Ejemplo n.º 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();
  }
Ejemplo n.º 2
0
  public ItemStack k() {
    ItemStack itemstack = new ItemStack(this.d, this.b, this.f);

    if (this.e != null) {
      itemstack.e = (NBTTagCompound) this.e.b();
    }

    return itemstack;
  }
Ejemplo n.º 3
0
  public ItemStack a(int i0) {
    ItemStack itemstack = new ItemStack(this.d, i0, this.f);

    if (this.e != null) {
      itemstack.e = (NBTTagCompound) this.e.b();
    }

    this.b -= i0;
    return itemstack;
  }