mirror of
https://github.com/Creators-of-Create/Create.git
synced 2024-12-26 06:57:51 +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
1 changed files with 2 additions and 2 deletions
|
@ -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 a new issue