Class AchievementTab

java.lang.Object
api.achievement.AchievementTab

public class AchievementTab extends Object
  • Field Details

    • achievementList

      public List<Achievement> achievementList
      Holds a list of all registered achievements.
    • minDisplayColumn

      public int minDisplayColumn
      Is the smallest column used to display a achievement on the GUI.
    • minDisplayRow

      public int minDisplayRow
      Is the smallest row used to display a achievement on the GUI.
    • maxDisplayColumn

      public int maxDisplayColumn
      Is the biggest column used to display a achievement on the GUI.
    • maxDisplayRow

      public int maxDisplayRow
      Is the biggest row used to display a achievement on the GUI.
  • Constructor Details

    • AchievementTab

      public AchievementTab(String name)
      Parameters:
      name - is the name of the tab
  • Method Details

    • getName

      public String getName()
      Returns:
      untranslated name of the tab
    • getIndex

      public int getIndex()
      Returns:
      index of the tab
    • setIcon

      public AchievementTab setIcon(int id)
      Sets the icon for this tab to the specified item/block id.
      Parameters:
      id - is the item/block id
      Returns:
      this
    • setIcon

      public AchievementTab setIcon(Item item)
      Sets the icon for this tab to the specified item.
      Parameters:
      item - is the item to set as the icon
      Returns:
      this
    • setIcon

      public AchievementTab setIcon(Block block)
      Sets the icon for this tab to the specified block.
      Parameters:
      block - is the block to set as the block
      Returns:
      this
    • add

      public void add(Achievement achievement)
      Adds an Achievement to this tab.
      Parameters:
      achievement - to add
    • getIconItemID

      public int getIconItemID()
    • getIconItem

      public Item getIconItem()
    • size

      public int size()
    • genAchievementIcon

      public Icon genAchievementIcon(int mapX, int mapY, int windowX, int windowY)
      Generates the background of a tab. Uses vanilla background by default. Override this method to create a custom background.
      Parameters:
      mapX -
      mapY -
      windowX -
      windowY -
      Returns:
      Icon object