mirror of
https://github.com/Dreeam-qwq/Gale.git
synced 2025-12-22 08:19:31 +00:00
Move empty ServerLevel array to reduce allocations patch
This commit is contained in:
@@ -133,14 +133,16 @@ index f597d65d56964297eeeed6c7e77703764178fee0..d503c0a7c4706af28a7db2face5efd8d
|
||||
this.storage = Arrays.copyOf(this.storage, this.storage.length * 2);
|
||||
diff --git a/src/main/java/me/titaniumtown/ArrayConstants.java b/src/main/java/me/titaniumtown/ArrayConstants.java
|
||||
new file mode 100644
|
||||
index 0000000000000000000000000000000000000000..ceec23a85aae625fbbe2db95c8e9c83fb9f9767c
|
||||
index 0000000000000000000000000000000000000000..c99e9e361ab4377c0df76b943b96bf87e138d91c
|
||||
--- /dev/null
|
||||
+++ b/src/main/java/me/titaniumtown/ArrayConstants.java
|
||||
@@ -0,0 +1,18 @@
|
||||
@@ -0,0 +1,21 @@
|
||||
+// Gale - JettPack - reduce array allocations
|
||||
+
|
||||
+package me.titaniumtown;
|
||||
+
|
||||
+import net.minecraft.server.level.ServerLevel;
|
||||
+
|
||||
+public final class ArrayConstants {
|
||||
+
|
||||
+ private ArrayConstants() {}
|
||||
@@ -153,6 +155,7 @@ index 0000000000000000000000000000000000000000..ceec23a85aae625fbbe2db95c8e9c83f
|
||||
+ public static final long[] emptyLongArray = new long[0];
|
||||
+ public static final org.bukkit.entity.Entity[] emptyBukkitEntityArray = new org.bukkit.entity.Entity[0];
|
||||
+ public static final net.minecraft.world.entity.Entity[] emptyEntityArray = new net.minecraft.world.entity.Entity[0];
|
||||
+ public static final ServerLevel[] emptyServerLevelArray = new ServerLevel[0];
|
||||
+
|
||||
+}
|
||||
diff --git a/src/main/java/net/minecraft/advancements/RequirementsStrategy.java b/src/main/java/net/minecraft/advancements/RequirementsStrategy.java
|
||||
|
||||
Reference in New Issue
Block a user