public interface Extent extends EntityUniverse, TileEntityVolume, InteractableVolume, MutableBiomeVolume, LocationCompositeValueStore, Identifiable, LocationBasePropertyHolder
EntityUniverse.EntityHit
Modifier and Type | Method and Description |
---|---|
ScheduledBlockUpdate |
addScheduledUpdate(int x,
int y,
int z,
int priority,
int ticks)
Adds a new
ScheduledBlockUpdate to this block. |
default ScheduledBlockUpdate |
addScheduledUpdate(com.flowpowered.math.vector.Vector3i position,
int priority,
int ticks)
Adds a new
ScheduledBlockUpdate to this block. |
ArchetypeVolume |
createArchetypeVolume(com.flowpowered.math.vector.Vector3i min,
com.flowpowered.math.vector.Vector3i max,
com.flowpowered.math.vector.Vector3i origin)
Creates a new archetype volume from the specified section of this extent.
|
BlockSnapshot |
createSnapshot(int x,
int y,
int z)
Gets a snapshot of this block at the current point in time.
|
default BlockSnapshot |
createSnapshot(com.flowpowered.math.vector.Vector3i position)
Gets a snapshot of this block at the current point in time.
|
MutableBiomeVolumeWorker<? extends Extent> |
getBiomeWorker()
Gets a new biome worker for this biome volume.
|
Optional<AABB> |
getBlockSelectionBox(int x,
int y,
int z)
Gets the bounding box used to select blocks, which appears
as a black outline on a vanilla client.
|
default Optional<AABB> |
getBlockSelectionBox(com.flowpowered.math.vector.Vector3i pos)
Gets the bounding box used to select blocks, which appears
as a black outline on a vanilla client.
|
MutableBlockVolumeWorker<? extends Extent> |
getBlockWorker()
Gets a new block worker for this block volume.
|
Optional<UUID> |
getCreator(int x,
int y,
int z)
Gets the
UUID , if available, of the user who created the
BlockSnapshot at passed block position. |
default Optional<UUID> |
getCreator(com.flowpowered.math.vector.Vector3i pos)
Gets the
UUID , if available, of the user who created the
BlockSnapshot at passed block position. |
Extent |
getExtentView(com.flowpowered.math.vector.Vector3i newMin,
com.flowpowered.math.vector.Vector3i newMax)
Returns a new extent that is the same or smaller than the current extent.
|
default com.flowpowered.math.vector.Vector3i |
getHighestPositionAt(com.flowpowered.math.vector.Vector3i position)
Get the
Location of the highest block that sunlight can reach in
the given column. |
int |
getHighestYAt(int x,
int z)
Get the y value of the highest block that sunlight can reach in the given
column.
|
default int |
getHighestYAt(com.flowpowered.math.vector.Vector2i column)
Get the y value of the highest block that sunlight can reach in the given
column.
|
Set<AABB> |
getIntersectingBlockCollisionBoxes(AABB box)
Gets all the block collision boxes that intersect the bounding box, in
no particular order.
|
default Set<AABB> |
getIntersectingCollisionBoxes(Entity owner)
Gets all the collision boxes that intersect the bounding box owned by
the entity, in no particular order.
|
Set<AABB> |
getIntersectingCollisionBoxes(Entity owner,
AABB box)
Gets all the collision boxes that intersect the bounding box owned by
the entity, in no particular order.
|
default Location<? extends Extent> |
getLocation(double x,
double y,
double z)
Gets a location in this extent at the given position.
|
default Location<? extends Extent> |
getLocation(int x,
int y,
int z)
Gets a location in this extent at the given position.
|
Location<? extends Extent> |
getLocation(com.flowpowered.math.vector.Vector3d position)
Gets a location in this extent at the given position.
|
Location<? extends Extent> |
getLocation(com.flowpowered.math.vector.Vector3i position)
Gets a location in this extent at the given position.
|
Optional<UUID> |
getNotifier(int x,
int y,
int z)
Gets the
UUID , if available, of the user who last notified the
BlockSnapshot located at passed block coordinates. |
default Optional<UUID> |
getNotifier(com.flowpowered.math.vector.Vector3i pos)
Gets the
UUID , if available, of the user who last notified the
BlockSnapshot located at passed block position. |
int |
getPrecipitationLevelAt(int x,
int z)
Returns the y level that precipitation ends falling in the given column.
|
default int |
getPrecipitationLevelAt(com.flowpowered.math.vector.Vector2i column)
Returns the y level that precipitation ends falling in the given column.
|
default com.flowpowered.math.vector.Vector3i |
getPrecipitationLevelAt(com.flowpowered.math.vector.Vector3i position)
Returns the position that precipitation ends falling in the column
of the given position.
|
Collection<ScheduledBlockUpdate> |
getScheduledUpdates(int x,
int y,
int z)
Gets a list of
ScheduledBlockUpdate s on this block. |
default Collection<ScheduledBlockUpdate> |
getScheduledUpdates(com.flowpowered.math.vector.Vector3i position)
Gets a list of
ScheduledBlockUpdate s on this block. |
boolean |
isLoaded()
Gets whether or not this extent is currently loaded.
|
void |
removeScheduledUpdate(int x,
int y,
int z,
ScheduledBlockUpdate update)
Removes a
ScheduledBlockUpdate from this block. |
default void |
removeScheduledUpdate(com.flowpowered.math.vector.Vector3i position,
ScheduledBlockUpdate update)
Removes a
ScheduledBlockUpdate from this block. |
boolean |
restoreSnapshot(BlockSnapshot snapshot,
boolean force,
BlockChangeFlag flag)
Restores the given
BlockSnapshot using the saved block position
stored within the snapshot. |
boolean |
restoreSnapshot(int x,
int y,
int z,
BlockSnapshot snapshot,
boolean force,
BlockChangeFlag flag)
Restores the
BlockSnapshot at the given position. |
default boolean |
restoreSnapshot(com.flowpowered.math.vector.Vector3i position,
BlockSnapshot snapshot,
boolean force,
BlockChangeFlag flag)
Restores the
BlockSnapshot at the given position. |
boolean |
setBlock(int x,
int y,
int z,
BlockState blockState,
BlockChangeFlag flag)
Sets the block at the given position in the world.
|
default boolean |
setBlock(com.flowpowered.math.vector.Vector3i position,
BlockState blockState,
BlockChangeFlag flag)
Sets the block at the given position in the world.
|
default boolean |
setBlockType(int x,
int y,
int z,
BlockType type,
BlockChangeFlag flag)
Sets the block at the given position in the world.
|
default boolean |
setBlockType(com.flowpowered.math.vector.Vector3i position,
BlockType type,
BlockChangeFlag flag)
Sets the block at the given position in the world.
|
void |
setCreator(int x,
int y,
int z,
UUID uuid)
Sets the
UUID of the user who created the BlockSnapshot
located at passed block coordinates. |
default void |
setCreator(com.flowpowered.math.vector.Vector3i pos,
UUID uuid)
Sets the
UUID of the user who created the BlockSnapshot
located at passed block position. |
void |
setNotifier(int x,
int y,
int z,
UUID uuid)
Sets the
UUID of the user who last notified the
BlockSnapshot located at passed block coordinates. |
default void |
setNotifier(com.flowpowered.math.vector.Vector3i pos,
UUID uuid)
Sets the
UUID of the user who last notified the
BlockSnapshot located at passed block position. |
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
Location<? extends Extent> getLocation(com.flowpowered.math.vector.Vector3i position)
position
- The positiondefault Location<? extends Extent> getLocation(int x, int y, int z)
x
- The X positiony
- The Y positionz
- The Z positionLocation<? extends Extent> getLocation(com.flowpowered.math.vector.Vector3d position)
position
- The positiondefault Location<? extends Extent> getLocation(double x, double y, double z)
x
- The X positiony
- The Y positionz
- The Z positionint getHighestYAt(int x, int z)
This method ignores all transparent blocks, providing the highest opaque block.
x
- The x column valuez
- The z column valuedefault int getHighestYAt(com.flowpowered.math.vector.Vector2i column)
This method ignores all transparent blocks, providing the highest opaque block.
column
- The column valuedefault com.flowpowered.math.vector.Vector3i getHighestPositionAt(com.flowpowered.math.vector.Vector3i position)
Location
of the highest block that sunlight can reach in
the given column.
This method ignores all transparent blocks, providing the highest opaque block.
position
- The column positionint getPrecipitationLevelAt(int x, int z)
A value is still returned for columns in biomes which do not receive precipitation.
x
- The x column valuez
- The y column valuedefault int getPrecipitationLevelAt(com.flowpowered.math.vector.Vector2i column)
A value is still returned for columns in biomes which do not receive precipitation.
column
- The column valuedefault com.flowpowered.math.vector.Vector3i getPrecipitationLevelAt(com.flowpowered.math.vector.Vector3i position)
A position is still returned for positions in biomes which do not receive precipitation.
position
- The position valuedefault boolean setBlock(com.flowpowered.math.vector.Vector3i position, BlockState blockState, BlockChangeFlag flag)
position
- The positionblockState
- The blockflag
- The various change flags controlling some interactionsPositionOutOfBoundsException
- If the position is outside of the
bounds of the volumeboolean setBlock(int x, int y, int z, BlockState blockState, BlockChangeFlag flag)
x
- The X positiony
- The Y positionz
- The Z positionblockState
- The blockflag
- The various change flags controlling some interactionsPositionOutOfBoundsException
- If the position is outside of the
bounds of the volumedefault boolean setBlockType(com.flowpowered.math.vector.Vector3i position, BlockType type, BlockChangeFlag flag)
position
- The positiontype
- The block typeflag
- The various change flags controlling some interactionsPositionOutOfBoundsException
- If the position is outside of the
bounds of the volumedefault boolean setBlockType(int x, int y, int z, BlockType type, BlockChangeFlag flag)
x
- The X positiony
- The Y positionz
- The Z positiontype
- The blockflag
- The various change flags controlling some interactionsPositionOutOfBoundsException
- If the position is outside of the
bounds of the volumedefault BlockSnapshot createSnapshot(com.flowpowered.math.vector.Vector3i position)
A snapshot is disconnected from the Extent
that it was taken
from so changes to the original block do not affect the snapshot.
position
- The position of the blockBlockSnapshot createSnapshot(int x, int y, int z)
A snapshot is disconnected from the Extent
that it was taken
from so changes to the original block do not affect the snapshot.
x
- The X positiony
- The Y positionz
- The Z positionboolean restoreSnapshot(BlockSnapshot snapshot, boolean force, BlockChangeFlag flag)
BlockSnapshot
using the saved block position
stored within the snapshot.
If forced, the state of the block will change its BlockType
to
match that of the snapshot then set the state. However, if force is set
to false and the BlockType
s does not match, false will be
returned. If notifyNeighbors is true, neighboring blocks will be notified
of changes at the restored block location triggering physic updates.
snapshot
- The snapshotforce
- If true, forces block state to be set even if the
BlockType
does not match the snapshot one.flag
- The various change flags controlling some interactionsdefault boolean restoreSnapshot(com.flowpowered.math.vector.Vector3i position, BlockSnapshot snapshot, boolean force, BlockChangeFlag flag)
BlockSnapshot
at the given position.
If forced, the state of the block will change its BlockType
to
match that of the snapshot then set the state. However, if force is set
to false and the BlockType
s does not match, false will be
returned. If notifyNeighbors is true, neighboring blocks will be notified
of changes at the restored block location triggering physic updates.
position
- The position of the blocksnapshot
- The snapshotforce
- If true, forces block state to be set even if the
BlockType
does not match the snapshot one.flag
- The various change flags controlling some interactionsboolean restoreSnapshot(int x, int y, int z, BlockSnapshot snapshot, boolean force, BlockChangeFlag flag)
BlockSnapshot
at the given position.
If forced, the state of the block will change its BlockType
to
match that of the snapshot then set the state. However, if force is set
to false and the BlockType
s does not match, false will be
returned. If notifyNeighbors is true, neighboring blocks will be notified
of changes at the restored block location triggering physic updates.
x
- The X positiony
- The Y positionz
- The Z positionsnapshot
- The snapshotforce
- If true, forces block state to be set even if the
BlockType
does not match the snapshot one.flag
- The various change flags controlling some interactionsdefault Collection<ScheduledBlockUpdate> getScheduledUpdates(com.flowpowered.math.vector.Vector3i position)
ScheduledBlockUpdate
s on this block.position
- The position of the blockCollection<ScheduledBlockUpdate> getScheduledUpdates(int x, int y, int z)
ScheduledBlockUpdate
s on this block.x
- The X positiony
- The Y positionz
- The Z positiondefault ScheduledBlockUpdate addScheduledUpdate(com.flowpowered.math.vector.Vector3i position, int priority, int ticks)
ScheduledBlockUpdate
to this block.position
- The position of the blockpriority
- The priority of the scheduled updateticks
- The ticks until the scheduled update should be processedScheduledBlockUpdate addScheduledUpdate(int x, int y, int z, int priority, int ticks)
ScheduledBlockUpdate
to this block.x
- The X positiony
- The Y positionz
- The Z positionpriority
- The priority of the scheduled updateticks
- The ticks until the scheduled update should be processeddefault void removeScheduledUpdate(com.flowpowered.math.vector.Vector3i position, ScheduledBlockUpdate update)
ScheduledBlockUpdate
from this block.position
- The position of the blockupdate
- The ScheduledBlockUpdate to removevoid removeScheduledUpdate(int x, int y, int z, ScheduledBlockUpdate update)
ScheduledBlockUpdate
from this block.x
- The X positiony
- The Y positionz
- The Z positionupdate
- The ScheduledBlockUpdate to removeboolean isLoaded()
Extent getExtentView(com.flowpowered.math.vector.Vector3i newMin, com.flowpowered.math.vector.Vector3i newMax)
newMin
- The new minimum coordinates in this extentnewMax
- The new maximum coordinates in this extentPositionOutOfBoundsException
- If the new minimum and maximum are
outside the current extentMutableBiomeVolumeWorker<? extends Extent> getBiomeWorker()
BiomeVolume
getBiomeWorker
in interface BiomeVolume
getBiomeWorker
in interface MutableBiomeVolume
MutableBlockVolumeWorker<? extends Extent> getBlockWorker()
BlockVolume
getBlockWorker
in interface BlockVolume
getBlockWorker
in interface InteractableVolume
getBlockWorker
in interface MutableBlockVolume
getBlockWorker
in interface TileEntityVolume
default Optional<UUID> getCreator(com.flowpowered.math.vector.Vector3i pos)
UUID
, if available, of the user who created the
BlockSnapshot
at passed block position.pos
- The position to be checkedUUID
if one existsOptional<UUID> getCreator(int x, int y, int z)
UUID
, if available, of the user who created the
BlockSnapshot
at passed block position.x
- The x coordinatey
- The y coordinatez
- The z coordinateUUID
if one existsdefault Optional<UUID> getNotifier(com.flowpowered.math.vector.Vector3i pos)
UUID
, if available, of the user who last notified the
BlockSnapshot
located at passed block position.pos
- The position to be checkedUUID
if one existsOptional<UUID> getNotifier(int x, int y, int z)
UUID
, if available, of the user who last notified the
BlockSnapshot
located at passed block coordinates.x
- The x coordinatey
- The y coordinatez
- The z coordinateUUID
if availabledefault void setCreator(com.flowpowered.math.vector.Vector3i pos, @Nullable UUID uuid)
UUID
of the user who created the BlockSnapshot
located at passed block position.pos
- The block position where the user data should be applieduuid
- The UUID
to set as creatorvoid setCreator(int x, int y, int z, @Nullable UUID uuid)
UUID
of the user who created the BlockSnapshot
located at passed block coordinates.x
- The x coordinate where the user data should be appliedy
- The y coordinate where the user data should be appliedz
- The z coordinate where the user data should be applieduuid
- The UUID
to set as creatordefault void setNotifier(com.flowpowered.math.vector.Vector3i pos, @Nullable UUID uuid)
UUID
of the user who last notified the
BlockSnapshot
located at passed block position.pos
- The block position where the user data should be applieduuid
- The UUID
to set as notifiervoid setNotifier(int x, int y, int z, @Nullable UUID uuid)
UUID
of the user who last notified the
BlockSnapshot
located at passed block coordinates.x
- The x coordinate where the user data should be appliedy
- The y coordinate where the user data should be appliedz
- The z coordinate where the user data should be applieduuid
- The UUID
to set as notifierdefault Optional<AABB> getBlockSelectionBox(com.flowpowered.math.vector.Vector3i pos)
pos
- The position of the block from which to get the selection boxOptional<AABB> getBlockSelectionBox(int x, int y, int z)
x
- The x coord of the block from which to get the selection boxy
- The y coord of the block from which to get the selection boxz
- The z coord of the block from which to get the selection boxSet<AABB> getIntersectingBlockCollisionBoxes(AABB box)
box
- The intersection boxdefault Set<AABB> getIntersectingCollisionBoxes(Entity owner)
owner
- The entity that owns the bounding boxSet<AABB> getIntersectingCollisionBoxes(Entity owner, AABB box)
owner
- The entity that owns the bounding boxbox
- The intersection boxArchetypeVolume createArchetypeVolume(com.flowpowered.math.vector.Vector3i min, com.flowpowered.math.vector.Vector3i max, com.flowpowered.math.vector.Vector3i origin)
min
- The minimum point of the volume to copymax
- The maximum point of the volume to copyorigin
- The eventual origin on the new archetype volume