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
@@ -48,21 +48,21 @@ public class BlockCondenser extends AEBaseTileBlock
@Override
public ActionResultType onActivated(final World w, final BlockPos pos, final PlayerEntity player, final Hand hand, final @Nullable ItemStack heldItem, final BlockRayTraceResult hit)
{
if( player.isShiftKeyDown() )
if( player.isCrouching() )
{
return false;
return ActionResultType.PASS;
}
if( Platform.isServer() )
{
final TileCondenser tc = this.getTileEntity( w, pos );
if( tc != null && !player.isShiftKeyDown() )
if( tc != null && !player.isCrouching() )
{
Platform.openGUI( player, tc, AEPartLocation.fromFacing(hit), GuiBridge.GUI_CONDENSER );
return true;
return ActionResultType.SUCCESS;
}
}
return true;
return ActionResultType.SUCCESS;
}
}