From 496a67abb9f364d60827dedfaaabcde15040237d Mon Sep 17 00:00:00 2001 From: AlgorithmX2 Date: Sat, 1 Feb 2014 20:26:30 -0600 Subject: [PATCH] Never rotate while sneaking! Fixed Crash. --- items/contents/NetworkToolViewer.java | 3 ++- items/tools/ToolNetworkTool.java | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/items/contents/NetworkToolViewer.java b/items/contents/NetworkToolViewer.java index 0d10cebb2..07857d821 100644 --- a/items/contents/NetworkToolViewer.java +++ b/items/contents/NetworkToolViewer.java @@ -19,7 +19,8 @@ public class NetworkToolViewer implements INetworkTool this.is = is; gh = gHost; inv = new AppEngInternalInventory( null, 9 ); - inv.readFromNBT( Platform.openNbtData( is ), "inv" ); + if ( is.hasTagCompound() ) // prevent crash when opening network status creen. + inv.readFromNBT( Platform.openNbtData( is ), "inv" ); } @Override diff --git a/items/tools/ToolNetworkTool.java b/items/tools/ToolNetworkTool.java index aff4752f2..7d8c99259 100644 --- a/items/tools/ToolNetworkTool.java +++ b/items/tools/ToolNetworkTool.java @@ -42,7 +42,7 @@ public class ToolNetworkTool extends AEBaseItem implements IGuiItem, IAEWrench, public boolean onItemUseFirst(ItemStack is, EntityPlayer player, World world, int x, int y, int z, int side, float hitX, float hitY, float hitZ) { int id = world.getBlockId( x, y, z ); - if ( id > 0 ) + if ( id > 0 && !player.isSneaking() ) { Block b = Block.blocksList[id]; TileEntity te = world.getBlockTileEntity( x, y, z );