Merge branch 'development'

This commit is contained in:
Brianna 2020-05-14 20:28:45 -04:00
commit 0936798178
2 changed files with 15 additions and 1 deletions

View File

@ -4,7 +4,7 @@ stages:
variables:
name: "SongodaCore"
path: "/builds/$CI_PROJECT_PATH"
version: "2.3.33"
version: "2.3.34"
build:
stage: build

View File

@ -8,4 +8,18 @@ public class LocationUtils {
return location1.getBlockX() == location2.getBlockX() && location1.getBlockY() == location2.getBlockY() && location1.getBlockZ() == location2.getBlockZ();
}
public static boolean isInArea(Location l, Location pos1, Location pos2){
double x1 = Math.min(pos1.getX(), pos2.getX());
double y1 = Math.min(pos1.getY(), pos2.getY());
double z1 = Math.min(pos1.getZ(), pos2.getZ());
double x2 = Math.max(pos1.getX(), pos2.getX());
double y2 = Math.max(pos1.getY(), pos2.getY());
double z2 = Math.max(pos1.getZ(), pos2.getZ());
return l.getX() >= x1 && l.getX() <= x2 &&
l.getY() >= y1 && l.getY() <= y2 &&
l.getZ() >= z1 && l.getZ() <= z2;
}
}