Jump to content

block moddel in gui missing


loordgek
 Share

Recommended Posts

I assume by "in GUI" you mean the ItemBlock doesn't have a model? That will be because the ItemBlock model is defined by the "inventory" variant in a blockstates file. Your "inventory" variant is empty, and you have no default model set, so there is nothing for the item to refer to.

 

Edit: Actually I didn't realise you do have an item model file (which takes precedence over the blockstates "inventory"  variant, making it unnecessary in your file). What do you expect your item to look like when the only information in your model is this?

{
  "parent": "block/cube_all"
}

The log even contains a hint:

[20:06:06] [Client thread/WARN]: Unable to resolve texture due to upward reference: #all in minecraft:models/block/cube_all

It's looking for a texture definition #all, but you haven't given one. You've just told it to be a cube with no information about textures.

Edited by Jay Avery
Link to comment
Share on other sites

Yes, you need a model for every ItemBlock. But there are easy ways of doing it if it has the same model as the block itself. If you use an item model file, set the parent to the block model itself, then you don't have to set the textures in the item model because the block already has them. Or if you use the forge blockstates format, you can define the ItemBlock model using the "inventory" variant (or the defaults, as long as you still include an inventory variant).

Link to comment
Share on other sites

21 hours ago, Jay Avery said:

Or if you use the forge blockstates format, you can define the ItemBlock model using the "inventory" variant (or the defaults, as long as you still include an inventory variant).

and how does that work ?

Link to comment
Share on other sites

55 minutes ago, loordgek said:

and how does that work ?

You specify a model in the "inventory" variant of the block's blockstates file, and it will automatically be used for the ItemBlock's model if there isn't one in the item folder.

Edited by Jay Avery
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
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.

 Share



×
×
  • Create New...

Important Information

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