Mirror von
https://github.com/IntellectualSites/FastAsyncWorldEdit.git
synchronisiert 2024-11-07 03:50:06 +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:
Ursprung
338be0ff31
Commit
41073bb1a0
@ -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);
|
||||
}
|
||||
|
||||
|
@ -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;
|
||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren