mirror of
https://github.com/plexusorg/Plex-FAWE.git
synced 2024-12-22 09:17:39 +00: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
This commit is contained in:
parent
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;
|
||||
|
Loading…
Reference in New Issue
Block a user