13
0
geforkt von Mirrors/Paper
Paper/paper-server/patches/sources/net/minecraft/server/commands/CommandSummon.patch
CraftBukkit/Spigot a265d64138 Move CraftBukkit per-file patches
By: Initial <noreply+automated@papermc.io>
2024-12-11 22:26:36 +01:00

12 Zeilen
783 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()), EntitySpawnReason.COMMAND, (GroupDataEntity) 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;