Class CapabilityHelpersNeoForge

java.lang.Object
org.cyclops.cyclopscore.helper.CapabilityHelpersNeoForge
All Implemented Interfaces:
ICapabilityHelpersNeoForge

public class CapabilityHelpersNeoForge extends Object implements ICapabilityHelpersNeoForge
  • Constructor Summary

    Constructors
    Constructor
    Description
    CapabilityHelpersNeoForge(org.cyclops.cyclopscore.helper.IModHelpers modHelpers)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    <T, C> Optional<T>
    getCapability(net.neoforged.neoforge.common.extensions.ILevelExtension level, net.minecraft.core.BlockPos pos, C context, net.neoforged.neoforge.capabilities.BlockCapability<T,C> capability)
    Safely get a capability from a block entity.
    <T, C> Optional<T>
    getCapability(net.neoforged.neoforge.common.extensions.ILevelExtension level, net.minecraft.core.BlockPos pos, net.neoforged.neoforge.capabilities.BlockCapability<T,C> capability)
    Safely get a capability from a block entity.
    <T, C> Optional<T>
    getCapability(DimPos dimPos, C context, net.neoforged.neoforge.capabilities.BlockCapability<T,C> capability)
    Safely get a capability from a block entity.
    <T, C> Optional<T>
    getCapability(DimPos dimPos, net.neoforged.neoforge.capabilities.BlockCapability<T,C> capability)
    Safely get a capability from a block entity.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • CapabilityHelpersNeoForge

      public CapabilityHelpersNeoForge(org.cyclops.cyclopscore.helper.IModHelpers modHelpers)
  • Method Details

    • getCapability

      public <T, C> Optional<T> getCapability(DimPos dimPos, net.neoforged.neoforge.capabilities.BlockCapability<T,C> capability)
      Description copied from interface: ICapabilityHelpersNeoForge
      Safely get a capability from a block entity.
      Specified by:
      getCapability in interface ICapabilityHelpersNeoForge
      Type Parameters:
      T - The capability instance.
      C - The capability context.
      Parameters:
      dimPos - The dimensional position of the block providing the block entity.
      capability - The capability.
      Returns:
      The lazy optional capability.
    • getCapability

      public <T, C> Optional<T> getCapability(DimPos dimPos, C context, net.neoforged.neoforge.capabilities.BlockCapability<T,C> capability)
      Description copied from interface: ICapabilityHelpersNeoForge
      Safely get a capability from a block entity.
      Specified by:
      getCapability in interface ICapabilityHelpersNeoForge
      Type Parameters:
      T - The capability instance.
      C - The capability context.
      Parameters:
      dimPos - The dimensional position of the block providing the block entity.
      context - The context to get the capability from.
      capability - The capability.
      Returns:
      The lazy optional capability.
    • getCapability

      public <T, C> Optional<T> getCapability(net.neoforged.neoforge.common.extensions.ILevelExtension level, net.minecraft.core.BlockPos pos, net.neoforged.neoforge.capabilities.BlockCapability<T,C> capability)
      Description copied from interface: ICapabilityHelpersNeoForge
      Safely get a capability from a block entity.
      Specified by:
      getCapability in interface ICapabilityHelpersNeoForge
      Type Parameters:
      T - The capability instance.
      C - The capability context.
      Parameters:
      level - The level.
      pos - The position of the block of the block entity providing the capability.
      capability - The capability.
      Returns:
      The lazy optional capability.
    • getCapability

      public <T, C> Optional<T> getCapability(net.neoforged.neoforge.common.extensions.ILevelExtension level, net.minecraft.core.BlockPos pos, C context, net.neoforged.neoforge.capabilities.BlockCapability<T,C> capability)
      Description copied from interface: ICapabilityHelpersNeoForge
      Safely get a capability from a block entity.
      Specified by:
      getCapability in interface ICapabilityHelpersNeoForge
      Type Parameters:
      T - The capability instance.
      C - The capability context.
      Parameters:
      level - The level.
      pos - The position of the block of the block entity providing the capability.
      context - The context to get the capability from.
      capability - The capability.
      Returns:
      The lazy optional capability.