Posted January 29, 20214 yr I am able to create the wall block and it can connect to other blocks. My problem is they won't connect to themselves. The picture shows the problem. I also can't get the item to look correct. My code: Makes Wall Block public static final RegistryObject<WallBlock> WHITE_BRICK_WALL = register("white_brick_wall", () -> new WallBlock(AbstractBlock.Properties.create(Material.ROCK).hardnessAndResistance(2, 6).sound(SoundType.STONE))); Block State wallBlock(ModBlocks.WHITE_BRICK_WALL.get(), modLoc("block/white_bricks")); Item Model withExistingParent("white_bricks", modLoc("block/white_bricks")); Thanks for look at the problem
January 29, 20214 yr you add your block to the walls tag group. you can add the json by hand (under resources/data/minecraft/tags/blocks), but as it seems you're using data generators already, forge has a BlockTagsProvider which you can extend and override the method registerTags(). in there you can call the helper method getOrCreateBuilder(), and pass the tag group you want, should be under net.minecraft.tags.BlockTags. with the builder you can call add(), and pass a reference to your block (or blocks). for the item, you need the parent of the item model to be of the inventory model, not the block model. you're using withExistingParent() and calling the model that you're generating for the block. but that's not the model you want. minecraft should have a model under models/block for the wall_inventory (something like that, I know that for buttons it is models/block/button_inventory). then you can chain .texture(), and set the "texture" attribute to have the texture of your block. ps.: this kind of posts really should go under Modder Support, not Support & Bug Reports Edited January 29, 20214 yr by kiou.23
January 29, 20214 yr Author 31 minutes ago, kiou.23 said: you add your block to the walls tag group. you can add the json by hand (under resources/data/minecraft/tags/blocks), but as it seems you're using data generators already, forge has a BlockTagsProvider which you can extend and override the method registerTags(). in there you can call the helper method getOrCreateBuilder(), and pass the tag group you want, should be under net.minecraft.tags.BlockTags. with the builder you can call add(), and pass a reference to your block (or blocks). for the item, you need the parent of the item model to be of the inventory model, not the block model. you're using withExistingParent() and calling the model that you're generating for the block. but that's not the model you want. minecraft should have a model under models/block for the wall_inventory (something like that, I know that for buttons it is models/block/button_inventory). then you can chain .texture(), and set the "texture" attribute to have the texture of your block. ps.: this kind of posts really should go under Modder Support, not Support & Bug Reports Tysm! Whoops, I thought I posted it under Modder Support. Sorry about 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.