diff options
author | Jake Potrebic <[email protected]> | 2023-06-16 19:27:45 -0700 |
---|---|---|
committer | GitHub <[email protected]> | 2023-06-16 19:27:45 -0700 |
commit | 38856661c0f10f927b130bdc83c3cc6aafa5cb9a (patch) | |
tree | f79c26ce0914fae57a35fe9661d54ff3b6f9d2a8 /patches/server/0960-Avoid-Lazy-Initialization-for-Enum-Fields.patch | |
parent | a226f44b452c8c75ca077b492ba4a957629ba489 (diff) | |
download | Paper-38856661c0f10f927b130bdc83c3cc6aafa5cb9a.tar.gz Paper-38856661c0f10f927b130bdc83c3cc6aafa5cb9a.zip |
Remove stacktrace on exception from reading server.properties (#9296)
Diffstat (limited to 'patches/server/0960-Avoid-Lazy-Initialization-for-Enum-Fields.patch')
-rw-r--r-- | patches/server/0960-Avoid-Lazy-Initialization-for-Enum-Fields.patch | 40 |
1 files changed, 0 insertions, 40 deletions
diff --git a/patches/server/0960-Avoid-Lazy-Initialization-for-Enum-Fields.patch b/patches/server/0960-Avoid-Lazy-Initialization-for-Enum-Fields.patch deleted file mode 100644 index 809f5d1710..0000000000 --- a/patches/server/0960-Avoid-Lazy-Initialization-for-Enum-Fields.patch +++ /dev/null @@ -1,40 +0,0 @@ -From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 -From: Owen1212055 <[email protected]> -Date: Sun, 14 May 2023 00:47:28 -0400 -Subject: [PATCH] Avoid Lazy Initialization for Enum Fields - -This patch is meant to get rid of any instances of lazy initialization that Minecraft introduces for enums. -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..bbd407ab618fc89a82a6724ba3503d8b4a397016 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 { - 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.mul(axisTransformation.transformation()); -+ this.initializeRotationDirections(); // Paper - } - - private BooleanList packInversions() { -@@ -139,7 +140,7 @@ public enum OctahedralGroup implements StringRepresentable { - return this.name; - } - -- public Direction rotate(Direction direction) { -+ public void initializeRotationDirections() { // Paper - 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 { - } - } - -+ // Paper start - Move lazy initialization to constructor -+ } -+ public Direction rotate(Direction direction) { -+ // Paper end - return this.rotatedDirections.get(direction); - } - |