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

[1.17.1] Stair Block Properties isn't working correctly


Zevinn
 Share

Recommended Posts

So, for some reason, IntelliJ isn't able to resolve the constructer. I really need some help with the properties.

public static final RegistryObject<Block> GRIMSTONESTAIRS= BLOCKS.register("grimstone_bricks_stairs",() -> new StairBlock(BlockBehaviour.Properties.of(Material.HEAVY_METAL).strength(1.5f,0.5f).sound(SoundType.DEEPSLATE)));

 

Link to comment
Share on other sites

Well, if you mean this, it doesn't work either.

public static final RegistryObject<Block> GRIMSTONESTAIRS= BLOCKS.register("grimstone_bricks_stairs",() -> new StairBlock(GRIMSTONEBRICK.get(), BlockBehaviour.Properties.of(Material.HEAVY_METAL).strength(1.5f,0.5f).sound(SoundType.DEEPSLATE)));

 

Link to comment
Share on other sites

You have to add .defaultBlockState and COPY the block. Here an example:

public static final RegistryObject<Block> CUSTOM_STAIRS = BLOCKS.register("custom_stairs", () ->
            new StairBlock(CUSTOM_PLANKS.get().defaultBlockState(), BlockBehaviour.Properties.copy(MANGROVE_PLANKS.get()).strength(0.3F, 0.3F))
    );
Edited by ZainJx
Link to comment
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.
Note: Your post will require moderator approval before it will be visible.

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.

 Share



×
×
  • Create New...

Important Information

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