Posted March 20, 20214 yr simpleBlock(ModBlocks.SILVER_BLOCK.get()); is easy, created all faced block of the same texture. But..how do I do that with grass block that has custom properties { "parent": "block/grass_block", "textures": { "particle": "modid:block/dirt", "side": "modid:block/grass_side", "top": "modid:block/grass_block_top", "bottom": "modid:block/dirt", "overlay": "modid:block/grass_side" } }
March 20, 20214 yr I encourage you to look at the code for the BlockStateProvider class and the simpleBlock method, see the helper functions and what they call internally simpleBlock simply defines a model for a Block regardless of blockstate. so if it is a grass block that you want to make: it doesn't have a block state, you use the simpleBlock method if you only give the simpleBlock one parameter, a block, it generates a model with all faces with the same texture if that's not what you want tho, you can pass a custom model as the second parameter you can call models() to get the default BlockModelProvider, it has a bunch of methods for the common model files the one that you want is the BlockModelProvider#cubeBottomTop()
March 20, 20214 yr Author 12 minutes ago, kiou.23 said: I encourage you to look at the code for the BlockStateProvider class and the simpleBlock method, see the helper functions and what they call internally simpleBlock simply defines a model for a Block regardless of blockstate. so if it is a grass block that you want to make: it doesn't have a block state, you use the simpleBlock method if you only give the simpleBlock one parameter, a block, it generates a model with all faces with the same texture if that's not what you want tho, you can pass a custom model as the second parameter you can call models() to get the default BlockModelProvider, it has a bunch of methods for the common model files the one that you want is the BlockModelProvider#cubeBottomTop() Thanks! thats what I was missing, I found the cubebottomtop and didnt understand why it said I'm missing a model, I will try that
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.