@Override
  @SideOnly(Side.CLIENT)
  public void onRender(
      GuiEnderCompendium gui, int x, int y, int mouseX, int mouseY, boolean isUnlocked) {
    GL11.glColor4f(1F, 1F, 1F, 1F);
    gui.mc.getTextureManager().bindTexture(GuiEnderCompendium.texFragments);
    gui.drawTexturedModalRect(x, y, 89, 0, 96, 20);

    for (int a = 0, xx = x, yy = y; a < 6; a++) {
      ItemStack is =
          isUnlocked ? (a == 5 ? charm : runes[a]) : KnowledgeFragmentCrafting.lockedItem;

      if (is != null) {
        GuiItemRenderHelper.renderItemIntoGUI(gui.mc.getTextureManager(), is, xx + 2, yy + 2);

        if (isUnlocked
            && mouseX >= xx + 1
            && mouseX <= xx + 18
            && mouseY >= yy + 1
            && mouseY <= yy + 18) {
          GuiItemRenderHelper.setupTooltip(
              mouseX,
              mouseY,
              Joiner.on('\n').join(KnowledgeUtils.getCompendiumTooltip(is, gui.mc.thePlayer)));
        }
      }

      if (a == 4) xx = x + 98;
      else xx += 19;
    }
  }
  @Override
  @SideOnly(Side.CLIENT)
  public void onRender(
      GuiEnderCompendium gui, int x, int y, int mouseX, int mouseY, boolean isUnlocked) {
    String str = getString(isUnlocked);
    GuiHelper.renderUnicodeString(str, x + 1, y, CompendiumPageHandler.innerWidth, 255 << 24);

    if (isUnlocked) {
      KnowledgeObject<?> obj = getHoveredObject(gui.mc.fontRenderer, mouseX, mouseY, x, y);
      if (obj != null)
        GuiItemRenderHelper.setupTooltip(
            mouseX,
            mouseY,
            obj.getTranslatedTooltip()
                + "\n"
                + EnumChatFormatting.DARK_PURPLE
                + I18n.format("compendium.viewObject"));
    }
  }