aboutsummaryrefslogtreecommitdiffhomepage
path: root/patch-remap/mache-spigotflower-stripped/net/minecraft/server/commands/SummonCommand.java.patch
diff options
context:
space:
mode:
Diffstat (limited to 'patch-remap/mache-spigotflower-stripped/net/minecraft/server/commands/SummonCommand.java.patch')
-rw-r--r--patch-remap/mache-spigotflower-stripped/net/minecraft/server/commands/SummonCommand.java.patch11
1 files changed, 11 insertions, 0 deletions
diff --git a/patch-remap/mache-spigotflower-stripped/net/minecraft/server/commands/SummonCommand.java.patch b/patch-remap/mache-spigotflower-stripped/net/minecraft/server/commands/SummonCommand.java.patch
new file mode 100644
index 0000000000..ecd57e2c6e
--- /dev/null
+++ b/patch-remap/mache-spigotflower-stripped/net/minecraft/server/commands/SummonCommand.java.patch
@@ -0,0 +1,11 @@
+--- a/net/minecraft/server/commands/SummonCommand.java
++++ b/net/minecraft/server/commands/SummonCommand.java
+@@ -68,7 +67,7 @@
+ ((Mob) entity).finalizeSpawn(commandsourcestack.getLevel(), commandsourcestack.getLevel().getCurrentDifficultyAt(entity.blockPosition()), MobSpawnType.COMMAND, (SpawnGroupData) null, (CompoundTag) null);
+ }
+
+- if (!serverlevel.tryAddFreshEntityWithPassengers(entity)) {
++ 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;