Exemple #1
0
 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);
   }
 }
Exemple #2
0
  protected void a(DifficultyInstance difficultyinstance) {
    super.a(difficultyinstance);
    if (this.V.nextFloat() < (this.o.aa() == EnumDifficulty.HARD ? 0.05F : 0.01F)) {
      int i0 = this.V.nextInt(3);

      if (i0 == 0) {
        this.c(0, new ItemStack(Items.l));
      } else {
        this.c(0, new ItemStack(Items.a));
      }
    }
  }
Exemple #3
0
  public void a(NBTTagCompound nbttagcompound) {
    super.a(nbttagcompound);
    this.ac.b(17, Byte.valueOf((byte) (nbttagcompound.n("powered") ? 1 : 0)));
    if (nbttagcompound.b("Fuse", 99)) {
      this.bk = nbttagcompound.e("Fuse");
    }

    if (nbttagcompound.b("ExplosionRadius", 99)) {
      this.bl = nbttagcompound.d("ExplosionRadius");
    }

    if (nbttagcompound.n("ignited")) {
      this.cm();
    }
  }
Exemple #4
0
  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);
    }
  }
Exemple #5
0
  public void a(NBTTagCompound nbttagcompound) {
    super.a(nbttagcompound);
    if (nbttagcompound.n("IsBaby")) {
      this.l(true);
    }

    if (nbttagcompound.n("IsVillager")) {
      this.m(true);
    }

    if (nbttagcompound.b("ConversionTime", 99) && nbttagcompound.f("ConversionTime") > -1) {
      this.a(nbttagcompound.f("ConversionTime"));
    }

    this.a(nbttagcompound.n("CanBreakDoors"));
  }
Exemple #6
0
  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);
    }
  }
Exemple #7
0
 public void a(EntityLightningBolt entitylightningbolt) {
   super.a(entitylightningbolt);
   this.ac.b(17, Byte.valueOf((byte) 1));
 }
Exemple #8
0
 protected final void a(float f0) {
   super.a(this.bo * f0, this.bp * f0);
 }