Package org.cyclops.cyclopscore.helper
Class CapabilityHelpersNeoForge
java.lang.Object
org.cyclops.cyclopscore.helper.CapabilityHelpersNeoForge
- All Implemented Interfaces:
ICapabilityHelpersNeoForge
-
Constructor Summary
ConstructorDescriptionCapabilityHelpersNeoForge
(org.cyclops.cyclopscore.helper.IModHelpers modHelpers) -
Method Summary
Modifier and TypeMethodDescription<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.
-
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 interfaceICapabilityHelpersNeoForge
- 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 interfaceICapabilityHelpersNeoForge
- 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 interfaceICapabilityHelpersNeoForge
- 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 interfaceICapabilityHelpersNeoForge
- 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.
-