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>
  • Method Details

    • setBlock

      default boolean setBlock(Vector3i position, BlockState block)
      Sets the block at the given position in the world. Additionally, this performs what's considered to be "default" placement by a Player such that neighboring blocks are affected, light is updated, pathfinding awareness is notified, etc. see BlockChangeFlags.DEFAULT_PLACEMENT for more information, and see BlockChangeFlag for details on the modifiers and what they may change.
      Specified by:
      setBlock in interface BlockVolume.Modifiable<P extends PhysicsAwareMutableBlockVolume<P>>
      Parameters:
      position - The position
      block - The block
      Returns:
      True if the block change was not cancelled
    • setBlock

      default boolean setBlock(int x, int y, int z, BlockState block)
      Sets the block at the given position in the world. Additionally, this performs what's considered to be "default" placement by a Player such that neighboring blocks are affected, light is updated, pathfinding awareness is notified, etc. see BlockChangeFlags.DEFAULT_PLACEMENT for more information, and see BlockChangeFlag for details on the modifiers and what they may change.
      Specified by:
      setBlock in interface BlockVolume.Modifiable<P extends PhysicsAwareMutableBlockVolume<P>>
      Parameters:
      x - The X position
      y - The Y position
      z - The Z position
      block - The block
      Returns:
      True if the block change was not cancelled
    • setBlock

      default boolean setBlock(Vector3i position, BlockState blockState, BlockChangeFlag flag)
      Sets the block at the given position in the world.
      Parameters:
      position - The position
      blockState - The block
      flag - 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

      boolean setBlock(int x, int y, int z, BlockState blockState, BlockChangeFlag flag)
      Sets the block at the given position in the world.
      Parameters:
      x - The X position
      y - The Y position
      z - The Z position
      blockState - The block
      flag - 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