3
0
Mirror von https://github.com/PaperMC/Paper.git synchronisiert 2024-11-16 13:00:06 +01:00
Paper/nms-patches/MobSpawnerAbstract.patch
2018-08-26 12:00:00 +10:00

20 Zeilen
1021 B
Diff

--- a/net/minecraft/server/MobSpawnerAbstract.java
+++ b/net/minecraft/server/MobSpawnerAbstract.java
@@ -41,6 +41,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() {
@@ -110,7 +111,7 @@
((EntityInsentient) entity).prepare(world.getDamageScaler(new BlockPosition(entity)), (GroupDataEntity) null, (NBTTagCompound) null);
}
- ChunkRegionLoader.a(entity, (GeneratorAccess) world);
+ ChunkRegionLoader.a(entity, (GeneratorAccess) world, org.bukkit.event.entity.CreatureSpawnEvent.SpawnReason.SPAWNER); // CraftBukkit
world.triggerEffect(2004, blockposition, 0);
if (entityinsentient != null) {
entityinsentient.doSpawnEffect();