public interface Extent extends EntityUniverse, TileEntityVolume, MutableBiomeArea, LocationCompositeValueStore, Identifiable, LocationBasePropertyHolder
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. |
ScheduledBlockUpdate |
addScheduledUpdate(com.flowpowered.math.vector.Vector3i position,
int priority,
int ticks)
Adds a new
ScheduledBlockUpdate to this block. |
BlockSnapshot |
createSnapshot(int x,
int y,
int z)
Get a snapshot of this block at the current point in time.
|
BlockSnapshot |
createSnapshot(com.flowpowered.math.vector.Vector3i position)
Get a snapshot of this block at the current point in time.
|
Extent |
getExtentView(DiscreteTransform3 transform)
Returns a new extent that is viewed through some transformation.
|
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 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.
|
Extent |
getRelativeExtentView()
Returns a new extent that is translated so that
BlockVolume.getBlockMin() returns Vector3i.ZERO . |
Collection<ScheduledBlockUpdate> |
getScheduledUpdates(int x,
int y,
int z)
Gets a list of
ScheduledBlockUpdate s on this block. |
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. |
void |
removeScheduledUpdate(com.flowpowered.math.vector.Vector3i position,
ScheduledBlockUpdate update)
Removes a
ScheduledBlockUpdate from this block. |
boolean |
restoreSnapshot(BlockSnapshot snapshot,
boolean force,
boolean notifyNeighbors)
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,
boolean notifyNeighbors)
Restores the
BlockSnapshot at the given position. |
boolean |
restoreSnapshot(com.flowpowered.math.vector.Vector3i position,
BlockSnapshot snapshot,
boolean force,
boolean notifyNeighbors)
Restores the
BlockSnapshot at the given position. |
void |
setBlock(int x,
int y,
int z,
BlockState block,
boolean notifyNeighbors)
Sets the block at the given position in the world.
|
void |
setBlock(com.flowpowered.math.vector.Vector3i position,
BlockState block,
boolean notifyNeighbors)
Sets the block at the given position in the world.
|
void |
setBlockType(int x,
int y,
int z,
BlockType type,
boolean notifyNeighbors)
Replace the block at this position by a new type.
|
void |
setBlockType(com.flowpowered.math.vector.Vector3i position,
BlockType type,
boolean notifyNeighbors)
Replace the block at this position by a new type.
|
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
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 positionvoid setBlock(com.flowpowered.math.vector.Vector3i position, BlockState block, boolean notifyNeighbors)
position
- The positionblock
- The blocknotifyNeighbors
- Whether or not you want to notify neighboring
blocks of this change. If true, this may cause blocks to change.PositionOutOfBoundsException
- If the position is outside of the
bounds of the volumevoid setBlock(int x, int y, int z, BlockState block, boolean notifyNeighbors)
x
- The X positiony
- The Y positionz
- The Z positionblock
- The blocknotifyNeighbors
- Whether or not you want to notify neighboring
blocks of this change. If true, this may cause blocks to change.PositionOutOfBoundsException
- If the position is outside of the
bounds of the volumevoid setBlockType(com.flowpowered.math.vector.Vector3i position, BlockType type, boolean notifyNeighbors)
This will remove any extended block data at the given position.
position
- The position of the blocktype
- The new typenotifyNeighbors
- Whether or not you want to notify neighboring
blocks of this change. If true, this may cause blocks to change.PositionOutOfBoundsException
- If the position is outside of the
bounds of the areavoid setBlockType(int x, int y, int z, BlockType type, boolean notifyNeighbors)
This will remove any extended block data at the given position.
x
- The X positiony
- The Y positionz
- The Z positiontype
- The new typenotifyNeighbors
- Whether or not you want to notify neighboring
blocks. If true, this may cause blocks to change.PositionOutOfBoundsException
- If the position is outside of the
bounds of the areaBlockSnapshot 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, boolean notifyNeighbors)
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.notifyNeighbors
- Whether or not you want to notify neighboring
blocks of this change. If true, this may cause blocks to change.boolean restoreSnapshot(com.flowpowered.math.vector.Vector3i position, BlockSnapshot snapshot, boolean force, boolean notifyNeighbors)
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.notifyNeighbors
- Whether or not you want to notify neighboring
blocks of this change. If true, this may cause blocks to change.boolean restoreSnapshot(int x, int y, int z, BlockSnapshot snapshot, boolean force, boolean notifyNeighbors)
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.notifyNeighbors
- Whether or not you want to notify neighboring
blocks of this change. If true, this may cause blocks to change.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 positionScheduledBlockUpdate 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 processedvoid 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 extentExtent getExtentView(DiscreteTransform3 transform)
transform
- The transformation to be appliedExtent getRelativeExtentView()
BlockVolume.getBlockMin()
returns Vector3i.ZERO
.
This does not copy the data, it only provides a new view of the
extent.