ActionResultType in onActivated
This commit is contained in:
@@ -444,7 +444,7 @@ public abstract class AEBasePart implements IPart, IGridProxyable, IActionHost,
|
||||
|
||||
final String name = is.getTranslationKey();
|
||||
|
||||
if( player.isShiftKeyDown() )
|
||||
if( player.isCrouching() )
|
||||
{
|
||||
final CompoundNBT data = this.downloadSettings( SettingsFrom.MEMORY_CARD );
|
||||
if( data != null )
|
||||
|
||||
@@ -818,7 +818,7 @@ public class CableBusContainer extends CableBusStorage implements AEMultiTile, I
|
||||
{
|
||||
// forge sends activate even when sneaking in some cases (eg emtpy hand)
|
||||
// if sneaking try shift activate first.
|
||||
if( player.isShiftKeyDown() && p.part.onShiftActivate( player, hand, pos ) )
|
||||
if( player.isCrouching() && p.part.onShiftActivate( player, hand, pos ) )
|
||||
{
|
||||
return true;
|
||||
}
|
||||
@@ -833,7 +833,7 @@ public class CableBusContainer extends CableBusStorage implements AEMultiTile, I
|
||||
final SelectedPart p = this.selectPart( hitVec );
|
||||
if( p != null && p.part != null )
|
||||
{
|
||||
if( player.isShiftKeyDown() )
|
||||
if( player.isCrouching() )
|
||||
{
|
||||
return p.part.onShiftClicked( player, hand, hitVec );
|
||||
}
|
||||
|
||||
@@ -79,7 +79,7 @@ public class PartPlacement
|
||||
return ActionResultType.FAIL;
|
||||
}
|
||||
|
||||
if( !held.isEmpty() && Platform.isWrench( player, held, pos ) && player.isShiftKeyDown() )
|
||||
if( !held.isEmpty() && Platform.isWrench( player, held, pos ) && player.isCrouching() )
|
||||
{
|
||||
if( !Platform.hasPermissions( new DimensionalCoord( world, pos ), player ) )
|
||||
{
|
||||
@@ -200,7 +200,7 @@ public class PartPlacement
|
||||
if( held.isEmpty() )
|
||||
{
|
||||
final Block block = world.getBlockState( pos ).getBlock();
|
||||
if( host != null && player.isShiftKeyDown() && block != null )
|
||||
if( host != null && player.isCrouching() && block != null )
|
||||
{
|
||||
final LookDirection dir = Platform.getPlayerRay( player, getEyeOffset( player ) );
|
||||
final RayTraceResult mop = block.getRayTraceResult( world.getBlockState( pos ), world, pos, dir.getA(), dir.getB(), mop );
|
||||
@@ -325,7 +325,7 @@ public class PartPlacement
|
||||
|
||||
if( sp.part != null )
|
||||
{
|
||||
if( !player.isShiftKeyDown() && sp.part.onActivate( player, hand, mop.hitVec ) )
|
||||
if( !player.isCrouching() && sp.part.onActivate( player, hand, mop.hitVec ) )
|
||||
{
|
||||
return ActionResult.resultFail( null );
|
||||
}
|
||||
@@ -437,7 +437,7 @@ public class PartPlacement
|
||||
boolean supportedItem = items.memoryCard().isSameAs( held );
|
||||
supportedItem |= items.colorApplicator().isSameAs( held );
|
||||
|
||||
if( event.getPlayer().isShiftKeyDown() && !held.isEmpty() && supportedItem )
|
||||
if( event.getPlayer().isCrouching() && !held.isEmpty() && supportedItem )
|
||||
{
|
||||
NetworkHandler.instance().sendToServer( new PacketClick( event.getPos(), event.getFace(), 0, 0, 0, event.getHand() ) );
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user