Jump to content
Search In
  • More options...
Find results that contain...
Find results in...

Recommended Posts

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 :)

 

 

Minecraft_ 1.16.5 - Singleplayer 2021-01-28 18_07_55.png

Link to post
Share on other sites

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 by kiou.23
  • Like 1
Link to post
Share on other sites
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...

Link to post
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.

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.



×
×
  • Create New...

Important Information

By using this site, you agree to our Privacy Policy.