From aa4668ef28ddff5f231ce182dfee632192fd8533 Mon Sep 17 00:00:00 2001 From: Cael Warner <52902343+CaelWarner@users.noreply.github.com> Date: Sat, 11 Dec 2021 17:44:03 -0800 Subject: [PATCH] Fixed issues with new world height - Pulleys are now able to extend below Y=0 - Super Glue can now be placed above Y=256, all the way up to the new world height limit of 320 - Fixes #2421, fixes #2426, fixes #2427 --- .../components/structureMovement/glue/SuperGlueEntity.java | 2 +- .../components/structureMovement/pulley/PulleyTileEntity.java | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main/java/com/simibubi/create/content/contraptions/components/structureMovement/glue/SuperGlueEntity.java b/src/main/java/com/simibubi/create/content/contraptions/components/structureMovement/glue/SuperGlueEntity.java index fcf3a435d..8f622be50 100644 --- a/src/main/java/com/simibubi/create/content/contraptions/components/structureMovement/glue/SuperGlueEntity.java +++ b/src/main/java/com/simibubi/create/content/contraptions/components/structureMovement/glue/SuperGlueEntity.java @@ -180,7 +180,7 @@ public class SuperGlueEntity extends Entity public boolean onValidSurface() { BlockPos pos = hangingPosition; BlockPos pos2 = hangingPosition.relative(getFacingDirection().getOpposite()); - if (pos2.getY() >= 256) + if (level.isOutsideBuildHeight(pos2)) return false; if (!level.isAreaLoaded(pos, 0) || !level.isAreaLoaded(pos2, 0)) return true; diff --git a/src/main/java/com/simibubi/create/content/contraptions/components/structureMovement/pulley/PulleyTileEntity.java b/src/main/java/com/simibubi/create/content/contraptions/components/structureMovement/pulley/PulleyTileEntity.java index b8b50ca0a..beada6112 100644 --- a/src/main/java/com/simibubi/create/content/contraptions/components/structureMovement/pulley/PulleyTileEntity.java +++ b/src/main/java/com/simibubi/create/content/contraptions/components/structureMovement/pulley/PulleyTileEntity.java @@ -207,7 +207,7 @@ public class PulleyTileEntity extends LinearActuatorTileEntity { @Override protected int getExtensionRange() { - return Math.max(0, Math.min(AllConfigs.SERVER.kinetics.maxRopeLength.get(), worldPosition.getY() - 1)); + return Math.max(0, Math.min(AllConfigs.SERVER.kinetics.maxRopeLength.get(), (worldPosition.getY() - 1) + 64)); } @Override