3
0
Mirror von https://github.com/IntellectualSites/FastAsyncWorldEdit.git synchronisiert 2024-12-24 18:10:08 +01:00

More exact testing for scaling/flipping in AffineTransform and only combine transforms when not equal in ForwardExtentCopy

- Fixes #1162
 - Also fixes rotation in x/z axes
Dieser Commit ist enthalten in:
dordsor21 2021-07-10 19:47:39 +01:00
Ursprung 338be0ff31
Commit 41073bb1a0
Es konnte kein GPG-Schlüssel zu dieser Signatur gefunden werden
GPG-Schlüssel-ID: 1E53E88969FFCF0B
2 geänderte Dateien mit 5 neuen und 4 gelöschten Zeilen

Datei anzeigen

@ -279,6 +279,8 @@ public class ForwardExtentCopy implements Operation {
public Operation resume(RunContext run) throws WorldEditException {
if (currentTransform == null) {
currentTransform = transform;
} else if (!currentTransform.equals(transform)) {
currentTransform = currentTransform.combine(transform);
}
if (lastBiomeVisitor != null) {
affectedBiomeCols += lastBiomeVisitor.getAffected();
@ -406,7 +408,6 @@ public class ForwardExtentCopy implements Operation {
}
if (transExt != null) {
currentTransform = currentTransform.combine(transform);
transExt.setTransform(currentTransform);
}

Datei anzeigen

@ -306,13 +306,13 @@ public class AffineTransform implements Transform, Serializable {
return true;
}
// Check for flip-and-rotate
if (vector.getX() != 0 && vector.getY() != 0 && m01 != 0 && m10 != 0) {
if (vector.getX() != 0 && vector.getY() != 0 && ((m01 < 0 && m10 < 0) || (m01 > 0 && m10 > 0))) {
flip = true;
}
if (vector.getX() != 0 && vector.getZ() != 0 && m02 != 0 && m20 != 0) {
if (vector.getX() != 0 && vector.getZ() != 0 && ((m02 < 0 && m20 < 0) || (m02 > 0 && m20 > 0))) {
flip = !flip;
}
if (vector.getY() != 0 && vector.getZ() != 0 && m12 != 0 && m21 != 0) {
if (vector.getY() != 0 && vector.getZ() != 0 && ((m12 < 0 && m21 < 0) || (m12 > 0 && m21 > 0))) {
flip = !flip;
}
return flip;