diff --git a/src/main/java/com/atsuishio/superbwarfare/block/BarbedWireBlock.java b/src/main/java/com/atsuishio/superbwarfare/block/BarbedWireBlock.java index 8a48a1f43..235e2e299 100644 --- a/src/main/java/com/atsuishio/superbwarfare/block/BarbedWireBlock.java +++ b/src/main/java/com/atsuishio/superbwarfare/block/BarbedWireBlock.java @@ -33,6 +33,7 @@ import java.util.List; @SuppressWarnings("deprecation") public class BarbedWireBlock extends Block { + public static final BooleanProperty WATERLOGGED = BlockStateProperties.WATERLOGGED; public static final DirectionProperty FACING = HorizontalDirectionalBlock.FACING; diff --git a/src/main/java/com/atsuishio/superbwarfare/block/CementedCarbideBlock.java b/src/main/java/com/atsuishio/superbwarfare/block/CementedCarbideBlock.java deleted file mode 100644 index feace1aa1..000000000 --- a/src/main/java/com/atsuishio/superbwarfare/block/CementedCarbideBlock.java +++ /dev/null @@ -1,11 +0,0 @@ -package com.atsuishio.superbwarfare.block; - -import net.minecraft.world.level.block.Block; -import net.minecraft.world.level.block.SoundType; -import net.minecraft.world.level.block.state.properties.NoteBlockInstrument; - -public class CementedCarbideBlock extends Block { - public CementedCarbideBlock() { - super(Properties.of().instrument(NoteBlockInstrument.BASEDRUM).sound(SoundType.METAL).strength(5f, 6f).requiresCorrectToolForDrops()); - } -} diff --git a/src/main/java/com/atsuishio/superbwarfare/block/DeepslateGalenaOreBlock.java b/src/main/java/com/atsuishio/superbwarfare/block/DeepslateGalenaOreBlock.java deleted file mode 100644 index 266732837..000000000 --- a/src/main/java/com/atsuishio/superbwarfare/block/DeepslateGalenaOreBlock.java +++ /dev/null @@ -1,12 +0,0 @@ -package com.atsuishio.superbwarfare.block; - -import net.minecraft.world.level.block.Block; -import net.minecraft.world.level.block.SoundType; -import net.minecraft.world.level.block.state.BlockBehaviour; -import net.minecraft.world.level.block.state.properties.NoteBlockInstrument; - -public class DeepslateGalenaOreBlock extends Block { - public DeepslateGalenaOreBlock() { - super(BlockBehaviour.Properties.of().instrument(NoteBlockInstrument.BASEDRUM).sound(SoundType.STONE).strength(3f, 8f).requiresCorrectToolForDrops()); - } -} diff --git a/src/main/java/com/atsuishio/superbwarfare/block/DeepslateScheeliteOreBlock.java b/src/main/java/com/atsuishio/superbwarfare/block/DeepslateScheeliteOreBlock.java deleted file mode 100644 index 519450121..000000000 --- a/src/main/java/com/atsuishio/superbwarfare/block/DeepslateScheeliteOreBlock.java +++ /dev/null @@ -1,12 +0,0 @@ -package com.atsuishio.superbwarfare.block; - -import net.minecraft.world.level.block.Block; -import net.minecraft.world.level.block.SoundType; -import net.minecraft.world.level.block.state.BlockBehaviour; -import net.minecraft.world.level.block.state.properties.NoteBlockInstrument; - -public class DeepslateScheeliteOreBlock extends Block { - public DeepslateScheeliteOreBlock() { - super(BlockBehaviour.Properties.of().instrument(NoteBlockInstrument.BASEDRUM).sound(SoundType.STONE).strength(3f, 8f).requiresCorrectToolForDrops()); - } -} diff --git a/src/main/java/com/atsuishio/superbwarfare/block/DeepslateSilverOreBlock.java b/src/main/java/com/atsuishio/superbwarfare/block/DeepslateSilverOreBlock.java deleted file mode 100644 index 03384bf05..000000000 --- a/src/main/java/com/atsuishio/superbwarfare/block/DeepslateSilverOreBlock.java +++ /dev/null @@ -1,11 +0,0 @@ -package com.atsuishio.superbwarfare.block; - -import net.minecraft.world.level.block.Block; -import net.minecraft.world.level.block.SoundType; -import net.minecraft.world.level.block.state.properties.NoteBlockInstrument; - -public class DeepslateSilverOreBlock extends Block { - public DeepslateSilverOreBlock() { - super(Properties.of().instrument(NoteBlockInstrument.BASEDRUM).sound(SoundType.STONE).strength(3f, 8f).requiresCorrectToolForDrops()); - } -} diff --git a/src/main/java/com/atsuishio/superbwarfare/block/DragonTeethBlock.java b/src/main/java/com/atsuishio/superbwarfare/block/DragonTeethBlock.java index cbf62a082..8bbda3b52 100644 --- a/src/main/java/com/atsuishio/superbwarfare/block/DragonTeethBlock.java +++ b/src/main/java/com/atsuishio/superbwarfare/block/DragonTeethBlock.java @@ -24,11 +24,12 @@ import net.minecraft.world.phys.shapes.VoxelShape; @SuppressWarnings("deprecation") public class DragonTeethBlock extends Block { + public static final BooleanProperty WATERLOGGED = BlockStateProperties.WATERLOGGED; + public DragonTeethBlock() { super(BlockBehaviour.Properties.of().instrument(NoteBlockInstrument.BASEDRUM).sound(SoundType.STONE).strength(25f, 500f).requiresCorrectToolForDrops().pushReaction(PushReaction.BLOCK).noOcclusion().isRedstoneConductor((bs, br, bp) -> false)); this.registerDefaultState(this.stateDefinition.any().setValue(WATERLOGGED, false)); - } @Override @@ -79,6 +80,5 @@ public class DragonTeethBlock extends Block { } return super.updateShape(state, facing, facingState, world, currentPos, facingPos); } - } diff --git a/src/main/java/com/atsuishio/superbwarfare/block/GalenaOreBlock.java b/src/main/java/com/atsuishio/superbwarfare/block/GalenaOreBlock.java deleted file mode 100644 index d3c2d03af..000000000 --- a/src/main/java/com/atsuishio/superbwarfare/block/GalenaOreBlock.java +++ /dev/null @@ -1,12 +0,0 @@ -package com.atsuishio.superbwarfare.block; - -import net.minecraft.world.level.block.Block; -import net.minecraft.world.level.block.SoundType; -import net.minecraft.world.level.block.state.BlockBehaviour; -import net.minecraft.world.level.block.state.properties.NoteBlockInstrument; - -public class GalenaOreBlock extends Block { - public GalenaOreBlock() { - super(BlockBehaviour.Properties.of().instrument(NoteBlockInstrument.BASEDRUM).sound(SoundType.STONE).strength(3f, 5f).requiresCorrectToolForDrops()); - } -} diff --git a/src/main/java/com/atsuishio/superbwarfare/block/JumpPadBlock.java b/src/main/java/com/atsuishio/superbwarfare/block/JumpPadBlock.java index 96711e53e..8d2160395 100644 --- a/src/main/java/com/atsuishio/superbwarfare/block/JumpPadBlock.java +++ b/src/main/java/com/atsuishio/superbwarfare/block/JumpPadBlock.java @@ -29,6 +29,7 @@ import net.minecraft.world.phys.shapes.VoxelShape; @SuppressWarnings("deprecation") public class JumpPadBlock extends Block { + public static final BooleanProperty WATERLOGGED = BlockStateProperties.WATERLOGGED; public static final DirectionProperty FACING = HorizontalDirectionalBlock.FACING; diff --git a/src/main/java/com/atsuishio/superbwarfare/block/LeadBlock.java b/src/main/java/com/atsuishio/superbwarfare/block/LeadBlock.java deleted file mode 100644 index 9ac516c17..000000000 --- a/src/main/java/com/atsuishio/superbwarfare/block/LeadBlock.java +++ /dev/null @@ -1,11 +0,0 @@ -package com.atsuishio.superbwarfare.block; - -import net.minecraft.world.level.block.Block; -import net.minecraft.world.level.block.SoundType; -import net.minecraft.world.level.block.state.properties.NoteBlockInstrument; - -public class LeadBlock extends Block { - public LeadBlock() { - super(Properties.of().instrument(NoteBlockInstrument.BASEDRUM).sound(SoundType.METAL).strength(5f, 6f).requiresCorrectToolForDrops()); - } -} diff --git a/src/main/java/com/atsuishio/superbwarfare/block/ReforgingTableBlock.java b/src/main/java/com/atsuishio/superbwarfare/block/ReforgingTableBlock.java index d1fa13894..7f8b4a123 100644 --- a/src/main/java/com/atsuishio/superbwarfare/block/ReforgingTableBlock.java +++ b/src/main/java/com/atsuishio/superbwarfare/block/ReforgingTableBlock.java @@ -122,5 +122,4 @@ public class ReforgingTableBlock extends Block { return new SimpleMenuProvider((i, inventory, player) -> new ReforgingTableMenu(i, inventory, ContainerLevelAccess.create(pLevel, pPos)), CONTAINER_TITLE); } - } diff --git a/src/main/java/com/atsuishio/superbwarfare/block/SandbagBlock.java b/src/main/java/com/atsuishio/superbwarfare/block/SandbagBlock.java deleted file mode 100644 index 9c7c66f9c..000000000 --- a/src/main/java/com/atsuishio/superbwarfare/block/SandbagBlock.java +++ /dev/null @@ -1,12 +0,0 @@ -package com.atsuishio.superbwarfare.block; - -import net.minecraft.world.level.block.Block; -import net.minecraft.world.level.block.SoundType; -import net.minecraft.world.level.block.state.BlockBehaviour; -import net.minecraft.world.level.block.state.properties.NoteBlockInstrument; - -public class SandbagBlock extends Block { - public SandbagBlock() { - super(BlockBehaviour.Properties.of().instrument(NoteBlockInstrument.SNARE).sound(SoundType.SAND).strength(10f, 20f)); - } -} diff --git a/src/main/java/com/atsuishio/superbwarfare/block/ScheeliteOreBlock.java b/src/main/java/com/atsuishio/superbwarfare/block/ScheeliteOreBlock.java deleted file mode 100644 index 4a53e933d..000000000 --- a/src/main/java/com/atsuishio/superbwarfare/block/ScheeliteOreBlock.java +++ /dev/null @@ -1,12 +0,0 @@ -package com.atsuishio.superbwarfare.block; - -import net.minecraft.world.level.block.Block; -import net.minecraft.world.level.block.SoundType; -import net.minecraft.world.level.block.state.BlockBehaviour; -import net.minecraft.world.level.block.state.properties.NoteBlockInstrument; - -public class ScheeliteOreBlock extends Block { - public ScheeliteOreBlock() { - super(BlockBehaviour.Properties.of().instrument(NoteBlockInstrument.BASEDRUM).sound(SoundType.STONE).strength(3f, 5f).requiresCorrectToolForDrops()); - } -} diff --git a/src/main/java/com/atsuishio/superbwarfare/block/SilverBlock.java b/src/main/java/com/atsuishio/superbwarfare/block/SilverBlock.java deleted file mode 100644 index ba55315fb..000000000 --- a/src/main/java/com/atsuishio/superbwarfare/block/SilverBlock.java +++ /dev/null @@ -1,11 +0,0 @@ -package com.atsuishio.superbwarfare.block; - -import net.minecraft.world.level.block.Block; -import net.minecraft.world.level.block.SoundType; -import net.minecraft.world.level.block.state.properties.NoteBlockInstrument; - -public class SilverBlock extends Block { - public SilverBlock() { - super(Properties.of().instrument(NoteBlockInstrument.BASEDRUM).sound(SoundType.METAL).strength(5f, 6f).requiresCorrectToolForDrops()); - } -} diff --git a/src/main/java/com/atsuishio/superbwarfare/block/SilverOreBlock.java b/src/main/java/com/atsuishio/superbwarfare/block/SilverOreBlock.java deleted file mode 100644 index 1c51ddb1d..000000000 --- a/src/main/java/com/atsuishio/superbwarfare/block/SilverOreBlock.java +++ /dev/null @@ -1,11 +0,0 @@ -package com.atsuishio.superbwarfare.block; - -import net.minecraft.world.level.block.Block; -import net.minecraft.world.level.block.SoundType; -import net.minecraft.world.level.block.state.properties.NoteBlockInstrument; - -public class SilverOreBlock extends Block { - public SilverOreBlock() { - super(Properties.of().instrument(NoteBlockInstrument.BASEDRUM).sound(SoundType.STONE).strength(3f, 5f).requiresCorrectToolForDrops()); - } -} diff --git a/src/main/java/com/atsuishio/superbwarfare/block/SteelBlock.java b/src/main/java/com/atsuishio/superbwarfare/block/SteelBlock.java deleted file mode 100644 index 102f5243c..000000000 --- a/src/main/java/com/atsuishio/superbwarfare/block/SteelBlock.java +++ /dev/null @@ -1,11 +0,0 @@ -package com.atsuishio.superbwarfare.block; - -import net.minecraft.world.level.block.Block; -import net.minecraft.world.level.block.SoundType; -import net.minecraft.world.level.block.state.properties.NoteBlockInstrument; - -public class SteelBlock extends Block { - public SteelBlock() { - super(Properties.of().instrument(NoteBlockInstrument.BASEDRUM).sound(SoundType.METAL).strength(5f, 6f).requiresCorrectToolForDrops()); - } -} diff --git a/src/main/java/com/atsuishio/superbwarfare/block/TungstenBlock.java b/src/main/java/com/atsuishio/superbwarfare/block/TungstenBlock.java deleted file mode 100644 index c8b07c7a9..000000000 --- a/src/main/java/com/atsuishio/superbwarfare/block/TungstenBlock.java +++ /dev/null @@ -1,11 +0,0 @@ -package com.atsuishio.superbwarfare.block; - -import net.minecraft.world.level.block.Block; -import net.minecraft.world.level.block.SoundType; -import net.minecraft.world.level.block.state.properties.NoteBlockInstrument; - -public class TungstenBlock extends Block { - public TungstenBlock() { - super(Properties.of().instrument(NoteBlockInstrument.BASEDRUM).sound(SoundType.METAL).strength(5f, 6f).requiresCorrectToolForDrops()); - } -} diff --git a/src/main/java/com/atsuishio/superbwarfare/init/ModBlocks.java b/src/main/java/com/atsuishio/superbwarfare/init/ModBlocks.java index 4cdc21faf..e9af5a4a9 100644 --- a/src/main/java/com/atsuishio/superbwarfare/init/ModBlocks.java +++ b/src/main/java/com/atsuishio/superbwarfare/init/ModBlocks.java @@ -3,6 +3,9 @@ package com.atsuishio.superbwarfare.init; import com.atsuishio.superbwarfare.ModUtils; import com.atsuishio.superbwarfare.block.*; import net.minecraft.world.level.block.Block; +import net.minecraft.world.level.block.SoundType; +import net.minecraft.world.level.block.state.BlockBehaviour; +import net.minecraft.world.level.block.state.properties.NoteBlockInstrument; import net.minecraftforge.registries.DeferredRegister; import net.minecraftforge.registries.ForgeRegistries; import net.minecraftforge.registries.RegistryObject; @@ -11,22 +14,34 @@ public class ModBlocks { public static final DeferredRegister REGISTRY = DeferredRegister.create(ForgeRegistries.BLOCKS, ModUtils.MODID); - public static final RegistryObject SANDBAG = REGISTRY.register("sandbag", SandbagBlock::new); + public static final RegistryObject SANDBAG = REGISTRY.register("sandbag", + () -> new Block(BlockBehaviour.Properties.of().instrument(NoteBlockInstrument.SNARE).sound(SoundType.SAND).strength(10f, 20f))); public static final RegistryObject BARBED_WIRE = REGISTRY.register("barbed_wire", BarbedWireBlock::new); public static final RegistryObject JUMP_PAD = REGISTRY.register("jump_pad", JumpPadBlock::new); - public static final RegistryObject GALENA_ORE = REGISTRY.register("galena_ore", GalenaOreBlock::new); - public static final RegistryObject DEEPSLATE_GALENA_ORE = REGISTRY.register("deepslate_galena_ore", DeepslateGalenaOreBlock::new); - public static final RegistryObject SCHEELITE_ORE = REGISTRY.register("scheelite_ore", ScheeliteOreBlock::new); - public static final RegistryObject DEEPSLATE_SCHEELITE_ORE = REGISTRY.register("deepslate_scheelite_ore", DeepslateScheeliteOreBlock::new); - public static final RegistryObject SILVER_ORE = REGISTRY.register("silver_ore", SilverOreBlock::new); - public static final RegistryObject DEEPSLATE_SILVER_ORE = REGISTRY.register("deepslate_silver_ore", DeepslateSilverOreBlock::new); + public static final RegistryObject GALENA_ORE = REGISTRY.register("galena_ore", + () -> new Block(BlockBehaviour.Properties.of().instrument(NoteBlockInstrument.BASEDRUM).sound(SoundType.STONE).strength(3f, 5f).requiresCorrectToolForDrops())); + public static final RegistryObject DEEPSLATE_GALENA_ORE = REGISTRY.register("deepslate_galena_ore", + () -> new Block(BlockBehaviour.Properties.of().instrument(NoteBlockInstrument.BASEDRUM).sound(SoundType.STONE).strength(3f, 8f).requiresCorrectToolForDrops())); + public static final RegistryObject SCHEELITE_ORE = REGISTRY.register("scheelite_ore", + () -> new Block(BlockBehaviour.Properties.of().instrument(NoteBlockInstrument.BASEDRUM).sound(SoundType.STONE).strength(3f, 5f).requiresCorrectToolForDrops())); + public static final RegistryObject DEEPSLATE_SCHEELITE_ORE = REGISTRY.register("deepslate_scheelite_ore", + () -> new Block(BlockBehaviour.Properties.of().instrument(NoteBlockInstrument.BASEDRUM).sound(SoundType.STONE).strength(3f, 8f).requiresCorrectToolForDrops())); + public static final RegistryObject SILVER_ORE = REGISTRY.register("silver_ore", + () -> new Block(BlockBehaviour.Properties.of().instrument(NoteBlockInstrument.BASEDRUM).sound(SoundType.STONE).strength(3f, 5f).requiresCorrectToolForDrops())); + public static final RegistryObject DEEPSLATE_SILVER_ORE = REGISTRY.register("deepslate_silver_ore", + () -> new Block(BlockBehaviour.Properties.of().instrument(NoteBlockInstrument.BASEDRUM).sound(SoundType.STONE).strength(3f, 8f).requiresCorrectToolForDrops())); public static final RegistryObject DRAGON_TEETH = REGISTRY.register("dragon_teeth", DragonTeethBlock::new); public static final RegistryObject REFORGING_TABLE = REGISTRY.register("reforging_table", ReforgingTableBlock::new); - public static final RegistryObject LEAD_BLOCK = REGISTRY.register("lead_block", LeadBlock::new); - public static final RegistryObject STEEL_BLOCK = REGISTRY.register("steel_block", SteelBlock::new); - public static final RegistryObject TUNGSTEN_BLOCK = REGISTRY.register("tungsten_block", TungstenBlock::new); - public static final RegistryObject SILVER_BLOCK = REGISTRY.register("silver_block", SilverBlock::new); - public static final RegistryObject CEMENTED_CARBIDE_BLOCK = REGISTRY.register("cemented_carbide_block", CementedCarbideBlock::new); + public static final RegistryObject LEAD_BLOCK = REGISTRY.register("lead_block", + () -> new Block(BlockBehaviour.Properties.of().instrument(NoteBlockInstrument.BASEDRUM).sound(SoundType.METAL).strength(5f, 6f).requiresCorrectToolForDrops())); + public static final RegistryObject STEEL_BLOCK = REGISTRY.register("steel_block", + () -> new Block(BlockBehaviour.Properties.of().instrument(NoteBlockInstrument.BASEDRUM).sound(SoundType.METAL).strength(5f, 6f).requiresCorrectToolForDrops())); + public static final RegistryObject TUNGSTEN_BLOCK = REGISTRY.register("tungsten_block", + () -> new Block(BlockBehaviour.Properties.of().instrument(NoteBlockInstrument.BASEDRUM).sound(SoundType.METAL).strength(5f, 6f).requiresCorrectToolForDrops())); + public static final RegistryObject SILVER_BLOCK = REGISTRY.register("silver_block", + () -> new Block(BlockBehaviour.Properties.of().instrument(NoteBlockInstrument.BASEDRUM).sound(SoundType.METAL).strength(5f, 6f).requiresCorrectToolForDrops())); + public static final RegistryObject CEMENTED_CARBIDE_BLOCK = REGISTRY.register("cemented_carbide_block", + () -> new Block(BlockBehaviour.Properties.of().instrument(NoteBlockInstrument.BASEDRUM).sound(SoundType.METAL).strength(5f, 6f).requiresCorrectToolForDrops())); public static final RegistryObject CONTAINER = REGISTRY.register("container", ContainerBlock::new); public static final RegistryObject CHARGING_STATION = REGISTRY.register("charging_station", ChargingStationBlock::new); public static final RegistryObject FUMO_25 = REGISTRY.register("fumo_25", FuMO25Block::new);