@minecraft/server
    Preparing search index...

    Class BlockBoundingBoxUtilsBeta

    Bounding Box Utils is a utility class that provides a number of useful functions for the creation and utility of BlockBoundingBox objects

    Index

    Methods

    • Beta

      Parameters

      • min: Vector3

        A corner world location

      • max: Vector3

        A corner world location diametrically opposite

      Returns BlockBoundingBox

      Create a validated instance of a BlockBoundingBox where the min and max components are guaranteed to be (min <= max)

      This function can't be called in read-only mode.

    • Beta

      Parameters

      Returns Vector3

      Note that BlockBoundingBox objects represent whole blocks, so the center of boxes which have odd numbered bounds are not mathematically centered... i.e. a BlockBoundingBox( 0,0,0 -> 3,3,3 ) would have a center of (1,1,1) (not (1.5, 1.5, 1.5) as expected)

      Calculate the center block of a given BlockBoundingBox object.

      This function can't be called in read-only mode.

    • Beta

      Parameters

      Returns Vector3

      Get the Span of each of the BlockBoundingBox Axis components

      This function can't be called in read-only mode.

    • Beta

      Parameters

      Returns boolean

      Check to see if a given coordinate is inside a BlockBoundingBox

      This function can't be called in read-only mode.

    • Beta

      Parameters

      Returns boolean

      Check to see if a BlockBoundingBox is valid (i.e. (min <= max))

      This function can't be called in read-only mode.