I have all the registering and stuffs for my custom bow (and arrow), but I'm stuck as I'm not sure what I should add in the arguments of ModelBakery#registerItemVariants.
The arguments of ModelBakery.registerItemVariants should be ResourceLocations or ModelResourceLocations pointing to the models you want loaded. Each location can either be an item model (<domain>:models/item/<path>.json) or a blockstates file (<domain>:blockstates/<path>.json, <variant> variant).
You can see how I register the models for my mod's bows in 1.8.9 here.
In 1.9, Item#getModel has been replaced by overrides specified in the model itself (see the wiki page for more details). You only need to register the base model, the overrides will be automatically loaded.
Chisel Facades: For all your decorative pipe-hiding needs.
Please don't PM me to ask for help or to join your mod development team. Asking your question in a public thread preserves it for people who are having the same problem in the future. I'm not interested in developing mods with people.
Each call to ModelBakery.registerItemVariants can register any number of models. You can register one model per call or register all of them at once.
Rollback Post to RevisionRollBack
Chisel Facades: For all your decorative pipe-hiding needs.
Please don't PM me to ask for help or to join your mod development team. Asking your question in a public thread preserves it for people who are having the same problem in the future. I'm not interested in developing mods with people.
I've added what your code but it's giving out errors on the console, link for them here. My Items#main is in the preInit() method of my main class while my Items#registerRenders is in my init() method of my ClientProxy class. I edited my error report such that it will display only the error portion and not the processes and startups
The ModelResourceLocations you're passing to ModelBakery.registerItemVariants are completely wrong. For the paths in my previous post, only the parts inside the <angle brackets> need to be specified in your ModelResourceLocations.
new ModelResourceLocation("hpm:cwarrow_greenarrow_bow", "inventory") will load either the assets/hpm/models/item/cwarrow_greenarrow_bow.json item model or the inventory variant of the assets/hpm/blockstates/cwarrow_greenarrow_bow.json blockstates file.
You should be using ModelLoader.setCustomModelResourceLocation/setCustomMeshDefinition in preInit rather than ItemModelMesher#register in init.
Never use .getUnlocalizedName().substring(5) anywhere in your code. Unlocalised names should only be used for translation, nothing else.
The default model loaded for every Item is the one with its registry name (Item#getRegistryName), you should use this as the default ModelResourceLocation.
Chisel Facades: For all your decorative pipe-hiding needs.
Please don't PM me to ask for help or to join your mod development team. Asking your question in a public thread preserves it for people who are having the same problem in the future. I'm not interested in developing mods with people.
I have all the registering and stuffs for my custom bow (and arrow), but I'm stuck as I'm not sure what I should add in the arguments of ModelBakery#registerItemVariants.
Do I type in the same thing as ModelBakery#addVariantName from 1.8 before it was deprecated?
The arguments of ModelBakery.registerItemVariants should be ResourceLocations or ModelResourceLocations pointing to the models you want loaded. Each location can either be an item model (<domain>:models/item/<path>.json) or a blockstates file (<domain>:blockstates/<path>.json, <variant> variant).
You can see how I register the models for my mod's bows in 1.8.9 here.
In 1.9, Item#getModel has been replaced by overrides specified in the model itself (see the wiki page for more details). You only need to register the base model, the overrides will be automatically loaded.
Chisel Facades: For all your decorative pipe-hiding needs.
Please don't PM me to ask for help or to join your mod development team. Asking your question in a public thread preserves it for people who are having the same problem in the future. I'm not interested in developing mods with people.
I have to do "normal", "pulling_0", "pulling_1", "pulling_2" individually?
One variant to one statement? 4 statements in total?
Each call to ModelBakery.registerItemVariants can register any number of models. You can register one model per call or register all of them at once.
Chisel Facades: For all your decorative pipe-hiding needs.
Please don't PM me to ask for help or to join your mod development team. Asking your question in a public thread preserves it for people who are having the same problem in the future. I'm not interested in developing mods with people.
I've added what your code but it's giving out errors on the console, link for them here. My Items#main is in the preInit() method of my main class while my Items#registerRenders is in my init() method of my ClientProxy class. I edited my error report such that it will display only the error portion and not the processes and startups
The ModelResourceLocations you're passing to ModelBakery.registerItemVariants are completely wrong. For the paths in my previous post, only the parts inside the <angle brackets> need to be specified in your ModelResourceLocations.
new ModelResourceLocation("hpm:cwarrow_greenarrow_bow", "inventory") will load either the assets/hpm/models/item/cwarrow_greenarrow_bow.json item model or the inventory variant of the assets/hpm/blockstates/cwarrow_greenarrow_bow.json blockstates file.
You should be using ModelLoader.setCustomModelResourceLocation/setCustomMeshDefinition in preInit rather than ItemModelMesher#register in init.
Never use .getUnlocalizedName().substring(5) anywhere in your code. Unlocalised names should only be used for translation, nothing else.
The default model loaded for every Item is the one with its registry name (Item#getRegistryName), you should use this as the default ModelResourceLocation.
Chisel Facades: For all your decorative pipe-hiding needs.
Please don't PM me to ask for help or to join your mod development team. Asking your question in a public thread preserves it for people who are having the same problem in the future. I'm not interested in developing mods with people.