This repository was archived by the owner on Jun 3, 2024. It is now read-only.
File tree Expand file tree Collapse file tree
patchwork-capabilities/src/main/java/net/minecraftforge/common/capabilities Expand file tree Collapse file tree Original file line number Diff line number Diff line change 3131import net .minecraft .util .math .Direction ;
3232
3333/**
34- * This is the core holder object Capabilities.
35- * Each capability will have ONE instance of this class,
36- * and it will the the one passed into the {@link ICapabilityProvider} functions.
34+ * Capabilities are an extensible way of attaching arbitrary interfaces to classes that support
35+ * {@link ICapabilityProvider} using {@link ICapabilityProvider#getCapability}. This class is a marker that
36+ * represents support for the interface held in <code><T></code>
37+ *
38+ * <p>This class, beyond serving as a marker, also allows creation of the default implementation of the interface as well
39+ * as the ability to read and write the interface to NBT
40+ *
41+ * <p>When {@link CapabilityManager#register} is called, {@link CapabilityManager} creates a single instance of this class,
42+ * which is then passed to any listeners of {@link com.patchworkmc.api.capability.CapabilityRegisteredCallback}.
43+ *
44+ * <p>After registration, instances of this class may be used with {@link ICapabilityProvider#getCapability} and the
45+ * functions within {@link IStorage}
46+ *
47+ * <p>Each capability will have ONE instance of this class, and it will the the one passed into
48+ * {@link ICapabilityProvider}'s methods
3749 *
3850 * <p>The {@link CapabilityManager} is in charge of creating this class.
51+ *
52+ * @param <T> The data which is to be attached
3953 */
4054public class Capability <T > {
4155 public interface IStorage <T > {
You can’t perform that action at this time.
0 commit comments