Stop the crash in another way.

This commit is contained in:
James McKay committed 2016-12-17 08:42:59 +11:00
1 parent 1e43783eaa
commit e894253583
1 file changed
+2 -2
@@ -49,8 +49,8 @@ public class WandWorker {
int meta = world.getMetadata(blockPos);
String blockString = String.format("%s/%s", Block.blockRegistry.getNameForObject(block), meta);
if(!BetterBuildersWandsMod.instance.configValues.HARD_BLACKLIST_SET.contains(blockString)) {
ItemStack exactItemstack = BlockShim.getPickBlock(block, world, player, blockPos);
if (player.countItems(exactItemstack) > 0) {
ItemStack exactItemstack = new ItemStack(block, 1, meta);
if (Item.getItemFromBlock(block) != null && player.countItems(exactItemstack) > 0) {
return exactItemstack;
}
return getEquivalentItemStack(blockPos);