Incorrect spawn reason for monsters from spawner - Fixes #3708 (#3764)

This commit is contained in:
Jake Potrebic 2020-07-04 19:54:39 -06:00 committed by GitHub
parent 97b59df9c2
commit d43def7954
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -58,6 +58,18 @@ index c5abac3eb3f98a948ff7a3423cfcad70abae86ff..4502ea222d98872a4c33714a8c3149c6
// Paper end
} catch (Throwable throwable) {
diff --git a/src/main/java/net/minecraft/server/MobSpawnerAbstract.java b/src/main/java/net/minecraft/server/MobSpawnerAbstract.java
index e2f5354709819e56f9bc66b8c8d5e095bc8387b4..df5ac3295ea64fa9bb15f0565610265d55651b87 100644
--- a/src/main/java/net/minecraft/server/MobSpawnerAbstract.java
+++ b/src/main/java/net/minecraft/server/MobSpawnerAbstract.java
@@ -162,6 +162,7 @@ public abstract class MobSpawnerAbstract {
// Spigot End
}
entity.spawnedViaMobSpawner = true; // Paper
+ entity.spawnReason = org.bukkit.event.entity.CreatureSpawnEvent.SpawnReason.SPAWNER; // Paper
// Spigot Start
flag = true; // Paper
if (org.bukkit.craftbukkit.event.CraftEventFactory.callSpawnerSpawnEvent(entity, blockposition).isCancelled()) {
diff --git a/src/main/java/net/minecraft/server/PlayerList.java b/src/main/java/net/minecraft/server/PlayerList.java
index 61d29dabf6ae8be8f8b5b6da9b801e84adda7dfb..6a00d1dcd62034c595723547afb4637e9d7c18a0 100644
--- a/src/main/java/net/minecraft/server/PlayerList.java