From 7cb641cdc822839bb70fb6b99464a3d6faf8b39c Mon Sep 17 00:00:00 2001 From: Gunther De Wachter Date: Wed, 16 Aug 2017 03:23:18 +0200 Subject: [PATCH] Fix shift clicking memory card still triggering off-hand item/block usage. --- src/main/java/appeng/items/tools/ToolMemoryCard.java | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/src/main/java/appeng/items/tools/ToolMemoryCard.java b/src/main/java/appeng/items/tools/ToolMemoryCard.java index fe9d6c8ac..ee5bca30a 100644 --- a/src/main/java/appeng/items/tools/ToolMemoryCard.java +++ b/src/main/java/appeng/items/tools/ToolMemoryCard.java @@ -146,11 +146,14 @@ public class ToolMemoryCard extends AEBaseItem implements IMemoryCard @Override public EnumActionResult onItemUse( final EntityPlayer player, final World w, final BlockPos pos, final EnumHand hand, final EnumFacing side, final float hx, final float hy, final float hz ) { - if( player.isSneaking() && !w.isRemote ) + if( player.isSneaking() ) { - final IMemoryCard mem = (IMemoryCard) player.getHeldItem( hand ).getItem(); - mem.notifyUser( player, MemoryCardMessages.SETTINGS_CLEARED ); - player.getHeldItem( hand ).setTagCompound( null ); + if( !w.isRemote ) + { + final IMemoryCard mem = (IMemoryCard) player.getHeldItem( hand ).getItem(); + mem.notifyUser( player, MemoryCardMessages.SETTINGS_CLEARED ); + player.getHeldItem( hand ).setTagCompound( null ); + } return EnumActionResult.SUCCESS; } else