mirror of
https://github.com/PaperMC/Paper.git
synced 2024-12-29 07:48:53 +01:00
Merge branch 'master' into ver/1.14
This commit is contained in:
commit
ae153a18f9
1 changed files with 28 additions and 0 deletions
|
@ -0,0 +1,28 @@
|
|||
From 4533bdff8b99b025551672999f15f9563698504c 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 60442e4b8a..1874b5d252 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;
|
||||
--
|
||||
2.21.0
|
||||
|
Loading…
Reference in a new issue