Jump to content

Texture File Not Working...


Izar

Recommended Posts

Hello I'm new to modding and I need help trying to figure out why my texture file won't work.

Eclipse doesn't display any errors when I run Minecraft but all I get is the "Missing Texture" icon

 

Here is a sample of my code:

It's going to be a bedrock mod

 

 

package com.minecraft.bedrockmod;

 

import cpw.mods.fml.common.Mod;

import cpw.mods.fml.common.Mod.EventHandler;

import cpw.mods.fml.common.event.FMLInitializationEvent;

import cpw.mods.fml.common.event.FMLPreInitializationEvent;

import cpw.mods.fml.common.registry.GameRegistry;

import net.minecraft.block.Block;

import net.minecraft.creativetab.CreativeTabs;

import net.minecraft.init.Items;

import net.minecraft.item.Item;

 

@Mod(modid = BedrockPiece.modid, version = BedrockPiece.version)

 

public class BedrockPiece {

 

public static final String modid = "BedrockPiece";

public static final String version = "1.0";

 

public static Item BedrockPiece;

 

 

@EventHandler

public void init(FMLPreInitializationEvent event){

 

BedrockPiece = new Item().setUnlocalizedName("BedrockPiece").setCreativeTab(CreativeTabs.tabMaterials).setTextureName(modid + ":" + "bedrockpiece");

GameRegistry.registerItem(BedrockPiece, "BedrockPiece");

 

}

 

@EventHandler

public void init(FMLInitializationEvent event){

 

}

 

}

 

I would appreciate any help...

Thanks

Fellow Minecrafter & Modder

Link to comment
Share on other sites

1. Use spoiler tags for code

2. Please actually try googling before posting here.. there are plenty of tutorials on how to do this.

Heres what you've done wrong(so you know)

 

1. Do not declare BedrockPiece as Item(). Make your own class.

2. You have not included @SideOnly(Side.CLIENT) in your code anywhere. This goes in your own class you made above

3. You have 2 public void init's, why?

4. You have not set the ItemID.

 

Really... what do you expect. Code doesn't go "oh I guess he'll want a texture for this... lets try and find it". You need to tell it exactly what do to. Where in your code do you think you've told it to load a texture?

 

 

Link to comment
Share on other sites

Where would I put @SideOnly?

 

And where would I set the Item ID

 

What do you mean make my own class?

 

Again, I'm new to modding

 

Also, I have followed other tutorials and am doing the exact same thing

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Announcements



×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.