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 c() { if (this.f) { double d0 = this.b - this.g.s; double d1 = this.c - this.g.t; double d2 = this.d - this.g.u; double d3 = d0 * d0 + d1 * d1 + d2 * d2; if (this.h-- <= 0) { this.h += this.g.bb().nextInt(5) + 2; d3 = (double) MathHelper.a(d3); if (this.b(this.b, this.c, this.d, d3)) { this.g.v += d0 / d3 * 0.1D; this.g.w += d1 / d3 * 0.1D; this.g.x += d2 / d3 * 0.1D; } else { this.f = false; } } } }
public double a(double d0) { d0 = MathHelper.a(d0, this.a, this.b); return d0; }