public void a(DamageSource damagesource) { super.a(damagesource); if (damagesource.j() instanceof EntityCreeper && !(this instanceof EntityPigZombie) && ((EntityCreeper) damagesource.j()).n() && ((EntityCreeper) damagesource.j()).cn()) { ((EntityCreeper) damagesource.j()).co(); this.a(new ItemStack(Items.bX, 1, 2), 0.0F); } }
public boolean a(DamageSource damagesource, float f0) { if (this.b(damagesource)) { return false; } else if ("fireball".equals(damagesource.p()) && damagesource.j() instanceof EntityPlayer) { super.a(damagesource, 1000.0F); ((EntityPlayer) damagesource.j()).b((StatBase) AchievementList.z); return true; } else { return super.a(damagesource, f0); } }
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(DamageSource damagesource) { super.a(damagesource); if (damagesource.j() instanceof EntitySkeleton) { int i0 = Item.b(Items.cq); int i1 = Item.b(Items.cB); int i2 = i0 + this.V.nextInt(i1 - i0 + 1); this.a(Item.b(i2), 1); } else if (damagesource.j() instanceof EntityCreeper && damagesource.j() != this && ((EntityCreeper) damagesource.j()).n() && ((EntityCreeper) damagesource.j()).cn()) { ((EntityCreeper) damagesource.j()).co(); this.a(new ItemStack(Items.bX, 1, 4), 0.0F); } }