Jump to content

Render model from JSON


AlexInCube

Recommended Posts

I want to get the model out of the json file and render it, I could do a single block for each part of the model, but that's not comfortable.

private ModelResourceLocation modellocation = new ModelResourceLocation("allyouneed:splinklertop","inventory");
    private IBakedModel model = Minecraft.getInstance().getModelManager().getModel(modellocation).getBakedModel();

I kind of figured out how to get it, but how to render it? 

Link to comment
Share on other sites

54 minutes ago, AlexInCube said:

I kind of figured out how to get it

obviously not

 

check out:

net.minecraftforge.client.model.ModelLoader#addSpecialModel

net.minecraft.client.renderer.model.ModelManager#getModel

 I will make fun of you if you are not able to look into the (vanilla-) code.

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.