From f3f6ea2251bcda067a6ce32ad435a23a2255243e Mon Sep 17 00:00:00 2001 From: Progwml6 Date: Thu, 27 Feb 2014 20:42:01 -0500 Subject: [PATCH] solve NPE w/ mantle's debugging interfaces w/ empty hands --- build.properties | 2 +- src/mantle/blocks/abstracts/InventoryBlock.java | 3 +-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/build.properties b/build.properties index 40af07d..40879d9 100644 --- a/build.properties +++ b/build.properties @@ -1,2 +1,2 @@ minecraft_version=1.7.2 -forge_version=10.12.0.1024 \ No newline at end of file +forge_version=10.12.0.1033 \ No newline at end of file diff --git a/src/mantle/blocks/abstracts/InventoryBlock.java b/src/mantle/blocks/abstracts/InventoryBlock.java index 1a967c9..e85bc53 100644 --- a/src/mantle/blocks/abstracts/InventoryBlock.java +++ b/src/mantle/blocks/abstracts/InventoryBlock.java @@ -200,8 +200,7 @@ public abstract class InventoryBlock extends BlockContainer @Override public void onBlockClicked (World world, int x, int y, int z, EntityPlayer player) { - if (FMLCommonHandler.instance().getEffectiveSide() == Side.SERVER && player.getHeldItem().getItem() == Items.stick) - ; + if (FMLCommonHandler.instance().getEffectiveSide() == Side.SERVER && player.getHeldItem() != null && player.getHeldItem().getItem() != null && player.getHeldItem().getItem() == Items.stick) { TileEntity te = world.getTileEntity(x, y, z); if (te instanceof IDebuggable)