GeorgeTsak Posted August 5, 2017 Posted August 5, 2017 (edited) I used an OBJ model in my mod to render a block. While it renders ok, I can't get it to render when being hold or when in inventory. I have tried registering it in many ways but it still doesn't work. The item in hand appears as purple/black cube and in inventory as a 2d purple/black texture. (There is no error in console): ModelLoader.setCustomModelResourceLocation(ItemSnail, 0, new ModelResourceLocation(ItemSnail.getRegistryName().toString()+".obj", "inventory")); ModelLoader.setCustomModelResourceLocation(ItemSnail, 0, new ModelResourceLocation(ItemSnail.getRegistryName().toString()+".obj")); ModelLoader.setCustomModelResourceLocation(ItemSnail, 0, new ModelResourceLocation(ItemSnail.getRegistryName().toString()+".obj", "normal")); ModelLoader.setCustomModelResourceLocation(ItemSnail, 0, new ModelResourceLocation(ItemSnail.getRegistryName().toString(), "inventory")); ModelLoader.setCustomModelResourceLocation(ItemSnail, 0, new ModelResourceLocation(ItemSnail.getRegistryName().toString())); ModelLoader.setCustomModelResourceLocation(ItemSnail, 0, new ModelResourceLocation(ItemSnail.getRegistryName().toString(), "normal")); (I am not into blockstates that much) Here is my JSON file in blockstates: Spoiler { "forge_marker": 1, "defaults": { "textures": {"#sn": "mymodname:entity/other/snail"}, "model": "mymodname:snail.obj" }, "variants": { "normal": [{}], "inventory": [{ "transform": { "thirdperson": { "translation": [0, 0.09375, -0.171875], "rotation": [ { "y": -45}, {"x": 0}, {"z": 170} ], "scale": 0.375 }, "gui": { "rotation": [ {"y": 90} ] } } }], "facing": { "down": { "model": "mymodname:snail.obj"}, "up": { "model": "mymodname:snail.obj"}, "north": { "model": "mymodnamet:snail.obj", "y": -180}, "south": { "model": "mymodname:snail.obj", "y": 0}, "west": { "model": "mymodname:snail.obj", "y": 90}, "east": { "model": "mymodname:snail.obj", "y": 270} } } } What am I doing wrong? Edited August 5, 2017 by GeorgeTsak Added some info Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.