Interface BlockVolume.Modifiable<M extends BlockVolume.Modifiable<M>>
- All Superinterfaces:
BlockVolume, BlockVolume.Streamable<M>, MutableVolume, Volume
- All Known Subinterfaces:
ArchetypeVolume, BlockEntityArchetypeVolume.Modifiable<M>, BlockEntityArchetypeVolume.Mutable, BlockEntityVolume.Modifiable<M>, BlockEntityVolume.Mutable, BlockVolume.Mutable, Chunk<P>, ClientWorld, GenerationChunk, GenerationRegion, PhysicsAwareMutableBlockVolume<P>, Schematic, ServerWorld, World<W,L>, WorldChunk, WorldLike<P>
- Enclosing interface:
BlockVolume
public static interface BlockVolume.Modifiable<M extends BlockVolume.Modifiable<M>>
extends BlockVolume.Streamable<M>, MutableVolume
-
Nested Class Summary
Nested classes/interfaces inherited from interface BlockVolume
BlockVolume.Immutable, BlockVolume.Modifiable<M>, BlockVolume.Mutable, BlockVolume.Streamable<B>, BlockVolume.Unmodifiable<U> -
Method Summary
Modifier and TypeMethodDescriptionbooleanremoveBlock(int x, int y, int z) default booleanremoveBlock(Vector3i position) booleansetBlock(int x, int y, int z, BlockState block) Sets the block at the given position in the world.default booleansetBlock(Vector3i position, BlockState block) Sets the block at the given position in the world.Methods inherited from interface BlockVolume
block, block, blockPalette, fluid, fluid, highestPositionAt, highestYAt, highestYAtMethods inherited from interface BlockVolume.Streamable
blockStateStream
-
Method Details
-
setBlock
Sets the block at the given position in the world.- Parameters:
position- The positionblock- The block- Returns:
- Whether the block change was successful
- Throws:
PositionOutOfBoundsException- If the position is outside of the bounds of the volume
-
setBlock
Sets the block at the given position in the world.- Parameters:
x- The X positiony- The Y positionz- The Z positionblock- The block- Returns:
- Whether the block change was successful
- Throws:
PositionOutOfBoundsException- If the position is outside of the bounds of the volume
-
removeBlock
-
removeBlock
boolean removeBlock(int x, int y, int z)
-