mirror of
https://github.com/Creators-of-Create/Create.git
synced 2024-12-28 16:06:48 +01:00
Break door blocks when rotating a Contraption vertically
- This prevents them from getting stuck in an invalid state.
This commit is contained in:
parent
6c0af5f83f
commit
67fd16b492
1 changed files with 3 additions and 1 deletions
|
@ -21,6 +21,8 @@ import java.util.function.BiConsumer;
|
||||||
|
|
||||||
import javax.annotation.Nullable;
|
import javax.annotation.Nullable;
|
||||||
|
|
||||||
|
import net.minecraft.world.level.block.DoorBlock;
|
||||||
|
|
||||||
import org.apache.commons.lang3.tuple.MutablePair;
|
import org.apache.commons.lang3.tuple.MutablePair;
|
||||||
import org.apache.commons.lang3.tuple.Pair;
|
import org.apache.commons.lang3.tuple.Pair;
|
||||||
|
|
||||||
|
@ -1045,7 +1047,7 @@ public abstract class Contraption {
|
||||||
boolean verticalRotation = transform.rotationAxis == null || transform.rotationAxis.isHorizontal();
|
boolean verticalRotation = transform.rotationAxis == null || transform.rotationAxis.isHorizontal();
|
||||||
verticalRotation = verticalRotation && transform.rotation != Rotation.NONE;
|
verticalRotation = verticalRotation && transform.rotation != Rotation.NONE;
|
||||||
if (verticalRotation) {
|
if (verticalRotation) {
|
||||||
if (state.getBlock() instanceof RopeBlock || state.getBlock() instanceof MagnetBlock)
|
if (state.getBlock() instanceof RopeBlock || state.getBlock() instanceof MagnetBlock || state.getBlock() instanceof DoorBlock)
|
||||||
world.destroyBlock(targetPos, true);
|
world.destroyBlock(targetPos, true);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue