Importing the class

Link to importing-the-class

It might be required for you to import the package if you encounter any issues (like casting an Array), so better be safe than sorry and add the import at the very top of the file.

ZenScript
Copy
import crafttweaker.neoforge.api.world.ILevelExtension;

Name: getCapability

Return Type: @org.openzen.zencode.java.ZenCodeType.Nullable T

ZenScript
Copy
ILevelExtension.getCapability<T : Object, C : Object>(cap as BlockCapability<T,C>, pos as BlockPos, context as @org.openzen.zencode.java.ZenCodeType.Nullable C) as @org.openzen.zencode.java.ZenCodeType.Nullable T
ParameterType
Parameter
cap
Type
BlockCapability<T,C>
Parameter
pos
Type
BlockPos
Parameter
context
Type
@org.openzen.zencode.java.ZenCodeType.Nullable C
Parameter
T
Type
Object
Parameter
C
Type
Object

Name: getCapability

Return Type: @org.openzen.zencode.java.ZenCodeType.Nullable T

ZenScript
Copy
ILevelExtension.getCapability<T : Object, C : Object>(cap as BlockCapability<T,C>, pos as BlockPos, state as BlockState?, blockEntity as BlockEntity?, context as @org.openzen.zencode.java.ZenCodeType.Nullable C) as @org.openzen.zencode.java.ZenCodeType.Nullable T
ParameterType
Parameter
cap
Type
BlockCapability<T,C>
Parameter
pos
Type
BlockPos
Parameter
state
Type
BlockState?
Parameter
blockEntity
Type
BlockEntity?
Parameter
context
Type
@org.openzen.zencode.java.ZenCodeType.Nullable C
Parameter
T
Type
Object
Parameter
C
Type
Object