mirror of
https://github.com/PaperMC/Paper.git
synced 2025-08-04 06:02:12 -07:00
First few files and initial rebuild
This commit is contained in:
@@ -0,0 +1,30 @@
|
||||
--- a/com/mojang/math/OctahedralGroup.java
|
||||
+++ b/com/mojang/math/OctahedralGroup.java
|
||||
@@ -111,6 +_,7 @@
|
||||
this.permutation = permutation;
|
||||
this.transformation = new Matrix3f().scaling(invertX ? -1.0F : 1.0F, invertY ? -1.0F : 1.0F, invertZ ? -1.0F : 1.0F);
|
||||
this.transformation.mul(permutation.transformation());
|
||||
+ this.initializeRotationDirections(); // Paper - Avoid Lazy Initialization for Enum Fields
|
||||
}
|
||||
|
||||
private BooleanList packInversions() {
|
||||
@@ -139,7 +_,7 @@
|
||||
return this.name;
|
||||
}
|
||||
|
||||
- public Direction rotate(Direction direction) {
|
||||
+ public void initializeRotationDirections() { // Paper - Avoid Lazy Initialization for Enum Fields
|
||||
if (this.rotatedDirections == null) {
|
||||
this.rotatedDirections = Maps.newEnumMap(Direction.class);
|
||||
Direction.Axis[] axiss = Direction.Axis.values();
|
||||
@@ -154,6 +_,10 @@
|
||||
}
|
||||
}
|
||||
|
||||
+ // Paper start - Avoid Lazy Initialization for Enum Fields
|
||||
+ }
|
||||
+ public Direction rotate(Direction direction) {
|
||||
+ // Paper end - Avoid Lazy Initialization for Enum Fields
|
||||
return this.rotatedDirections.get(direction);
|
||||
}
|
||||
|
Reference in New Issue
Block a user