Class BaseCapability<T,C extends @Nullable Object>
java.lang.Object
net.neoforged.neoforge.capabilities.BaseCapability<T,C>
- Type Parameters:
T
- Type of queried objects.C
- Type of the additional context.
- Direct Known Subclasses:
BlockCapability
,EntityCapability
,ItemCapability
-
Field Summary
Fields -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotected
BaseCapability
(net.minecraft.resources.ResourceLocation name, Class<T> typeClass, Class<C> contextClass) -
Method Summary
-
Field Details
-
name
private final net.minecraft.resources.ResourceLocation name -
typeClass
-
contextClass
-
-
Constructor Details
-
BaseCapability
-
-
Method Details
-
name
public final net.minecraft.resources.ResourceLocation name()Returns the name of this capability.- Returns:
- the name of this capability
-
typeClass
Returns the type of queried objects.- Returns:
- the type of queried objects
-
contextClass
Returns the type of the additional context.- Returns:
- the type of the additional context
-