public boolean a(DamageSource damagesource, float f0) { if (super.a(damagesource, f0)) { EntityLivingBase entitylivingbase = this.u(); if (entitylivingbase == null && damagesource.j() instanceof EntityLivingBase) { entitylivingbase = (EntityLivingBase) damagesource.j(); } if (entitylivingbase != null && this.o.aa() == EnumDifficulty.HARD && (double) this.V.nextFloat() < this.a(b).e()) { int i0 = MathHelper.c(this.s); int i1 = MathHelper.c(this.t); int i2 = MathHelper.c(this.u); EntityZombie entityzombie = new EntityZombie(this.o); for (int i3 = 0; i3 < 50; ++i3) { int i4 = i0 + MathHelper.a(this.V, 7, 40) * MathHelper.a(this.V, -1, 1); int i5 = i1 + MathHelper.a(this.V, 7, 40) * MathHelper.a(this.V, -1, 1); int i6 = i2 + MathHelper.a(this.V, 7, 40) * MathHelper.a(this.V, -1, 1); if (World.a((IBlockAccess) this.o, new BlockPos(i4, i5 - 1, i6)) && this.o.l(new BlockPos(i4, i5, i6)) < 10) { entityzombie.b((double) i4, (double) i5, (double) i6); if (!this.o.b((double) i4, (double) i5, (double) i6, 7.0D) && this.o.a(entityzombie.aQ(), (Entity) entityzombie) && this.o.a((Entity) entityzombie, entityzombie.aQ()).isEmpty() && !this.o.d(entityzombie.aQ())) { this.o.d((Entity) entityzombie); entityzombie.d(entitylivingbase); entityzombie.a(this.o.E(new BlockPos(entityzombie)), (IEntityLivingData) null); this.a(b) .b( new AttributeModifier( "Zombie reinforcement caller charge", -0.05000000074505806D, 0)); entityzombie .a(b) .b( new AttributeModifier( "Zombie reinforcement callee charge", -0.05000000074505806D, 0)); break; } } } } return true; } else { return false; } }
public void a(EntityLivingBase entitylivingbase) { super.a(entitylivingbase); if ((this.o.aa() == EnumDifficulty.NORMAL || this.o.aa() == EnumDifficulty.HARD) && entitylivingbase instanceof EntityVillager) { if (this.o.aa() != EnumDifficulty.HARD && this.V.nextBoolean()) { return; } EntityZombie entityzombie = new EntityZombie(this.o); entityzombie.m(entitylivingbase); this.o.e((Entity) entitylivingbase); entityzombie.a(this.o.E(new BlockPos(entityzombie)), (IEntityLivingData) null); entityzombie.m(true); if (entitylivingbase.i_()) { entityzombie.l(true); } this.o.d((Entity) entityzombie); this.o.a( (EntityPlayer) null, 1016, new BlockPos((int) this.s, (int) this.t, (int) this.u), 0); } }