Jump to content
View in the app

A better way to browse. Learn more.

Forge Forums

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Featured Replies

Posted

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

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

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

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

Important Information

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

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.