Posted May 31, 20169 yr I'm trying to load my custom item model (located at <resourcepack>/assets/tesitems/models/item/iron_sword.json), I am using resource pack for fast reloading, but it doesn't work. I don't see any exceptions, so I think model is getting loaded. Here is model code: { "parent": "tesitems:item/handheld", "textures": { "layer0": "tesitems:items/iron_sword" }, "display": { "thirdperson": { "rotation": [ 0, 90, -35 ], "translation": [ 0, 1.25, -3.5 ], "scale": [ 0.85, 0.85, 0.85 ] }, "firstperson": { "rotation": [ 0, -135, 25 ], "translation": [ 0, 4, 2 ], "scale": [ 1.7, 1.7, 1.7 ] } } } , handheld (in the same folder): { "parent": "builtin/generated", "display": { "thirdperson_righthand": { "rotation": [ 0, 90, -35 ], "translation": [ 0, 1.25, -3.5 ], "scale": [ 0.85, 0.85, 0.85 ] }, "firstperson_righthand": { "rotation": [ 0, -135, 25 ], "translation": [ 0, 4, 2 ], "scale": [ 1.7, 1.7, 1.7 ] }, "thirdperson_lefthand": { "rotation": [ 0, 90, -35 ], "translation": [ 0, 1.25, -3.5 ], "scale": [ 0.85, 0.85, 0.85 ] }, "firstperson_lefthand": { "rotation": [ 0, -135, 25 ], "translation": [ 0, 4, 2 ], "scale": [ 1.7, 1.7, 1.7 ] } } } , registering: private static void registerWeapon(Weapon weapon, String name) { weapon.setRegistryName(name); weapon.setUnlocalizedName(name); GameRegistry.register(weapon); } , Weapon extends ItemSword. Texture is in <resourcepack>/assets/tesitems/textures/items/. What had I missed?
May 31, 20169 yr Mods are already resource packs, you can build your project in your IDE and then reload resources in-game any time you add/change a resource. There are no thirdperson or firstperson display transformations in 1.9+ (they were split into left/right hand), so your iron_sword model is using the transformations specified by your handheld model. Minecraft will automatically load a model for each Item , but it won't actually use that model unless you tell it to by calling ModelLoader.setCustomModelResourceLocation / setCustomMeshDefinition in preInit (only on the client side). If that's not the issue, upload your FML log (logs/fml-client-latest.log) to Gist and link it here. It should tell you what went wrong. Please don't PM me to ask for help. Asking your question in a public thread preserves it for people who are having the same problem in the future.
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.