java.lang.Object
cn.nukkit.level.generator.populator.impl.structure.utils.math.StructureBoundingBox

public class StructureBoundingBox extends Object
  • Constructor Details

  • Method Details

    • getMin

      public BlockVector3 getMin()
    • getMax

      public BlockVector3 getMax()
    • getMinChunkX

      public int getMinChunkX()
    • getMinChunkZ

      public int getMinChunkZ()
    • getMaxChunkX

      public int getMaxChunkX()
    • getMaxChunkZ

      public int getMaxChunkZ()
    • isVectorInside

      public boolean isVectorInside(BlockVector3 vec)
      Checks whether the given point is inside a block that intersects this box.
      Parameters:
      vec - the point to check
      Returns:
      true if this box intersects the block containing vec
    • intersectsWith

      public boolean intersectsWith(StructureBoundingBox boundingBox)
      Whether this box intersects the given box.
      Parameters:
      boundingBox - the box to check intersection with
      Returns:
      true if the given box intersects this box; false otherwise
    • intersectsWith

      public boolean intersectsWith(int minX, int minZ, int maxX, int maxZ)
      Whether this box intersects the given vertically-infinite box.
      Parameters:
      minX - the minimum X coordinate
      minZ - the minimum Z coordinate
      maxX - the maximum X coordinate
      maxZ - the maximum Z coordinate
      Returns:
      true if the given box intersects this box; false otherwise
    • expandTo

      public void expandTo(StructureBoundingBox boundingBox)
      Changes this bounding box to the bounding box of the union of itself and another bounding box.
      Parameters:
      boundingBox - the other bounding box to contain
    • offset

      public void offset(BlockVector3 offset)