Class DefaultCapabilityProvider<T>
java.lang.Object
org.cyclops.cyclopscore.modcompat.capabilities.DefaultCapabilityProvider<T>
- All Implemented Interfaces:
net.minecraftforge.common.capabilities.ICapabilityProvider
- Direct Known Subclasses:
SerializableCapabilityProvider
public class DefaultCapabilityProvider<T>
extends Object
implements net.minecraftforge.common.capabilities.ICapabilityProvider
A default implementation of the capability provider.
-
Field Summary
Modifier and TypeFieldDescriptionprotected final net.minecraftforge.common.util.LazyOptional<T>
protected final ICapabilityTypeGetter<T>
-
Constructor Summary
ConstructorDescriptionDefaultCapabilityProvider
(net.minecraftforge.common.capabilities.Capability<T> capabilityType, T capability) Deprecated.DefaultCapabilityProvider
(ICapabilityTypeGetter<T> capabilityGetter, net.minecraftforge.common.util.LazyOptional<T> capability) DefaultCapabilityProvider
(ICapabilityTypeGetter<T> capabilityGetter, T capability) -
Method Summary
Modifier and TypeMethodDescription<T2> net.minecraftforge.common.util.LazyOptional<T2>
getCapability
(net.minecraftforge.common.capabilities.Capability<T2> capability, net.minecraft.core.Direction facing) net.minecraftforge.common.capabilities.Capability<T>
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface net.minecraftforge.common.capabilities.ICapabilityProvider
getCapability
-
Field Details
-
capabilityGetter
-
capability
-
-
Constructor Details
-
DefaultCapabilityProvider
public DefaultCapabilityProvider(ICapabilityTypeGetter<T> capabilityGetter, net.minecraftforge.common.util.LazyOptional<T> capability) -
DefaultCapabilityProvider
-
DefaultCapabilityProvider
@Deprecated public DefaultCapabilityProvider(net.minecraftforge.common.capabilities.Capability<T> capabilityType, T capability) Deprecated.
-
-
Method Details
-
getCapabilityType
-
getCapability
public <T2> net.minecraftforge.common.util.LazyOptional<T2> getCapability(net.minecraftforge.common.capabilities.Capability<T2> capability, net.minecraft.core.Direction facing) - Specified by:
getCapability
in interfacenet.minecraftforge.common.capabilities.ICapabilityProvider
-