Package org.moddingx.libx.registration
Interface Registerable.TrackingCollector
- Enclosing interface:
- Registerable
public static interface Registerable.TrackingCollector
Some helpful methods to track elements with names depending on this elements registry name.
-
Method Summary
Modifier and TypeMethodDescription<T> void
Adds a registry tracking action with the same registry name as the current object.<T> void
Adds a registry tracking action with the same registry name as the current object with a given suffix.void
Tracks a field with a value with the same registry name as the current object, registered in the given registry that is stored in the given field.void
trackNamed
(net.minecraftforge.registries.IForgeRegistry<?> registry, String name, Field field) Tracks a field with a value with the same registry name as the current object with a given suffix, registered in the given registry that is stored in the given field.
-
Method Details
-
track
Tracks a field with a value with the same registry name as the current object, registered in the given registry that is stored in the given field. The field must not be static and must be a field of the class that implementsRegisterable
-
trackNamed
Tracks a field with a value with the same registry name as the current object with a given suffix, registered in the given registry that is stored in the given field. The field must not be static and must be a field of the class that implementsRegisterable
-
run
Adds a registry tracking action with the same registry name as the current object. -
runNamed
<T> void runNamed(net.minecraftforge.registries.IForgeRegistry<T> registry, String name, Consumer<T> action) Adds a registry tracking action with the same registry name as the current object with a given suffix.
-