diff --git a/BauSystem_15/src/de/steamwar/bausystem/world/Region_15.java b/BauSystem_15/src/de/steamwar/bausystem/world/Region_15.java index 7547b24..76da59d 100644 --- a/BauSystem_15/src/de/steamwar/bausystem/world/Region_15.java +++ b/BauSystem_15/src/de/steamwar/bausystem/world/Region_15.java @@ -54,27 +54,6 @@ class Region_15 { } static EditSession paste(Clipboard clipboard, int x, int y, int z, boolean rotate) { - try (EditSession e = WorldEdit.getInstance().getEditSessionFactory().getEditSession(new BukkitWorld(Bukkit.getWorlds().get(0)), -1)) { - ClipboardHolder ch = new ClipboardHolder(clipboard); - BlockVector3 dimensions = clipboard.getDimensions(); - BlockVector3 v = BlockVector3.at(x, y, z); - BlockVector3 offset = clipboard.getRegion().getMinimumPoint().subtract(clipboard.getOrigin()); - System.out.println("min point cb: " + clipboard.getMinimumPoint()); - System.out.println("min point rg: " + clipboard.getRegion().getMinimumPoint()); - System.out.println("origin: " + clipboard.getOrigin()); - if (rotate) { - ch.setTransform(new AffineTransform().rotateY(180)); - v = v.add(dimensions.getX() / 2 + dimensions.getX() % 2, 0, dimensions.getZ() / 2 + dimensions.getZ() % 2).subtract(offset.multiply(-1, 1, -1)).subtract(1, 0, 1); - } else { - v = v.subtract(dimensions.getX() / 2 - dimensions.getX() % 2, 0, dimensions.getZ() / 2 - dimensions.getZ() % 2).subtract(offset); - } - - Operations.completeBlindly(ch.createPaste(e).to(v).build()); - return e; - } - } - - static EditSession pasteNew(Clipboard clipboard, int x, int y, int z, boolean rotate) { try (EditSession e = WorldEdit.getInstance().getEditSessionFactory().getEditSession(new BukkitWorld(Bukkit.getWorlds().get(0)), -1)) { ClipboardHolder ch = new ClipboardHolder(clipboard); BlockVector3 dimensions = clipboard.getDimensions();