Interface ICapabilityHelpersNeoForge

All Known Implementing Classes:
CapabilityHelpersNeoForge

public interface ICapabilityHelpersNeoForge
  • 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.
  • Method Details

    • getCapability

      <T, C> Optional<T> getCapability(DimPos dimPos, net.neoforged.neoforge.capabilities.BlockCapability<T,C> capability)
      Safely get a capability from a block entity.
      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

      <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.
      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

      <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.
      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

      <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.
      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.