Jump to content

Recommended Posts

Posted (edited)

For some reason, Forge doesn't register my item model. When it's "displayed" in the game, it shows the missing texture... texture. Here's the error message, if that helps

 

The item constructor:

public MobBallItem() 
{ 
  this.setMaxStackSize(1); 
  this.setUnlocalizedName("mob_ball"); 
  this.setRegistryName(new ResourceLocation(MobFighters.MODID, "mob_ball")); 
  Items.ITEMS.add(this); 
}

 

Model registry:

@SubscribeEvent
@SuppressWarnings("ConstantConditions")
@SideOnly(Side.CLIENT)
public static void registerModels(ModelRegistryEvent event)
{
    for(Item item : ITEMS) //I have a static import for ITEMS
    {
        ModelLoader.setCustomModelResourceLocation(item, 0, new ModelResourceLocation(item.getRegistryName(), "inventory"));
    }
}

 

Item registry:

@SubscribeEvent
public static void registerItems(RegistryEvent.Register<Item> registry)
{
    registry.getRegistry().register(Items.MOB_BALL);
    MobFighters.getLogger().info("Registered Items!");
}

 

Item model location: assets/<MODID>/models/items/mob_ball.json

Yes, I completely checked if this path is right

Edited by Keheck
Posted

1.12 is no longer supported on these forums due to age.

Please update to a modern version to receive support here.

 

More information on supported versions can be found in the LTS link at the top of every page.

  • Guest locked this topic
Guest
This topic is now closed to further replies.

Announcements



×
×
  • Create New...

Important Information

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