From 1d403a556292b4d0114cf09ab53914caa2d43aec Mon Sep 17 00:00:00 2001 From: IThundxr Date: Fri, 10 Jan 2025 12:05:37 -0500 Subject: [PATCH] Fix waterlogged bracketed kinetics dropping the bracket (#7126) --- .../kinetics/simpleRelays/AbstractSimpleShaftBlock.java | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/main/java/com/simibubi/create/content/kinetics/simpleRelays/AbstractSimpleShaftBlock.java b/src/main/java/com/simibubi/create/content/kinetics/simpleRelays/AbstractSimpleShaftBlock.java index d4ad89d44..c6eaeb67e 100644 --- a/src/main/java/com/simibubi/create/content/kinetics/simpleRelays/AbstractSimpleShaftBlock.java +++ b/src/main/java/com/simibubi/create/content/kinetics/simpleRelays/AbstractSimpleShaftBlock.java @@ -37,7 +37,10 @@ public abstract class AbstractSimpleShaftBlock extends AbstractShaftBlock implem @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); }