mirror of
https://github.com/Creators-of-Create/Create.git
synced 2024-12-26 15:06:42 +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
|
@Override
|
||||||
public boolean canConnectRedstone(BlockState state, BlockGetter world, BlockPos pos, Direction side) {
|
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
|
@Override
|
||||||
|
@ -66,7 +66,7 @@ public class ThresholdSwitchBlock extends DirectedDirectionalBlock implements IB
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public int getSignal(BlockState blockState, BlockGetter blockAccess, BlockPos pos, Direction side) {
|
public int getSignal(BlockState blockState, BlockGetter blockAccess, BlockPos pos, Direction side) {
|
||||||
if (side == blockState.getValue(FACING)
|
if (side == getTargetDirection(blockState)
|
||||||
.getOpposite())
|
.getOpposite())
|
||||||
return 0;
|
return 0;
|
||||||
return getBlockEntityOptional(blockAccess, pos).filter(ThresholdSwitchBlockEntity::isPowered)
|
return getBlockEntityOptional(blockAccess, pos).filter(ThresholdSwitchBlockEntity::isPowered)
|
||||||
|
|
Loading…
Reference in a new issue