From f27cf186fd56c32c4a29d22339dbf3f58888b639 Mon Sep 17 00:00:00 2001 From: bruberu <80226372+bruberu@users.noreply.github.com> Date: Wed, 11 Dec 2024 18:06:36 -0600 Subject: [PATCH 1/2] fix: susy stone speeds --- .../common/blocks/SuSyBlocks.java | 7 ++++--- .../common/blocks/SusyStoneVariantBlock.java | 19 +++++++++++++++---- 2 files changed, 19 insertions(+), 7 deletions(-) diff --git a/src/main/java/supersymmetry/common/blocks/SuSyBlocks.java b/src/main/java/supersymmetry/common/blocks/SuSyBlocks.java index edb6ca4d0..64e176e11 100644 --- a/src/main/java/supersymmetry/common/blocks/SuSyBlocks.java +++ b/src/main/java/supersymmetry/common/blocks/SuSyBlocks.java @@ -162,9 +162,10 @@ 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()); } } 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; } } From e2b1a0318162df08eab7261475a84d54d5e1bebd Mon Sep 17 00:00:00 2001 From: bruberu <80226372+bruberu@users.noreply.github.com> Date: Wed, 11 Dec 2024 18:11:08 -0600 Subject: [PATCH 2/2] feat: 66% faster asphalt --- src/main/java/supersymmetry/common/blocks/SuSyBlocks.java | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/main/java/supersymmetry/common/blocks/SuSyBlocks.java b/src/main/java/supersymmetry/common/blocks/SuSyBlocks.java index 64e176e11..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; @@ -167,6 +169,9 @@ public static void registerWalkingSpeedBonus() { 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 + } } @SuppressWarnings("unchecked")