From ffd605f8ac3ff220fd7e6a292597a812904af0d2 Mon Sep 17 00:00:00 2001 From: cakeGit <65340665+cakeGit@users.noreply.github.com> Date: Sat, 3 Feb 2024 12:56:37 +0000 Subject: [PATCH 1/2] Added missing whitespace --- .../create/content/contraptions/TranslatingContraption.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/com/simibubi/create/content/contraptions/TranslatingContraption.java b/src/main/java/com/simibubi/create/content/contraptions/TranslatingContraption.java index e547f49f7..3ccd22f32 100644 --- a/src/main/java/com/simibubi/create/content/contraptions/TranslatingContraption.java +++ b/src/main/java/com/simibubi/create/content/contraptions/TranslatingContraption.java @@ -19,7 +19,7 @@ public abstract class TranslatingContraption extends Contraption { return Collections.emptySet(); if (cachedColliders == null || cachedColliderDirection != movementDirection) { cachedColliderDirection = movementDirection; - cachedColliders= createColliders(world, movementDirection); + cachedColliders = createColliders(world, movementDirection); } return cachedColliders; } From 378e9700057402eca553f7669967b3efb04b4189 Mon Sep 17 00:00:00 2001 From: cakeGit <65340665+cakeGit@users.noreply.github.com> Date: Wed, 7 Feb 2024 20:12:41 +0000 Subject: [PATCH 2/2] Added station blockstate check --- .../create/content/trains/station/StationBlockEntity.java | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/main/java/com/simibubi/create/content/trains/station/StationBlockEntity.java b/src/main/java/com/simibubi/create/content/trains/station/StationBlockEntity.java index 86318d1a1..a164782e6 100644 --- a/src/main/java/com/simibubi/create/content/trains/station/StationBlockEntity.java +++ b/src/main/java/com/simibubi/create/content/trains/station/StationBlockEntity.java @@ -288,7 +288,7 @@ public class StationBlockEntity extends SmartBlockEntity implements ITransformab BlockPos up = new BlockPos(track.getUpNormal(level, pos, state)); BlockPos down = new BlockPos(track.getUpNormal(level, pos, state).scale(-1)); int bogeyOffset = pos.distManhattan(edgePoint.getGlobalPosition()) - 1; - + if (!isValidBogeyOffset(bogeyOffset)) { for (boolean upsideDown : Iterate.falseAndTrue) { for (int i = -1; i <= 1; i++) { @@ -364,6 +364,10 @@ public class StationBlockEntity extends SmartBlockEntity implements ITransformab if (!tryEnterAssemblyMode()) return false; + //Check the station wasn't destroyed + if (!(level.getBlockState(worldPosition).getBlock() instanceof StationBlock)) + return true; + BlockState newState = getBlockState().setValue(StationBlock.ASSEMBLING, true); level.setBlock(getBlockPos(), newState, 3); refreshBlockState();