Hello!
I'm trying to create a new simply Item, I got it but I couldn't set the texture.
In my mod
@Mod(modid = ExampleMod.MODID, name = "examplemod", version = ExampleMod.VERSION)
public class ExampleMod
{
public static final String MODID = "examplemod";
public static final String VERSION = "1.0";
I register the new item:
Item test_item = new Item();
test_item.setUnlocalizedName("test_item");
GameRegistry.registerItem(test_item, "test_item");
Then I register the render model item:
Minecraft.getMinecraft().getRenderItem().getItemModelMesher().register(test_item, 0, new ModelResourceLocation("examplemod:test_item"));
And finally that's my files' structure for resources:
src/main/resources/assets/examplemod/models/item/test_item.json
src/main/resources/assets/examplemod/textures/items/test_item.png
When that's content for test_item.json
{
"parent": "builtin/generated",
"textures": {
"layer0": "examplemod:items/test_item"
},
"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 ]
}
}
}
I have copy json and png from minecraft package in forge, using the apple model(json & png).
When I launch the game, I can get my Item but it hasn't texture, purple and black you know.
No errors are shown, but if I change test_item.json.textures.layer0 to another route, It shows an not found image error.
So, json it's ok because else would show an error, and it doesn't.
Where can be the error?
Thanks for help. I will pay attention for help .