Esempio n. 1
0
  public void a(World world, Block block, BlockPos blockpos, EntityPlayer entityplayer) {
    boolean flag0 = this.d.a(this, world, block, blockpos, entityplayer);

    if (flag0) {
      entityplayer.b(StatList.J[Item.b(this.d)]);
    }
  }
Esempio n. 2
0
  public void a(EntityLivingBase entitylivingbase, EntityPlayer entityplayer) {
    boolean flag0 = this.d.a(this, entitylivingbase, (EntityLivingBase) entityplayer);

    if (flag0) {
      entityplayer.b(StatList.J[Item.b(this.d)]);
    }
  }
Esempio n. 3
0
  public void c(NBTTagCompound nbttagcompound) {
    if (nbttagcompound.b("id", 8)) {
      this.d = Item.d(nbttagcompound.j("id"));
    } else {
      this.d = Item.b(nbttagcompound.e("id"));
    }

    this.b = nbttagcompound.d("Count");
    this.f = nbttagcompound.e("Damage");
    if (this.f < 0) {
      this.f = 0;
    }

    if (nbttagcompound.b("tag", 10)) {
      this.e = nbttagcompound.m("tag");
      if (this.d != null) {
        this.d.a(this.e);
      }
    }
  }
Esempio n. 4
0
  public boolean a(
      EntityPlayer entityplayer,
      World world,
      BlockPos blockpos,
      EnumFacing enumfacing,
      float f0,
      float f1,
      float f2) {
    boolean flag0 = this.b().a(this, entityplayer, world, blockpos, enumfacing, f0, f1, f2);

    if (flag0) {
      entityplayer.b(StatList.J[Item.b(this.d)]);
    }

    return flag0;
  }
Esempio n. 5
0
  public void a(int i0, EntityLivingBase entitylivingbase) {
    if (!(entitylivingbase instanceof EntityPlayer) || !((EntityPlayer) entitylivingbase).by.d) {
      if (this.e()) {
        if (this.a(i0, entitylivingbase.bb())) {
          entitylivingbase.b(this);
          --this.b;
          if (entitylivingbase instanceof EntityPlayer) {
            EntityPlayer entityplayer = (EntityPlayer) entitylivingbase;

            entityplayer.b(StatList.K[Item.b(this.d)]);
            if (this.b == 0 && this.b() instanceof ItemBow) {
              entityplayer.bZ();
            }
          }

          if (this.b < 0) {
            this.b = 0;
          }

          this.f = 0;
        }
      }
    }
  }
Esempio n. 6
0
 public ItemStack(Block block, int i0, int i1) {
   this(Item.a(block), i0, i1);
 }
Esempio n. 7
0
 public void a(World world, EntityPlayer entityplayer, int i0) {
   entityplayer.a(StatList.I[Item.b(this.d)], i0);
   this.d.d(this, world, entityplayer);
 }