接口 ICapabilityProvider<O,C extends @Nullable Object,T>
- 函数接口:
- 这是一个函数接口, 因此可用作 lambda 表达式或方法引用的赋值目标。
-
方法概要
-
方法详细资料
-
getCapability
Returns the capability, ornull
if not available.For block entities only: If a previously returned capability is not valid anymore, or if a new capability is available,
ILevelExtension.invalidateCapabilities(BlockPos)
MUST be called to notify the caches (seeIBlockCapabilityProvider.getCapability(net.minecraft.world.level.Level, net.minecraft.core.BlockPos, net.minecraft.world.level.block.state.BlockState, net.minecraft.world.level.block.entity.BlockEntity, C)
).- 参数:
object
- The object that might provide the capability.context
- Extra context, capability-dependent.
-