diff --git a/BauSystem_Main/src/de/steamwar/bausystem/world/Region.java b/BauSystem_Main/src/de/steamwar/bausystem/world/Region.java index 2b1265c..c9d746a 100644 --- a/BauSystem_Main/src/de/steamwar/bausystem/world/Region.java +++ b/BauSystem_Main/src/de/steamwar/bausystem/world/Region.java @@ -166,11 +166,19 @@ public class Region { return prototype.getMaxPoint(this); } - public Point getMinBuildAreaPoint() { + public Point getMinPointExtension() { + return prototype.getMinPointExtension(this); + } + + public Point getMaxPointExtension() { + return prototype.getMaxPointExtension(this); + } + + public Point getMinPointBuildArea() { return prototype.buildArea.getMinPoint(this); } - public Point getMaxBuildAreaPoint() { + public Point getMaxPointBuildArea() { return prototype.buildArea.getMaxPoint(this); } @@ -391,6 +399,23 @@ public class Region { ); } + + public Point getMinPointExtension(Region region) { + return new Point( + region.minPoint.getX() + offsetX - extensionAxisX, + region.minPoint.getY() + offsetY, + region.minPoint.getZ() + offsetZ - extensionNegativeZ + ); + } + + public Point getMaxPointExtension(Region region) { + return new Point( + region.minPoint.getX() + offsetX - extensionAxisX + (sizeX + extensionAxisX * 2), + region.minPoint.getY() + offsetY + sizeY + extensionPositiveY, + region.minPoint.getZ() + offsetZ - extensionNegativeZ + (sizeZ + extensionNegativeZ + extensionPositiveZ) + ); + } + public boolean inRegion(Region region, Location l) { return inRange(l.getX(), region.minPoint.getX() + offsetX, sizeX) && inRange(l.getY(), region.minPoint.getY() + offsetY, sizeY) &&