Fix shift clicking memory card still triggering off-hand item/block usage.
This commit is contained in:
@@ -146,11 +146,14 @@ public class ToolMemoryCard extends AEBaseItem implements IMemoryCard
|
|||||||
@Override
|
@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 )
|
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();
|
if( !w.isRemote )
|
||||||
mem.notifyUser( player, MemoryCardMessages.SETTINGS_CLEARED );
|
{
|
||||||
player.getHeldItem( hand ).setTagCompound( null );
|
final IMemoryCard mem = (IMemoryCard) player.getHeldItem( hand ).getItem();
|
||||||
|
mem.notifyUser( player, MemoryCardMessages.SETTINGS_CLEARED );
|
||||||
|
player.getHeldItem( hand ).setTagCompound( null );
|
||||||
|
}
|
||||||
return EnumActionResult.SUCCESS;
|
return EnumActionResult.SUCCESS;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
|||||||
Reference in New Issue
Block a user