2015-05-25 12:37:24 +02:00
|
|
|
--- a/net/minecraft/server/MobSpawnerAbstract.java
|
|
|
|
+++ b/net/minecraft/server/MobSpawnerAbstract.java
|
2019-12-10 23:00:00 +01:00
|
|
|
@@ -43,6 +43,7 @@
|
2017-08-08 04:46:59 +02:00
|
|
|
|
2018-07-15 02:00:00 +02:00
|
|
|
public void setMobName(EntityTypes<?> entitytypes) {
|
2019-05-14 02:00:00 +02:00
|
|
|
this.spawnData.getEntity().setString("id", IRegistry.ENTITY_TYPE.getKey(entitytypes).toString());
|
2018-07-15 02:00:00 +02:00
|
|
|
+ this.mobs.clear(); // CraftBukkit - SPIGOT-3496, MC-92282
|
2017-08-08 04:46:59 +02:00
|
|
|
}
|
2018-07-15 02:00:00 +02:00
|
|
|
|
|
|
|
private boolean h() {
|
2020-08-11 23:00:00 +02:00
|
|
|
@@ -132,7 +133,7 @@
|
|
|
|
}
|
|
|
|
}
|
2016-02-29 22:32:46 +01:00
|
|
|
|
2020-08-11 23:00:00 +02:00
|
|
|
- if (!worldserver.addAllEntitiesSafely(entity)) {
|
|
|
|
+ if (!worldserver.addAllEntitiesSafely(entity, org.bukkit.event.entity.CreatureSpawnEvent.SpawnReason.SPAWNER)) { // CraftBukkit
|
|
|
|
this.i();
|
|
|
|
return;
|
|
|
|
}
|