SteamWar/BauSystem2.0
Archiviert
12
0

Fix one off in rotated pasting
Alle Prüfungen waren erfolgreich
SteamWarCI Build successful

Signed-off-by: yoyosource <yoyosource@nidido.de>
Dieser Commit ist enthalten in:
yoyosource 2021-12-03 16:32:03 +01:00
Ursprung b20a85ab2e
Commit 932f5f63ca
2 geänderte Dateien mit 4 neuen und 3 gelöschten Zeilen

Datei anzeigen

@ -129,7 +129,7 @@ public class Region_15 {
BlockVector3 offset = clipboard.getRegion().getMinimumPoint().subtract(clipboard.getOrigin()); BlockVector3 offset = clipboard.getRegion().getMinimumPoint().subtract(clipboard.getOrigin());
if (pasteOptions.isRotate()) { if (pasteOptions.isRotate()) {
ch.setTransform(new AffineTransform().rotateY(180)); ch.setTransform(new AffineTransform().rotateY(180));
v = v.add(dimensions.getX() / 2, 0, dimensions.getZ() / 2).subtract(offset.multiply(-1, 1, -1)).subtract(1, 0, 1); v = v.add(dimensions.getX() / 2, 0, dimensions.getZ() / 2).subtract(offset.multiply(-1, 1, -1)).subtract(0, 0, 1);
} else { } else {
v = v.subtract(dimensions.getX() / 2, 0, dimensions.getZ() / 2).subtract(offset); v = v.subtract(dimensions.getX() / 2, 0, dimensions.getZ() / 2).subtract(offset);
} }

Datei anzeigen

@ -431,9 +431,10 @@ public class Region {
pastePoint = pastePoint.add(0, 0, prototype.getTestblock().getSizeZ() / 2); pastePoint = pastePoint.add(0, 0, prototype.getTestblock().getSizeZ() / 2);
} else { } else {
clipboard = schematic.load(); clipboard = schematic.load();
if (Math.abs(clipboard.getOrigin().getZ() - clipboard.getMinimumPoint().getZ()) < 2 || Math.abs(clipboard.getOrigin().getZ() - clipboard.getMinimumPoint().getZ()) > prototype.getTestblock().getSizeZ()) { int dz = Math.abs(clipboard.getOrigin().getZ() - clipboard.getMinimumPoint().getZ());
if (dz < 2 || dz > prototype.getTestblock().getSizeZ()) {
pastePoint = pastePoint.add(0, 0, prototype.getTestblock().getSizeZ() / 2); pastePoint = pastePoint.add(0, 0, prototype.getTestblock().getSizeZ() / 2);
} else if (clipboard.getDimensions().getZ() != prototype.getTestblock().getSizeZ()) { } else if (clipboard.getDimensions().getZ() < prototype.getTestblock().getSizeZ()) {
pastePoint = pastePoint.add(0, 0, clipboard.getDimensions().getZ() / 2 - (clipboard.getOrigin().getZ() - clipboard.getMinimumPoint().getZ()) - 1); pastePoint = pastePoint.add(0, 0, clipboard.getDimensions().getZ() / 2 - (clipboard.getOrigin().getZ() - clipboard.getMinimumPoint().getZ()) - 1);
} else { } else {
pastePoint = pastePoint.add(0, 0, prototype.getTestblock().getSizeZ() / 2); pastePoint = pastePoint.add(0, 0, prototype.getTestblock().getSizeZ() / 2);