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.
|
MutableBlockVolume |
getRelativeBlockView()
Returns a new volume that is translated so that
BlockVolume.getBlockMin() returns Vector3i.ZERO . |
void |
setBlock(int x,
int y,
int z,
BlockState block)
Sets the block at the given position in the world.
|
void |
setBlock(com.flowpowered.math.vector.Vector3i position,
BlockState block)
Sets the block at the given position in the world.
|
void |
setBlockType(int x,
int y,
int z,
BlockType type)
Replace the block at this position by a new type.
|
void |
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, getUnmodifiableBlockView
void setBlock(com.flowpowered.math.vector.Vector3i position, BlockState block)
position
- The positionblock
- The blockPositionOutOfBoundsException
- If the position is outside of the
bounds of the volumevoid 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 volumevoid 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 areavoid 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 areaMutableBlockVolume getBlockView(com.flowpowered.math.vector.Vector3i newMin, com.flowpowered.math.vector.Vector3i newMax)
getBlockView
in interface BlockVolume
newMin
- 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 BlockVolume
transform
- The transformation to be appliedMutableBlockVolume getRelativeBlockView()
BlockVolume.getBlockMin()
returns Vector3i.ZERO
.
This does not copy the blocks, it only provides a new view of the
storage.getRelativeBlockView
in interface BlockVolume