Fixed tools getting deleted when being used in off-hand.

This commit is contained in:
Gunther De Wachter
2017-07-02 07:33:16 +02:00
parent 5ebd8452bf
commit b67d7eed82
5 changed files with 17 additions and 17 deletions
@@ -55,12 +55,12 @@ public class ToolBiometricCard extends AEBaseItem implements IBiometricCard
{
if( p.isSneaking() )
{
this.encode( p.getHeldItemMainhand(), p );
this.encode( p.getHeldItem(hand), p );
p.swingArm( hand );
return new ActionResult<ItemStack>( EnumActionResult.SUCCESS, p.getHeldItemMainhand() );
return new ActionResult<ItemStack>( EnumActionResult.SUCCESS, p.getHeldItem(hand) );
}
return new ActionResult<ItemStack>( EnumActionResult.PASS, p.getHeldItemMainhand() );
return new ActionResult<ItemStack>( EnumActionResult.PASS, p.getHeldItem(hand) );
}
@Override