I'm using Forge / Eclipse / Minecraft 1.5.2. My basic block is working, except that instead of using texture file I provided, it's displaying a white texture with the words "missing texture".
Here's my block class:
public class GenericBlock extends Block {
protected Icon blockIcon;
public GenericBlock (int id, Material material) {
super(id, material);
this.setCreativeTab(CreativeTabs.tabBlock);
System.out.println("+++++++++GenericBlock constructor[" + id + "," + material + "]");
}
public void registerIcons(IconRegister iconRegister)
{
blockIcon = iconRegister.registerIcon("Generic:genericdirt");
System.out.println("++++++++++++++block icon registered: " + blockIcon.getIconName());
}
}
I know it can find the file, because when I try a bogus file (e.g. Generic:blahblah) I get an error.
I'm running this in Eclipse, and the texture file is located in forge\mcp\eclipse\Minecraft\bin\mods\Generic\textures\blocks\genericdirt.png
I'm using Forge / Eclipse / Minecraft 1.5.2. My basic block is working, except that instead of using texture file I provided, it's displaying a white texture with the words "missing texture".
Here's my block class:
I know it can find the file, because when I try a bogus file (e.g. Generic:blahblah) I get an error.
I'm running this in Eclipse, and the texture file is located in forge\mcp\eclipse\Minecraft\bin\mods\Generic\textures\blocks\genericdirt.png
Help?
The Block class already has this variable and your one might be overiding the one created in the Block class.
HA!!! That did it! What a Java rookie mistake. I've been developing in Java for 15 years -- I should know better. Thanks.