Class BlockVolumeUtilsBeta

Block Volume Utils is a utility class that provides a number of useful functions for the creation and utility of @minecraft-server.BlockVolume objects

Hierarchy

  • BlockVolumeUtils

Constructors

Methods

  • Parameters

    • volume: BlockVolume

      The volume to test against

    • pos: Vector3

      The world block location to test

    Returns boolean

    If the location is either inside or more than 0 blocks away, the function will return false. If the location is directly contacting the outer surface of the BlockVolume, the function will return true.

    Remarks

    Check to see if the given location is directly adjacent to the outer surface of a BlockVolume.

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

  • Parameters

    Returns boolean

    If the outer faces of both block volumes touch and are directly adjacent at any point, return true.

    Remarks

    Check to see if a two block volumes are directly adjacent and two faces touch.

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

  • Parameters

    Returns boolean

    Return true if two block volumes are identical

    Remarks

    Test the equality of two block volumes

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

  • Parameters

    Returns BoundingBox

    Remarks

    Return a BoundingBox object which represents the validated min and max coordinates of the volume

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

  • Parameters

    Returns number

    Remarks

    Return the capacity (volume) of the BlockVolume (WDH)

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

  • Parameters

    Returns Vector3

    Remarks

    Get the largest corner position of the volume (guaranteed to be >= min)

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

  • Parameters

    Returns Vector3

    Remarks

    Get the smallest corner position of the volume (guaranteed to be <= max)

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

  • Parameters

    Returns Vector3

    Remarks

    Get a Vector3 object where each component represents the number of blocks along that axis

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

  • Parameters

    Returns boolean

    Remarks

    Check to see if a given world block location is inside a BlockVolume

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

  • Parameters

    Returns BlockVolume

    Returns a new BlockVolume object which represents the new volume

    Remarks

    Move a BlockVolume by a specified amount

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