2021-05-09 08:33:34 +02:00
--- a/net/minecraft/server/commands/CommandSummon.java
+++ b/net/minecraft/server/commands/CommandSummon.java
2021-11-21 23:00:00 +01:00
@@ -65,7 +65,7 @@
((EntityInsentient) entity).finalizeSpawn(commandlistenerwrapper.getLevel(), commandlistenerwrapper.getLevel().getCurrentDifficultyAt(entity.blockPosition()), EnumMobSpawn.COMMAND, (GroupDataEntity) null, (NBTTagCompound) null);
2021-05-09 08:33:34 +02:00
}
2021-11-21 23:00:00 +01:00
- if (!worldserver.tryAddFreshEntityWithPassengers(entity)) {
+ if (!worldserver.tryAddFreshEntityWithPassengers(entity, org.bukkit.event.entity.CreatureSpawnEvent.SpawnReason.COMMAND)) { // CraftBukkit - pass a spawn reason of "COMMAND"
2021-06-11 07:00:00 +02:00
throw CommandSummon.ERROR_DUPLICATE_UUID.create();
2021-05-09 08:33:34 +02:00
} else {
2022-06-07 18:00:00 +02:00
commandlistenerwrapper.sendSuccess(IChatBaseComponent.translatable("commands.summon.success", entity.getDisplayName()), true);