mirror of
https://github.com/PaperMC/Paper.git
synced 2024-11-05 10:20:53 +01:00
c3640b1dc0
* She compiles! Also readded the armorstand ticking patch, thanks cat * Update mob goal api * Misc fixes to make it run drop per playing mob spawns for now
26 lines
1.3 KiB
Diff
26 lines
1.3 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/IDispenseBehavior.java b/src/main/java/net/minecraft/server/IDispenseBehavior.java
|
|
index aa6af83512e2baea4e3d942b7f7407ad05ea0f24..5432c24919bb5c32ca1eec4c9861ad127f72a60a 100644
|
|
--- a/src/main/java/net/minecraft/server/IDispenseBehavior.java
|
|
+++ b/src/main/java/net/minecraft/server/IDispenseBehavior.java
|
|
@@ -163,7 +163,14 @@ public interface IDispenseBehavior {
|
|
}
|
|
}
|
|
|
|
+ try { // Paper
|
|
entitytypes.spawnCreature(isourceblock.getWorld(), itemstack, (EntityHuman) null, isourceblock.getBlockPosition().shift(enumdirection), EnumMobSpawn.DISPENSER, 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
|
|
// CraftBukkit end
|
|
return itemstack;
|