Jump to content

[Solved][1.8.9] ModelBakery.addVariantName is deprecated.


OrangeVillager61

Recommended Posts

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

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Announcements



×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.