Edit: For a solution to this problem, look at TGG's post at the bottom of this thread.
I'm sure you all will figure out the problem in seconds, but I haven't been able to find a working solution yet. I'm just starting out and learning how to mod, and I'm working through the basic tutorials on the wiki. No matter what I do, I'm getting the "using missing texture: unable to load" error for my textures.
Folder hierarchy:
forge/mcp/src
assets
generic
textures
blocks
genericblock.png
genericore.png
items
genericitem.png
genericingot.png
tutorial
generic
Generic.java
GenericBlock.java
(etc)
assets - figured I'd try it here for kicks
generic
textures
(same as before)
Relevant lines in files. I'm leaving out a lot of lines for brevity, but I assure you that the full versions all compile. Most of this code is taken from the Icons and Textures tutorial, with some bits and pieces taken from other guides.
Generic.java:
@Mod(modid=Generic.modid, name="Generic", version="0.0.0")
public class Generic {
public static final String modid = "generic";
public static Item genericItem;
@EventHandler
public void preInit(FMLPreInitializationEvent event) {
genericItem = new GenericItem(500);
}
}
GenericItem.java:
public class GenericItem extends Item {
public GenericItem(int id) {
super(id);
setUnlocalizedName("genericitem");
String s = Generic.modid + ":" + (this.getUnlocalizedName().substring(5));
setTextureName(s);
}
}
I've tried the Wuppy way of going through the IconRegister, this way of using a ResourceLocation object, and setting setTextureName in the constructor (and in the main mod file) as I'm doing here. No dice! Help me, Obi Wan Kenobi, you're my only hope.
(Note: if in fact I solve this problem before anyone's able to reply, I'll post the problem/solution and hopefully anyone googling in the future will find it.)