Files
Shiroha/shiroha-server/minecraft-patches/features/0034-Add-config-to-disable-entity-tick-catchers.patch
T

19 lines
1.1 KiB
Diff
Raw Normal View History

2026-07-09 00:03:09 +08:00
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Helvetica Volubi <suisuroru@blue-millennium.fun>
Date: Sun, 28 Jun 2026 20:10:51 +0800
Subject: [PATCH] Add config to disable entity tick catchers
diff --git a/net/minecraft/world/level/Level.java b/net/minecraft/world/level/Level.java
2026-07-14 15:09:17 +08:00
index 21b3fcba9e80082ad33a4331f27758cffef163f8..5878cd5ee450430276d0d97f2a33d49109d09ed5 100644
2026-07-09 00:03:09 +08:00
--- a/net/minecraft/world/level/Level.java
+++ b/net/minecraft/world/level/Level.java
@@ -1591,6 +1591,7 @@ public abstract class Level implements LevelAccessor, AutoCloseable, ca.spottedl
));
2026-07-14 11:32:51 +08:00
// Shiroha end
2026-07-09 00:03:09 +08:00
} catch (Throwable t) {
2026-07-14 12:22:17 +08:00
+ if (io.nanachiyo0721.shiroha.config.modules.experiment.DisableEntityCatchConfig.enabled) throw t; // Shiroha - Add config to disable entity tick catchers
2026-07-09 00:03:09 +08:00
// Paper start - Prevent block entity and entity crashes
final String msg = String.format("Entity threw exception at %s:%s,%s,%s", io.papermc.paper.util.MCUtil.getLevelName(entity.level()), entity.getX(), entity.getY(), entity.getZ());
MinecraftServer.LOGGER.error(msg, t);