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.
  • 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 interface net.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)