mirror of
https://github.com/Creators-of-Create/Create.git
synced 2024-12-25 06:27:41 +01:00
Fix contraption blocks do not drop while replacing by bedrock
This commit is contained in:
parent
a4e7db5788
commit
2a9795f411
1 changed files with 8 additions and 4 deletions
|
@ -565,11 +565,15 @@ public abstract class Contraption {
|
||||||
state = state.with(SawBlock.RUNNING, false);
|
state = state.with(SawBlock.RUNNING, false);
|
||||||
|
|
||||||
BlockState blockState = world.getBlockState(targetPos);
|
BlockState blockState = world.getBlockState(targetPos);
|
||||||
if (blockState.getBlockHardness(world, targetPos) == -1)
|
if (blockState.getBlockHardness(world, targetPos) == -1
|
||||||
continue;
|
|| (state.getCollisionShape(world, targetPos).isEmpty()
|
||||||
if (state.getCollisionShape(world, targetPos).isEmpty()
|
&& !blockState.getCollisionShape(world, targetPos).isEmpty())) {
|
||||||
&& !blockState.getCollisionShape(world, targetPos).isEmpty())
|
if (targetPos.getY() == 0)
|
||||||
|
targetPos = targetPos.up();
|
||||||
|
world.playEvent(2001, targetPos, Block.getStateId(state));
|
||||||
|
Block.spawnDrops(state, world, targetPos, null);
|
||||||
continue;
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
world.destroyBlock(targetPos, true);
|
world.destroyBlock(targetPos, true);
|
||||||
world.setBlockState(targetPos, state, 3 | BlockFlags.IS_MOVING);
|
world.setBlockState(targetPos, state, 3 | BlockFlags.IS_MOVING);
|
||||||
|
|
Loading…
Reference in a new issue