From d389b919018e73b143bb0a3aec48c3fc8bf4e606 Mon Sep 17 00:00:00 2001 From: yoyosource Date: Sun, 19 Sep 2021 21:37:50 +0200 Subject: [PATCH] Fix Region Testblock paste Signed-off-by: yoyosource --- BauSystem_Main/src/de/steamwar/bausystem/region/Region.java | 4 +++- 1 file changed, 3 insertions(+), 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 d3248977..a9d457df 100644 --- a/BauSystem_Main/src/de/steamwar/bausystem/region/Region.java +++ b/BauSystem_Main/src/de/steamwar/bausystem/region/Region.java @@ -408,7 +408,9 @@ public class Region { pastePoint = pastePoint.add(0, 0, prototype.getTestblock().getSizeZ() / 2); } else { clipboard = schematic.load(); - if (clipboard.getDimensions().getZ() != prototype.getTestblock().getSizeZ()) { + if (Math.abs(clipboard.getOrigin().getZ() - clipboard.getMinimumPoint().getZ()) < 2) { + 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); } else { pastePoint = pastePoint.add(0, 0, prototype.getTestblock().getSizeZ() / 2);