From 67fd16b492c46091fe4e62034d74f5b4ed96efcd Mon Sep 17 00:00:00 2001 From: SuperCoder79 <25208576+SuperCoder7979@users.noreply.github.com> Date: Wed, 10 Aug 2022 16:19:38 -0400 Subject: [PATCH] Break door blocks when rotating a Contraption vertically - This prevents them from getting stuck in an invalid state. --- .../components/structureMovement/Contraption.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/main/java/com/simibubi/create/content/contraptions/components/structureMovement/Contraption.java b/src/main/java/com/simibubi/create/content/contraptions/components/structureMovement/Contraption.java index 5a66c6d05..ae1c164be 100644 --- a/src/main/java/com/simibubi/create/content/contraptions/components/structureMovement/Contraption.java +++ b/src/main/java/com/simibubi/create/content/contraptions/components/structureMovement/Contraption.java @@ -21,6 +21,8 @@ import java.util.function.BiConsumer; import javax.annotation.Nullable; +import net.minecraft.world.level.block.DoorBlock; + import org.apache.commons.lang3.tuple.MutablePair; import org.apache.commons.lang3.tuple.Pair; @@ -1045,7 +1047,7 @@ public abstract class Contraption { boolean verticalRotation = transform.rotationAxis == null || transform.rotationAxis.isHorizontal(); verticalRotation = verticalRotation && transform.rotation != Rotation.NONE; 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); }