Interface BlockAccessor

All Known Implementing Classes:
BukkitBlockAccessor

public interface BlockAccessor
A generic interface to get types and states from coordinates.
  • Method Details

    • getWorldName

      @NotNull @NotNull String getWorldName()
      Get the name of the world being accessed by this BlockAccessor.
      Returns:
      the world name
    • getType

      @NotNull @NotNull BlockType getType(int x, int y, int z)
      Get the BlockType at the given coordinates.
      Parameters:
      x - the x coordinate
      y - the y coordinate
      z - the z coordinate
      Returns:
      the type
    • getType

      @NotNull default @NotNull BlockType getType(@NotNull @NotNull BlockPosition position)
      Get the BlockType at the given BlockPosition.
      Parameters:
      position - the position
      Returns:
      the type
    • getState

      @NotNull @NotNull BlockState getState(int x, int y, int z)
      Get the BlockState at the given coordinates.
      Parameters:
      x - the x coordinate
      y - the y coordinate
      z - the z coordinate
      Returns:
      the state
    • getState

      @NotNull default @NotNull BlockState getState(@NotNull @NotNull BlockPosition position)
      Get the BlockState at the given BlockPosition.
      Parameters:
      position - the position
      Returns:
      the state