diff --git a/src/main/java/com/atsuishio/superbwarfare/block/entity/ChargingStationBlockEntity.java b/src/main/java/com/atsuishio/superbwarfare/block/entity/ChargingStationBlockEntity.java index 5a10ca021..ab43b85b3 100644 --- a/src/main/java/com/atsuishio/superbwarfare/block/entity/ChargingStationBlockEntity.java +++ b/src/main/java/com/atsuishio/superbwarfare/block/entity/ChargingStationBlockEntity.java @@ -105,12 +105,8 @@ public class ChargingStationBlockEntity extends BlockEntity implements WorldlyCo } public static void serverTick(Level pLevel, BlockPos pPos, BlockState pState, ChargingStationBlockEntity blockEntity) { - if (blockEntity.showRange && !pState.getValue(ChargingStationBlock.SHOW_RANGE)) { - pLevel.setBlockAndUpdate(pPos, pState.setValue(ChargingStationBlock.SHOW_RANGE, true)); - setChanged(pLevel, pPos, pState); - } - if (!blockEntity.showRange && pState.getValue(ChargingStationBlock.SHOW_RANGE)) { - pLevel.setBlockAndUpdate(pPos, pState.setValue(ChargingStationBlock.SHOW_RANGE, false)); + if (blockEntity.showRange != pState.getValue(ChargingStationBlock.SHOW_RANGE)) { + pLevel.setBlockAndUpdate(pPos, pState.setValue(ChargingStationBlock.SHOW_RANGE, blockEntity.showRange)); setChanged(pLevel, pPos, pState); }