BlockCapability

Importing the class

If you need to reference this type directly, like when casting an Array, or as a parameter, you will need to import it. Simply add the import at the top of the file.

script.zs
import crafttweaker.neoforge.api.capability.BlockCapability;

Extends

BlockCapability<C, T> extends BaseCapability<C, T>.

Members

getCapability(level as Level, pos as BlockPos, state as BlockState, blockEntity as BlockEntity, context as U) as T?
script.zs
// BlockCapability<C,T>.getCapability<T, U>(level as Level, pos as BlockPos, state as BlockState, blockEntity as BlockEntity, context as U) as T?;
myBlockCapability.getCapability<T, U>(myLevel, myBlockPos, myBlockState, myBlockEntity, myU);

Parameters:

level Type: Level
pos Type: BlockPos
state Type: BlockState
blockEntity Type: BlockEntity
context Type: U

Return Type: T?

Getter
script.zs
// BlockCapability<C,T>.name as ResourceLocation
myBlockCapability.name

Return Type: ResourceLocation