Annotation Interface CapabilityInject
When placed on a FIELD, the field will be set to an
instance of Capability once that capability is registered.
That field must be static and be able to hold a instance
of 'Capability'
Example:
@CapabilityInject(IExampleCapability.class) private static final CapabilityWhen placed on a METHOD, the method will be invoked once the capability is registered. This allows you to have a 'enable features' callback. It MUST have one parameter of type 'Capability; Example:TEST_CAP = null;
@CapabilityInject(IExampleCapability.class) private static void capRegistered(CapabilityWarning: Capability injections are run in the thread that the capablity is registered. Due to parallel mod loading, this can potentially be off of the main thread.cap) {}
-
Required Element Summary
-
Element Details
-
value
Class<?> valueThe capability interface to listen for registration. Note: When reading annotations, DO NOT call this function as it will cause a hard dependency on the class.
-