ActionResultType in onActivated

This commit is contained in:
Sebastian Hartte
2020-06-02 19:15:23 +02:00
parent 3e78c713d1
commit cf9ab8a13b
42 changed files with 135 additions and 181 deletions
@@ -57,7 +57,7 @@ public class ToolBiometricCard extends AEBaseItem implements IBiometricCard
@Override
public ActionResult<ItemStack> onItemRightClick( final World w, final PlayerEntity p, final Hand hand )
{
if( p.isShiftKeyDown() )
if( p.isCrouching() )
{
this.encode( p.getHeldItem( hand ), p );
p.swingArm( hand );
@@ -70,7 +70,7 @@ public class ToolBiometricCard extends AEBaseItem implements IBiometricCard
@Override
public boolean itemInteractionForEntity( ItemStack is, final PlayerEntity player, final LivingEntity target, final Hand hand )
{
if( target instanceof PlayerEntity && !player.isShiftKeyDown() )
if( target instanceof PlayerEntity && !player.isCrouching() )
{
if( player.isCreative() )
{