Search code examples
texturesminecraftminecraft-forge

Minecraft Forge not registering texture


I am making a mod in 1.10.2 using the Refined Storage code, and adding a couple of AE2 core features. Right now I am working on cables. I tried to add an item, but it comes out looking like this: 1st person picture 3rd person picture The item's model file is being registered, and I know that, because when I rename it, it gives an error, and when I have it the correct name, it doesn't. The model file looks like this:

{
   "parent": "item/generated",
  "textures": {
    "layer0": "infinitystorage:items/network_card"
  }
}

I have the picture in the assets/infinitystorage/textures/items. I know it should work, because there are a lot of other items that have working textures. My item class looks like this:

public class ItemNetworkTool extends ItemBase {
    public ItemNetworkTool() {
        super("network_tool");

        //setRegistryName(InfinityStorage.ID, "network_tool");
        setMaxStackSize(1);
     }

The ItemBase class constructor looks like this:

public ItemBase(String name) {
    this.name = name;

    setRegistryName(InfinityStorage.ID, name);
    setCreativeTab(InfinityStorage.INSTANCE.tab);
}

@Override
public String getUnlocalizedName() {
    return "item." + InfinityStorage.ID + ":" + name;
}

I have no clue what to do. My source code is over here: link, if you need it. Thank you.


Solution

  • I have it fixed. What I was missing what the model in my ClientProxy file. I added the following line to fix the issue:

    ModelLoader.setCustomModelResourceLocation(InfinityStorageItems.NETWORK_TOOL, 0, new ModelResourceLocation("infinitystorage:network_tool", "inventory"));