Home Commands Examples Getting Started With Scripts Global Keywords
NeoForgeBracketDumpers NeoForgeBracketHandlers NeoForgeBracketValidators

ILevelExtension

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.world.ILevelExtension;

Members

getCapability(cap as BlockCapability<C, T>, pos as BlockPos, context as C?) as T?
script.zs
// ILevelExtension.getCapability<C, T>(cap as BlockCapability<C, T>, pos as BlockPos, context as C?) as T?;
myILevelExtension.getCapability<C, T>(myBlockCapability, myBlockPos, myC);

Parameters:

cap Type: BlockCapability<C, T>
pos Type: BlockPos
context Type: C?

Return Type: T?

getCapability(cap as BlockCapability<C, T>, pos as BlockPos, state as BlockState, blockEntity as BlockEntity, context as C?) as T?
script.zs
// ILevelExtension.getCapability<C, T>(cap as BlockCapability<C, T>, pos as BlockPos, state as BlockState, blockEntity as BlockEntity, context as C?) as T?;
myILevelExtension.getCapability<C, T>(myBlockCapability, myBlockPos, myBlockState, myBlockEntity, myC);

Parameters:

cap Type: BlockCapability<C, T>
pos Type: BlockPos
state Type: BlockState
blockEntity Type: BlockEntity
context Type: C?

Return Type: T?