Class Achievement<T>

java.lang.Object
net.minecraft.src.StatBase
net.minecraft.src.Achievement<T>

public class Achievement<T> extends StatBase
  • Field Details

    • displayColumn

      public final int displayColumn
      Is the column (related to center of achievement gui, in 24 pixels unit) that the achievement will be displayed.
    • displayRow

      public final int displayRow
      Is the row (related to center of achievement gui, in 24 pixels unit) that the achievement will be displayed.
    • parentAchievements

      public final Achievement[] parentAchievements
    • tab

      public AchievementTab tab
      Holds the tab this achievement is in.
    • isHidden

      public boolean isHidden
      Determines if this achievement should be shown to the player when locked.
    • isSecret

      public boolean isSecret
    • shouldAnnounce

      public boolean shouldAnnounce
    • achievementColor

      public EnumChatFormatting achievementColor
      The format code to be used when the achievement is announce to chat. See https://minecraft.fandom.com/wiki/Formatting_codes
    • frameSet

      public String frameSet
      The name of the file containing the achievement's frame.
    • u

      public int u
      The left coordinate of the frame in frameSet.
    • v

      public int v
      The top coordinate of the frame in frameSet.
    • theItemStack

      public final ItemStack theItemStack
      Holds the ItemStack that will be used to draw the achievement into the GUI.
    • predicate

      public final Predicate<T> predicate
    • eventType

      public final Class<? extends AchievementEventDispatcher.AchievementEvent<T>> eventType
    • id

      public final ResourceLocation id
    • name

      public final String name
  • Constructor Details

  • Method Details

    • setIndependent

      public Achievement setIndependent()
      Indicates whether or not the given achievement or statistic is independent (i.e., lacks prerequisites for being update).
    • setSpecial

      public Achievement<T> 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

      public Achievement<T> setSpecial(boolean isSpecial)
      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

      public Achievement<T> setHidden()
      Hidden achievements are on visible in GUI but details about it are hidden.
    • setHidden

      public Achievement<T> setHidden(boolean isHidden)
      Hidden achievements are on visible in GUI but details about it are hidden.
    • setSecret

      public Achievement<T> setSecret()
      Secret achievements are not revealed until unlocked.
    • setSecret

      public Achievement<T> setSecret(boolean isSecret)
      Secret achievements are not revealed until unlocked.
    • setAchievementColor

      public Achievement setAchievementColor(EnumChatFormatting achievementColor)
      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

      public Achievement setFrameSet(String frameSetName)
      The name of the file containing the achievement's frame.
    • setFrame

      public Achievement setFrame(int x, int y)
      The coordinate of the achievement's frame.
    • setNoAnnounce

      public Achievement<T> setNoAnnounce()
    • registerAchievement

      public Achievement<T> registerAchievement()
      Adds the achievement on the internal list of registered achievements, also, it's check for duplicated id's.
    • registerAchievement

      public Achievement<T> registerAchievement(AchievementTab achievementtab)
      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:
      isAchievement in class StatBase
    • getDescription

      public String getDescription()
      Returns the fully description of the achievement - ready to be displayed on screen.
    • setStatStringFormatter

      public Achievement setStatStringFormatter(IStatStringFormat par1IStatStringFormat)
      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

      public StatBase registerStat()
      Register the stat into StatList.
      Overrides:
      registerStat in class StatBase
    • registerStat

      public StatBase registerStat(AchievementTab tab)
      Register the stat into StatList.
    • initIndependentStat

      public StatBase initIndependentStat()
      Initializes the current stat as independent (i.e., lacking prerequisites for being updated) and returns the current instance.
      Overrides:
      initIndependentStat in class StatBase