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 TypeMethodDescriptionboolean
Tests if this snapshot contains the specified block.getBiome
(int x, int z) Deprecated.biomes are now 3-dimensionalgetBiome
(int x, int y, int z) Get biome at given coordinatesgetBlockData
(int x, int y, int z) Get block data for block at corresponding coordinate in the chunkint
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 chunkgetBlockType
(int x, int y, int z) Get block type for block at corresponding coordinate in the chunklong
Get world full time when chunk snapshot was capturedint
getData
(int x, int y, int z) Deprecated.Magic valueint
getHighestBlockYAt
(int x, int z) Gets the highest non-air coordinate at the given coordinatesdouble
getRawBiomeTemperature
(int x, int z) Deprecated.biomes are now 3-dimensionaldouble
getRawBiomeTemperature
(int x, int y, int z) Get raw biome temperature at given coordinatesGets 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
Gets name of the world containing this chunk- Returns:
- Parent World Name
-
getBlockType
Get block type for block at corresponding coordinate in the chunk- Parameters:
x
- 0-15y
- world minHeight (inclusive) - world maxHeight (exclusive)z
- 0-15- Returns:
- block material type
-
getBlockData
Get block data for block at corresponding coordinate in the chunk- Parameters:
x
- 0-15y
- world minHeight (inclusive) - world maxHeight (exclusive)z
- 0-15- Returns:
- block material type
-
getData
Deprecated.Magic valueGet block data for block at corresponding coordinate in the chunk- Parameters:
x
- 0-15y
- world minHeight (inclusive) - world maxHeight (exclusive)z
- 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
- world minHeight (inclusive) - world maxHeight (exclusive)z
- 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
- world minHeight (inclusive) - world maxHeight (exclusive)z
- 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 blocks (0-15)z
- Z-coordinate of the blocks (0-15)- Returns:
- Y-coordinate of the highest non-air block
-
getBiome
Deprecated.biomes are now 3-dimensionalGet biome at given coordinates- Parameters:
x
- X-coordinate (0-15)z
- Z-coordinate (0-15)- Returns:
- Biome at given coordinate
-
getBiome
Get biome at given coordinates- Parameters:
x
- X-coordinate (0-15)y
- Y-coordinate (world minHeight (inclusive) - world maxHeight (exclusive))z
- Z-coordinate (0-15)- Returns:
- Biome at given coordinate
-
getRawBiomeTemperature
Deprecated.biomes are now 3-dimensionalGet raw biome temperature at given coordinates- Parameters:
x
- X-coordinate (0-15)z
- Z-coordinate (0-15)- Returns:
- temperature at given coordinate
-
getRawBiomeTemperature
double getRawBiomeTemperature(int x, int y, int z) Get raw biome temperature at given coordinates- Parameters:
x
- X-coordinate (0-15)y
- Y-coordinate (0-15)z
- Z-coordinate (0-15)- Returns:
- temperature 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, world minHeight (inclusive) - world maxHeight (exclusive))- Returns:
- true if empty, false if not
-
contains
Tests if this snapshot contains the specified block.- Parameters:
block
- block to test- Returns:
- if the block is contained within
-