mirror of
https://github.com/BentoBoxWorld/BentoBox.git
synced 2024-11-27 13:15:28 +01:00
support 1.18 negative y (#1973)
Fixes an issue where blueprint starting block could not be placed in negative area.
This commit is contained in:
parent
3e0368fbab
commit
d07c1b5a8c
@ -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;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user