public interface Extent extends EntityUniverse, TileEntityVolume, MutableBiomeArea, LocationCompositeValueStore, Identifiable
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.
|
boolean |
digBlock(int x,
int y,
int z)
Simulate the digging of the block as if a player had done so.
|
boolean |
digBlock(com.flowpowered.math.vector.Vector3i position)
Simulate the digging of the block as if a player had done so.
|
boolean |
digBlockWith(int x,
int y,
int z,
ItemStack itemStack)
Simulate the digging of the block with the given tool as if a player
had done so.
|
boolean |
digBlockWith(com.flowpowered.math.vector.Vector3i position,
ItemStack itemStack)
Simulate the digging of the block with the given tool as if a player
had done so.
|
int |
getBlockDigTimeWith(int x,
int y,
int z,
ItemStack itemStack)
Gets the time it takes to dig this block the specified item in ticks.
|
int |
getBlockDigTimeWith(com.flowpowered.math.vector.Vector3i position,
ItemStack itemStack)
Gets the time it takes to dig this block the specified item in ticks.
|
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.
|
Collection<Direction> |
getIndirectlyPoweredBlockFaces(int x,
int y,
int z)
Get all faces of this block that are indirectly powered.
|
Collection<Direction> |
getIndirectlyPoweredBlockFaces(com.flowpowered.math.vector.Vector3i position)
Get all faces of this block that are indirectly powered.
|
Location<? extends Extent> |
getLocation(double x,
double y,
double z)
Gets a location in this extent at the given position.
|
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.
|
Collection<Direction> |
getPoweredBlockFaces(int x,
int y,
int z)
Get all the faces of this block that are directly powered.
|
Collection<Direction> |
getPoweredBlockFaces(com.flowpowered.math.vector.Vector3i position)
Get all the faces of this block that are directly powered.
|
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. |
void |
interactBlock(int x,
int y,
int z,
Direction side)
Simulates the interaction with this object as if a player had done so.
|
void |
interactBlock(com.flowpowered.math.vector.Vector3i position,
Direction side)
Simulates the interaction with this object as if a player had done so.
|
void |
interactBlockWith(int x,
int y,
int z,
ItemStack itemStack,
Direction side)
Simulates the interaction with this object using the given item as if
the player had done so.
|
void |
interactBlockWith(com.flowpowered.math.vector.Vector3i position,
ItemStack itemStack,
Direction side)
Simulates the interaction with this object using the given item as if
the player had done so.
|
boolean |
isBlockFaceIndirectlyPowered(int x,
int y,
int z,
Direction direction)
Test whether the face in the given direction is indirectly powered.
|
boolean |
isBlockFaceIndirectlyPowered(com.flowpowered.math.vector.Vector3i position,
Direction direction)
Test whether the face in the given direction is indirectly powered.
|
boolean |
isBlockFacePowered(int x,
int y,
int z,
Direction direction)
Test whether the face in the given direction is powered.
|
boolean |
isBlockFacePowered(com.flowpowered.math.vector.Vector3i position,
Direction direction)
Test whether the face in the given direction is powered.
|
boolean |
isBlockFlammable(int x,
int y,
int z,
Direction faceDirection)
Test whether the given face of the block can catch fire.
|
boolean |
isBlockFlammable(com.flowpowered.math.vector.Vector3i position,
Direction faceDirection)
Test whether the given face of the block can catch fire.
|
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, getProperties, getProperties, getProperty, getProperty, 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
Location<? extends Extent> getLocation(com.flowpowered.math.vector.Vector3i position)
position
- The positionLocation<? 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 positionLocation<? 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.void interactBlock(com.flowpowered.math.vector.Vector3i position, Direction side)
position
- The position of the blockside
- The side of the block to interact withvoid interactBlock(int x, int y, int z, Direction side)
x
- The X positiony
- The Y positionz
- The Z positionside
- The side of the block to interact withvoid interactBlockWith(com.flowpowered.math.vector.Vector3i position, ItemStack itemStack, Direction side)
position
- The position of the blockitemStack
- The itemside
- The side of the block to interact withvoid interactBlockWith(int x, int y, int z, ItemStack itemStack, Direction side)
x
- The X positiony
- The Y positionz
- The Z positionitemStack
- The itemside
- The side of the block to interact withboolean digBlock(com.flowpowered.math.vector.Vector3i position)
position
- The position of the blockboolean digBlock(int x, int y, int z)
x
- The X positiony
- The Y positionz
- The Z positionboolean digBlockWith(com.flowpowered.math.vector.Vector3i position, ItemStack itemStack)
position
- The position of the blockitemStack
- The toolboolean digBlockWith(int x, int y, int z, ItemStack itemStack)
x
- The X positiony
- The Y positionz
- The Z positionitemStack
- The toolint getBlockDigTimeWith(com.flowpowered.math.vector.Vector3i position, ItemStack itemStack)
position
- The position of the blockitemStack
- The item to pretend-dig withint getBlockDigTimeWith(int x, int y, int z, ItemStack itemStack)
x
- The X positiony
- The Y positionz
- The Z positionitemStack
- The item to pretend-dig withboolean isBlockFacePowered(com.flowpowered.math.vector.Vector3i position, Direction direction)
position
- The position of the blockdirection
- The directionboolean isBlockFacePowered(int x, int y, int z, Direction direction)
x
- The X positiony
- The Y positionz
- The Z positiondirection
- The directionboolean isBlockFaceIndirectlyPowered(com.flowpowered.math.vector.Vector3i position, Direction direction)
position
- The position of the blockdirection
- The directionboolean isBlockFaceIndirectlyPowered(int x, int y, int z, Direction direction)
x
- The X positiony
- The Y positionz
- The Z positiondirection
- The directionCollection<Direction> getPoweredBlockFaces(com.flowpowered.math.vector.Vector3i position)
position
- The position of the blockCollection<Direction> getPoweredBlockFaces(int x, int y, int z)
x
- The X positiony
- The Y positionz
- The Z positionCollection<Direction> getIndirectlyPoweredBlockFaces(com.flowpowered.math.vector.Vector3i position)
position
- The position of the blockCollection<Direction> getIndirectlyPoweredBlockFaces(int x, int y, int z)
x
- The X positiony
- The Y positionz
- The Z positionboolean isBlockFlammable(com.flowpowered.math.vector.Vector3i position, Direction faceDirection)
position
- The position of the blockfaceDirection
- The face of the block to checkboolean isBlockFlammable(int x, int y, int z, Direction faceDirection)
x
- The X positiony
- The Y positionz
- The Z positionfaceDirection
- The face of the block to checkCollection<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.