mirror of
https://github.com/Creators-of-Create/Create.git
synced 2025-01-30 23:05:03 +01:00
Fix waterlogged bracketed kinetics dropping the bracket (#7126)
This commit is contained in:
parent
b420e3a3b7
commit
1d403a5562
1 changed files with 4 additions and 1 deletions
|
@ -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);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue