Examples of simulateAdd()


Examples of appeng.util.InventoryAdaptor.simulateAdd()

        InscriberRecipe out = getTask();
        if ( out != null )
        {
          ItemStack is = out.output.copy();
          InventoryAdaptor ad = InventoryAdaptor.getAdaptor( new WrapperInventoryRange( inv, 3, 1, true ), ForgeDirection.UNKNOWN );
          if ( ad.simulateAdd( is ) == null )
          {
            smash = true;
            finalStep = 0;
            markForUpdate();
          }
View Full Code Here

Examples of appeng.util.InventoryAdaptor.simulateAdd()

        ais.setStackSize( myItem.getMaxStackSize() );

        InventoryAdaptor adp = InventoryAdaptor.getAdaptor( player, ForgeDirection.UNKNOWN );
        myItem.stackSize = (int) ais.getStackSize();
        myItem = adp.simulateAdd( myItem );

        if ( myItem != null )
          ais.setStackSize( ais.getStackSize() - myItem.stackSize );

        ais = Platform.poweredExtraction( powerSrc, cellInv, ais, mySrc );
View Full Code Here

Examples of appeng.util.InventoryAdaptor.simulateAdd()

          ais.setStackSize( myItem.getMaxStackSize() );

          InventoryAdaptor adp = InventoryAdaptor.getAdaptor( player, ForgeDirection.UNKNOWN );
          myItem.stackSize = (int) ais.getStackSize();
          myItem = adp.simulateAdd( myItem );

          if ( myItem != null )
            ais.setStackSize( ais.getStackSize() - myItem.stackSize );

          ais = Platform.poweredExtraction( powerSrc, cellInv, ais, mySrc );
View Full Code Here

Examples of appeng.util.InventoryAdaptor.simulateAdd()

    if ( rs == null )
      return;

    for ( int x = 0; x < maxTimesToCraft; x++ )
    {
      if ( ia.simulateAdd( rs ) == null )
      {
        IItemList<IAEItemStack> all = inv.getStorageList();
        ItemStack extra = ia.addItems( craftItem( who, rs, inv, all ) );
        if ( extra != null )
        {
View Full Code Here

Examples of appeng.util.InventoryAdaptor.simulateAdd()

      if ( craftingTracker.isBusy( x ) )
        changed = handleCrafting( x, adaptor, itemStack ) || changed;
      else if ( itemStack.getStackSize() > 0 )
      {
        // make sure strange things didn't happen...
        if ( adaptor.simulateAdd( itemStack.getItemStack() ) != null )
        {
          changed = true;
          throw new GridAccessException();
        }
View Full Code Here

Examples of appeng.util.InventoryAdaptor.simulateAdd()

    if ( acquired != null && slot >= 0 && slot <= requireWork.length )
    {
      InventoryAdaptor adaptor = getAdaptor( slot );

      if ( mode == Actionable.SIMULATE )
        return AEItemStack.create( adaptor.simulateAdd( acquired.getItemStack() ) );
      else
      {
        IAEItemStack is = AEItemStack.create( adaptor.addItems( acquired.getItemStack() ) );
        updatePlan( slot );
        return is;
View Full Code Here

Examples of appeng.util.InventoryAdaptor.simulateAdd()

        double power = items.getStackSize();
        if ( energy.extractAEPower( power, mode, PowerMultiplier.CONFIG ) > power - 0.01 )
        {
          if ( mode == Actionable.MODULATE )
            return AEItemStack.create( d.addItems( items.getItemStack() ) );
          return AEItemStack.create( d.simulateAdd( items.getItemStack() ) );
        }
      }
    }
    catch (GridAccessException e)
    {
View Full Code Here

Examples of appeng.util.inv.AdaptorPlayerHand.simulateAdd()

      InventoryAdaptor inv = new AdaptorPlayerHand( getPlayerInv().player );
      InventoryAdaptor playerInv = InventoryAdaptor.getAdaptor( getPlayerInv().player, ForgeDirection.UNKNOWN );
      if ( packetPatternSlot.shift )
        inv = playerInv;

      if ( inv.simulateAdd( out.getItemStack() ) != null )
        return;

      IAEItemStack extracted = Platform.poweredExtraction( powerSrc, cellInv, out, mySrc );
      EntityPlayer p = getPlayerInv().player;
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.