Package org.bukkit
Interface ChunkSnapshot
public interface ChunkSnapshot
Represents a static, thread-safe snapshot of chunk of blocks.
Purpose is to allow clean, efficient copy of a chunk data to be made, and then handed off for processing in another thread (e.g. map rendering)
-
Method Summary
Modifier and Type Method Description Biome
getBiome(int x, int z)
Get biome at given coordinatesint
getBlockData(int x, int y, int z)
Deprecated.Magic valueint
getBlockEmittedLight(int x, int y, int z)
Get light level emitted by block at corresponding coordinate in the chunkint
getBlockSkyLight(int x, int y, int z)
Get sky light level for block at corresponding coordinate in the chunkint
getBlockTypeId(int x, int y, int z)
Deprecated.Magic valuelong
getCaptureFullTime()
Get world full time when chunk snapshot was capturedint
getHighestBlockYAt(int x, int z)
Gets the highest non-air coordinate at the given coordinatesdouble
getRawBiomeRainfall(int x, int z)
Get raw biome rainfall (0.0-1.0) at given coordinatedouble
getRawBiomeTemperature(int x, int z)
Get raw biome temperature (0.0-1.0) at given coordinatejava.lang.String
getWorldName()
Gets name of the world containing this chunkint
getX()
Gets the X-coordinate of this chunkint
getZ()
Gets the Z-coordinate of this chunkboolean
isSectionEmpty(int sy)
Test if section is empty
-
Method Details
-
getX
int getX()Gets the X-coordinate of this chunk- Returns:
- X-coordinate
-
getZ
int getZ()Gets the Z-coordinate of this chunk- Returns:
- Z-coordinate
-
getWorldName
java.lang.String getWorldName()Gets name of the world containing this chunk- Returns:
- Parent World Name
-
getBlockTypeId
@Deprecated int getBlockTypeId(int x, int y, int z)Deprecated.Magic valueGet block type for block at corresponding coordinate in the chunk- Parameters:
x
- 0-15y
- 0-127z
- 0-15- Returns:
- 0-255
-
getBlockData
@Deprecated int getBlockData(int x, int y, int z)Deprecated.Magic valueGet block data for block at corresponding coordinate in the chunk- Parameters:
x
- 0-15y
- 0-127z
- 0-15- Returns:
- 0-15
-
getBlockSkyLight
int getBlockSkyLight(int x, int y, int z)Get sky light level for block at corresponding coordinate in the chunk- Parameters:
x
- 0-15y
- 0-127z
- 0-15- Returns:
- 0-15
-
getBlockEmittedLight
int getBlockEmittedLight(int x, int y, int z)Get light level emitted by block at corresponding coordinate in the chunk- Parameters:
x
- 0-15y
- 0-127z
- 0-15- Returns:
- 0-15
-
getHighestBlockYAt
int getHighestBlockYAt(int x, int z)Gets the highest non-air coordinate at the given coordinates- Parameters:
x
- X-coordinate of the blocksz
- Z-coordinate of the blocks- Returns:
- Y-coordinate of the highest non-air block
-
getBiome
Get biome at given coordinates- Parameters:
x
- X-coordinatez
- Z-coordinate- Returns:
- Biome at given coordinate
-
getRawBiomeTemperature
double getRawBiomeTemperature(int x, int z)Get raw biome temperature (0.0-1.0) at given coordinate- Parameters:
x
- X-coordinatez
- Z-coordinate- Returns:
- temperature at given coordinate
-
getRawBiomeRainfall
double getRawBiomeRainfall(int x, int z)Get raw biome rainfall (0.0-1.0) at given coordinate- Parameters:
x
- X-coordinatez
- Z-coordinate- Returns:
- rainfall at given coordinate
-
getCaptureFullTime
long getCaptureFullTime()Get world full time when chunk snapshot was captured- Returns:
- time in ticks
-
isSectionEmpty
boolean isSectionEmpty(int sy)Test if section is empty- Parameters:
sy
- - section Y coordinate (block Y / 16)- Returns:
- true if empty, false if not
-