Package appeng.api.config

Examples of appeng.api.config.Upgrades


        for (int x = 0; x < upgrades.getSizeInventory(); x++)
        {
          ItemStack is = upgrades.getStackInSlot( x );
          if ( is != null && is.getItem() instanceof IUpgradeModule )
          {
            Upgrades u = ((IUpgradeModule) is.getItem()).getType( is );
            if ( u != null )
            {
              switch (u)
              {
              case FUZZY:
View Full Code Here


    if ( itemstack == null )
      return false;
    Item it = itemstack.getItem();
    if ( it instanceof IUpgradeModule )
    {
      Upgrades u = ((IUpgradeModule) it).getType( itemstack );
      if ( u != null )
      {
        return getInstalledUpgrades( u ) < getMaxInstalled( u );
      }
    }
View Full Code Here

    for (ItemStack is : this)
    {
      if ( is == null || is.getItem() == null || !(is.getItem() instanceof IUpgradeModule) )
        continue;

      Upgrades myUpgrade = ((IUpgradeModule) is.getItem()).getType( is );
      switch (myUpgrade)
      {
      case CAPACITY:
        CapacityUpgrades++;
        break;
View Full Code Here

      for (int x = 0; x < upgrades.getSizeInventory(); x++)
      {
        ItemStack is = upgrades.getStackInSlot( x );
        if ( is != null && is.getItem() instanceof IUpgradeModule )
        {
          Upgrades u = ((IUpgradeModule) is.getItem()).getType( is );
          if ( u != null )
          {
            switch (u)
            {
            case FUZZY:
View Full Code Here

    {
      NBTTagCompound c = Platform.openNbtData( is );
      details.add( c.getString( "InscribeName" ) );
    }

    Upgrades u = getType( is );
    if ( u != null )
    {
      List<String> textList = new LinkedList<String>();
      for (Entry<ItemStack, Integer> j : u.getSupported().entrySet())
      {
        String name = null;

        int limit = j.getValue();

        if ( j.getKey().getItem() instanceof IItemGroup )
        {
          IItemGroup ig = (IItemGroup) j.getKey().getItem();
          String str = ig.getUnlocalizedGroupName( u.getSupported().keySet(), j.getKey() );
          if ( str != null )
            name = Platform.gui_localize( str ) + (limit > 1 ? " (" + limit + ")" : "");
        }

        if ( name == null )
View Full Code Here

        upgrades = ((IUpgradeableHost) te).getInventoryByName( "upgrades" );

      if ( upgrades != null && is != null && is.getItem() instanceof IUpgradeModule )
      {
        IUpgradeModule um = (IUpgradeModule) is.getItem();
        Upgrades u = um.getType( is );

        if ( u != null )
        {
          InventoryAdaptor ad = InventoryAdaptor.getAdaptor( upgrades, ForgeDirection.UNKNOWN );
          if ( ad != null )
View Full Code Here

TOP

Related Classes of appeng.api.config.Upgrades

Copyright © 2018 www.massapicom. 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.