Skip to content

Commit

Permalink
Use proper constant instead of magic number
Browse files Browse the repository at this point in the history
  • Loading branch information
3TUSK committed Sep 15, 2024
1 parent 0f08e3c commit 21fe2fb
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/main/java/org/teacon/powertool/block/RegisterBlock.java
Original file line number Diff line number Diff line change
Expand Up @@ -83,9 +83,9 @@ public BlockState getStateForPlacement(BlockPlaceContext context) {
@Override
protected void tick(BlockState state, ServerLevel level, BlockPos pos, RandomSource random) {
if (state.getValue(POWERED)) {
level.setBlock(pos, state.setValue(POWERED, Boolean.FALSE), 2);
level.setBlock(pos, state.setValue(POWERED, Boolean.FALSE), UPDATE_CLIENTS);
} else {
level.setBlock(pos, state.setValue(POWERED, Boolean.TRUE), 2);
level.setBlock(pos, state.setValue(POWERED, Boolean.TRUE), UPDATE_CLIENTS);
level.scheduleTick(pos, this, 2);
}

Expand Down

0 comments on commit 21fe2fb

Please sign in to comment.