public boolean a(EntityPlayer entityplayer) { ItemStack itemstack = entityplayer.bY(); if (itemstack != null && itemstack.b() == Items.ao && itemstack.i() == 0 && this.cm() && this.a(Potion.t)) { if (!entityplayer.by.d) { --itemstack.b; } if (itemstack.b <= 0) { entityplayer.bg.a(entityplayer.bg.c, (ItemStack) null); } if (!this.o.D) { this.a(this.V.nextInt(2401) + 3600); } return true; } else { return false; } }
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(); }
protected boolean a(EntityPlayer entityplayer) { ItemStack itemstack = entityplayer.bg.h(); if (itemstack != null && itemstack.b() == Items.d) { this.o.a( this.s + 0.5D, this.t + 0.5D, this.u + 0.5D, "fire.ignite", 1.0F, this.V.nextFloat() * 0.4F + 0.8F); entityplayer.bv(); if (!this.o.D) { this.cm(); itemstack.a(1, (EntityLivingBase) entityplayer); return true; } } return super.a(entityplayer); }
public static ItemStack a(NBTTagCompound nbttagcompound) { ItemStack itemstack = new ItemStack(); itemstack.c(nbttagcompound); return itemstack.b() != null ? itemstack : null; }
protected boolean a(ItemStack itemstack) { return itemstack.b() == Items.aP && this.i_() && this.av() ? false : super.a(itemstack); }