Skip to content

Commit d0d0efe

Browse files
Partially revert 083c083 for Transformation (#11798)
* Partially revert 083c083 for Transformation The type is used in a way that requires mutability * keep copy in ctors
1 parent aa2c52b commit d0d0efe

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

paper-api/src/main/java/org/bukkit/util/Transformation.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ public Transformation(@NotNull Vector3f translation, @NotNull Quaternionf leftRo
5252
*/
5353
@NotNull
5454
public Vector3f getTranslation() {
55-
return new Vector3f(this.translation);
55+
return this.translation;
5656
}
5757

5858
/**
@@ -62,7 +62,7 @@ public Vector3f getTranslation() {
6262
*/
6363
@NotNull
6464
public Quaternionf getLeftRotation() {
65-
return new Quaternionf(this.leftRotation);
65+
return this.leftRotation;
6666
}
6767

6868
/**
@@ -72,7 +72,7 @@ public Quaternionf getLeftRotation() {
7272
*/
7373
@NotNull
7474
public Vector3f getScale() {
75-
return new Vector3f(this.scale);
75+
return this.scale;
7676
}
7777

7878
/**
@@ -82,7 +82,7 @@ public Vector3f getScale() {
8282
*/
8383
@NotNull
8484
public Quaternionf getRightRotation() {
85-
return new Quaternionf(this.rightRotation);
85+
return this.rightRotation;
8686
}
8787

8888
@Override

0 commit comments

Comments
 (0)