Class ConfigValueEditorType<T>

java.lang.Object
net.mezzdev.config.gui.api.ConfigValueEditorType<T>

public final class ConfigValueEditorType<T> extends Object
Identifies the kind of editor a config screen should use for a config value.

Editor types are reference-identity tokens. Create one token for each UID and share that exact instance between the serializer and editor registration. Registering a different token with the same UID is rejected, preventing callers from associating incompatible generic value types with one logical editor type.

Since:
0.1.0
  • Method Details

    • create

      public static <T> ConfigValueEditorType<T> create(String namespace, String path)
      Create a config value editor type.
      Parameters:
      namespace - the namespace for this editor type
      path - the path for this editor type
      Since:
      0.1.0
    • create

      public static <T> ConfigValueEditorType<T> create(net.minecraft.resources.Identifier uid)
      Create a config value editor type.
      Parameters:
      uid - the unique id for this editor type
      Since:
      0.1.0
    • getUid

      public net.minecraft.resources.Identifier getUid()
      The unique id of this editor type.
      Since:
      0.1.0
    • toString

      public String toString()
      Overrides:
      toString in class Object