mirror of
https://github.com/PaperMC/Paper.git
synced 2025-01-15 21:01:24 +01:00
Fix DEFAULT getEntitySpawnReason for /summon (#9480)
This commit is contained in:
parent
203115c88f
commit
93f4d6f535
@ -9,6 +9,18 @@ Pre existing entities will return NATURAL if it was a non
|
|||||||
persistenting Living Entity, SPAWNER for spawners,
|
persistenting Living Entity, SPAWNER for spawners,
|
||||||
or DEFAULT since data was not stored.
|
or DEFAULT since data was not stored.
|
||||||
|
|
||||||
|
diff --git a/src/main/java/net/minecraft/server/commands/SummonCommand.java b/src/main/java/net/minecraft/server/commands/SummonCommand.java
|
||||||
|
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
|
||||||
|
--- a/src/main/java/net/minecraft/server/commands/SummonCommand.java
|
||||||
|
+++ b/src/main/java/net/minecraft/server/commands/SummonCommand.java
|
||||||
|
@@ -0,0 +0,0 @@ public class SummonCommand {
|
||||||
|
ServerLevel worldserver = source.getLevel();
|
||||||
|
Entity entity = EntityType.loadEntityRecursive(nbttagcompound1, worldserver, (entity1) -> {
|
||||||
|
entity1.moveTo(pos.x, pos.y, pos.z, entity1.getYRot(), entity1.getXRot());
|
||||||
|
+ entity1.spawnReason = org.bukkit.event.entity.CreatureSpawnEvent.SpawnReason.COMMAND; // Paper
|
||||||
|
return entity1;
|
||||||
|
});
|
||||||
|
|
||||||
diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java
|
diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||||
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
|
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
|
||||||
--- a/src/main/java/net/minecraft/server/level/ServerLevel.java
|
--- a/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||||
|
Loading…
Reference in New Issue
Block a user