diff options
Diffstat (limited to 'patch-remap/og/net/minecraft/server/commands/CommandSummon.patch')
-rw-r--r-- | patch-remap/og/net/minecraft/server/commands/CommandSummon.patch | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/patch-remap/og/net/minecraft/server/commands/CommandSummon.patch b/patch-remap/og/net/minecraft/server/commands/CommandSummon.patch new file mode 100644 index 0000000000..7ab0f2a793 --- /dev/null +++ b/patch-remap/og/net/minecraft/server/commands/CommandSummon.patch @@ -0,0 +1,11 @@ +--- a/net/minecraft/server/commands/CommandSummon.java ++++ b/net/minecraft/server/commands/CommandSummon.java +@@ -67,7 +67,7 @@ + ((EntityInsentient) entity).finalizeSpawn(commandlistenerwrapper.getLevel(), commandlistenerwrapper.getLevel().getCurrentDifficultyAt(entity.blockPosition()), EnumMobSpawn.COMMAND, (GroupDataEntity) null, (NBTTagCompound) null); + } + +- if (!worldserver.tryAddFreshEntityWithPassengers(entity)) { ++ if (!worldserver.tryAddFreshEntityWithPassengers(entity, org.bukkit.event.entity.CreatureSpawnEvent.SpawnReason.COMMAND)) { // CraftBukkit - pass a spawn reason of "COMMAND" + throw CommandSummon.ERROR_DUPLICATE_UUID.create(); + } else { + return entity; |