Add NetheriteOnlyBlock and update block properties and tags

This commit is contained in:
IM23a-spirgif
2025-05-12 22:18:49 +02:00
parent bd18873afa
commit a6d9e81f53
3 changed files with 37 additions and 5 deletions
@@ -18,13 +18,13 @@ public class ModBlocks {
DeferredRegister.createBlocks(Stalinium.MODID);
public static final DeferredBlock<Block> COMPRESSED_BEDROCK = registerBlock("compressed_bedrock",
() -> new Block(BlockBehaviour.Properties.of()
() -> new NetheriteOnlyBlock(BlockBehaviour.Properties.of()
.strength(50f, 1200f)
.requiresCorrectToolForDrops()
.sound(SoundType.STONE)));
public static final DeferredBlock<Block> STALINIUM_ORE = registerBlock("stalinium_ore",
() -> new Block(BlockBehaviour.Properties.of()
() -> new NetheriteOnlyBlock(BlockBehaviour.Properties.of()
.strength(5f, 6f)
.requiresCorrectToolForDrops()
.sound(SoundType.NETHER_ORE)));
@@ -35,6 +35,8 @@ public class ModBlocks {
.requiresCorrectToolForDrops()
.sound(SoundType.NETHERITE_BLOCK)));
private static <T extends Block> DeferredBlock<T> registerBlock(String name, Supplier<T> block) {
DeferredBlock<T> toReturn = BLOCKS.register(name, block);
registerBlockItem(name, toReturn);