|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface Chunk
Represents a chunk of blocks
Method Summary | |
---|---|
Block |
getBlock(int x,
int y,
int z)
Gets a block from this chunk |
ChunkSnapshot |
getChunkSnapshot()
Capture thread-safe read-only snapshot of chunk data |
ChunkSnapshot |
getChunkSnapshot(boolean includeMaxblocky,
boolean includeBiome,
boolean includeBiomeTempRain)
Capture thread-safe read-only snapshot of chunk data |
Entity[] |
getEntities()
Get a list of all entities in the chunk. |
BlockState[] |
getTileEntities()
Get a list of all tile entities in the chunk. |
World |
getWorld()
Gets the world containing this chunk |
int |
getX()
Gets the X-coordinate of this chunk |
int |
getZ()
Gets the Z-coordinate of this chunk |
boolean |
isLoaded()
Checks if the chunk is loaded. |
boolean |
load()
Loads the chunk. |
boolean |
load(boolean generate)
Loads the chunk. |
boolean |
unload()
Unloads and optionally saves the Chunk |
boolean |
unload(boolean save)
Unloads and optionally saves the Chunk |
boolean |
unload(boolean save,
boolean safe)
Unloads and optionally saves the Chunk |
Method Detail |
---|
int getX()
int getZ()
World getWorld()
Block getBlock(int x, int y, int z)
x
- 0-15y
- 0-127z
- 0-15
ChunkSnapshot getChunkSnapshot()
ChunkSnapshot getChunkSnapshot(boolean includeMaxblocky, boolean includeBiome, boolean includeBiomeTempRain)
includeMaxblocky
- - if true, snapshot includes per-coordinate maximum Y valuesincludeBiome
- - if true, snapshot includes per-coordinate biome typeincludeBiomeTempRain
- - if true, snapshot includes per-coordinate raw biome temperature and rainfall
Entity[] getEntities()
BlockState[] getTileEntities()
boolean isLoaded()
boolean load(boolean generate)
generate
- Whether or not to generate a chunk if it doesn't already exist
boolean load()
boolean unload(boolean save, boolean safe)
save
- Controls whether the chunk is savedsafe
- Controls whether to unload the chunk when players are nearby
boolean unload(boolean save)
save
- Controls whether the chunk is saved
boolean unload()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |