Skip to content

Commit

Permalink
fixed machine facing being reversed in machines when getting redstone…
Browse files Browse the repository at this point in the history
… power
  • Loading branch information
Trinsdar committed Sep 24, 2023
1 parent 84f1cb9 commit 328ffca
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -323,7 +323,7 @@ public int getSignal(BlockState blockState, BlockGetter blockAccess, BlockPos po
BlockEntity entity = blockAccess.getBlockEntity(pos);
if (entity instanceof BlockEntityMachine) {
BlockEntityMachine<?> machine = (BlockEntityMachine<?>) entity;
return machine.getWeakRedstonePower(side);
return machine.getWeakRedstonePower(side == null ? null : side.getOpposite());
}
return super.getSignal(blockState, blockAccess, pos, side);
}
Expand All @@ -333,7 +333,7 @@ public int getDirectSignal(BlockState blockState, BlockGetter blockAccess, Block
BlockEntity entity = blockAccess.getBlockEntity(pos);
if (entity instanceof BlockEntityMachine) {
BlockEntityMachine<?> machine = (BlockEntityMachine<?>) entity;
return machine.getStrongRedstonePower(side);
return machine.getStrongRedstonePower(side == null ? null : side.getOpposite());
}
return super.getDirectSignal(blockState, blockAccess, pos, side);
}
Expand Down

0 comments on commit 328ffca

Please sign in to comment.