From 9ac626d2a9feb8eeb4fb74bb62f9ccfa12ff2baa Mon Sep 17 00:00:00 2001 From: LexManos Date: Fri, 12 Jun 2020 16:53:01 -0700 Subject: [PATCH] Fire SpecialSpawn event for mobs spawners. Closes #6700 --- .../minecraft/world/spawner/AbstractSpawner.java.patch | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/patches/minecraft/net/minecraft/world/spawner/AbstractSpawner.java.patch b/patches/minecraft/net/minecraft/world/spawner/AbstractSpawner.java.patch index 8e5841963..b47f9db64 100644 --- a/patches/minecraft/net/minecraft/world/spawner/AbstractSpawner.java.patch +++ b/patches/minecraft/net/minecraft/world/spawner/AbstractSpawner.java.patch @@ -1,6 +1,6 @@ --- a/net/minecraft/world/spawner/AbstractSpawner.java +++ b/net/minecraft/world/spawner/AbstractSpawner.java -@@ -128,7 +128,7 @@ +@@ -128,11 +128,12 @@ entity.func_70012_b(entity.func_226277_ct_(), entity.func_226278_cu_(), entity.func_226281_cx_(), world.field_73012_v.nextFloat() * 360.0F, 0.0F); if (entity instanceof MobEntity) { MobEntity mobentity = (MobEntity)entity; @@ -9,7 +9,12 @@ continue; } -@@ -285,4 +285,9 @@ + if (this.field_98282_f.func_185277_b().func_186856_d() == 1 && this.field_98282_f.func_185277_b().func_150297_b("id", 8)) { ++ if (!net.minecraftforge.event.ForgeEventFactory.doSpecialSpawn(mobentity, world, (float)entity.func_226277_ct_(), (float)entity.func_226278_cu_(), (float)entity.func_226281_cx_(), this, SpawnReason.SPAWNER)) + ((MobEntity)entity).func_213386_a(world, world.func_175649_E(new BlockPos(entity)), SpawnReason.SPAWNER, (ILivingEntityData)null, (CompoundNBT)null); + } + } +@@ -285,4 +286,9 @@ public double func_177223_e() { return this.field_98284_d; }