mirror of
https://github.com/songoda/FabledSkyBlock.git
synced 2024-11-22 18:26:08 +01:00
1.8.8 compatibility
This commit is contained in:
parent
e58cd903d0
commit
f59879dd05
@ -1629,7 +1629,7 @@ public class IslandManager {
|
||||
double locIncrement = island.getSize() % 2d != 0d ? 0.50d + Double.MIN_VALUE : -Double.MIN_VALUE;
|
||||
return LocationUtil.isLocationInLocationRadius(
|
||||
islandLocation.clone().add(locIncrement, 0d, locIncrement),
|
||||
location.toCenterLocation(),
|
||||
LocationUtil.toCenterLocation(location),
|
||||
island.getRadius() + Math.round(locIncrement));
|
||||
}
|
||||
return false;
|
||||
|
@ -369,4 +369,12 @@ public final class LocationUtil {
|
||||
return rndLoc;
|
||||
}
|
||||
}
|
||||
|
||||
public static Location toCenterLocation(Location loc) {
|
||||
Location centerLoc = loc.clone();
|
||||
centerLoc.setX((double)loc.getBlockX() + 0.5D);
|
||||
centerLoc.setY((double)loc.getBlockY() + 0.5D);
|
||||
centerLoc.setZ((double)loc.getBlockZ() + 0.5D);
|
||||
return centerLoc;
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user