From 5c31db3867e13ef7750287187cd193e0944009d1 Mon Sep 17 00:00:00 2001 From: yoyosource Date: Sun, 14 Mar 2021 18:33:54 +0100 Subject: [PATCH] Fix Region --- .../src/de/steamwar/bausystem/world/Region.java | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/BauSystem_Main/src/de/steamwar/bausystem/world/Region.java b/BauSystem_Main/src/de/steamwar/bausystem/world/Region.java index 01183bf..168d97c 100644 --- a/BauSystem_Main/src/de/steamwar/bausystem/world/Region.java +++ b/BauSystem_Main/src/de/steamwar/bausystem/world/Region.java @@ -315,9 +315,9 @@ public class Region { } public boolean inRegionExtension(Region region, Location l) { - return inRange(l.getX(), region.minX + offsetX - extensionAxisX + 1, sizeX + extensionAxisX * 2 - 1) && - inRange(l.getY(), region.minY + offsetY, sizeY + extensionPositiveY - 1) && - inRange(l.getZ(), region.minZ + offsetZ - extensionNegativeZ + 1, sizeZ + extensionNegativeZ - 1 + extensionPositiveZ); + return inRange(l.getX(), region.minX + offsetX - extensionAxisX, sizeX + extensionAxisX * 2) && + inRange(l.getY(), region.minY + offsetY, sizeY + extensionPositiveY) && + inRange(l.getZ(), region.minZ + offsetZ - extensionNegativeZ, sizeZ + extensionNegativeZ + extensionPositiveZ); } public void fastreset(Region region){ @@ -362,7 +362,7 @@ public class Region { } private static boolean inRange(double l, int min, int size){ - return min <= l && l <= min + size; + return min <= l && l < min + size; } private static void paste(File file, int x, int y, int z, boolean rotate){ //Type of protect