Class DefaultSidedCapabilityProvider<T>
java.lang.Object
org.cyclops.cyclopscore.modcompat.capabilities.DefaultSidedCapabilityProvider<T>
- All Implemented Interfaces:
net.minecraftforge.common.capabilities.ICapabilityProvider
public class DefaultSidedCapabilityProvider<T>
extends Object
implements net.minecraftforge.common.capabilities.ICapabilityProvider
A default sided implementation of the capability provider.
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic interface
-
Constructor Summary
ConstructorDescriptionDefaultSidedCapabilityProvider
(EnumFacingMap<org.apache.commons.lang3.tuple.Pair<net.minecraftforge.common.capabilities.Capability<T>, T>> capabilities) -
Method Summary
Modifier and TypeMethodDescriptionstatic <T,
H extends DefaultSidedCapabilityProvider.ISidedCapabilityConstructor<T>>
EnumFacingMap<org.apache.commons.lang3.tuple.Pair<net.minecraftforge.common.capabilities.Capability<T>,T>> forAllSides
(net.minecraftforge.common.capabilities.Capability<T> capabilityType, H constructor) <T2> net.minecraftforge.common.util.LazyOptional<T2>
getCapability
(net.minecraftforge.common.capabilities.Capability<T2> capability, net.minecraft.core.Direction facing) 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
-
Constructor Details
-
DefaultSidedCapabilityProvider
public DefaultSidedCapabilityProvider(EnumFacingMap<org.apache.commons.lang3.tuple.Pair<net.minecraftforge.common.capabilities.Capability<T>, T>> capabilities)
-
-
Method Details
-
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
-
forAllSides
public static <T,H extends DefaultSidedCapabilityProvider.ISidedCapabilityConstructor<T>> EnumFacingMap<org.apache.commons.lang3.tuple.Pair<net.minecraftforge.common.capabilities.Capability<T>,T>> forAllSides(net.minecraftforge.common.capabilities.Capability<T> capabilityType, H constructor)
-