From d07c1b5a8c897d0bc95227e96ad43e51a70b2b9c Mon Sep 17 00:00:00 2001 From: evlad Date: Sun, 1 May 2022 07:44:42 +0200 Subject: [PATCH] support 1.18 negative y (#1973) Fixes an issue where blueprint starting block could not be placed in negative area. --- .../world/bentobox/bentobox/managers/IslandWorldManager.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main/java/world/bentobox/bentobox/managers/IslandWorldManager.java b/src/main/java/world/bentobox/bentobox/managers/IslandWorldManager.java index 72405a848..eff2e8c65 100644 --- a/src/main/java/world/bentobox/bentobox/managers/IslandWorldManager.java +++ b/src/main/java/world/bentobox/bentobox/managers/IslandWorldManager.java @@ -229,13 +229,13 @@ public class IslandWorldManager { } /** - * Value will always be greater than 0 and less than the world's max height. + * Value will always be greater than the world's min height and less than the world's max height. * @return the islandHeight */ public int getIslandHeight(@NonNull World world) { if (gameModes.containsKey(world) && world.getMaxHeight() > 0) { return Math.min(world.getMaxHeight() - 1, - Math.max(0, gameModes.get(world).getWorldSettings().getIslandHeight())); + Math.max(world.getMinHeight(), gameModes.get(world).getWorldSettings().getIslandHeight())); } return 0; }