comment out redundant WaterLoggableDoorBlock code

This commit is contained in:
CreepyCre 2021-06-18 11:57:55 +02:00
parent 5dcccdd571
commit f8f8d00f98

View file

@ -71,12 +71,14 @@ public class WaterLoggableDoorBlock extends DoorBlock implements Waterloggable {
@Override
public BlockState getStateForNeighborUpdate(BlockState state, Direction direction, BlockState neighborState, WorldAccess world, BlockPos pos, BlockPos neighborPos) {
if (state.get(WATERLOGGED)) {
world.getFluidTickScheduler().schedule(pos, Fluids.WATER, Fluids.WATER.getTickRate(world));
}
// commented out code is redundant with the very odd implementations of Block#replace and World#breakBlock
// please keep it anyways in case it is needed in the future
//if (state.get(WATERLOGGED)) {
// world.getFluidTickScheduler().schedule(pos, Fluids.WATER, Fluids.WATER.getTickRate(world));
//}
BlockState newState = super.getStateForNeighborUpdate(state, direction, neighborState, world, pos, neighborPos);
if (newState.isAir() && state.getFluidState().getFluid() == Fluids.WATER) return Blocks.WATER.getDefaultState();
//if (newState.isAir() && state.getFluidState().getFluid() == Fluids.WATER) return Blocks.WATER.getDefaultState();
return newState;
}