2015-05-25 12:37:24 +02:00
|
|
|
--- a/net/minecraft/server/MobSpawnerAbstract.java
|
|
|
|
+++ b/net/minecraft/server/MobSpawnerAbstract.java
|
2019-04-23 04:00:00 +02:00
|
|
|
@@ -42,6 +42,7 @@
|
2017-08-08 04:46:59 +02:00
|
|
|
|
2018-07-15 02:00:00 +02:00
|
|
|
public void setMobName(EntityTypes<?> entitytypes) {
|
2018-08-26 04:00:00 +02:00
|
|
|
this.spawnData.b().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() {
|
2019-04-23 04:00:00 +02:00
|
|
|
@@ -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();
|
2016-02-29 22:32:46 +01:00
|
|
|
|
2019-04-23 04:00:00 +02:00
|
|
|
while (iterator.hasNext()) {
|