Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
IThundxr committed Nov 4, 2024
1 parent d39f899 commit f3bb31e
Showing 1 changed file with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,10 @@ public PushReaction getPistonPushReaction(BlockState state) {

@Override
public void onRemove(BlockState state, Level world, BlockPos pos, BlockState newState, boolean isMoving) {
if (state != newState && !isMoving)
boolean wasWaterLogged = state.hasProperty(WATERLOGGED) &&
newState.hasProperty(WATERLOGGED) &&
(state.getValue(WATERLOGGED) != newState.getValue(WATERLOGGED));
if (state != newState && !isMoving && !wasWaterLogged)
removeBracket(world, pos, true).ifPresent(stack -> Block.popResource(world, pos, stack));
super.onRemove(state, world, pos, newState, isMoving);
}
Expand Down

0 comments on commit f3bb31e

Please sign in to comment.