Annotation Interface ConfigurableProperty


@Retention(RUNTIME) @Target(FIELD) public @interface ConfigurableProperty
Property inside configs that can be configured in the config file.
  • Required Element Summary

    Required Elements
    Modifier and Type
    Required Element
    Description
    The category of the field.
    The comment for the field in the config file.
  • Optional Element Summary

    Optional Elements
    Modifier and Type
    Optional Element
    Description
    net.neoforged.fml.config.ModConfig.Type
     
    boolean
    Whether or not this field can be changed with commands at runtime.
    int
    The maximal value of the field, as a integer.
    int
    The minimal value of the field, as a integer.
    Override the named id if multiple instances of a given config class exists.
    boolean
     
    boolean
     
    boolean
     
  • Element Details

    • category

      String category
      The category of the field.
      Returns:
      The category.
    • comment

      String comment
      The comment for the field in the config file.
      Returns:
      The comment.
    • namedId

      String namedId
      Override the named id if multiple instances of a given config class exists.
      Returns:
      A custom named id to place this property under. If empty, then the named id of the hosting config will be used.
      Default:
      ""
    • isCommandable

      boolean isCommandable
      Whether or not this field can be changed with commands at runtime.
      Returns:
      If it is commandable.
      Default:
      false
    • requiresWorldRestart

      boolean requiresWorldRestart
      Returns:
      If this configurable requires worlds to regenerate.
      Default:
      false
    • requiresMcRestart

      boolean requiresMcRestart
      Returns:
      If this configurable requires minecraft to restart.
      Default:
      false
    • showInGui

      boolean showInGui
      Returns:
      If this configurable will be shown in the gui.
      Default:
      true
    • minimalValue

      int minimalValue
      The minimal value of the field, as a integer.
      Returns:
      The minimal value.
      Default:
      -2147483648
    • maximalValue

      int maximalValue
      The maximal value of the field, as a integer.
      Returns:
      The maximal value.
      Default:
      2147483647
    • configLocation

      net.neoforged.fml.config.ModConfig.Type configLocation
      Returns:
      The location of this config property.
      Default:
      COMMON