Annotation 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,
NeoForgeRegistries.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 -
Optional Element Summary
Optional ElementsModifier and TypeOptional ElementDescriptionAll elements from this class are prefixed with a special prefix.int
Higher priorities are registered first.Class
<?>
-
Element Details
-
registry
String registry -
registryClass
Class<?> registryClass- Default:
void.class
-
priority
int priorityHigher priorities are registered first.- Default:
0
-
prefix
String prefixAll elements from this class are prefixed with a special prefix. This way you can keep field names simple and avoid duplicates.- Default:
""
-