I am trying to code my first mod and everything is working but i can't get the game to register my item.
Here is the code plz Help.
package AlphaPlayz.Lava.init;
import AlphaPlayz.Lava.Reference;
import AlphaPlayz.Lava.items.ItemCheese;
import net.minecraft.client.Minecraft;
import net.minecraft.client.renderer.block.model.ModelResourceLocation;
import net.minecraft.item.Item;
import net.minecraftforge.fml.common.registry.GameRegistry;
public class ModItems {
public static Item cheese;
public static void init(){
cheese = new ItemCheese();
}
public static void register() {
ForgeRegistry.ITEMS.register(cheese);
}
public static void registerRenders(){
registerRender(cheese);
}
private static void registerRender(Item item){
Minecraft.getMinecraft().getRenderItem().getItemModelMesher().register(item, 0, new ModelResourceLocation(Reference.MOD_ID + ":" + item.getUnlocalizedName().substring(5), "inventory"));
}
}