Package net.minecraft.src
Class Achievement<T>
java.lang.Object
net.minecraft.src.StatBase
net.minecraft.src.Achievement<T>
-
Field Summary
FieldsModifier and TypeFieldDescriptionThe format code to be used when the achievement is announce to chat.final intIs the column (related to center of achievement gui, in 24 pixels unit) that the achievement will be displayed.final intIs the row (related to center of achievement gui, in 24 pixels unit) that the achievement will be displayed.final Class<? extends AchievementEventDispatcher.AchievementEvent<T>>The name of the file containing the achievement's frame.final ResourceLocationbooleanDetermines if this achievement should be shown to the player when locked.booleanfinal Stringfinal Achievement[]booleanHolds the tab this achievement is in.final ItemStackHolds the ItemStack that will be used to draw the achievement into the GUI.intThe left coordinate of the frame in frameSet.intThe top coordinate of the frame in frameSet.Fields inherited from class net.minecraft.src.StatBase
distanceStatType, field_111202_k, isIndependent, simpleStatType, statGuid, statId, timeStatType -
Constructor Summary
ConstructorsConstructorDescriptionAchievement(ResourceLocation id, ItemStack iconStack, int displayColumn, int displayRow, Class<? extends AchievementEventDispatcher.AchievementEvent<T>> eventType, Predicate<T> predicate, Achievement<?>... parentAchievements) -
Method Summary
Modifier and TypeMethodDescriptionReturns the fully description of the achievement - ready to be displayed on screen.booleanSpecial achievements have a 'spiked' (on normal texture pack) frame, special achievements are the hardest ones to achieve.Initializes the current stat as independent (i.e., lacking prerequisites for being updated) and returns the current instance.booleanReturns whether or not the StatBase-derived class is a statistic (running counter) or an achievement (one-shot).Adds the achievement on the internal list of registered achievements, also, it's check for duplicated id's.registerAchievement(AchievementTab achievementtab) Registers an achievement to a custom tab.Register the stat into StatList.Register the stat into StatList.setAchievementColor(EnumChatFormatting achievementColor) The format code to be used when the achievement is announce to chat.setFrame(int x, int y) The coordinate of the achievement's frame.setFrameSet(String frameSetName) The name of the file containing the achievement's frame.Hidden achievements are on visible in GUI but details about it are hidden.setHidden(boolean isHidden) Hidden achievements are on visible in GUI but details about it are hidden.Indicates whether or not the given achievement or statistic is independent (i.e., lacks prerequisites for being update).Secret achievements are not revealed until unlocked.setSecret(boolean isSecret) Secret achievements are not revealed until unlocked.Special achievements have a 'spiked' (on normal texture pack) frame, as well as having a dark purple announcement color.setSpecial(boolean isSpecial) Special achievements have a 'spiked' (on normal texture pack) frame, as well as having a dark purple announcement color.setStatStringFormatter(IStatStringFormat par1IStatStringFormat) Defines a string formatter for the achievement.Methods inherited from class net.minecraft.src.StatBase
func_75968_a, getName, toString
-
Field Details
-
displayColumn
public final int displayColumnIs the column (related to center of achievement gui, in 24 pixels unit) that the achievement will be displayed. -
displayRow
public final int displayRowIs the row (related to center of achievement gui, in 24 pixels unit) that the achievement will be displayed. -
parentAchievements
-
tab
Holds the tab this achievement is in. -
isHidden
public boolean isHiddenDetermines if this achievement should be shown to the player when locked. -
isSecret
public boolean isSecret -
shouldAnnounce
public boolean shouldAnnounce -
achievementColor
The format code to be used when the achievement is announce to chat. See https://minecraft.fandom.com/wiki/Formatting_codes -
frameSet
The name of the file containing the achievement's frame. -
u
public int uThe left coordinate of the frame in frameSet. -
v
public int vThe top coordinate of the frame in frameSet. -
theItemStack
Holds the ItemStack that will be used to draw the achievement into the GUI. -
predicate
-
eventType
-
id
-
name
-
-
Constructor Details
-
Achievement
public Achievement(ResourceLocation id, ItemStack iconStack, int displayColumn, int displayRow, Class<? extends AchievementEventDispatcher.AchievementEvent<T>> eventType, Predicate<T> predicate, Achievement<?>... parentAchievements)
-
-
Method Details
-
setIndependent
Indicates whether or not the given achievement or statistic is independent (i.e., lacks prerequisites for being update). -
setSpecial
Special achievements have a 'spiked' (on normal texture pack) frame, as well as having a dark purple announcement color. Special achievements are the hardest ones to achieve. -
setSpecial
Special achievements have a 'spiked' (on normal texture pack) frame, as well as having a dark purple announcement color. Special achievements are the hardest ones to achieve. -
setHidden
Hidden achievements are on visible in GUI but details about it are hidden. -
setHidden
Hidden achievements are on visible in GUI but details about it are hidden. -
setSecret
Secret achievements are not revealed until unlocked. -
setSecret
Secret achievements are not revealed until unlocked. -
setAchievementColor
The format code to be used when the achievement is announce to chat. This is set to (green) by default, and (dark_purple) for special achievements. This method can override those colors See https://minecraft.fandom.com/wiki/Formatting_codes -
setFrameSet
The name of the file containing the achievement's frame. -
setFrame
The coordinate of the achievement's frame. -
setNoAnnounce
-
registerAchievement
Adds the achievement on the internal list of registered achievements, also, it's check for duplicated id's. -
registerAchievement
Registers an achievement to a custom tab.- Parameters:
achievementtab- is the custom tab to register to- Returns:
- this
-
isAchievement
public boolean isAchievement()Returns whether or not the StatBase-derived class is a statistic (running counter) or an achievement (one-shot).- Overrides:
isAchievementin classStatBase
-
getDescription
Returns the fully description of the achievement - ready to be displayed on screen. -
setStatStringFormatter
Defines a string formatter for the achievement. -
getSpecial
public boolean getSpecial()Special achievements have a 'spiked' (on normal texture pack) frame, special achievements are the hardest ones to achieve. -
registerStat
Register the stat into StatList.- Overrides:
registerStatin classStatBase
-
registerStat
Register the stat into StatList. -
initIndependentStat
Initializes the current stat as independent (i.e., lacking prerequisites for being updated) and returns the current instance.- Overrides:
initIndependentStatin classStatBase
-