I can't figure out for the life of me why this isn't working as it was working fine a few months ago, but whenever I try to render a simple item I get the error "Model definition for location x#inventory not found"
Here's the class registering it
package com.bryceclark56.horticulture.Item;
import com.bryceclark56.horticulture.Reference.Reference;
import net.minecraft.client.Minecraft;
import net.minecraft.client.resources.model.ModelBakery;
import net.minecraft.client.resources.model.ModelResourceLocation;
import net.minecraft.item.Item;
import net.minecraftforge.fml.common.registry.GameRegistry;
public class Items
{
public static final FoodHorticulture lettuce = new FoodHorticulture(6, 2, false).setUnlocalizedName("lettuce");
public static void registerRenderer(Item item, String name)
{
ModelBakery.addVariantName(item, Reference.MOD_ID + ":" + name);
Minecraft.getMinecraft().getRenderItem().getItemModelMesher().register(item, 0, new ModelResourceLocation(Reference.MOD_ID + ":" + name, "inventory"));
}
public static void init()
{
GameRegistry.registerItem(lettuce, "lettuce");
}
public static void registerModels()
{
registerRenderer(lettuce, "lettuce");
}
}
And the JSON file.
{
"parent": "builtin/generated",
"textures": {
"layer0": "horticulture:items/lettuce"
},
"display": {
"thirdperson": {
"rotation": [ -90, 0, 0 ],
"translation": [ 0, 1, -3 ],
"scale": [ 0.55, 0.55, 0.55 ]
},
"firstperson": {
"rotation": [ 0, -135, 25 ],
"translation": [ 0, 4, 2 ],
"scale": [ 1.7, 1.7, 1.7 ]
}
}
}
Also worth noting that the renderer is only being registered on the client proxy so that's not the problem.