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
,BlockAndTintGetter
,BlockGetter
Undocumented Interfaces
EntityGetter
,LevelSimulatedRW
,CollisionGetter
,SignalGetter
,NoiseBiomeSource
,IForgeBlockAndTintGetter
,LevelHeightAccessor
,IForgeBlockGetter
,LevelSimulatedReader
,LevelWriter
Members
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