Enum Class ResearchBranchType

java.lang.Object
java.lang.Enum<ResearchBranchType>
com.minecolonies.api.research.ResearchBranchType
All Implemented Interfaces:
Serializable, Comparable<ResearchBranchType>, Constable

public enum ResearchBranchType extends Enum<ResearchBranchType>
Different Research Branch types, along with descriptions of their behaviors. Primarily related to display rendering internal to Minecolonies, or to implementations for AbstractResearchProvider.
  • Enum Constant Details

    • DEFAULT

      public static final ResearchBranchType DEFAULT
      Default branch using Tree-based view. Enforces University Level, limits to one level-six research, shows research level headers, etc. All branches without an explicit type, or with an invalid explicit type, will act as DEFAULT.
    • UNLOCKABLES

      public static final ResearchBranchType UNLOCKABLES
      Branch using Tree-based DragZoomView with reduced restrictions. Does not enforce university level, allows multiple researches above the university's max level, does not show research level requirement in headers, does not show research level time headers if branch-time is under 0.01. This is not a replacement for vanilla advancements: use only where University behaviors are important (eg: time, item cost, parent requirement enforcement), where requirement complexity is too broad to fit the Advancement system, where exclusive branches or colony-wide announcements are required, or where requirement or reward is tied to a colony-wide behavior instead of a player-specific one.
  • Field Details

    • tag

      public final String tag
      The string tag representation of the Branch-Type. Used both in logic, and in datapack JSON.
  • Method Details

    • values

      public static ResearchBranchType[] values()
      Returns an array containing the constants of this enum class, in the order they are declared.
      Returns:
      an array containing the constants of this enum class, in the order they are declared
    • valueOf

      public static ResearchBranchType valueOf(String name)
      Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)
      Parameters:
      name - the name of the enum constant to be returned.
      Returns:
      the enum constant with the specified name
      Throws:
      IllegalArgumentException - if this enum class has no constant with the specified name
      NullPointerException - if the argument is null
    • valueOfTag

      public static ResearchBranchType valueOfTag(String tag)
      Get the matching enum from a string. If no matching string is found, defaults to DEFAULT
      Parameters:
      tag - The string representation of the BranchType
      Returns:
      The enum value.