PaperMC/paper-server/nms-patches/net/minecraft/world/level/MobSpawnerAbstract.patch
CraftBukkit/Spigot 9da047989c Repackage NMS
By: md_5 <git@md-5.net>
2021-03-16 09:00:00 +11:00

19 lines
838 B
Diff

--- a/net/minecraft/world/level/MobSpawnerAbstract.java
+++ b/net/minecraft/world/level/MobSpawnerAbstract.java
@@ -60,6 +60,7 @@
public void setMobName(EntityTypes<?> entitytypes) {
this.spawnData.getEntity().setString("id", IRegistry.ENTITY_TYPE.getKey(entitytypes).toString());
+ this.mobs.clear(); // CraftBukkit - SPIGOT-3496, MC-92282
}
private boolean h() {
@@ -149,7 +150,7 @@
}
}
- if (!worldserver.addAllEntitiesSafely(entity)) {
+ if (!worldserver.addAllEntitiesSafely(entity, org.bukkit.event.entity.CreatureSpawnEvent.SpawnReason.SPAWNER)) { // CraftBukkit
this.i();
return;
}