In all cases, the event has a method <code>addCapability</code>, which can be used to attach capabilities to the target object. Instead of adding capabilities themselves to the list, you add capability providers, which have the chance to return capabilities only from certain sides. While the provider only needs to implement <code>ICapabilityProvider</code>, if the capability needs to store data persistently it is possible to implement <code><nowiki>ICapabilitySerializable<T extends INBT></nowiki></code> which, on top of returning the capabilities, will allow providing NBT save/load functions. | In all cases, the event has a method <code>addCapability</code>, which can be used to attach capabilities to the target object. Instead of adding capabilities themselves to the list, you add capability providers, which have the chance to return capabilities only from certain sides. While the provider only needs to implement <code>ICapabilityProvider</code>, if the capability needs to store data persistently it is possible to implement <code><nowiki>ICapabilitySerializable<T extends INBT></nowiki></code> which, on top of returning the capabilities, will allow providing NBT save/load functions. |