Fix shift clicking memory card still triggering off-hand item/block usage.

This commit is contained in:
Gunther De Wachter 2017-08-16 03:23:18 +02:00
parent b5b8050c4c
commit 7cb641cdc8

View file

@ -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