From 61a31ca0c7a5398d3b3e0d31469d2af58bb169f3 Mon Sep 17 00:00:00 2001 From: Lukas Hennig Date: Tue, 8 Aug 2017 04:46:59 +0200 Subject: [PATCH] SPIGOT-3496, MC-92282: Set mob type of mob-spawner reverts after single spawn wave. Fixes CreatureSpawner.setSpawnedType and a vanilla issue related to setting the mob type of a mob-spawner via spawn_egg. --- nms-patches/MobSpawnerAbstract.patch | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/nms-patches/MobSpawnerAbstract.patch b/nms-patches/MobSpawnerAbstract.patch index 87c41c2ec0..0d3b89df11 100644 --- a/nms-patches/MobSpawnerAbstract.patch +++ b/nms-patches/MobSpawnerAbstract.patch @@ -1,6 +1,14 @@ --- a/net/minecraft/server/MobSpawnerAbstract.java +++ b/net/minecraft/server/MobSpawnerAbstract.java -@@ -102,7 +102,7 @@ +@@ -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); }