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.api.world.BlockGetter;

Link to getBlockEntityData

Name: getBlockEntityData

Gets the tile entity data for a tile entity at a given position.

Returns: The data of the tile entity.
Return Type: IData

ZenScript
Copy
// BlockGetter.getBlockEntityData(pos as BlockPos) as IData

myBlockGetter.getBlockEntityData(new BlockPos(0, 1, 2));
ParameterTypeDescription
Parameter
pos
Type
BlockPos
Description
The position of the tile entity.

Link to getBlockFloorHeight

Name: getBlockFloorHeight

Return Type: double

ZenScript
Copy
BlockGetter.getBlockFloorHeight(pos as BlockPos) as double
ParameterType
Parameter
pos
Type
BlockPos

Name: getBlockState

Gets the block state at a given position.

Returns: The block state at the position.
Return Type: BlockState

ZenScript
Copy
// BlockGetter.getBlockState(pos as BlockPos) as BlockState

myBlockGetter.getBlockState(new BlockPos(0, 1, 2));
ParameterTypeDescription
Parameter
pos
Type
BlockPos
Description
The position to look up.

Link to getLightEmission

Name: getLightEmission

Return Type: int

ZenScript
Copy
BlockGetter.getLightEmission(pos as BlockPos) as int
ParameterType
Parameter
pos
Type
BlockPos
NameTypeHas GetterHas Setter
Name
maxLightLevel
Type
int
Has Getter
true
Has Setter
false