ActionResultType in onActivated
This commit is contained in:
@@ -225,7 +225,7 @@ public final class ItemMaterial extends AEBaseItem implements IStorageComponent,
|
||||
{
|
||||
PlayerEntity player = context.getPlayer();
|
||||
Hand hand = context.getHand();
|
||||
if( player.isShiftKeyDown() )
|
||||
if( player.isCrouching() )
|
||||
{
|
||||
final TileEntity te = context.getWorld().getTileEntity( context.getPos() );
|
||||
IItemHandler upgrades = null;
|
||||
|
||||
@@ -76,7 +76,7 @@ public class ItemEncodedPattern extends AEBaseItem implements ICraftingPatternIt
|
||||
|
||||
private boolean clearPattern( final ItemStack stack, final PlayerEntity player )
|
||||
{
|
||||
if( player.isShiftKeyDown() )
|
||||
if( player.isCrouching() )
|
||||
{
|
||||
if( Platform.isClient() )
|
||||
{
|
||||
|
||||
@@ -170,7 +170,7 @@ public abstract class AbstractStorageCell<T extends IAEStack<T>> extends AEBaseI
|
||||
|
||||
private boolean disassembleDrive( final ItemStack stack, final World world, final PlayerEntity player )
|
||||
{
|
||||
if( player.isShiftKeyDown() )
|
||||
if( player.isCrouching() )
|
||||
{
|
||||
if( Platform.isClient() )
|
||||
{
|
||||
|
||||
@@ -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() )
|
||||
{
|
||||
|
||||
@@ -198,7 +198,7 @@ public class ToolMemoryCard extends AEBaseItem implements IMemoryCard
|
||||
@Override
|
||||
public ActionResultType onItemUse( ItemUseContext context )
|
||||
{
|
||||
if( context.getPlayer().isShiftKeyDown() )
|
||||
if( context.getPlayer().isCrouching() )
|
||||
{
|
||||
if( !context.getPlayer().world.isRemote )
|
||||
{
|
||||
@@ -215,7 +215,7 @@ public class ToolMemoryCard extends AEBaseItem implements IMemoryCard
|
||||
@Override
|
||||
public ActionResult<ItemStack> onItemRightClick( World w, PlayerEntity player, Hand hand )
|
||||
{
|
||||
if( player.isShiftKeyDown() )
|
||||
if( player.isCrouching() )
|
||||
{
|
||||
if( !w.isRemote )
|
||||
{
|
||||
|
||||
@@ -103,7 +103,7 @@ public class ToolNetworkTool extends AEBaseItem implements IGuiItem, IAEWrench
|
||||
{
|
||||
return ActionResultType.FAIL;
|
||||
}
|
||||
else if( context.getPlayer().isShiftKeyDown() )
|
||||
else if( context.getPlayer().isCrouching() )
|
||||
{
|
||||
return ActionResultType.PASS;
|
||||
}
|
||||
@@ -138,7 +138,7 @@ public class ToolNetworkTool extends AEBaseItem implements IGuiItem, IAEWrench
|
||||
}
|
||||
|
||||
final Block b = w.getBlockState( pos ).getBlock();
|
||||
if( !p.isShiftKeyDown() )
|
||||
if( !p.isCrouching() )
|
||||
{
|
||||
final TileEntity te = w.getTileEntity( pos );
|
||||
if( !( te instanceof IGridHost ) )
|
||||
@@ -152,7 +152,7 @@ public class ToolNetworkTool extends AEBaseItem implements IGuiItem, IAEWrench
|
||||
}
|
||||
}
|
||||
|
||||
if( !p.isShiftKeyDown() )
|
||||
if( !p.isCrouching() )
|
||||
{
|
||||
if( p.openContainer instanceof AEBaseContainer )
|
||||
{
|
||||
|
||||
@@ -188,7 +188,7 @@ public class ToolColorApplicator extends AEBasePoweredItem implements IStorageCe
|
||||
}
|
||||
}
|
||||
|
||||
if( p.isShiftKeyDown() )
|
||||
if( p.isCrouching() )
|
||||
{
|
||||
this.cycleColors( is, paintBall, 1 );
|
||||
}
|
||||
|
||||
@@ -256,7 +256,7 @@ public class ToolEntropyManipulator extends AEBasePoweredItem implements IBlockT
|
||||
final BlockState state = w.getBlockState( pos );
|
||||
final Block blockID = state.getBlock();
|
||||
|
||||
if( p.isShiftKeyDown() )
|
||||
if( p.isCrouching() )
|
||||
{
|
||||
if( this.canCool( state ) )
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user