This commit is contained in:
Jesse Boyd 2017-09-08 09:37:21 +10:00
parent 31d43755ab
commit 89c0a2cd2f
No known key found for this signature in database
GPG Key ID: 59F1DE6293AF6E1F
2 changed files with 5 additions and 3 deletions

View File

@ -474,7 +474,7 @@ public class ClipboardCommands extends MethodCommands {
transform = transform.rotateY(-(yRotate != null ? yRotate : 0));
transform = transform.rotateX(-(xRotate != null ? xRotate : 0));
transform = transform.rotateZ(-(zRotate != null ? zRotate : 0));
holder.setTransform(holder.getTransform().combine(transform));
holder.setTransform(transform.combine(holder.getTransform()));
BBC.COMMAND_ROTATE.send(player);
if (!FawePlayer.wrap(player).hasPermission("fawe.tips"))
BBC.TIP_FLIP.or(BBC.TIP_DEFORM, BBC.TIP_TRANSFORM).send(player);
@ -496,7 +496,7 @@ public class ClipboardCommands extends MethodCommands {
Clipboard clipboard = holder.getClipboard();
AffineTransform transform = new AffineTransform();
transform = transform.scale(direction.positive().multiply(-2).add(1, 1, 1));
holder.setTransform(holder.getTransform().combine(transform));
holder.setTransform(transform.combine(holder.getTransform()));
BBC.COMMAND_FLIPPED.send(player);
}

View File

@ -305,7 +305,9 @@ public class AffineTransform implements Transform, Serializable {
@Override
public Transform combine(Transform other) {
if (other instanceof AffineTransform) {
if (other instanceof Identity || other.isIdentity()) {
return this;
} else if (other instanceof AffineTransform) {
return concatenate((AffineTransform) other);
} else {
return new CombinedTransform(this, other);