mirror of
https://github.com/Creators-of-Create/Create.git
synced 2025-01-21 00:41:53 +01:00
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() {
|
public void disassemble() {
|
||||||
|
if (!isAlive()) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
if (getContraption() != null) {
|
if (getContraption() != null) {
|
||||||
|
remove();
|
||||||
BlockPos offset = new BlockPos(getAnchorVec().add(.5, .5, .5));
|
BlockPos offset = new BlockPos(getAnchorVec().add(.5, .5, .5));
|
||||||
Vec3d rotation = new Vec3d(getRoll(1), getYaw(1), getPitch(1));
|
Vec3d rotation = new Vec3d(getRoll(1), getYaw(1), getPitch(1));
|
||||||
getContraption().addBlocksToWorld(world, offset, rotation);
|
getContraption().addBlocksToWorld(world, offset, rotation);
|
||||||
preventMovedEntitiesFromGettingStuck();
|
preventMovedEntitiesFromGettingStuck();
|
||||||
}
|
}
|
||||||
remove();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
Loading…
Add table
Reference in a new issue