Annotation Interface RegisterClass


@Retention(SOURCE) @Target(TYPE) @Documented public @interface RegisterClass
Can be applied to a class to register all public static final fields to a ModXRegistration. The target registry is set by the value from registry(). Use an empty string for no registry at all. The registry is resolved by taking the value from registryClass() and looking for a public static final field with the name from registry() that holds a ResourceKey<Registry<T>> that links to the registry to use. If registryClass() is not given, ForgeRegistries.Keys and Registries are searched. To ignore a field add @Exclude to it. By default the name from the field is taken and translated to snake case. To explicitly set a name use @Name.
  • Required Element Summary

    Required Elements
    Modifier and Type
    Required Element
    Description
     
  • Optional Element Summary

    Optional Elements
    Modifier and Type
    Optional Element
    Description
    All elements from this class are prefixed with a special prefix.
    int
    Higher priorities are registered first.
     
  • Element Details

    • registryClass

      Class<?> registryClass
      Default:
      void.class
    • priority

      int priority
      Higher priorities are registered first.
      Default:
      0
    • prefix

      String prefix
      All elements from this class are prefixed with a special prefix. This way you can keep field names simple and avoid duplicates.
      Default:
      ""