diff --git a/src/main/java/supersymmetry/common/blocks/SuSyBlocks.java b/src/main/java/supersymmetry/common/blocks/SuSyBlocks.java index edb6ca4d0..a4f07a677 100644 --- a/src/main/java/supersymmetry/common/blocks/SuSyBlocks.java +++ b/src/main/java/supersymmetry/common/blocks/SuSyBlocks.java @@ -17,6 +17,8 @@ import java.util.Map; import java.util.stream.Collectors; +import static gregtech.common.blocks.MetaBlocks.ASPHALT; + public class SuSyBlocks { public static BlockCoolingCoil COOLING_COIL; @@ -162,9 +164,13 @@ private static void registerItemModel(@NotNull Block block) { public static void registerWalkingSpeedBonus() { for (SusyStoneVariantBlock block : SUSY_STONE_BLOCKS.values()) { - for (IBlockState state : block.getBlockState().getValidStates()) { - BlockUtility.setWalkingSpeedBonus(state, BlockUtility.ASPHALT_WALKING_SPEED_BONUS); - } + if (block.getWalkingSpeed() == 0) + continue; + for (IBlockState state : block.getBlockState().getValidStates()) + BlockUtility.setWalkingSpeedBonus(state, block.getWalkingSpeed()); + } + for (IBlockState state : ASPHALT.getBlockState().getValidStates()) { + BlockUtility.setWalkingSpeedBonus(state, 1); // Buff from 0.6F } } diff --git a/src/main/java/supersymmetry/common/blocks/SusyStoneVariantBlock.java b/src/main/java/supersymmetry/common/blocks/SusyStoneVariantBlock.java index 8447fa68d..bd5f4b091 100644 --- a/src/main/java/supersymmetry/common/blocks/SusyStoneVariantBlock.java +++ b/src/main/java/supersymmetry/common/blocks/SusyStoneVariantBlock.java @@ -56,10 +56,14 @@ public Item getItemDropped(@NotNull IBlockState state, @NotNull Random rand, int SuSyBlocks.SUSY_STONE_BLOCKS.get(StoneVariant.COBBLE) : this); } + public double getWalkingSpeed() { + return this.stoneVariant.walkingSpeed; + } + public enum StoneVariant { SMOOTH("susy_stone_smooth"), COBBLE("susy_stone_cobble", 2.0F, 10.0F), - BRICKS("susy_stone_bricks"); + BRICKS("susy_stone_bricks", 0.25); // TODO // COBBLE_MOSSY("stone_cobble_mossy", 2.0F, 10.0F), // POLISHED("stone_polished"), @@ -77,24 +81,31 @@ public enum StoneVariant { public final String translationKey; public final float hardness; public final float resistance; + public final double walkingSpeed; StoneVariant(@Nonnull String id) { this(id, id); } + StoneVariant(@Nonnull String id, double walkingSpeed) { + this(id, id, 1.5F, 10.0F, walkingSpeed); + } + + StoneVariant(@Nonnull String id, @Nonnull String translationKey) { - this(id, translationKey, 1.5F, 10.0F); + this(id, translationKey, 1.5F, 10.0F, 0); } StoneVariant(@Nonnull String id, float hardness, float resistance) { - this(id, id, hardness, resistance); + this(id, id, hardness, resistance, 0); } - StoneVariant(@Nonnull String id, @Nonnull String translationKey, float hardness, float resistance) { + StoneVariant(@Nonnull String id, @Nonnull String translationKey, float hardness, float resistance, double walkingSpeed) { this.id = id; this.translationKey = translationKey; this.hardness = hardness; this.resistance = resistance; + this.walkingSpeed = walkingSpeed; } }