From f04cad9cf84266256a9e104c52ed153aa2b4d2b4 Mon Sep 17 00:00:00 2001 From: yoyosource Date: Mon, 20 Sep 2021 20:53:19 +0200 Subject: [PATCH] Fix Region Testblock paste Signed-off-by: yoyosource --- BauSystem_Main/src/de/steamwar/bausystem/region/Region.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/BauSystem_Main/src/de/steamwar/bausystem/region/Region.java b/BauSystem_Main/src/de/steamwar/bausystem/region/Region.java index a9d457df..48980111 100644 --- a/BauSystem_Main/src/de/steamwar/bausystem/region/Region.java +++ b/BauSystem_Main/src/de/steamwar/bausystem/region/Region.java @@ -408,7 +408,7 @@ public class Region { pastePoint = pastePoint.add(0, 0, prototype.getTestblock().getSizeZ() / 2); } else { clipboard = schematic.load(); - if (Math.abs(clipboard.getOrigin().getZ() - clipboard.getMinimumPoint().getZ()) < 2) { + if (Math.abs(clipboard.getOrigin().getZ() - clipboard.getMinimumPoint().getZ()) < 2 || Math.abs(clipboard.getOrigin().getZ() - clipboard.getMinimumPoint().getZ()) > prototype.getTestblock().getSizeZ()) { pastePoint = pastePoint.add(0, 0, prototype.getTestblock().getSizeZ() / 2); } else if (clipboard.getDimensions().getZ() != prototype.getTestblock().getSizeZ()) { pastePoint = pastePoint.add(0, 0, clipboard.getDimensions().getZ() / 2 - (clipboard.getOrigin().getZ() - clipboard.getMinimumPoint().getZ()) - 1);