Interface VoxelShape


public interface VoxelShape
A shape made out of voxels. For example, used to represent the detailed collision shape of blocks.
  • Method Summary

    Modifier and Type
    Method
    Description
    Converts this shape into a collection of BoundingBox equivalent to the shape: a bounding box intersects with this block shape if it intersects with any of the shape's bounding boxes.
    boolean
    Checks if the given bounding box intersects this block shape.
  • Method Details

    • getBoundingBoxes

      Converts this shape into a collection of BoundingBox equivalent to the shape: a bounding box intersects with this block shape if it intersects with any of the shape's bounding boxes.
      Returns:
      shape converted to bounding boxes
    • overlaps

      boolean overlaps(@NotNull @NotNull BoundingBox other)
      Checks if the given bounding box intersects this block shape.
      Parameters:
      other - bounding box to test
      Returns:
      true if other overlaps this, false otherwise