Fix bin crash when interacting with empty hand.
This commit is contained in:
parent
28165fecdf
commit
766f0d5302
1 changed files with 2 additions and 3 deletions
|
@ -469,10 +469,9 @@ public class BlockBasic extends Block implements IBlockCTM, ICustomBlockIcon
|
|||
{
|
||||
TileEntityBin bin = (TileEntityBin)world.getTileEntity(x, y, z);
|
||||
|
||||
Item tool = entityplayer.getCurrentEquippedItem().getItem();
|
||||
|
||||
if(MekanismUtils.hasUsableWrench(entityplayer, x, y, z))
|
||||
if(entityplayer.getCurrentEquippedItem() != null && MekanismUtils.hasUsableWrench(entityplayer, x, y, z))
|
||||
{
|
||||
Item tool = entityplayer.getCurrentEquippedItem().getItem();
|
||||
if(entityplayer.isSneaking())
|
||||
{
|
||||
dismantleBlock(world, x, y, z, false);
|
||||
|
|
Loading…
Reference in a new issue