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 Details

    • capabilityGetter

      protected final ICapabilityTypeGetter<T> capabilityGetter
    • capability

      protected final net.minecraftforge.common.util.LazyOptional<T> capability
  • Constructor Details

    • DefaultCapabilityProvider

      public DefaultCapabilityProvider(ICapabilityTypeGetter<T> capabilityGetter, net.minecraftforge.common.util.LazyOptional<T> capability)
    • DefaultCapabilityProvider

      public DefaultCapabilityProvider(ICapabilityTypeGetter<T> capabilityGetter, T capability)
    • DefaultCapabilityProvider

      @Deprecated public DefaultCapabilityProvider(net.minecraftforge.common.capabilities.Capability<T> capabilityType, T capability)
      Deprecated.
  • Method Details

    • getCapabilityType

      public net.minecraftforge.common.capabilities.Capability<T> 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 interface net.minecraftforge.common.capabilities.ICapabilityProvider