diff --git a/src/main/java/growthcraft/core/init/GrowthcraftBlocks.java b/src/main/java/growthcraft/core/init/GrowthcraftBlocks.java index 54ba171..c2e149c 100644 --- a/src/main/java/growthcraft/core/init/GrowthcraftBlocks.java +++ b/src/main/java/growthcraft/core/init/GrowthcraftBlocks.java @@ -10,7 +10,6 @@ import net.minecraft.world.level.block.Blocks; import net.minecraft.world.level.block.SoundType; import net.minecraft.world.level.block.state.BlockBehaviour; -import net.minecraft.world.level.material.Material; import net.minecraftforge.registries.DeferredRegister; import net.minecraftforge.registries.ForgeRegistries; import net.minecraftforge.registries.RegistryObject; @@ -63,7 +62,7 @@ public class GrowthcraftBlocks { public static final RegistryObject SALT_BLOCK = registerBlock( Reference.UnlocalizedName.SALT_BLOCK, - () -> new GrowthcraftBlock(Material.STONE, SoundType.STONE) + () -> new GrowthcraftBlock(Blocks.GRAVEL, SoundType.GRAVEL) ); public static final RegistryObject SALT_ORE = registerBlock( diff --git a/src/main/java/growthcraft/lib/block/GrowthcraftBlock.java b/src/main/java/growthcraft/lib/block/GrowthcraftBlock.java index f03940d..7540fe7 100644 --- a/src/main/java/growthcraft/lib/block/GrowthcraftBlock.java +++ b/src/main/java/growthcraft/lib/block/GrowthcraftBlock.java @@ -14,10 +14,18 @@ public GrowthcraftBlock(Material material) { this(getInitProperties(material, SoundType.WOOD)); } + public GrowthcraftBlock(Block block) { + this(getInitProperties(block, SoundType.WOOD)); + } + public GrowthcraftBlock(Material material, SoundType soundType) { this(getInitProperties(material, soundType)); } + public GrowthcraftBlock(Block block, SoundType soundType) { + this(getInitProperties(block, soundType)); + } + public GrowthcraftBlock(Properties properties) { super(properties); } @@ -27,4 +35,10 @@ private static Properties getInitProperties(Material material, SoundType soundTy properties.sound(SoundType.WOOD); return properties; } + + private static Properties getInitProperties(Block block, SoundType soundType) { + Properties properties = Properties.copy(block); + properties.sound(SoundType.WOOD); + return properties; + } } diff --git a/src/main/resources/assets/growthcraft/blockstates/salt_block.json b/src/main/resources/assets/growthcraft/blockstates/salt_block.json new file mode 100644 index 0000000..8afd7a6 --- /dev/null +++ b/src/main/resources/assets/growthcraft/blockstates/salt_block.json @@ -0,0 +1,5 @@ +{ + "variants": { + "": { "model": "growthcraft:block/salt_block" } + } +} \ No newline at end of file