SteamWar/BauSystem2.0
Archiviert
12
0

Simplify Region.inRegion

Dieser Commit ist enthalten in:
yoyosource 2021-05-07 10:48:12 +02:00
Ursprung 758f9cd594
Commit 485cf8f417

Datei anzeigen

@ -195,9 +195,12 @@ public class Region {
}
private boolean inRegion(Location location, Point minPoint, Point maxPoint) {
return location.getBlockX() >= minPoint.getX() && location.getBlockX() <= maxPoint.getX() &&
location.getBlockY() >= minPoint.getY() && location.getBlockY() <= maxPoint.getY() &&
location.getBlockZ() >= minPoint.getZ() && location.getBlockZ() <= maxPoint.getZ();
int blockX = location.getBlockX();
int blockY = location.getBlockY();
int blockZ = location.getBlockZ();
return blockX >= minPoint.getX() && blockX <= maxPoint.getX() &&
blockY >= minPoint.getY() && blockY <= maxPoint.getY() &&
blockZ >= minPoint.getZ() && blockZ <= maxPoint.getZ();
}
public boolean hasType(RegionType regionType) {