capability's presence. The registration requires specifying only the Capability Interface.
capability's presence. The registration requires specifying only the Capability Interface.
−
The registration can be performed by calling the <code>register</code> method on the <code>CapabilityManager</code>.
+
The registration can be performed by calling the <code>register</code> method within the <code>RegisterCapabilitiesEvent</code> which is fired on the <code>MOD</code> event bus. The
−
This '''needs''' to happen when the <code>FMLCommonSetupEvent</code> is fired on the <code>MOD</code> event bus. The
registration will also automatically inject the created Capability into all relevant fields and methods: refer to
registration will also automatically inject the created Capability into all relevant fields and methods: refer to
[[#Obtaining a Capability|Obtaining a Capability]] for more information.
[[#Obtaining a Capability|Obtaining a Capability]] for more information.
Line 463:
Line 462:
<syntaxhighlight lang="java">
<syntaxhighlight lang="java">
−
public void onCommonSetup(FMLCommonSetupEvent event) {