Interface PhysicsAwareMutableBlockVolume<P extends PhysicsAwareMutableBlockVolume<P>>
- All Superinterfaces:
BlockVolume
,BlockVolume.Modifiable<P>
,BlockVolume.Streamable<P>
,MutableVolume
,Volume
- All Known Subinterfaces:
ClientWorld
,GenerationRegion
,ServerWorld
,World<W,
,L> WorldChunk
,WorldLike<P>
public interface PhysicsAwareMutableBlockVolume<P extends PhysicsAwareMutableBlockVolume<P>>
extends BlockVolume.Modifiable<P>
-
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 TypeMethodDescriptiondefault boolean
setBlock
(int x, int y, int z, BlockState block) Sets the block at the given position in the world.boolean
setBlock
(int x, int y, int z, BlockState blockState, BlockChangeFlag flag) 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.default boolean
setBlock
(Vector3i position, BlockState blockState, BlockChangeFlag flag) Sets the block at the given position in the world.Methods inherited from interface org.spongepowered.api.world.volume.block.BlockVolume
block, block, fluid, fluid, highestPositionAt, highestYAt, highestYAt
Methods inherited from interface org.spongepowered.api.world.volume.block.BlockVolume.Modifiable
removeBlock, removeBlock
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. Additionally, this performs what's considered to be "default" placement by aPlayer
such that neighboring blocks are affected, light is updated, pathfinding awareness is notified, etc. seeBlockChangeFlags.DEFAULT_PLACEMENT
for more information, and seeBlockChangeFlag
for details on the modifiers and what they may change.- Specified by:
setBlock
in interfaceBlockVolume.Modifiable<P extends PhysicsAwareMutableBlockVolume<P>>
- Parameters:
position
- The positionblock
- The block- Returns:
- True if the block change was not cancelled
-
setBlock
Sets the block at the given position in the world. Additionally, this performs what's considered to be "default" placement by aPlayer
such that neighboring blocks are affected, light is updated, pathfinding awareness is notified, etc. seeBlockChangeFlags.DEFAULT_PLACEMENT
for more information, and seeBlockChangeFlag
for details on the modifiers and what they may change.- Specified by:
setBlock
in interfaceBlockVolume.Modifiable<P extends PhysicsAwareMutableBlockVolume<P>>
- Parameters:
x
- The X positiony
- The Y positionz
- The Z positionblock
- The block- Returns:
- True if the block change was not cancelled
-
setBlock
Sets the block at the given position in the world.- Parameters:
position
- The positionblockState
- The blockflag
- The various change flags controlling some interactions- 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 positionblockState
- The blockflag
- The various change flags controlling some interactions- Returns:
- Whether the block change was successful
- Throws:
PositionOutOfBoundsException
- If the position is outside of the bounds of the volume
-