LevelReader
Link to levelreader
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.LevelReader;
Implemented Interfaces
Link to implemented-interfaces
LevelReader implements the following interfaces. That means all methods defined in these interfaces are also available in LevelReader
Methods
Link to methods
Name: canSeeSkyFromBelowWater
Return Type: boolean
ZenScript CopyLevelReader.canSeeSkyFromBelowWater(pos as BlockPos) as boolean
Parameter | Type |
---|---|
Parameter pos | Type BlockPos |
Name: getBiome
Gets the biome at a given position.
Returns: The biome at the given position.
Return Type: Biome
ZenScript Copy// LevelReader.getBiome(pos as BlockPos) as Biome
myLevelReader.getBiome(new BlockPos(0, 1, 2));
Parameter | Type | Description |
---|---|---|
Parameter pos | Type BlockPos | Description The position to look up. |
Name: hasChunk
Return Type: boolean
ZenScript CopyLevelReader.hasChunk(x as int, z as int) as boolean
Parameter | Type |
---|---|
Parameter x | Type int |
Parameter z | Type int |
Name: isEmptyBlock
Checks if the block at a given position is empty.
Returns: Whether the block is empty.
Return Type: boolean
ZenScript Copy// LevelReader.isEmptyBlock(pos as BlockPos) as boolean
myLevelReader.isEmptyBlock(new BlockPos(0, 1, 2));
Parameter | Type | Description |
---|---|---|
Parameter pos | Type BlockPos | Description The position to look up. |
Name: isWaterAt
Return Type: boolean
ZenScript CopyLevelReader.isWaterAt(pos as BlockPos) as boolean
Parameter | Type |
---|---|
Parameter pos | Type BlockPos |
Properties
Link to properties
Name | Type | Has Getter | Has Setter | Description |
---|---|---|---|---|
Name isClientSide | Type boolean | Has Getter true | Has Setter false | Description |
Name seaLevel | Type int | Has Getter true | Has Setter false | Description Gets the height of the sea level. |
Name skyDarken | Type int | Has Getter true | Has Setter false | Description |