ActionResultType in onActivated
This commit is contained in:
@@ -94,11 +94,11 @@ public class BlockChest extends AEBaseTileBlock
|
||||
public ActionResultType onActivated(final World w, final BlockPos pos, final PlayerEntity p, final Hand hand, final @Nullable ItemStack heldItem, final BlockRayTraceResult hit)
|
||||
{
|
||||
final TileChest tg = this.getTileEntity( w, pos );
|
||||
if( tg != null && !p.isShiftKeyDown() )
|
||||
if( tg != null && !p.isCrouching() )
|
||||
{
|
||||
if( Platform.isClient() )
|
||||
{
|
||||
return true;
|
||||
return ActionResultType.SUCCESS;
|
||||
}
|
||||
|
||||
if( hit != tg.getUp() )
|
||||
@@ -113,9 +113,9 @@ public class BlockChest extends AEBaseTileBlock
|
||||
}
|
||||
}
|
||||
|
||||
return true;
|
||||
return ActionResultType.SUCCESS;
|
||||
}
|
||||
|
||||
return false;
|
||||
return ActionResultType.PASS;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -82,9 +82,9 @@ public class BlockDrive extends AEBaseTileBlock
|
||||
@Override
|
||||
public ActionResultType onActivated(final World w, final BlockPos pos, final PlayerEntity p, final Hand hand, final @Nullable ItemStack heldItem, final BlockRayTraceResult hit)
|
||||
{
|
||||
if( p.isShiftKeyDown() )
|
||||
if( p.isCrouching() )
|
||||
{
|
||||
return false;
|
||||
return ActionResultType.PASS;
|
||||
}
|
||||
|
||||
final TileDrive tg = this.getTileEntity( w, pos );
|
||||
@@ -94,8 +94,8 @@ public class BlockDrive extends AEBaseTileBlock
|
||||
{
|
||||
Platform.openGUI( p, tg, AEPartLocation.fromFacing(hit), GuiBridge.GUI_DRIVE );
|
||||
}
|
||||
return true;
|
||||
return ActionResultType.SUCCESS;
|
||||
}
|
||||
return false;
|
||||
return ActionResultType.PASS;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -60,9 +60,9 @@ public class BlockIOPort extends AEBaseTileBlock
|
||||
@Override
|
||||
public ActionResultType onActivated(final World w, final BlockPos pos, final PlayerEntity p, final Hand hand, final @Nullable ItemStack heldItem, final BlockRayTraceResult hit)
|
||||
{
|
||||
if( p.isShiftKeyDown() )
|
||||
if( p.isCrouching() )
|
||||
{
|
||||
return false;
|
||||
return ActionResultType.PASS;
|
||||
}
|
||||
|
||||
final TileIOPort tg = this.getTileEntity( w, pos );
|
||||
@@ -72,8 +72,8 @@ public class BlockIOPort extends AEBaseTileBlock
|
||||
{
|
||||
Platform.openGUI( p, tg, AEPartLocation.fromFacing(hit), GuiBridge.GUI_IOPORT );
|
||||
}
|
||||
return true;
|
||||
return ActionResultType.SUCCESS;
|
||||
}
|
||||
return false;
|
||||
return ActionResultType.PASS;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user