From a0a6ab18b7519c1534e9e4e5c8c349c77fe57b50 Mon Sep 17 00:00:00 2001 From: Shane Freeder Date: Mon, 10 Jun 2019 09:52:34 +0100 Subject: [PATCH] Catch exceptions from dispenser entity spawns --- ...eptions-from-dispenser-entity-spawns.patch | 27 +++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 Spigot-Server-Patches/0441-Catch-exceptions-from-dispenser-entity-spawns.patch diff --git a/Spigot-Server-Patches/0441-Catch-exceptions-from-dispenser-entity-spawns.patch b/Spigot-Server-Patches/0441-Catch-exceptions-from-dispenser-entity-spawns.patch new file mode 100644 index 000000000..a5b54f317 --- /dev/null +++ b/Spigot-Server-Patches/0441-Catch-exceptions-from-dispenser-entity-spawns.patch @@ -0,0 +1,27 @@ +From 4aaab5e21ab07136668aa409b8e2a2691c4f1c2b Mon Sep 17 00:00:00 2001 +From: Shane Freeder +Date: Mon, 10 Jun 2019 09:36:40 +0100 +Subject: [PATCH] Catch exceptions from dispenser entity spawns + + +diff --git a/src/main/java/net/minecraft/server/DispenserRegistry.java b/src/main/java/net/minecraft/server/DispenserRegistry.java +index f9d5489b7b..d564564420 100644 +--- a/src/main/java/net/minecraft/server/DispenserRegistry.java ++++ b/src/main/java/net/minecraft/server/DispenserRegistry.java +@@ -143,7 +143,13 @@ public class DispenserRegistry { + } + + if (entitytypes != null) { ++ try { // Paper + entitytypes.a(isourceblock.getWorld(), itemstack, (EntityHuman) null, isourceblock.getBlockPosition().shift(enumdirection), enumdirection != EnumDirection.UP, false); ++ // Paper start ++ } catch (Exception ex){ ++ MinecraftServer.LOGGER.warn("An exception occurred dispensing entity at {}[{}]", world.getWorld().getName(), isourceblock.getBlockPosition(), ex); ++ } ++ // Paper end + } + + // itemstack.subtract(1); // Handled during event processing +-- +2.21.0 +