mirror of
https://github.com/Creators-of-Create/Create.git
synced 2024-11-10 12:33:57 +01:00
Vertical threshold switch redstone fix
- Fix vertical threshold switches outputting redstone signal from wrong sides
This commit is contained in:
parent
8bf42ffa6f
commit
2cf7d171df
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user