Skip to content
This repository was archived by the owner on Jun 3, 2024. It is now read-only.

Commit 051af5b

Browse files
committed
Update JavaDoc
1 parent 1fe1ecd commit 051af5b

1 file changed

Lines changed: 17 additions & 3 deletions

File tree

  • patchwork-capabilities/src/main/java/net/minecraftforge/common/capabilities

patchwork-capabilities/src/main/java/net/minecraftforge/common/capabilities/Capability.java

Lines changed: 17 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -31,11 +31,25 @@
3131
import 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>&lt;T&gt;</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
*/
4054
public class Capability<T> {
4155
public interface IStorage<T> {

0 commit comments

Comments
 (0)