fixed? ws-region-reset
Dieser Commit ist enthalten in:
Ursprung
8d6806b538
Commit
2131cc9423
@ -54,27 +54,6 @@ class Region_15 {
|
|||||||
}
|
}
|
||||||
|
|
||||||
static EditSession paste(Clipboard clipboard, int x, int y, int z, boolean rotate) {
|
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)) {
|
try (EditSession e = WorldEdit.getInstance().getEditSessionFactory().getEditSession(new BukkitWorld(Bukkit.getWorlds().get(0)), -1)) {
|
||||||
ClipboardHolder ch = new ClipboardHolder(clipboard);
|
ClipboardHolder ch = new ClipboardHolder(clipboard);
|
||||||
BlockVector3 dimensions = clipboard.getDimensions();
|
BlockVector3 dimensions = clipboard.getDimensions();
|
||||||
|
In neuem Issue referenzieren
Einen Benutzer sperren