Skip to content

Commit

Permalink
Partially revert 083c083 for Transformation (#11798)
Browse files Browse the repository at this point in the history
* Partially revert 083c083 for Transformation

The type is used in a way that requires mutability

* keep copy in ctors
  • Loading branch information
Machine-Maker authored Dec 23, 2024
1 parent aa2c52b commit d0d0efe
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions paper-api/src/main/java/org/bukkit/util/Transformation.java
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ public Transformation(@NotNull Vector3f translation, @NotNull Quaternionf leftRo
*/
@NotNull
public Vector3f getTranslation() {
return new Vector3f(this.translation);
return this.translation;
}

/**
Expand All @@ -62,7 +62,7 @@ public Vector3f getTranslation() {
*/
@NotNull
public Quaternionf getLeftRotation() {
return new Quaternionf(this.leftRotation);
return this.leftRotation;
}

/**
Expand All @@ -72,7 +72,7 @@ public Quaternionf getLeftRotation() {
*/
@NotNull
public Vector3f getScale() {
return new Vector3f(this.scale);
return this.scale;
}

/**
Expand All @@ -82,7 +82,7 @@ public Vector3f getScale() {
*/
@NotNull
public Quaternionf getRightRotation() {
return new Quaternionf(this.rightRotation);
return this.rightRotation;
}

@Override
Expand Down

0 comments on commit d0d0efe

Please sign in to comment.