diff --git a/BauSystem_Main/src/de/steamwar/bausystem/region/Prototype.java b/BauSystem_Main/src/de/steamwar/bausystem/region/Prototype.java index a2088060..0fa57349 100644 --- a/BauSystem_Main/src/de/steamwar/bausystem/region/Prototype.java +++ b/BauSystem_Main/src/de/steamwar/bausystem/region/Prototype.java @@ -117,6 +117,7 @@ public class Prototype { private boolean extensionRegistered; + private final boolean hasCopyPoint; private final int copyOffsetX; private final int copyOffsetY; private final int copyOffsetZ; @@ -165,6 +166,7 @@ public class Prototype { copyOffsetX = yapionObject.getPlainValueOrDefault("copyOffsetX", 0); copyOffsetY = yapionObject.getPlainValueOrDefault("copyOffsetY", 0); copyOffsetZ = yapionObject.getPlainValueOrDefault("copyOffsetZ", 0); + hasCopyPoint = yapionObject.containsKey("copyOffsetX") || yapionObject.containsKey("copyOffsetY") || yapionObject.containsKey("copyOffsetZ"); } } diff --git a/BauSystem_Main/src/de/steamwar/bausystem/region/Region.java b/BauSystem_Main/src/de/steamwar/bausystem/region/Region.java index 26f6bef4..c29597f0 100644 --- a/BauSystem_Main/src/de/steamwar/bausystem/region/Region.java +++ b/BauSystem_Main/src/de/steamwar/bausystem/region/Region.java @@ -172,7 +172,7 @@ public class Region { this.minPointBuildExtension = this.minPointBuild.subtract(prototype.getBuild().getExtensionNegativeX(), prototype.getBuild().getExtensionNegativeY(), prototype.getBuild().getExtensionNegativeZ()); this.maxPointBuildExtension = this.maxPointBuild.add(prototype.getBuild().getExtensionPositiveX(), prototype.getBuild().getExtensionPositiveY(), prototype.getBuild().getExtensionPositiveZ()); - if (prototype.getBuild().getCopyOffsetX() == 0 && prototype.getBuild().getCopyOffsetY() == 0 && prototype.getBuild().getCopyOffsetZ() == 0) { + if (prototype.getBuild().isHasCopyPoint()) { this.copyPoint = minPoint.add(prototype.getCopyPointOffsetX(), prototype.getCopyPointOffsetY(), prototype.getCopyPointOffsetZ()); } else if (prototype.getBuild().getCopyOffsetX() != 0 || prototype.getBuild().getCopyOffsetY() != 0 || prototype.getBuild().getCopyOffsetZ() != 0) { this.copyPoint = this.minPointBuild.add(prototype.getBuild().getCopyOffsetX(), prototype.getBuild().getCopyOffsetY(), prototype.getBuild().getCopyOffsetZ());