diff options
Diffstat (limited to 'patches/server/0863-Avoid-Lazy-Initialization-for-Enum-Fields.patch')
-rw-r--r-- | patches/server/0863-Avoid-Lazy-Initialization-for-Enum-Fields.patch | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/patches/server/0863-Avoid-Lazy-Initialization-for-Enum-Fields.patch b/patches/server/0863-Avoid-Lazy-Initialization-for-Enum-Fields.patch index 346c3fd86c..112f2214ae 100644 --- a/patches/server/0863-Avoid-Lazy-Initialization-for-Enum-Fields.patch +++ b/patches/server/0863-Avoid-Lazy-Initialization-for-Enum-Fields.patch @@ -7,18 +7,18 @@ This patch is meant to get rid of any instances of lazy initialization that Mine This has the possibility to create race condition issues, and generally don't make sense to be lazily done anyways. diff --git a/src/main/java/com/mojang/math/OctahedralGroup.java b/src/main/java/com/mojang/math/OctahedralGroup.java -index a5a889d40228a0d6c7259caf8cb2554588d9aaf9..5009192046e5e083d14cef3f448b98b978dd54bf 100644 +index 8af12b383bb80d1c0a12e1151030ab6e21c27e79..d2efe5e4f767f8316bc3915573bd1efcbcf20968 100644 --- a/src/main/java/com/mojang/math/OctahedralGroup.java +++ b/src/main/java/com/mojang/math/OctahedralGroup.java -@@ -111,6 +111,7 @@ public enum OctahedralGroup implements StringRepresentable { +@@ -110,6 +110,7 @@ public enum OctahedralGroup implements StringRepresentable { this.permutation = axisTransformation; - this.transformation = (new Matrix3f()).scaling(flipX ? -1.0F : 1.0F, flipY ? -1.0F : 1.0F, flipZ ? -1.0F : 1.0F); + this.transformation = new Matrix3f().scaling(flipX ? -1.0F : 1.0F, flipY ? -1.0F : 1.0F, flipZ ? -1.0F : 1.0F); this.transformation.mul(axisTransformation.transformation()); + this.initializeRotationDirections(); // Paper - Avoid Lazy Initialization for Enum Fields } private BooleanList packInversions() { -@@ -139,7 +140,7 @@ public enum OctahedralGroup implements StringRepresentable { +@@ -138,7 +139,7 @@ public enum OctahedralGroup implements StringRepresentable { return this.name; } @@ -27,7 +27,7 @@ index a5a889d40228a0d6c7259caf8cb2554588d9aaf9..5009192046e5e083d14cef3f448b98b9 if (this.rotatedDirections == null) { this.rotatedDirections = Maps.newEnumMap(Direction.class); Direction.Axis[] axiss = Direction.Axis.values(); -@@ -154,6 +155,10 @@ public enum OctahedralGroup implements StringRepresentable { +@@ -153,6 +154,10 @@ public enum OctahedralGroup implements StringRepresentable { } } |