Piper McCorkle
Piper McCorkle

Reputation: 1084

Model renderer not working in Minecraft Forge

I'm attempting to create a Minecraft mod with Minecraft Forge for Minecraft 1.8 (recommended version), but the model renderer isn't working.

Image

CustomItem is rendering as a classic purple and black block.

Image

Inside public void init(FMLInitializationEvent event):

if (event.getSide() == Side.CLIENT) {
    RenderItem renderItem = Minecraft.getMinecraft().getRenderItem();

    renderItem.getItemModelMesher().register(ItemManager.customItem, 0, new ModelResourceLocation(this.MODID + ":" + ItemManager.customItem.name, "inventory"));
}

Upvotes: 0

Views: 1161

Answers (1)

Unihedron
Unihedron

Reputation: 11051

You may be encountering a problem specific to Eclipse where textures are not copied to the project's bin folder by default. According to the Minecraft Forge wiki, try:

  1. Make a folder in mcp/ named res, place your textures here under mods/[mod name]/textures. Edit: as of 1.6.1, the folder should be "assets" instead of "mods"
  2. Right click the project in the package explorer, select New > Folder
  3. Select Minecraft/lib as parent folder and Click the advanced button
  4. Select Link to alternate location and select the folder you created, create the link
  5. Right click the newly created link, select Build Path > Use as Source Folder

Upvotes: 2

Related Questions