Update BlockBOPFruit.java

Fixed null itemStack causing crash. Fixes #529 and #519
This commit is contained in:
wwrpg 2015-09-02 21:17:20 -07:00
parent 58c2c29da3
commit 0a502a54f1

View file

@ -104,7 +104,7 @@ public class BlockBOPFruit extends BOPBlockWorldDecor
@Override @Override
public boolean canReplace(World world, int x, int y, int z, int side, ItemStack itemStack) public boolean canReplace(World world, int x, int y, int z, int side, ItemStack itemStack)
{ {
int metadata = itemStack.getItemDamage(); int metadata = itemStack != null ? itemStack.getItemDamage() : 0;
return this.isValidPosition(world, x, y, z, metadata); return this.isValidPosition(world, x, y, z, metadata);
} }