Jump to content

Question about Items & Variants


fr0st

Recommended Posts

Hi.

 

After playing a bit with the new JSON systems introduced in 1.8, I have been wondering..

Since a BlockState JSON file can be used (with the forge syntax) to reduce a lot the number of useless and redundant Block Model files, can something similar be done with items? Is there a way to use BlockState files for items, or to dynamically define the texture of an item, using one simple model, just editing some texture values for each variant the item has?

 

Thanks to anyone who can provide any information about this.

I try my best, so apologies if I said something obviously stupid!

Link to comment
Share on other sites

Not if you rely on the "generated" item model. That depends on the texture itself, where each pixel is made into a cube.

Which would be pain to make into fixed json model.

But if your item model is already fixed, then yes, you can do the same architecture of json files as the blocks do.

Link to comment
Share on other sites

Yes, Items can have a blockstate file. Just omit the normal item model and create a blockstate json for it like you would normally. The only "drawback" is that the model files now have to go into the block folder as well.

This is from memory, not sure if this 100% accurate.

 

So all I have to do is create the blockstate json and place the model files in

models/block

?

And what do you mean by "normal" item model?

 

I will post my attempt later, thank you guys.

 

Edit: I am working on it (currently rewriting my model registry), and I just realized that I should have told you I'm working with 1.8, not 1.8.9, if that makes any difference.

I try my best, so apologies if I said something obviously stupid!

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.