示例#1
0
  public void m() {
    if (this.o.w() && !this.o.D && !this.i_()) {
      float f0 = this.c(1.0F);
      BlockPos blockpos = new BlockPos(this.s, (double) Math.round(this.t), this.u);

      if (f0 > 0.5F && this.V.nextFloat() * 30.0F < (f0 - 0.4F) * 2.0F && this.o.i(blockpos)) {
        boolean flag0 = true;
        ItemStack itemstack = this.p(4);

        if (itemstack != null) {
          if (itemstack.e()) {
            itemstack.b(itemstack.h() + this.V.nextInt(2));
            if (itemstack.h() >= itemstack.j()) {
              this.b(itemstack);
              this.c(4, (ItemStack) null);
            }
          }

          flag0 = false;
        }

        if (flag0) {
          this.e(8);
        }
      }
    }

    if (this.av() && this.u() != null && this.m instanceof EntityChicken) {
      ((EntityLiving) this.m).s().a(this.s().j(), 1.5D);
    }

    super.m();
  }
示例#2
0
 protected void aW() {
   super.aW();
   this.a(SharedMonsterAttributes.b).a(35.0D);
   this.a(SharedMonsterAttributes.d).a(0.23000000417232513D);
   this.a(SharedMonsterAttributes.e).a(3.0D);
   this.bx().b(b).a(this.V.nextDouble() * 0.10000000149011612D);
 }
示例#3
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);
   }
 }
示例#4
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));
      }
    }
  }
示例#5
0
  public void s_() {
    if (!this.o.D && this.cn()) {
      int i0 = this.cp();

      this.bm -= i0;
      if (this.bm <= 0) {
        this.co();
      }
    }

    super.s_();
  }
示例#6
0
  public void b(NBTTagCompound nbttagcompound) {
    super.b(nbttagcompound);
    if (this.i_()) {
      nbttagcompound.a("IsBaby", true);
    }

    if (this.cm()) {
      nbttagcompound.a("IsVillager", true);
    }

    nbttagcompound.a("ConversionTime", this.cn() ? this.bm : -1);
    nbttagcompound.a("CanBreakDoors", this.cl());
  }
示例#7
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"));
  }
示例#8
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);
    }
  }
示例#9
0
 protected void h() {
   super.h();
   this.H().a(12, Byte.valueOf((byte) 0));
   this.H().a(13, Byte.valueOf((byte) 0));
   this.H().a(14, Byte.valueOf((byte) 0));
 }
示例#10
0
 protected final void a(float f0) {
   super.a(this.bo * f0, this.bp * f0);
 }