PaperMC/paper-server/nms-patches/net/minecraft/server/commands/CommandSummon.patch
CraftBukkit/Spigot 40076782ed Update to Minecraft 1.19.4
By: md_5 <git@md-5.net>
2023-03-15 03:30:00 +11:00

11 lines
801 B
Diff

--- 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;