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 org.spongepowered.api.world.volume.block.BlockVolume
BlockVolume.Immutable, BlockVolume.Modifiable<M extends BlockVolume.Modifiable<M>>, BlockVolume.Mutable, BlockVolume.Streamable<B extends BlockVolume.Streamable<B>>, BlockVolume.Unmodifiable<U extends BlockVolume.Unmodifiable<U>>
-
Method Summary
Modifier and TypeMethodDescriptionboolean
removeBlock
(int x, int y, int z) default boolean
removeBlock
(Vector3i position) boolean
setBlock
(int x, int y, int z, BlockState block) Sets the block at the given position in the world.default boolean
setBlock
(Vector3i position, BlockState block) Sets the block at the given position in the world.Methods inherited from interface org.spongepowered.api.world.volume.block.BlockVolume
block, block, blockPalette, fluid, fluid, highestPositionAt, highestYAt, highestYAt
Methods inherited from interface org.spongepowered.api.world.volume.block.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)
-