Fix contraption duplication (#325)

This commit is contained in:
Snownee 2020-05-18 11:20:04 +08:00
parent 616f8f746e
commit 830c1c6d3d

View file

@ -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