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.
EntityUniverse.EntityHit| Modifier and Type | Method and Description |
|---|---|
MutableBiomeVolumeWorker<Chunk> |
getBiomeWorker()
Gets a new biome worker for this biome volume.
|
MutableBlockVolumeWorker<Chunk> |
getBlockWorker()
Gets a new block worker for this block volume.
|
int |
getInhabitedTime()
Gets the number of ticks players have been present in this chunk, used
for calculation of the regional difficulty factor.
|
int |
getInhabittedTime()
Deprecated.
Due to misspelling, use
getInhabitedTime() instead |
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.
|
default Optional<Chunk> |
getNeighbor(Direction direction)
Gets the chunk in the given direction from this chunk, if it exists.
|
default Optional<Chunk> |
getNeighbor(Direction direction,
boolean shouldLoad)
Gets the chunk in the given direction from this chunk.
|
com.flowpowered.math.vector.Vector3i |
getPosition()
Gets the position of the chunk.
|
double |
getRegionalDifficultyFactor()
Gets the regional difficulty factor for this chunk.
|
double |
getRegionalDifficultyPercentage()
Gets the regional difficulty percentage for this 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, createArchetypeVolume, createSnapshot, createSnapshot, getBlockSelectionBox, getBlockSelectionBox, getCreator, getCreator, getExtentView, getHighestPositionAt, getHighestYAt, getHighestYAt, getIntersectingBlockCollisionBoxes, getIntersectingCollisionBoxes, getIntersectingCollisionBoxes, getNotifier, getNotifier, getPrecipitationLevelAt, getPrecipitationLevelAt, getPrecipitationLevelAt, getScheduledUpdates, getScheduledUpdates, isLoaded, removeScheduledUpdate, removeScheduledUpdate, restoreSnapshot, restoreSnapshot, restoreSnapshot, setBlock, setBlock, setBlockType, setBlockType, setCreator, setCreator, setNotifier, setNotifiercreateEntity, createEntity, createEntity, createEntity, createEntityNaturally, createEntityNaturally, getEntities, getEntities, getEntity, getIntersectingEntities, getIntersectingEntities, getIntersectingEntities, getIntersectingEntities, getIntersectingEntities, getIntersectingEntities, getIntersectingEntities, getIntersectingEntities, getNearbyEntities, restoreSnapshot, spawnEntities, spawnEntitygetTileEntities, getTileEntities, getTileEntity, getTileEntitydigBlock, digBlock, digBlockWith, digBlockWith, getBlockDigTimeWith, getBlockDigTimeWith, hitBlock, hitBlock, interactBlock, interactBlock, interactBlockWith, interactBlockWith, placeBlock, placeBlockgetBlockView, getBlockView, getRelativeBlockView, setBlock, setBlock, setBlockType, setBlockTypecontainsBlock, containsBlock, getBlock, getBlock, getBlockCopy, getBlockCopy, getBlockMax, getBlockMin, getBlockSize, getBlockType, getBlockType, getImmutableBlockCopy, getUnmodifiableBlockViewgetBiomeView, getBiomeView, getRelativeBiomeView, setBiome, setBiomecontainsBiome, containsBiome, getBiome, getBiome, getBiomeCopy, getBiomeCopy, getBiomeMax, getBiomeMin, getBiomeSize, getImmutableBiomeCopy, getUnmodifiableBiomeViewcopyFrom, 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, validateRawDatagetUniqueIdgetFacesWithProperty, getFacesWithProperty, getProperties, getProperties, getProperty, getProperty, getProperty, getPropertydefault Location<Chunk> getLocation(com.flowpowered.math.vector.Vector3i position)
ExtentgetLocation in interface Extentposition - The positiondefault Location<Chunk> getLocation(int x, int y, int z)
ExtentgetLocation in interface Extentx - The X positiony - The Y positionz - The Z positiondefault Location<Chunk> getLocation(com.flowpowered.math.vector.Vector3d position)
ExtentgetLocation in interface Extentposition - The positiondefault Location<Chunk> getLocation(double x, double y, double z)
ExtentgetLocation in interface Extentx - 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()
@Deprecated int getInhabittedTime()
getInhabitedTime() insteadint getInhabitedTime()
double getRegionalDifficultyFactor()
This value is used for display only in vanilla.
double getRegionalDifficultyPercentage()
This is the value that is used in vanilla to find which effects are caused by the regional difficulty.
default Optional<Chunk> getNeighbor(Direction direction)
direction - The cardinal or ordinal direction to get the chunk fromdefault Optional<Chunk> getNeighbor(Direction direction, boolean shouldLoad)
direction - The cardinal or ordinal direction to get the chunk fromshouldLoad - Whether the server should load or generate the chunk
if unavailableshouldLoad is trueMutableBiomeVolumeWorker<Chunk> getBiomeWorker()
BiomeVolumegetBiomeWorker in interface BiomeVolumegetBiomeWorker in interface ExtentgetBiomeWorker in interface MutableBiomeVolumeMutableBlockVolumeWorker<Chunk> getBlockWorker()
BlockVolumegetBlockWorker in interface BlockVolumegetBlockWorker in interface ExtentgetBlockWorker in interface InteractableVolumegetBlockWorker in interface MutableBlockVolumegetBlockWorker in interface TileEntityVolume