[ci skip] Move chunk system patch back

This commit is contained in:
Nassim Jahnke
2024-01-24 22:13:08 +01:00
parent 49feea0525
commit 52438f04a0
19 changed files with 317 additions and 551 deletions

View File

@@ -75,7 +75,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
+ }
+
+ public static TickThread getCurrentTickThread() {
+ return (TickThread)Thread.currentThread();
+ return (TickThread) Thread.currentThread();
+ }
+
+ public static boolean isTickThread() {
@@ -83,11 +83,15 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
+ }
+
+ public static boolean isTickThreadFor(final ServerLevel world, final int chunkX, final int chunkZ) {
+ return Bukkit.isPrimaryThread();
+ return isTickThread();
+ }
+
+ public static boolean isTickThreadFor(final ServerLevel world, final int chunkX, final int chunkZ, final int radius) {
+ return isTickThread();
+ }
+
+ public static boolean isTickThreadFor(final Entity entity) {
+ return Bukkit.isPrimaryThread();
+ return isTickThread();
+ }
+}
diff --git a/src/main/java/org/spigotmc/AsyncCatcher.java b/src/main/java/org/spigotmc/AsyncCatcher.java