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, setNotifier
createEntity, createEntity, createEntity, createEntity, createEntityNaturally, createEntityNaturally, getEntities, getEntities, getEntity, getIntersectingEntities, getIntersectingEntities, getIntersectingEntities, getIntersectingEntities, getIntersectingEntities, getIntersectingEntities, getIntersectingEntities, getIntersectingEntities, getNearbyEntities, restoreSnapshot, spawnEntities, spawnEntity
getTileEntities, getTileEntities, getTileEntity, getTileEntity
digBlock, digBlock, digBlockWith, digBlockWith, getBlockDigTimeWith, getBlockDigTimeWith, hitBlock, hitBlock, interactBlock, interactBlock, interactBlockWith, interactBlockWith, placeBlock, placeBlock
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
getFacesWithProperty, getFacesWithProperty, 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()
@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()
BiomeVolume
getBiomeWorker
in interface BiomeVolume
getBiomeWorker
in interface Extent
getBiomeWorker
in interface MutableBiomeVolume
MutableBlockVolumeWorker<Chunk> getBlockWorker()
BlockVolume
getBlockWorker
in interface BlockVolume
getBlockWorker
in interface Extent
getBlockWorker
in interface InteractableVolume
getBlockWorker
in interface MutableBlockVolume
getBlockWorker
in interface TileEntityVolume