Port CB changes from Moonrise patch

This commit is contained in:
Spottedleaf
2024-12-20 10:52:51 -08:00
parent 3af380ba08
commit 48f34f8c90
9 changed files with 337 additions and 112 deletions

View File

@@ -7,7 +7,7 @@ public class AsyncCatcher {
public static boolean enabled = true;
public static void catchOp(String reason) {
if (AsyncCatcher.enabled && Thread.currentThread() != MinecraftServer.getServer().serverThread) {
if (!ca.spottedleaf.moonrise.common.util.TickThread.isTickThread()) { // Paper - chunk system
MinecraftServer.LOGGER.error("Thread {} failed main thread check: {}", Thread.currentThread().getName(), reason, new Throwable()); // Paper
throw new IllegalStateException("Asynchronous " + reason + "!");
}