diff --git a/patches/server/0017-Add-config-to-disable-async-catchers.patch b/patches/server/0017-Add-config-to-disable-async-catchers.patch new file mode 100644 index 0000000..656a8af --- /dev/null +++ b/patches/server/0017-Add-config-to-disable-async-catchers.patch @@ -0,0 +1,106 @@ +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: MrHua269 +Date: Wed, 7 Aug 2024 14:34:15 +0800 +Subject: [PATCH] Add config to disable async catchers + + +diff --git a/src/main/java/ca/spottedleaf/moonrise/common/util/TickThread.java b/src/main/java/ca/spottedleaf/moonrise/common/util/TickThread.java +index 7d626bec6f0a4497026de6c0311e27cf95cfd757..2760e66046a37327d279a5bcdfb56a5b073b82a5 100644 +--- a/src/main/java/ca/spottedleaf/moonrise/common/util/TickThread.java ++++ b/src/main/java/ca/spottedleaf/moonrise/common/util/TickThread.java +@@ -26,49 +26,49 @@ public class TickThread extends Thread { + */ + @Deprecated + public static void ensureTickThread(final String reason) { +- if (!isTickThread()) { ++ if (!isTickThread() && !me.earthme.luminol.config.modules.experiment.DisableAsyncCatcherConfig.enabled) { // Luminol + LOGGER.error("Thread " + Thread.currentThread().getName() + " failed main thread check: " + reason, new Throwable()); + throw new IllegalStateException(reason); + } + } + + public static void ensureTickThread(final Level world, final BlockPos pos, final String reason) { +- if (!isTickThreadFor(world, pos)) { ++ if (!isTickThreadFor(world, pos) && !me.earthme.luminol.config.modules.experiment.DisableAsyncCatcherConfig.enabled) { // Luminol + LOGGER.error("Thread " + Thread.currentThread().getName() + " failed main thread check: " + reason, new Throwable()); + throw new IllegalStateException(reason); + } + } + + public static void ensureTickThread(final Level world, final ChunkPos pos, final String reason) { +- if (!isTickThreadFor(world, pos)) { ++ if (!isTickThreadFor(world, pos) && !me.earthme.luminol.config.modules.experiment.DisableAsyncCatcherConfig.enabled) { // Luminol + LOGGER.error("Thread " + Thread.currentThread().getName() + " failed main thread check: " + reason, new Throwable()); + throw new IllegalStateException(reason); + } + } + + public static void ensureTickThread(final Level world, final int chunkX, final int chunkZ, final String reason) { +- if (!isTickThreadFor(world, chunkX, chunkZ)) { ++ if (!isTickThreadFor(world, chunkX, chunkZ) && !me.earthme.luminol.config.modules.experiment.DisableAsyncCatcherConfig.enabled) { // Luminol + LOGGER.error("Thread " + Thread.currentThread().getName() + " failed main thread check: " + reason, new Throwable()); + throw new IllegalStateException(reason); + } + } + + public static void ensureTickThread(final Entity entity, final String reason) { +- if (!isTickThreadFor(entity)) { ++ if (!isTickThreadFor(entity) && !me.earthme.luminol.config.modules.experiment.DisableAsyncCatcherConfig.enabled) { // Luminol + LOGGER.error("Thread " + Thread.currentThread().getName() + " failed main thread check: " + reason, new Throwable()); + throw new IllegalStateException(reason); + } + } + + public static void ensureTickThread(final Level world, final AABB aabb, final String reason) { +- if (!isTickThreadFor(world, aabb)) { ++ if (!isTickThreadFor(world, aabb) && !me.earthme.luminol.config.modules.experiment.DisableAsyncCatcherConfig.enabled) { // Luminol + LOGGER.error("Thread " + Thread.currentThread().getName() + " failed main thread check: " + reason, new Throwable()); + throw new IllegalStateException(reason); + } + } + + public static void ensureTickThread(final Level world, final double blockX, final double blockZ, final String reason) { +- if (!isTickThreadFor(world, blockX, blockZ)) { ++ if (!isTickThreadFor(world, blockX, blockZ) && !me.earthme.luminol.config.modules.experiment.DisableAsyncCatcherConfig.enabled) { // Luminol + LOGGER.error("Thread " + Thread.currentThread().getName() + " failed main thread check: " + reason, new Throwable()); + throw new IllegalStateException(reason); + } +diff --git a/src/main/java/me/earthme/luminol/config/modules/experiment/DisableAsyncCatcherConfig.java b/src/main/java/me/earthme/luminol/config/modules/experiment/DisableAsyncCatcherConfig.java +new file mode 100644 +index 0000000000000000000000000000000000000000..61f653eeca366672ded88c491cf5c59e546e7301 +--- /dev/null ++++ b/src/main/java/me/earthme/luminol/config/modules/experiment/DisableAsyncCatcherConfig.java +@@ -0,0 +1,20 @@ ++package me.earthme.luminol.config.modules.experiment; ++ ++import me.earthme.luminol.config.ConfigInfo; ++import me.earthme.luminol.config.EnumConfigCategory; ++import me.earthme.luminol.config.IConfigModule; ++ ++public class DisableAsyncCatcherConfig implements IConfigModule { ++ @ConfigInfo(baseName = "enabled") ++ public static boolean enabled = false; ++ ++ @Override ++ public EnumConfigCategory getCategory() { ++ return EnumConfigCategory.EXPERIMENT; ++ } ++ ++ @Override ++ public String getBaseName() { ++ return "disable_async_catchers"; ++ } ++} +diff --git a/src/main/java/org/spigotmc/AsyncCatcher.java b/src/main/java/org/spigotmc/AsyncCatcher.java +index 1f23e775eba1c34e01145bd91b0ce26fed6ca9de..3e0dbf379fc1b5baa27936cb902b3c54f9b0f4c9 100644 +--- a/src/main/java/org/spigotmc/AsyncCatcher.java ++++ b/src/main/java/org/spigotmc/AsyncCatcher.java +@@ -9,7 +9,7 @@ public class AsyncCatcher + + public static void catchOp(String reason) + { +- if (!ca.spottedleaf.moonrise.common.util.TickThread.isTickThread()) // Paper // Paper - rewrite chunk system ++ if (!ca.spottedleaf.moonrise.common.util.TickThread.isTickThread() && !me.earthme.luminol.config.modules.experiment.DisableAsyncCatcherConfig.enabled) // Paper // Paper - rewrite chunk system // Luminol + { + MinecraftServer.LOGGER.error("Thread " + Thread.currentThread().getName() + " failed main thread check: " + reason, new Throwable()); // Paper + throw new IllegalStateException( "Asynchronous " + reason + "!" ); diff --git a/patches/server/0017-Try-fixing-folia-spector-teleportation.patch b/patches/server/0018-Try-fixing-folia-spector-teleportation.patch similarity index 100% rename from patches/server/0017-Try-fixing-folia-spector-teleportation.patch rename to patches/server/0018-Try-fixing-folia-spector-teleportation.patch diff --git a/patches/server/0018-Teleport-async-if-entity-was-moving-to-another-regio.patch b/patches/server/0019-Teleport-async-if-entity-was-moving-to-another-regio.patch similarity index 100% rename from patches/server/0018-Teleport-async-if-entity-was-moving-to-another-regio.patch rename to patches/server/0019-Teleport-async-if-entity-was-moving-to-another-regio.patch diff --git a/patches/server/0019-Try-fixing-folia-off-region-POI-accessing-issue.patch b/patches/server/0020-Try-fixing-folia-off-region-POI-accessing-issue.patch similarity index 100% rename from patches/server/0019-Try-fixing-folia-off-region-POI-accessing-issue.patch rename to patches/server/0020-Try-fixing-folia-off-region-POI-accessing-issue.patch diff --git a/patches/server/0020-Prevent-teleportAsync-calling-during-moving-event-be.patch b/patches/server/0021-Prevent-teleportAsync-calling-during-moving-event-be.patch similarity index 100% rename from patches/server/0020-Prevent-teleportAsync-calling-during-moving-event-be.patch rename to patches/server/0021-Prevent-teleportAsync-calling-during-moving-event-be.patch diff --git a/patches/server/0021-Try-optimizing-the-task-dispatching.patch b/patches/server/0022-Try-optimizing-the-task-dispatching.patch similarity index 100% rename from patches/server/0021-Try-optimizing-the-task-dispatching.patch rename to patches/server/0022-Try-optimizing-the-task-dispatching.patch diff --git a/patches/server/0022-Force-disable-builtin-spark-plugin.patch b/patches/server/0023-Force-disable-builtin-spark-plugin.patch similarity index 100% rename from patches/server/0022-Force-disable-builtin-spark-plugin.patch rename to patches/server/0023-Force-disable-builtin-spark-plugin.patch diff --git a/patches/server/0023-Check-allow-before-getting-block-state-while-tripwir.patch b/patches/server/0024-Check-allow-before-getting-block-state-while-tripwir.patch similarity index 100% rename from patches/server/0023-Check-allow-before-getting-block-state-while-tripwir.patch rename to patches/server/0024-Check-allow-before-getting-block-state-while-tripwir.patch diff --git a/patches/server/0024-Kaiiju-Don-t-pathfind-outside-region.patch b/patches/server/0025-Kaiiju-Don-t-pathfind-outside-region.patch similarity index 100% rename from patches/server/0024-Kaiiju-Don-t-pathfind-outside-region.patch rename to patches/server/0025-Kaiiju-Don-t-pathfind-outside-region.patch diff --git a/patches/server/0025-Kaiiju-Vanilla-end-portal-teleportation.patch b/patches/server/0026-Kaiiju-Vanilla-end-portal-teleportation.patch similarity index 100% rename from patches/server/0025-Kaiiju-Vanilla-end-portal-teleportation.patch rename to patches/server/0026-Kaiiju-Vanilla-end-portal-teleportation.patch diff --git a/patches/server/0026-Petal-Reduce-sensor-work.patch b/patches/server/0027-Petal-Reduce-sensor-work.patch similarity index 100% rename from patches/server/0026-Petal-Reduce-sensor-work.patch rename to patches/server/0027-Petal-Reduce-sensor-work.patch diff --git a/patches/server/0027-Pufferfish-Improve-fluid-direction-caching.patch b/patches/server/0028-Pufferfish-Improve-fluid-direction-caching.patch similarity index 100% rename from patches/server/0027-Pufferfish-Improve-fluid-direction-caching.patch rename to patches/server/0028-Pufferfish-Improve-fluid-direction-caching.patch diff --git a/patches/server/0028-Pufferfish-Cache-climbing-check-for-activation.patch b/patches/server/0029-Pufferfish-Cache-climbing-check-for-activation.patch similarity index 100% rename from patches/server/0028-Pufferfish-Cache-climbing-check-for-activation.patch rename to patches/server/0029-Pufferfish-Cache-climbing-check-for-activation.patch diff --git a/patches/server/0029-Pufferfish-Reduce-chunk-loading-lookups.patch b/patches/server/0030-Pufferfish-Reduce-chunk-loading-lookups.patch similarity index 100% rename from patches/server/0029-Pufferfish-Reduce-chunk-loading-lookups.patch rename to patches/server/0030-Pufferfish-Reduce-chunk-loading-lookups.patch diff --git a/patches/server/0030-Pufferfish-Early-return-optimization-for-target-find.patch b/patches/server/0031-Pufferfish-Early-return-optimization-for-target-find.patch similarity index 100% rename from patches/server/0030-Pufferfish-Early-return-optimization-for-target-find.patch rename to patches/server/0031-Pufferfish-Early-return-optimization-for-target-find.patch diff --git a/patches/server/0031-Pufferfish-Fix-Paper-6045-block-goal-shouldn-t-load-.patch b/patches/server/0032-Pufferfish-Fix-Paper-6045-block-goal-shouldn-t-load-.patch similarity index 100% rename from patches/server/0031-Pufferfish-Fix-Paper-6045-block-goal-shouldn-t-load-.patch rename to patches/server/0032-Pufferfish-Fix-Paper-6045-block-goal-shouldn-t-load-.patch diff --git a/patches/server/0032-Pufferfish-Skip-cloning-loot-parameters.patch b/patches/server/0033-Pufferfish-Skip-cloning-loot-parameters.patch similarity index 100% rename from patches/server/0032-Pufferfish-Skip-cloning-loot-parameters.patch rename to patches/server/0033-Pufferfish-Skip-cloning-loot-parameters.patch diff --git a/patches/server/0033-Pufferfish-Reduce-projectile-chunk-loading.patch b/patches/server/0034-Pufferfish-Reduce-projectile-chunk-loading.patch similarity index 100% rename from patches/server/0033-Pufferfish-Reduce-projectile-chunk-loading.patch rename to patches/server/0034-Pufferfish-Reduce-projectile-chunk-loading.patch diff --git a/patches/server/0034-Pufferfish-Entity-TTL.patch b/patches/server/0035-Pufferfish-Entity-TTL.patch similarity index 100% rename from patches/server/0034-Pufferfish-Entity-TTL.patch rename to patches/server/0035-Pufferfish-Entity-TTL.patch diff --git a/patches/server/0035-Pufferfish-Dynamic-Activation-of-Brain.patch b/patches/server/0036-Pufferfish-Dynamic-Activation-of-Brain.patch similarity index 100% rename from patches/server/0035-Pufferfish-Dynamic-Activation-of-Brain.patch rename to patches/server/0036-Pufferfish-Dynamic-Activation-of-Brain.patch diff --git a/patches/server/0036-Pufferfish-Only-check-for-spooky-season-once-an-hour.patch b/patches/server/0037-Pufferfish-Only-check-for-spooky-season-once-an-hour.patch similarity index 100% rename from patches/server/0036-Pufferfish-Only-check-for-spooky-season-once-an-hour.patch rename to patches/server/0037-Pufferfish-Only-check-for-spooky-season-once-an-hour.patch diff --git a/patches/server/0037-Pufferfish-Optimize-suffocation.patch b/patches/server/0038-Pufferfish-Optimize-suffocation.patch similarity index 100% rename from patches/server/0037-Pufferfish-Optimize-suffocation.patch rename to patches/server/0038-Pufferfish-Optimize-suffocation.patch diff --git a/patches/server/0038-Pufferfish-Throttle-goal-selector-during-inactive-ti.patch b/patches/server/0039-Pufferfish-Throttle-goal-selector-during-inactive-ti.patch similarity index 100% rename from patches/server/0038-Pufferfish-Throttle-goal-selector-during-inactive-ti.patch rename to patches/server/0039-Pufferfish-Throttle-goal-selector-during-inactive-ti.patch diff --git a/patches/server/0039-Pufferfish-Simpler-ShapelessRecipes-comparison-for-V.patch b/patches/server/0040-Pufferfish-Simpler-ShapelessRecipes-comparison-for-V.patch similarity index 100% rename from patches/server/0039-Pufferfish-Simpler-ShapelessRecipes-comparison-for-V.patch rename to patches/server/0040-Pufferfish-Simpler-ShapelessRecipes-comparison-for-V.patch diff --git a/patches/server/0040-Pufferfish-SIMD-Utilities.patch b/patches/server/0041-Pufferfish-SIMD-Utilities.patch similarity index 100% rename from patches/server/0040-Pufferfish-SIMD-Utilities.patch rename to patches/server/0041-Pufferfish-SIMD-Utilities.patch diff --git a/patches/server/0041-Gale-Variable-entity-wake-up-duration.patch b/patches/server/0042-Gale-Variable-entity-wake-up-duration.patch similarity index 100% rename from patches/server/0041-Gale-Variable-entity-wake-up-duration.patch rename to patches/server/0042-Gale-Variable-entity-wake-up-duration.patch diff --git a/patches/server/0042-Gale-Optimize-sun-burn-tick.patch b/patches/server/0043-Gale-Optimize-sun-burn-tick.patch similarity index 100% rename from patches/server/0042-Gale-Optimize-sun-burn-tick.patch rename to patches/server/0043-Gale-Optimize-sun-burn-tick.patch diff --git a/patches/server/0043-Gale-Use-platform-math-functions.patch b/patches/server/0044-Gale-Use-platform-math-functions.patch similarity index 100% rename from patches/server/0043-Gale-Use-platform-math-functions.patch rename to patches/server/0044-Gale-Use-platform-math-functions.patch diff --git a/patches/server/0044-Gale-Skip-entity-move-if-movement-is-zero.patch b/patches/server/0045-Gale-Skip-entity-move-if-movement-is-zero.patch similarity index 100% rename from patches/server/0044-Gale-Skip-entity-move-if-movement-is-zero.patch rename to patches/server/0045-Gale-Skip-entity-move-if-movement-is-zero.patch diff --git a/patches/server/0045-Gale-Optimize-noise-generation.patch b/patches/server/0046-Gale-Optimize-noise-generation.patch similarity index 100% rename from patches/server/0045-Gale-Optimize-noise-generation.patch rename to patches/server/0046-Gale-Optimize-noise-generation.patch diff --git a/patches/server/0046-Gale-Faster-chunk-serialization.patch b/patches/server/0047-Gale-Faster-chunk-serialization.patch similarity index 100% rename from patches/server/0046-Gale-Faster-chunk-serialization.patch rename to patches/server/0047-Gale-Faster-chunk-serialization.patch diff --git a/patches/server/0047-Gale-Reduce-lambda-and-Optional-allocation-in-Entity.patch b/patches/server/0048-Gale-Reduce-lambda-and-Optional-allocation-in-Entity.patch similarity index 100% rename from patches/server/0047-Gale-Reduce-lambda-and-Optional-allocation-in-Entity.patch rename to patches/server/0048-Gale-Reduce-lambda-and-Optional-allocation-in-Entity.patch diff --git a/patches/server/0048-Gale-Replace-throttle-tracker-map-with-optimized-col.patch b/patches/server/0049-Gale-Replace-throttle-tracker-map-with-optimized-col.patch similarity index 100% rename from patches/server/0048-Gale-Replace-throttle-tracker-map-with-optimized-col.patch rename to patches/server/0049-Gale-Replace-throttle-tracker-map-with-optimized-col.patch diff --git a/patches/server/0049-Sparkly-Paper-Optimize-canSee-checks.patch b/patches/server/0050-Sparkly-Paper-Optimize-canSee-checks.patch similarity index 100% rename from patches/server/0049-Sparkly-Paper-Optimize-canSee-checks.patch rename to patches/server/0050-Sparkly-Paper-Optimize-canSee-checks.patch diff --git a/patches/server/0050-SparklyPaper-Skip-MapItem-update-if-the-map-does-not.patch b/patches/server/0051-SparklyPaper-Skip-MapItem-update-if-the-map-does-not.patch similarity index 100% rename from patches/server/0050-SparklyPaper-Skip-MapItem-update-if-the-map-does-not.patch rename to patches/server/0051-SparklyPaper-Skip-MapItem-update-if-the-map-does-not.patch diff --git a/patches/server/0051-SparklyPaper-Skip-distanceToSqr-call-in-ServerEntity.patch b/patches/server/0052-SparklyPaper-Skip-distanceToSqr-call-in-ServerEntity.patch similarity index 100% rename from patches/server/0051-SparklyPaper-Skip-distanceToSqr-call-in-ServerEntity.patch rename to patches/server/0052-SparklyPaper-Skip-distanceToSqr-call-in-ServerEntity.patch diff --git a/patches/server/0052-KioCG-Chunk-API-and-display-of-chunkhot-in-tpsbar.patch b/patches/server/0053-KioCG-Chunk-API-and-display-of-chunkhot-in-tpsbar.patch similarity index 100% rename from patches/server/0052-KioCG-Chunk-API-and-display-of-chunkhot-in-tpsbar.patch rename to patches/server/0053-KioCG-Chunk-API-and-display-of-chunkhot-in-tpsbar.patch diff --git a/patches/server/0053-Purpur-use-alternative-keep-alive.patch b/patches/server/0054-Purpur-use-alternative-keep-alive.patch similarity index 100% rename from patches/server/0053-Purpur-use-alternative-keep-alive.patch rename to patches/server/0054-Purpur-use-alternative-keep-alive.patch diff --git a/patches/server/0054-Leaf-Skip-event-if-no-listeners.patch b/patches/server/0055-Leaf-Skip-event-if-no-listeners.patch similarity index 100% rename from patches/server/0054-Leaf-Skip-event-if-no-listeners.patch rename to patches/server/0055-Leaf-Skip-event-if-no-listeners.patch diff --git a/patches/server/0055-Threaded-region-start-tick-and-finished-tick-event.patch b/patches/server/0056-Threaded-region-start-tick-and-finished-tick-event.patch similarity index 100% rename from patches/server/0055-Threaded-region-start-tick-and-finished-tick-event.patch rename to patches/server/0056-Threaded-region-start-tick-and-finished-tick-event.patch diff --git a/patches/server/0056-Fix-MC-2025.patch b/patches/server/0057-Fix-MC-2025.patch similarity index 100% rename from patches/server/0056-Fix-MC-2025.patch rename to patches/server/0057-Fix-MC-2025.patch diff --git a/patches/server/0057-FoliaPR-Add-TPS-From-Region.patch b/patches/server/0058-FoliaPR-Add-TPS-From-Region.patch similarity index 100% rename from patches/server/0057-FoliaPR-Add-TPS-From-Region.patch rename to patches/server/0058-FoliaPR-Add-TPS-From-Region.patch