Package api.achievement
Class AchievementTab
java.lang.Object
api.achievement.AchievementTab
-
Field Summary
FieldsModifier and TypeFieldDescriptionHolds a list of all registered achievements.intIs the biggest column used to display a achievement on the GUI.intIs the biggest row used to display a achievement on the GUI.intIs the smallest column used to display a achievement on the GUI.intIs the smallest row used to display a achievement on the GUI. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidadd(Achievement achievement) Adds an Achievement to this tab.genAchievementIcon(int mapX, int mapY, int windowX, int windowY) Generates the background of a tab.intintgetIndex()getName()setIcon(int id) Sets the icon for this tab to the specified item/block id.Sets the icon for this tab to the specified block.Sets the icon for this tab to the specified item.intsize()
-
Field Details
-
achievementList
Holds a list of all registered achievements. -
minDisplayColumn
public int minDisplayColumnIs the smallest column used to display a achievement on the GUI. -
minDisplayRow
public int minDisplayRowIs the smallest row used to display a achievement on the GUI. -
maxDisplayColumn
public int maxDisplayColumnIs the biggest column used to display a achievement on the GUI. -
maxDisplayRow
public int maxDisplayRowIs the biggest row used to display a achievement on the GUI.
-
-
Constructor Details
-
AchievementTab
- Parameters:
name- is the name of the tab
-
-
Method Details
-
getName
- Returns:
- untranslated name of the tab
-
getIndex
public int getIndex()- Returns:
- index of the tab
-
setIcon
Sets the icon for this tab to the specified item/block id.- Parameters:
id- is the item/block id- Returns:
- this
-
setIcon
Sets the icon for this tab to the specified item.- Parameters:
item- is the item to set as the icon- Returns:
- this
-
setIcon
Sets the icon for this tab to the specified block.- Parameters:
block- is the block to set as the block- Returns:
- this
-
add
Adds an Achievement to this tab.- Parameters:
achievement- to add
-
getIconItemID
public int getIconItemID() -
getIconItem
-
size
public int size() -
genAchievementIcon
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
-