Skip to content

Commit 39b4122

Browse files
committed
Fix summon command not actually spawning the entity
1 parent c109e86 commit 39b4122

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

folia-server/minecraft-patches/features/0001-Region-Threading-Base.patch

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9681,10 +9681,10 @@ index 57dfdff52f2ab7a66a215317d6ed927d3a410881..6a9cb4313c0e42889e36ade57ea02bcc
96819681
}
96829682
// Paper end - Add PlayerSetSpawnEvent
96839683
diff --git a/net/minecraft/server/commands/SummonCommand.java b/net/minecraft/server/commands/SummonCommand.java
9684-
index 88927b0bab343ae46678537e25ad8b3a730ab8be..f6fcc5fe018db4e5dd5691d18d49e48f84ac75f3 100644
9684+
index 88927b0bab343ae46678537e25ad8b3a730ab8be..81baca2f0ec800fead23c6be47596a50aaae38a0 100644
96859685
--- a/net/minecraft/server/commands/SummonCommand.java
96869686
+++ b/net/minecraft/server/commands/SummonCommand.java
9687-
@@ -94,11 +94,16 @@ public class SummonCommand {
9687+
@@ -94,11 +94,17 @@ public class SummonCommand {
96889688
if (entity == null) {
96899689
throw ERROR_FAILED.create();
96909690
} else {
@@ -9695,6 +9695,7 @@ index 88927b0bab343ae46678537e25ad8b3a730ab8be..f6fcc5fe018db4e5dd5691d18d49e48f
96959695
if (randomizeProperties && entity instanceof Mob mob) {
96969696
mob.finalizeSpawn(source.getLevel(), source.getLevel().getCurrentDifficultyAt(entity.blockPosition()), EntitySpawnReason.COMMAND, null);
96979697
}
9698+
+ level.tryAddFreshEntityWithPassengers(entity, org.bukkit.event.entity.CreatureSpawnEvent.SpawnReason.COMMAND); // Folia - region threading
96989699
+ }); // Folia - region threading
96999700

97009701
- if (!level.tryAddFreshEntityWithPassengers(entity, org.bukkit.event.entity.CreatureSpawnEvent.SpawnReason.COMMAND)) { // CraftBukkit - pass a spawn reason of "COMMAND"

0 commit comments

Comments
 (0)