mirror of
https://github.com/Creators-of-Create/Create.git
synced 2024-12-27 07:27:15 +01:00
Fix contraption stopping action is not called in some cases (#526)
This commit is contained in:
parent
3301f8ff01
commit
88ba7f2887
2 changed files with 9 additions and 1 deletions
|
@ -435,6 +435,15 @@ public abstract class AbstractContraptionEntity extends Entity implements IEntit
|
|||
}
|
||||
}
|
||||
|
||||
@SuppressWarnings("deprecation")
|
||||
@Override
|
||||
public void remove(boolean keepData) {
|
||||
if (!world.isRemote && !removed && contraption != null) {
|
||||
contraption.stop(world);
|
||||
}
|
||||
super.remove(keepData);
|
||||
}
|
||||
|
||||
protected abstract StructureTransform makeStructureTransform();
|
||||
|
||||
@Override
|
||||
|
|
|
@ -743,7 +743,6 @@ public abstract class Contraption {
|
|||
}
|
||||
|
||||
public void addBlocksToWorld(World world, StructureTransform transform) {
|
||||
stop(world);
|
||||
for (boolean nonBrittles : Iterate.trueAndFalse) {
|
||||
for (BlockInfo block : blocks.values()) {
|
||||
if (nonBrittles == BlockMovementTraits.isBrittle(block.state))
|
||||
|
|
Loading…
Reference in a new issue