Package vazkii.botania.api.lexicon

Examples of vazkii.botania.api.lexicon.LexiconEntry


  @Override
  void populateIndex() {
    for(int i = page * 12; i < (page + 1) * 12; i++) {
      GuiButtonInvisible button = (GuiButtonInvisible) buttonList.get(i - page * 12);
      LexiconEntry entry = i >= entriesToDisplay.size() ? null : entriesToDisplay.get(i);
      if(entry != null)
        button.displayString = entry.getKnowledgeType().color + "" + (entry.isPriority() ? EnumChatFormatting.ITALIC : "") + StatCollector.translateToLocal(entry.getUnlocalizedName());
      else button.displayString = "";
    }
  }
View Full Code Here


  void openEntry(int index) {
    if(index >= entriesToDisplay.size())
      return;

    LexiconEntry entry = entriesToDisplay.get(index);
    mc.displayGuiScreen(new GuiLexiconEntry(entry, this));
    ClientTickHandler.notifyPageChange();
  }
View Full Code Here

    GL11.glBlendFunc(GL11.GL_SRC_ALPHA, GL11.GL_ONE_MINUS_SRC_ALPHA);
    int sx = res.getScaledWidth() / 2 - 17;
    int sy = res.getScaledHeight() / 2 + 2;

    if(block instanceof ILexiconable) {
      LexiconEntry entry = ((ILexiconable) block).getEntry(mc.theWorld, pos.blockX, pos.blockY, pos.blockZ, mc.thePlayer, mc.thePlayer.getCurrentEquippedItem());
      if(entry != null) {
        if(!((ILexicon) stack.getItem()).isKnowledgeUnlocked(stack, entry.getKnowledgeType()))
          font = mc.standardGalacticFontRenderer;

        drawStr = StatCollector.translateToLocal(entry.getUnlocalizedName());
        draw = true;
      }
    }

    if(!draw && pos.entityHit == null) {
View Full Code Here

    if(par2EntityPlayer.isSneaking()) {
      Block block = par3World.getBlock(par4, par5, par6);

      if(block != null) {
        if(block instanceof ILexiconable) {
          LexiconEntry entry = ((ILexiconable) block).getEntry(par3World, par4, par5, par6, par2EntityPlayer, par1ItemStack);
          if(entry != null && isKnowledgeUnlocked(par1ItemStack, entry.getKnowledgeType())) {
            Botania.proxy.setEntryToOpen(entry);
            par2EntityPlayer.openGui(Botania.instance, LibGuiIDs.LEXICON, par3World, 0, 0, 0);
            if(!par3World.isRemote)
              par3World.playSoundAtEntity(par2EntityPlayer, "botania:lexiconOpen", 0.5F, 1F);
            return true;
View Full Code Here

  @Override
  public ItemStack onItemRightClick(ItemStack par1ItemStack, World par2World, EntityPlayer par3EntityPlayer) {
    String force = getForcedPage(par1ItemStack);
    if(force != null && !force.isEmpty()) {
      LexiconEntry entry = getEntryFromForce(par1ItemStack);
      if(entry != null)
        Botania.proxy.setEntryToOpen(entry);
      else par3EntityPlayer.addChatMessage(new ChatComponentTranslation("botaniamisc.cantOpen").setChatStyle(new ChatStyle().setColor(EnumChatFormatting.RED)));
      setForcedPage(par1ItemStack, "");
    }
View Full Code Here

TOP

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

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.