From 0a502a54f1be5c1be8ccb7b77c6c87bf49b66055 Mon Sep 17 00:00:00 2001 From: wwrpg Date: Wed, 2 Sep 2015 21:17:20 -0700 Subject: [PATCH] Update BlockBOPFruit.java Fixed null itemStack causing crash. Fixes #529 and #519 --- src/main/java/biomesoplenty/common/blocks/BlockBOPFruit.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/biomesoplenty/common/blocks/BlockBOPFruit.java b/src/main/java/biomesoplenty/common/blocks/BlockBOPFruit.java index b35bf78b7..c51939c3d 100644 --- a/src/main/java/biomesoplenty/common/blocks/BlockBOPFruit.java +++ b/src/main/java/biomesoplenty/common/blocks/BlockBOPFruit.java @@ -104,7 +104,7 @@ public class BlockBOPFruit extends BOPBlockWorldDecor @Override 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); }