Uses of Class
net.neoforged.neoforge.capabilities.BlockCapability
Package
Description
-
Uses of BlockCapability in net.neoforged.neoforge.capabilities
Modifier and TypeFieldDescriptionstatic final BlockCapability
<IEnergyStorage, @Nullable Direction> Capabilities.EnergyStorage.BLOCK
static final BlockCapability
<IFluidHandler, @Nullable Direction> Capabilities.FluidHandler.BLOCK
static final BlockCapability
<IItemHandler, @Nullable Direction> Capabilities.ItemHandler.BLOCK
private final BlockCapability
<T, C> BlockCapabilityCache.capability
Modifier and TypeFieldDescriptionprivate static final CapabilityRegistry
<BlockCapability<?, ?>> BlockCapability.registry
Modifier and TypeMethodDescriptionstatic <T,
C> BlockCapability <T, C> BlockCapability.create
(ResourceLocation name, Class<T> typeClass, Class<C> contextClass) Creates a new block capability, or gets it if it already exists.static <T> BlockCapability
<T, @Nullable Direction> BlockCapability.createSided
(ResourceLocation name, Class<T> typeClass) Creates a new block capability with nullableDirection
context, or gets it if it already exists.static <T> BlockCapability
<T, Void> BlockCapability.createVoid
(ResourceLocation name, Class<T> typeClass) Creates a new block capability withVoid
context, or gets it if it already exists.Modifier and TypeMethodDescriptionstatic List
<BlockCapability<?, ?>> BlockCapability.getAll()
Returns a new immutable copy of all the currently known block capabilities.Modifier and TypeMethodDescriptionstatic <T,
C> BlockCapabilityCache <T, C> BlockCapabilityCache.create
(BlockCapability<T, C> capability, ServerLevel level, BlockPos pos, C context) Creates a new cache instance and registers it to the level.static <T,
C> BlockCapabilityCache <T, C> BlockCapabilityCache.create
(BlockCapability<T, C> capability, ServerLevel level, BlockPos pos, C context, BooleanSupplier isValid, Runnable invalidationListener) Creates a new cache instance with an invalidation listener, and registers it to the level.boolean
RegisterCapabilitiesEvent.isBlockRegistered
(BlockCapability<?, ?> capability, Block block) Returntrue
if a provider is registered for the given block and capability.<T,
C> void RegisterCapabilitiesEvent.registerBlock
(BlockCapability<T, C> capability, IBlockCapabilityProvider<T, C> provider, Block... blocks) Register a capability provider for some blocks.<T,
C, BE extends BlockEntity>
voidRegisterCapabilitiesEvent.registerBlockEntity
(BlockCapability<T, C> capability, BlockEntityType<BE> blockEntityType, ICapabilityProvider<? super BE, C, T> provider) Register a capability provider for a block entity type.ModifierConstructorDescriptionprivate
BlockCapabilityCache
(BlockCapability<T, C> capability, ServerLevel level, BlockPos pos, C context, BooleanSupplier isValid, Runnable invalidationListener) -
Uses of BlockCapability in net.neoforged.neoforge.common.extensions
Modifier and TypeMethodDescriptiondefault <T,
C> T ILevelExtension.getCapability
(BlockCapability<T, C> cap, BlockPos pos, C context) Retrieve a block capability.default <T,
C> T ILevelExtension.getCapability
(BlockCapability<T, C> cap, BlockPos pos, @Nullable BlockState state, @Nullable BlockEntity blockEntity, C context) Retrieve a block capability. -
Uses of BlockCapability in net.neoforged.testframework.gametest
Modifier and TypeMethodDescription<T,
C> T ExtendedGameTestHelper.getCapability
(BlockCapability<T, C> cap, BlockPos pos, C context) <T,
C> T ExtendedGameTestHelper.requireCapability
(BlockCapability<T, C> cap, BlockPos pos, C context)