From 2cf7d171df552c145fa7f783ea40c1b487e12ca4 Mon Sep 17 00:00:00 2001 From: PepperCode1 <44146161+PepperCode1@users.noreply.github.com> Date: Sat, 28 Oct 2023 19:44:24 -0700 Subject: [PATCH] Vertical threshold switch redstone fix - Fix vertical threshold switches outputting redstone signal from wrong sides --- .../redstone/thresholdSwitch/ThresholdSwitchBlock.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main/java/com/simibubi/create/content/redstone/thresholdSwitch/ThresholdSwitchBlock.java b/src/main/java/com/simibubi/create/content/redstone/thresholdSwitch/ThresholdSwitchBlock.java index ac4df4530..de3a3f065 100644 --- a/src/main/java/com/simibubi/create/content/redstone/thresholdSwitch/ThresholdSwitchBlock.java +++ b/src/main/java/com/simibubi/create/content/redstone/thresholdSwitch/ThresholdSwitchBlock.java @@ -56,7 +56,7 @@ public class ThresholdSwitchBlock extends DirectedDirectionalBlock implements IB @Override public boolean canConnectRedstone(BlockState state, BlockGetter world, BlockPos pos, Direction side) { - return side != null && side.getOpposite() != state.getValue(FACING); + return side != null && side.getOpposite() != getTargetDirection(state); } @Override @@ -66,7 +66,7 @@ public class ThresholdSwitchBlock extends DirectedDirectionalBlock implements IB @Override public int getSignal(BlockState blockState, BlockGetter blockAccess, BlockPos pos, Direction side) { - if (side == blockState.getValue(FACING) + if (side == getTargetDirection(blockState) .getOpposite()) return 0; return getBlockEntityOptional(blockAccess, pos).filter(ThresholdSwitchBlockEntity::isPowered)