mirror of
https://github.com/PryPurity/WorldBorder.git
synced 2024-09-29 04:07:28 +02:00
Update "new location" method to accept locations at Y positions higher than the old 128 limit; vertical limit is now based on Bukkit's reported World.getMaxHeight() value
This commit is contained in:
parent
60e74901c6
commit
8bfb1c7894
@ -206,11 +206,12 @@ public class BorderData
|
||||
);
|
||||
}
|
||||
|
||||
private static final int limTop = 126, limBot = 1;
|
||||
private static final int limBot = 1;
|
||||
|
||||
// find closest safe Y position from the starting position
|
||||
private double getSafeY(World world, int X, int Y, int Z)
|
||||
{
|
||||
final int limTop = world.getMaxHeight() - 2;
|
||||
// Expanding Y search method adapted from Acru's code in the Nether plugin
|
||||
|
||||
for(int y1 = Y, y2 = Y; (y1 > limBot) || (y2 < limTop); y1--, y2++){
|
||||
|
Loading…
Reference in New Issue
Block a user