mirror of
https://github.com/PaperMC/Paper.git
synced 2024-11-30 06:24:06 +01:00
20 lines
725 B
Diff
20 lines
725 B
Diff
--- a/net/minecraft/server/MobSpawnerAbstract.java
|
|
+++ b/net/minecraft/server/MobSpawnerAbstract.java
|
|
@@ -42,6 +42,7 @@
|
|
|
|
public void setMobName(EntityTypes<?> entitytypes) {
|
|
this.spawnData.b().setString("id", IRegistry.ENTITY_TYPE.getKey(entitytypes).toString());
|
|
+ this.mobs.clear(); // CraftBukkit - SPIGOT-3496, MC-92282
|
|
}
|
|
|
|
private boolean h() {
|
|
@@ -147,7 +148,7 @@
|
|
}
|
|
|
|
private void a(Entity entity) {
|
|
- if (this.a().addEntity(entity)) {
|
|
+ if (this.a().addEntity(entity, org.bukkit.event.entity.CreatureSpawnEvent.SpawnReason.SPAWNER)) { // CraftBukkit
|
|
Iterator iterator = entity.getPassengers().iterator();
|
|
|
|
while (iterator.hasNext()) {
|