Hi guys,
I'm having problem rendering blocks on inventory. If I place the block, the rendering is good, it's only on my inventory. There is nothing suspect in logs.
I'm overriding BlockOre and using a "setTexture" method to register the block :
public BlockOre setTexture(String texture)
{
setUnlocalizedName(texture);
Minecraft.getMinecraft().getRenderItem().getItemModelMesher().register(Item.getItemFromBlock(this), 0, new ModelResourceLocation(MyMod.MODID + ":" + texture, "inventory"));
GameRegistry.registerBlock(this, texture);
return this;
}
on FMInitializationEvent I do :
rubyOre = new IronBlockOre().setTexture("ruby_ore").setHardness(3.0F).setResistance(5.0F).setStepSound(Block.soundTypePiston);
and here are jsons files :
src/main/resources/assets/my_modid/models/block/ruby_ore.json :
{
"parent": "block/cube_all",
"textures": {
"all": "my_modid:blocks/ruby_ore"
}
}
src/main/resources/assets/my_modid/models/item/ruby_ore.json :
{
"parent": "my_modid:block/ruby_ore",
"display": {
"thirdperson": {
"rotation": [ 10, -45, 170 ],
"translation": [ 0, 1.5, -2.75 ],
"scale": [ 0.375, 0.375, 0.375 ]
}
}
}
src/main/resources/assets/my_modid/blockstates/ruby_ore.json :
{
"variants": {
"normal": { "model": "my_modid:ruby_ore" }
}
}
the texture is at src/main/resources/assets/my_modid/textures/blocks/ruby_ore.png
What am i doing wrong ?
Thanks you for your help.