Fix NPE on shield break. Closes #2786

This commit is contained in:
LexManos 2016-04-27 18:37:54 -07:00
parent 35999f9a20
commit d090c2834b

View file

@ -232,9 +232,12 @@
public abstract EnumHandSide func_184591_cq(); public abstract EnumHandSide func_184591_cq();
public boolean func_184587_cr() public boolean func_184587_cr()
@@ -2371,6 +2437,14 @@ @@ -2369,8 +2435,16 @@
{
ItemStack itemstack = this.func_184586_b(this.func_184600_cs());
if (itemstack == this.field_184627_bm) - if (itemstack == this.field_184627_bm)
+ if (itemstack == this.field_184627_bm && itemstack != null)
{ {
+ field_184628_bn = net.minecraftforge.event.ForgeEventFactory.onItemUseTick(this, field_184627_bm, field_184628_bn); + field_184628_bn = net.minecraftforge.event.ForgeEventFactory.onItemUseTick(this, field_184627_bm, field_184628_bn);
+ if (field_184628_bn <= 0) + if (field_184628_bn <= 0)