BlockGetter
Link to blockgetter
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 Copyimport crafttweaker.api.world.BlockGetter;
Methods
Link to methods
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));
Parameter | Type | Description |
---|---|---|
Parameter pos | Type BlockPos | Description The position of the tile entity. |
Name: getBlockFloorHeight
Return Type: double
ZenScript CopyBlockGetter.getBlockFloorHeight(pos as BlockPos) as double
Parameter | Type |
---|---|
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));
Parameter | Type | Description |
---|---|---|
Parameter pos | Type BlockPos | Description The position to look up. |
Name: getLightEmission
Return Type: int
ZenScript CopyBlockGetter.getLightEmission(pos as BlockPos) as int
Parameter | Type |
---|---|
Parameter pos | Type BlockPos |
Properties
Link to properties
Name | Type | Has Getter | Has Setter |
---|---|---|---|
Name maxLightLevel | Type int | Has Getter true | Has Setter false |