Package appeng.util

Examples of appeng.util.InventoryAdaptor.addItems()


        IAEItemStack retrieved = Platform.poweredExtraction( energy, cell, input, new PlayerSource( player, this ) );
        if ( retrieved != null )
        {
          ItemStack newItems = retrieved.getItemStack();
          InventoryAdaptor adaptor = InventoryAdaptor.getAdaptor( player, ForgeDirection.UNKNOWN );
          newItems = adaptor.addItems( newItems );
          if ( newItems != null )
          {
            TileEntity te = tile;
            List<ItemStack> list = Arrays.asList( newItems );
            Platform.spawnDrops( player.worldObj, te.xCoord + side.offsetX, te.yCoord + side.offsetY, te.zCoord + side.offsetZ, list );
View Full Code Here


            }

            if ( toAdd != null )
            {
              if ( ap.simulateRemove( 1, toAdd, null ) == null )
                ap.addItems( toAdd );
              else
                duplicate = true;
            }
          }
          while (duplicate);
View Full Code Here

        for (int zz = 0; zz < secondary; zz++)
        {
          switch ((int) (Math.random() * 1000) % 3)
          {
          case 0:
            ap.addItems( AEApi.instance().blocks().blockSkyStone.stack( (int) (Math.random() * 12) + 1 ) );
            break;
          case 1:
            List<ItemStack> possibles = new LinkedList<ItemStack>();
            possibles.addAll( OreDictionary.getOres( "nuggetIron" ) );
            possibles.addAll( OreDictionary.getOres( "nuggetCopper" ) );
View Full Code Here

            ItemStack nugget = Platform.pickRandom( possibles );
            if ( nugget != null )
            {
              nugget = nugget.copy();
              nugget.stackSize = (int) (Math.random() * 12) + 1;
              ap.addItems( nugget );
            }
            break;
          }
        }
      }
View Full Code Here

          if ( ad != null )
          {
            if ( player.worldObj.isRemote )
              return false;

            player.inventory.setInventorySlotContents( player.inventory.currentItem, ad.addItems( is ) );
            return true;
          }
        }
      }
    }
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.