Fix contraption duplication (#325)
This commit is contained in:
parent
616f8f746e
commit
830c1c6d3d
1 changed files with 4 additions and 1 deletions
|
@ -497,13 +497,16 @@ public class ContraptionEntity extends Entity implements IEntityAdditionalSpawnD
|
|||
}
|
||||
|
||||
public void disassemble() {
|
||||
if (!isAlive()) {
|
||||
return;
|
||||
}
|
||||
if (getContraption() != null) {
|
||||
remove();
|
||||
BlockPos offset = new BlockPos(getAnchorVec().add(.5, .5, .5));
|
||||
Vec3d rotation = new Vec3d(getRoll(1), getYaw(1), getPitch(1));
|
||||
getContraption().addBlocksToWorld(world, offset, rotation);
|
||||
preventMovedEntitiesFromGettingStuck();
|
||||
}
|
||||
remove();
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
Loading…
Reference in a new issue