Never rotate while sneaking!

Fixed Crash.
This commit is contained in:
AlgorithmX2 2014-02-01 20:26:30 -06:00
parent 88da475a4b
commit 496a67abb9
2 changed files with 3 additions and 2 deletions

View file

@ -19,7 +19,8 @@ public class NetworkToolViewer implements INetworkTool
this.is = is; this.is = is;
gh = gHost; gh = gHost;
inv = new AppEngInternalInventory( null, 9 ); 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 @Override

View file

@ -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) 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 ); int id = world.getBlockId( x, y, z );
if ( id > 0 ) if ( id > 0 && !player.isSneaking() )
{ {
Block b = Block.blocksList[id]; Block b = Block.blocksList[id];
TileEntity te = world.getBlockTileEntity( x, y, z ); TileEntity te = world.getBlockTileEntity( x, y, z );