Annotation Interface Reg.Exclude
- Enclosing class:
Reg
Marks a field as excluded from registration. The field is skipped entirely: LibX will neither register
its value nor clean up any registry state that creating the value may have produced.
If the value of an excluded field is a registry object (an item, a block, a fluid, an entity type, ...)
that is still constructed, you must register it yourself, for example through
ModXRegistration.register. Constructing such an object without ever registering it leaves dangling state
behind in the game registries. An Item for example registers a data component initializer
in its constructor, so an item that is never registered will crash world load with
IllegalStateException: Missing element ResourceKey[minecraft:item / ...].
Therefore this annotation is meant for fields that don't hold registry objects at all, or for values
that you register on your own.