Catch exceptions from dispenser entity spawns
This commit is contained in:
parent
268b076ab2
commit
a0a6ab18b7
|
@ -0,0 +1,27 @@
|
|||
From 4aaab5e21ab07136668aa409b8e2a2691c4f1c2b Mon Sep 17 00:00:00 2001
|
||||
From: Shane Freeder <theboyetronic@gmail.com>
|
||||
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
|
||||
|
Loading…
Reference in New Issue