Jump to content

[1.18.2] Block item data generation


Recommended Posts

I'm trying to use data generation to create blockstates and block models. I'm a little stuck on generating my block's item model. I'm trying to make it inherit from the block model, but the data generator seems to be assuming it should instead inherit from an item model. This essentially results in the item model inheriting from itself instead of from the corresponding block model.

Here's my BlockStateProvider and the resulting item model. What am I missing?

Link to comment
Share on other sites

You don't need to use itemModels there, you need to use a ModelFile of the Block.
You can use a ExistingModelFile or a UncheckedModelFile depends on whether the Block model has already been generated or not.
You can get the location for the ModelFile from #blockTexture.

  • Like 1
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.

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.


  • Create New...

Important Information

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