diff --git a/Movecraft/src/main/java/net/countercraft/movecraft/async/AsyncManager.java b/Movecraft/src/main/java/net/countercraft/movecraft/async/AsyncManager.java index 7825b86e2..f5b07bd29 100644 --- a/Movecraft/src/main/java/net/countercraft/movecraft/async/AsyncManager.java +++ b/Movecraft/src/main/java/net/countercraft/movecraft/async/AsyncManager.java @@ -293,7 +293,7 @@ private void processSinking() { if (!(craft instanceof SinkingCraft)) continue; - if (craft.getHitBox().isEmpty() || craft.getHitBox().getMinY() < 5) { + if (craft.getHitBox().isEmpty() || craft.getHitBox().getMinY() < (craft.getWorld().getMinHeight() +5 )) { CraftManager.getInstance().release(craft, CraftReleaseEvent.Reason.SUNK, false); continue; } diff --git a/api/src/main/java/net/countercraft/movecraft/util/hitboxes/HitBox.java b/api/src/main/java/net/countercraft/movecraft/util/hitboxes/HitBox.java index 14ba27760..5549665bb 100644 --- a/api/src/main/java/net/countercraft/movecraft/util/hitboxes/HitBox.java +++ b/api/src/main/java/net/countercraft/movecraft/util/hitboxes/HitBox.java @@ -23,21 +23,21 @@ default int getXLength() { if (isEmpty()) return 0; - return Math.abs(getMaxX() - getMinX()); + return Math.abs(getMaxX() - getMinX() +1 ); } default int getYLength() { if (isEmpty()) return 0; - return Math.abs(getMaxY() - getMinY()); + return Math.abs(getMaxY() - getMinY() +1 ); } default int getZLength() { if (isEmpty()) return 0; - return Math.abs(getMaxZ() -getMinZ()); + return Math.abs(getMaxZ() -getMinZ() +1 ); } default boolean isEmpty() {