public interface MutableBlockVolume extends BlockVolume
BlockVolume| Modifier and Type | Method and Description |
|---|---|
MutableBlockVolume |
getBlockView(DiscreteTransform3 transform)
Returns a new volume that is viewed through some transformation.
|
MutableBlockVolume |
getBlockView(com.flowpowered.math.vector.Vector3i newMin,
com.flowpowered.math.vector.Vector3i newMax)
Returns a new volume that is the same or smaller than the current volume.
|
MutableBlockVolumeWorker<? extends MutableBlockVolume> |
getBlockWorker()
Gets a new block worker for this block volume.
|
default MutableBlockVolume |
getRelativeBlockView()
Returns a new volume that is translated so that
BlockVolume.getBlockMin() returns Vector3i.ZERO. |
boolean |
setBlock(int x,
int y,
int z,
BlockState block)
Sets the block at the given position in the world.
|
default boolean |
setBlock(com.flowpowered.math.vector.Vector3i position,
BlockState block)
Sets the block at the given position in the world.
|
default boolean |
setBlockType(int x,
int y,
int z,
BlockType type)
Replace the block at this position by a new type.
|
default boolean |
setBlockType(com.flowpowered.math.vector.Vector3i position,
BlockType type)
Replace the block at this position by a new type.
|
containsBlock, containsBlock, getBlock, getBlock, getBlockCopy, getBlockCopy, getBlockMax, getBlockMin, getBlockSize, getBlockType, getBlockType, getImmutableBlockCopy, getUnmodifiableBlockViewdefault boolean setBlock(com.flowpowered.math.vector.Vector3i position,
BlockState block)
position - The positionblock - The blockPositionOutOfBoundsException - If the position is outside of the
bounds of the volumeboolean setBlock(int x,
int y,
int z,
BlockState block)
x - The X positiony - The Y positionz - The Z positionblock - The blockPositionOutOfBoundsException - If the position is outside of the
bounds of the volumedefault boolean setBlockType(com.flowpowered.math.vector.Vector3i position,
BlockType type)
This will remove any extended block data at the given position.
position - The position of the blocktype - The new typePositionOutOfBoundsException - If the position is outside of the
bounds of the volumedefault boolean setBlockType(int x,
int y,
int z,
BlockType type)
This will remove any extended block data at the given position.
x - The X positiony - The Y positionz - The Z positiontype - The new typePositionOutOfBoundsException - If the position is outside of the
bounds of the volumeMutableBlockVolume getBlockView(com.flowpowered.math.vector.Vector3i newMin, com.flowpowered.math.vector.Vector3i newMax)
getBlockView in interface BlockVolumenewMin - The new minimum coordinates in this volumenewMax - The new maximum coordinates in this volumePositionOutOfBoundsException - If the new minimum and maximum are
outside the current volumeMutableBlockVolume getBlockView(DiscreteTransform3 transform)
getBlockView in interface BlockVolumetransform - The transformation to be applieddefault MutableBlockVolume getRelativeBlockView()
BlockVolume.getBlockMin() returns Vector3i.ZERO. This
does not copy the blocks, it only provides a new view of the storage.getRelativeBlockView in interface BlockVolumeMutableBlockVolumeWorker<? extends MutableBlockVolume> getBlockWorker()
BlockVolumegetBlockWorker in interface BlockVolume