Fire SpecialSpawn event for mobs spawners. Closes #6700
This commit is contained in:
parent
457909b6d5
commit
9ac626d2a9
1 changed files with 7 additions and 2 deletions
|
@ -1,6 +1,6 @@
|
||||||
--- a/net/minecraft/world/spawner/AbstractSpawner.java
|
--- a/net/minecraft/world/spawner/AbstractSpawner.java
|
||||||
+++ b/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);
|
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) {
|
if (entity instanceof MobEntity) {
|
||||||
MobEntity mobentity = (MobEntity)entity;
|
MobEntity mobentity = (MobEntity)entity;
|
||||||
|
@ -9,7 +9,12 @@
|
||||||
continue;
|
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() {
|
public double func_177223_e() {
|
||||||
return this.field_98284_d;
|
return this.field_98284_d;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue