aboutsummaryrefslogtreecommitdiffhomepage
path: root/patch-remap/mache-vineflower-stripped/net/minecraft/server/commands/SummonCommand.java.patch
diff options
context:
space:
mode:
Diffstat (limited to 'patch-remap/mache-vineflower-stripped/net/minecraft/server/commands/SummonCommand.java.patch')
-rw-r--r--patch-remap/mache-vineflower-stripped/net/minecraft/server/commands/SummonCommand.java.patch13
1 files changed, 13 insertions, 0 deletions
diff --git a/patch-remap/mache-vineflower-stripped/net/minecraft/server/commands/SummonCommand.java.patch b/patch-remap/mache-vineflower-stripped/net/minecraft/server/commands/SummonCommand.java.patch
new file mode 100644
index 0000000000..78a9b9643e
--- /dev/null
+++ b/patch-remap/mache-vineflower-stripped/net/minecraft/server/commands/SummonCommand.java.patch
@@ -0,0 +1,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;
+ }