Class MultipleCapabilityProvider

java.lang.Object
org.cyclops.cyclopscore.modcompat.capabilities.MultipleCapabilityProvider
All Implemented Interfaces:
net.minecraftforge.common.capabilities.ICapabilityProvider

public class MultipleCapabilityProvider extends Object implements net.minecraftforge.common.capabilities.ICapabilityProvider
A default implementation of a capability provider for multiple capabilities.
  • Constructor Summary

    Constructors
    Constructor
    Description
    MultipleCapabilityProvider(net.minecraftforge.common.capabilities.Capability<?>[] capabilityTypes, Object[] capabilities)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    <T> net.minecraftforge.common.util.LazyOptional<T>
    getCapability(net.minecraftforge.common.capabilities.Capability<T> capability, net.minecraft.core.Direction facing)
     
    protected int
    getCapabilityId(net.minecraftforge.common.capabilities.Capability<?> capability)
     
    of(net.minecraftforge.common.capabilities.Capability<T1> capabilityType1, T1 capability1, net.minecraftforge.common.capabilities.Capability<T2> capabilityType2, T2 capability2)
     
    static <T1, T2, T3> MultipleCapabilityProvider
    of(net.minecraftforge.common.capabilities.Capability<T1> capabilityType1, T1 capability1, net.minecraftforge.common.capabilities.Capability<T2> capabilityType2, T2 capability2, net.minecraftforge.common.capabilities.Capability<T3> capabilityType3, T3 capability3)
     

    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

    • MultipleCapabilityProvider

      public MultipleCapabilityProvider(net.minecraftforge.common.capabilities.Capability<?>[] capabilityTypes, Object[] capabilities)
  • Method Details

    • getCapabilityId

      protected int getCapabilityId(net.minecraftforge.common.capabilities.Capability<?> capability)
    • getCapability

      public <T> net.minecraftforge.common.util.LazyOptional<T> getCapability(net.minecraftforge.common.capabilities.Capability<T> capability, net.minecraft.core.Direction facing)
      Specified by:
      getCapability in interface net.minecraftforge.common.capabilities.ICapabilityProvider
    • of

      public static <T1, T2> MultipleCapabilityProvider of(net.minecraftforge.common.capabilities.Capability<T1> capabilityType1, T1 capability1, net.minecraftforge.common.capabilities.Capability<T2> capabilityType2, T2 capability2)
    • of

      public static <T1, T2, T3> MultipleCapabilityProvider of(net.minecraftforge.common.capabilities.Capability<T1> capabilityType1, T1 capability1, net.minecraftforge.common.capabilities.Capability<T2> capabilityType2, T2 capability2, net.minecraftforge.common.capabilities.Capability<T3> capabilityType3, T3 capability3)