CommonLevelAccessor
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.
import crafttweaker.api.world.CommonLevelAccessor;
Implements
CommonLevelAccessor
implements the following interfaces:
LevelReader
,LevelSimulatedRW
,BlockAndTintGetter
,BlockGetter
,LevelWriter
Undocumented Interfaces
EntityGetter
,CollisionGetter
,SignalGetter
,NoiseBiomeSource
,IBlockAndTintGetterExtension
,LevelHeightAccessor
,IBlockGetterExtension
,LevelSimulatedReader
Members
destroyBlock(pos as BlockPos, doDrops as bool) as bool
Destroys a block within the world.script.zs
Returns: Whether the block was changed.
myCommonLevelAccessor.destroyBlock(new BlockPos(0, 1, 2), true);
Parameters:
Return Type:
bool
destroyBlock(pos as BlockPos, doDrops as bool, breaker as Entity) as bool
Destroys a block within the world.script.zs
Returns: Whether the block was changed.
myCommonLevelAccessor.destroyBlock(new BlockPos(0, 1, 2), true, player);
Parameters:
Return Type:
bool
getBiome(pos as BlockPos) as Biome
getBlockEntityData(pos as BlockPos) as IData
Gets the tile entity data for a tile entity at a given position.script.zs
Returns: The data of the tile entity.
myCommonLevelAccessor.getBlockEntityData(new BlockPos(0, 1, 2));
Return Type:
IData
getBlockState(pos as BlockPos) as BlockState
Gets the block state at a given position.script.zs
Returns: The block state at the position.
myCommonLevelAccessor.getBlockState(new BlockPos(0, 1, 2));
Return Type:
BlockState
hasChunk(x as int, z as int) as bool
// CommonLevelAccessor.hasChunk(x as int, z as int) as bool;myCommonLevelAccessor.hasChunk(myInt, myInt);
Parameters:
x: int
Type: int
z: int
Type: int
Return Type:
bool
Getter
// CommonLevelAccessor.isClientSide as boolmyCommonLevelAccessor.isClientSide
Return Type:
bool
isEmptyBlock(pos as BlockPos) as bool
Getter
// CommonLevelAccessor.maxLightLevel as intmyCommonLevelAccessor.maxLightLevel
Return Type:
int
Getter
Gets the height of the sea level.script.zs
// CommonLevelAccessor.seaLevel as intmyCommonLevelAccessor.seaLevel
Return Type:
int
Getter
// CommonLevelAccessor.skyDarken as intmyCommonLevelAccessor.skyDarken
Return Type:
int