aboutsummaryrefslogtreecommitdiffhomepage
path: root/patch-remap/mache-vineflower-stripped/net/minecraft/server/commands/SummonCommand.java.patch
blob: 78a9b9643e69f8653e136554acd0aac1e550138a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
--- a/net/minecraft/server/commands/SummonCommand.java
+++ b/net/minecraft/server/commands/SummonCommand.java
@@ -93,8 +67,8 @@
                         .finalizeSpawn(source.getLevel(), source.getLevel().getCurrentDifficultyAt(entity.blockPosition()), MobSpawnType.COMMAND, null, null);
                 }
 
-                if (!level.tryAddFreshEntityWithPassengers(entity)) {
-                    throw ERROR_DUPLICATE_UUID.create();
+                if (!worldserver.tryAddFreshEntityWithPassengers(entity, org.bukkit.event.entity.CreatureSpawnEvent.SpawnReason.COMMAND)) { // CraftBukkit - pass a spawn reason of "COMMAND"
+                    throw SummonCommand.ERROR_DUPLICATE_UUID.create();
                 } else {
                     return entity;
                 }