BlockAndTintGetter

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

Implements

BlockAndTintGetter implements the following interfaces:

BlockGetter

Undocumented Interfaces

IBlockAndTintGetterExtension,LevelHeightAccessor,IBlockGetterExtension

Members

getBlockEntityData(pos as BlockPos) as IData
Gets the tile entity data for a tile entity at a given position.

Returns: The data of the tile entity.

script.zs
// BlockAndTintGetter.getBlockEntityData(pos as BlockPos) as IData;
myBlockAndTintGetter.getBlockEntityData(new BlockPos(0, 1, 2));

Parameters:

pos Type: BlockPos - The position of the tile entity.

Return Type: IData

getBlockFloorHeight(pos as BlockPos) as double
script.zs
// BlockAndTintGetter.getBlockFloorHeight(pos as BlockPos) as double;
myBlockAndTintGetter.getBlockFloorHeight(myBlockPos);

Parameters:

pos Type: BlockPos

Return Type: double

getBlockState(pos as BlockPos) as BlockState
Gets the block state at a given position.

Returns: The block state at the position.

script.zs
// BlockAndTintGetter.getBlockState(pos as BlockPos) as BlockState;
myBlockAndTintGetter.getBlockState(new BlockPos(0, 1, 2));

Parameters:

pos Type: BlockPos - The position to look up.

Return Type: BlockState

getLightEmission(pos as BlockPos) as int
script.zs
// BlockAndTintGetter.getLightEmission(pos as BlockPos) as int;
myBlockAndTintGetter.getLightEmission(myBlockPos);

Parameters:

pos Type: BlockPos

Return Type: int

Getter
script.zs
// BlockAndTintGetter.maxLightLevel as int
myBlockAndTintGetter.maxLightLevel

Return Type: int