Interface ConfigNode

All Known Subinterfaces:
ConfigGroup, ConfigValue<T>
All Known Implementing Classes:
ConfigGroupImpl, ConfigNodeImpl, ConfigValueImpl

@NonExtendable public interface ConfigNode
A group or a value in a config's tree.
  • Method Summary

    Modifier and Type
    Method
    Description
    The comment lines written above the node in the file, and shown in the config screen's tooltips.
     
    net.minecraft.network.chat.Component
    The translated name, or a readable form of the key when there's no translation.
    boolean
    Hidden nodes are kept in the file but not shown in the config screen.
    key()
    The node's key in its group, as written to the file.
    @Nullable ConfigGroup
    The group holding this node; null for the root.
    The dotted path from the root ("rendering.particles.enabled"); empty for the root.
    The key of the node's name: config.<modid>.<config>.<path>, unless the builder set another.
  • Method Details

    • key

      String key()
      The node's key in its group, as written to the file.
    • path

      String path()
      The dotted path from the root ("rendering.particles.enabled"); empty for the root.
    • config

      Config config()
    • parent

      @Nullable @Nullable ConfigGroup parent()
      The group holding this node; null for the root.
    • comment

      List<String> comment()
      The comment lines written above the node in the file, and shown in the config screen's tooltips.
    • translationKey

      String translationKey()
      The key of the node's name: config.<modid>.<config>.<path>, unless the builder set another. The tooltip uses the same key with .tooltip appended, falling back to the comment.
    • displayName

      net.minecraft.network.chat.Component displayName()
      The translated name, or a readable form of the key when there's no translation.
    • isHidden

      boolean isHidden()
      Hidden nodes are kept in the file but not shown in the config screen.