public interface Chunk extends Extent
Extent
.
In Minecraft, the chunk is 16 by 16 blocks on the X and Z axes. The height of each chunk varies between worlds.
Modifier and Type | Method and Description |
---|---|
default Location<Chunk> |
getLocation(double x,
double y,
double z)
Gets a location in this extent at the given position.
|
default Location<Chunk> |
getLocation(int x,
int y,
int z)
Gets a location in this extent at the given position.
|
default Location<Chunk> |
getLocation(com.flowpowered.math.vector.Vector3d position)
Gets a location in this extent at the given position.
|
default Location<Chunk> |
getLocation(com.flowpowered.math.vector.Vector3i position)
Gets a location in this extent at the given position.
|
com.flowpowered.math.vector.Vector3i |
getPosition()
Get the position of the chunk.
|
World |
getWorld()
Gets the world the chunk is in.
|
boolean |
isPopulated()
Gets if the chunk has been populated by the generator.
|
boolean |
loadChunk(boolean generate)
Loads this chunk, and generates if specified and required.
|
boolean |
unloadChunk()
Unloads this chunk, if possible.
|
addScheduledUpdate, addScheduledUpdate, createSnapshot, createSnapshot, getExtentView, getExtentView, getRelativeExtentView, getScheduledUpdates, getScheduledUpdates, isLoaded, removeScheduledUpdate, removeScheduledUpdate, restoreSnapshot, restoreSnapshot, restoreSnapshot, setBlock, setBlock, setBlockType, setBlockType
createEntity, createEntity, createEntity, createEntity, getEntities, getEntities, restoreSnapshot, spawnEntity
getTileEntities, getTileEntities, getTileEntity, getTileEntity
getBlockView, getBlockView, getRelativeBlockView, setBlock, setBlock, setBlockType, setBlockType
containsBlock, containsBlock, getBlock, getBlock, getBlockCopy, getBlockCopy, getBlockMax, getBlockMin, getBlockSize, getBlockType, getBlockType, getImmutableBlockCopy, getUnmodifiableBlockView
getBiomeView, getBiomeView, getRelativeBiomeView, setBiome, setBiome
containsBiome, containsBiome, getBiome, getBiome, getBiomeCopy, getBiomeCopy, getBiomeMax, getBiomeMin, getBiomeSize, getImmutableBiomeCopy, getUnmodifiableBiomeView
copyFrom, copyFrom, copyFrom, copyFrom, copyFrom, copyFrom, copyFrom, copyFrom, get, get, get, get, getKeys, getKeys, getManipulators, getManipulators, getOrCreate, getOrCreate, getOrElse, getOrElse, getOrNull, getOrNull, getValue, getValue, getValues, getValues, offer, offer, offer, offer, offer, offer, offer, offer, offer, offer, offer, remove, remove, remove, remove, setRawData, setRawData, supports, supports, supports, supports, supports, supports, supports, supports, transform, transform, undo, undo, validateRawData, validateRawData
getUniqueId
getProperties, getProperties, getProperty, getProperty, getProperty, getProperty
default Location<Chunk> getLocation(com.flowpowered.math.vector.Vector3i position)
Extent
getLocation
in interface Extent
position
- The positiondefault Location<Chunk> getLocation(int x, int y, int z)
Extent
getLocation
in interface Extent
x
- The X positiony
- The Y positionz
- The Z positiondefault Location<Chunk> getLocation(com.flowpowered.math.vector.Vector3d position)
Extent
getLocation
in interface Extent
position
- The positiondefault Location<Chunk> getLocation(double x, double y, double z)
Extent
getLocation
in interface Extent
x
- The X positiony
- The Y positionz
- The Z positioncom.flowpowered.math.vector.Vector3i getPosition()
The returned position is 3-dimensional with the Y-coordinate set to
be the base (lowest) Y-position of the chunk. As 3-dimensional chunks
do not yet exist in Minecraft, the returned position will always have
a y
set to 0.
World getWorld()
boolean isPopulated()
boolean loadChunk(boolean generate)
generate
- Whether or not to generate the chunk
if it does not yet existboolean unloadChunk()