ForgePatch/patches_old/minecraft/net/minecraft/world/spawner/AbstractSpawner.java.patch

27 lines
1.6 KiB
Diff

--- a/net/minecraft/world/spawner/AbstractSpawner.java
+++ b/net/minecraft/world/spawner/AbstractSpawner.java
@@ -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;
- if (!mobentity.func_213380_a(world, SpawnReason.SPAWNER) || !mobentity.func_205019_a(world)) {
+ if (!net.minecraftforge.event.ForgeEventFactory.canEntitySpawnSpawner(mobentity, world, (float)entity.func_226277_ct_(), (float)entity.func_226278_cu_(), (float)entity.func_226281_cx_(), this)) {
continue;
}
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;
}
+
+ @Nullable
+ public Entity getSpawnerEntity() {
+ return null;
+ }
}