mirror of
https://github.com/PaperMC/Paper.git
synced 2024-12-25 18:37:35 +01:00
61a31ca0c7
Fixes CreatureSpawner.setSpawnedType and a vanilla issue related to setting the mob type of a mob-spawner via spawn_egg.
20 lines
955 B
Diff
20 lines
955 B
Diff
--- a/net/minecraft/server/MobSpawnerAbstract.java
|
|
+++ b/net/minecraft/server/MobSpawnerAbstract.java
|
|
@@ -32,6 +32,7 @@
|
|
public void setMobName(@Nullable MinecraftKey minecraftkey) {
|
|
if (minecraftkey != null) {
|
|
this.spawnData.b().setString("id", minecraftkey.toString());
|
|
+ this.mobs.clear(); // CraftBukkit - SPIGOT-3496, MC-92282
|
|
}
|
|
|
|
}
|
|
@@ -102,7 +103,7 @@
|
|
((EntityInsentient) entity).prepare(world.D(new BlockPosition(entity)), (GroupDataEntity) null);
|
|
}
|
|
|
|
- ChunkRegionLoader.a(entity, world);
|
|
+ ChunkRegionLoader.a(entity, world, org.bukkit.event.entity.CreatureSpawnEvent.SpawnReason.SPAWNER); // CraftBukkit
|
|
world.triggerEffect(2004, blockposition, 0);
|
|
if (entityinsentient != null) {
|
|
entityinsentient.doSpawnEffect();
|