Daeruin Posted August 1, 2022 Share Posted August 1, 2022 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? Quote Link to comment Share on other sites More sharing options...
Luis_ST Posted August 1, 2022 Share Posted August 1, 2022 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. 1 Quote Link to comment Share on other sites More sharing options...
Daeruin Posted August 3, 2022 Author Share Posted August 3, 2022 Thank you, that worked!. It took me a minute to figure out how to use an ExistingModelFile. For future readers, you can get one through models().getExistingFile and passing in the resource location of the block model. Quote Link to comment Share on other sites More sharing options...
Luis_ST Posted August 3, 2022 Share Posted August 3, 2022 You simply can create a new ExistingModelFile or UncheckedModelFile. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
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.