Package vazkii.botania.api.lexicon

Examples of vazkii.botania.api.lexicon.KnowledgeType


  @Override
  public void getSubItems(Item item, CreativeTabs tab, List list) {
    list.add(new ItemStack(item));
    ItemStack creative = new ItemStack(item);
    for(String s : BotaniaAPI.knowledgeTypes.keySet()) {
      KnowledgeType type = BotaniaAPI.knowledgeTypes.get(s);
      unlockKnowledge(creative, type);
    }
    list.add(creative);
  }
View Full Code Here


      if(!edition.isEmpty())
        par3List.add(edition);

      List<KnowledgeType> typesKnown = new ArrayList();
      for(String s : BotaniaAPI.knowledgeTypes.keySet()) {
        KnowledgeType type = BotaniaAPI.knowledgeTypes.get(s);
        if(isKnowledgeUnlocked(par1ItemStack, type))
          typesKnown.add(type);
      }

      String format = typesKnown.size() == 1 ? "botaniamisc.knowledgeTypesSingular" : "botaniamisc.knowledgeTypesPlural";
      addStringToTooltip(String.format(StatCollector.translateToLocal(format), typesKnown.size()), par3List);

      for(KnowledgeType type : typesKnown)
        addStringToTooltip(" \u2022 " + StatCollector.translateToLocal(type.getUnlocalizedName()), par3List);

    } else addStringToTooltip(StatCollector.translateToLocal("botaniamisc.shiftinfo"), par3List);
  }
View Full Code Here

   * Registers a new Knowledge Type.
   * @param id The ID for this knowledge type.
   * @param color The color to display this knowledge type as.
   */
  public static KnowledgeType registerKnowledgeType(String id, EnumChatFormatting color, boolean autoUnlock) {
    KnowledgeType type = new KnowledgeType(id, color, autoUnlock);
    knowledgeTypes.put(id, type);
    return type;
  }
View Full Code Here

TOP

Related Classes of vazkii.botania.api.lexicon.KnowledgeType

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.