Posted May 23, 20169 yr In 1.8.9 ModelBakery.addVariantName is deprecated. What are the alternatives to this and why did it became deprecated? Thanks. OrangeVillager61
May 23, 20169 yr Try to use ModelBakery.registerItemVariants(Item item, ModelResourceLocation location) instead of addVariantName You can see the example here.
May 23, 20169 yr Author The texture only works when placed, it doesn't work in the inventory. ModelResourceLocation emptyModel1 = new ModelResourceLocation("advanced_brine_filter" + "_empty", "inventory"); ModelResourceLocation full1Model1 = new ModelResourceLocation("advanced_brine_filter" + "_full", "inventory"); ModelBakery.registerItemVariants(Item.getItemFromBlock(MoDropsBlocks.advanced_brine_filter), emptyModel1, full1Model1); I get the following errors. Caused by: java.lang.RuntimeException: Encountered an exception when loading model definition of model minecraft:blockstates/advanced_brine_filter_empty.json at net.minecraft.client.resources.model.ModelBakery.getModelBlockDefinition(ModelBakery.java:165) ~[ModelBakery.class:?] at net.minecraftforge.client.model.ModelLoader.getModelBlockDefinition(ModelLoader.java:211) ~[ModelLoader.class:?] ... 22 more Caused by: java.io.FileNotFoundException: minecraft:blockstates/advanced_brine_filter_empty.json at net.minecraft.client.resources.FallbackResourceManager.getAllResources(FallbackResourceManager.java:93) ~[FallbackResourceManager.class:?] at net.minecraft.client.resources.SimpleReloadableResourceManager.getAllResources(SimpleReloadableResourceManager.java:78) ~[simpleReloadableResourceManager.class:?] at net.minecraft.client.resources.model.ModelBakery.getModelBlockDefinition(ModelBakery.java:143) ~[ModelBakery.class:?] at net.minecraftforge.client.model.ModelLoader.getModelBlockDefinition(ModelLoader.java:211) ~[ModelLoader.class:?] ... 22 more [16:37:39] [Client thread/ERROR] [FML]: Model definition for location minecraft:advanced_brine_filter_full#inventory not found [16:37:39] [Client thread/ERROR] [FML]: Model definition for location minecraft:advanced_brine_filter_empty#inventory not found
May 23, 20169 yr You didn't set the domain of your ModelResourceLocation s, so it defaulted to "minecraft" . 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.
May 23, 20169 yr Author You didn't set the domain of your ModelResourceLocation s, so it defaulted to "minecraft" . *facepalm* Thank you! Last question why was ModelBakery.addVariantName deprecated in the first place?
May 23, 20169 yr Thank you! Last question why was ModelBakery.addVariantName deprecated in the first place? It was deprecated in this commit to allow items to use models specified in blockstates files. 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.