Jump to content

[1.12.2] Forge isn't registering item model


Keheck

Recommended Posts

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
Link to comment
Share on other sites

  • 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.