Package appeng.util

Examples of appeng.util.InventoryAdaptor.removeItems()


          if ( extra != null )
            playerHand.addItems( extra );
        }
        else if ( is != null )
        {
          ItemStack extra = interfaceSlot.removeItems( (is.stackSize + 1) / 2, null, null );
          if ( extra != null )
            extra = playerHand.addItems( extra );
          if ( extra != null )
            interfaceSlot.addItems( extra );
        }
View Full Code Here


        ais = Platform.poweredInsert( powerSrc, cellInv, ais, mySrc );
        if ( ais == null )
        {
          InventoryAdaptor ia = new AdaptorPlayerHand( player );

          ItemStack fail = ia.removeItems( 1, extracted.getItemStack(), null );
          if ( fail == null )
            cellInv.extractItems( extracted, Actionable.MODULATE, mySrc );

          updateHeld( player );
        }
View Full Code Here

        if ( diff != 0 )
        {
          // extract items!
          changed = true;
          ItemStack removed = adaptor.removeItems( (int) diff, null, null );
          if ( removed == null )
            throw new RuntimeException( "bad attempt at managing inventory. ( removeItems )" );
          else if ( removed.stackSize != diff )
            throw new RuntimeException( "bad attempt at managing inventory. ( removeItems )" );
        }
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.