Jump to content

Your json file for an item with a meta date


bi3sad23

Recommended Posts

Good afternoon, the renderer does not take into account its name json file. But if you use registry name, then everything works fine. Here are examples, the first works the second is not.

1:

public void renderItemMeta(Item item, int meta, String file) {
        Minecraft.getMinecraft().getRenderItem().getItemModelMesher().register(item, meta, new ModelResourceLocation(item.getRegistryName(), "inventory"));
    }

2:

public void renderItemMeta(Item item, int meta, String file) {
        Minecraft.getMinecraft().getRenderItem().getItemModelMesher().register(item, meta, new ModelResourceLocation("uilmod:" + file, "inventory"));
    }

 

Link to comment
Share on other sites

Thank you! That was the problem. But I still do not understand why ItemModelMesher does not allow me to use my json file. After all, in the filename of the file, he took the registration name and then it worked. But when I pointed out my file name, he was not.

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.