mirror of
https://github.com/PaperMC/Paper.git
synced 2025-01-01 17:01:56 +01:00
25 lines
1.2 KiB
Diff
25 lines
1.2 KiB
Diff
|
From 0000000000000000000000000000000000000000 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
|
||
|
@@ -0,0 +0,0 @@ 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
|
||
|
--
|