Class StructureBeta

Represents a loaded structure template (.mcstructure file). Structures can be placed in a world using the /structure command or the StructureManager APIs.

Hierarchy

  • Structure

Constructors

Properties

id: string

Remarks

The name of the structure. The identifier must include a namespace. For structures created via the /structure command or structure blocks, this namespace defaults to "mystructure".

size: Vector3

Remarks

The dimensions of the structure. For example, a single block structure will have a size of {x:1, y:1, z:1}

Throws

This property can throw when used.

InvalidStructureError

Methods

  • Parameters

    • location: Vector3

      The block location relative to the Structure's origin.

    Returns undefined | BlockPermutation

    Returns a BlockPermutation. Returns undefined if a block does not exist at the given location.

    Remarks

    Returns a BlockPermutation representing the block contained within the Structure at the given location.

    Throws

    Throws if the location is outside the structure's bounds. Throws if the Structure has been deleted.

    minecraftcommon.InvalidArgumentError

    InvalidStructureError

  • Parameters

    • location: Vector3

      The block location relative to the Structure's origin.

    Returns boolean

    Returns whether the block at the given location is waterlogged. Returns false if a block does not exist at the given location.

    Remarks

    Returns whether the block at the given location is waterlogged.

    Throws

    Throws if the location is outside the structure's bounds. Throws if the Structure has been deleted.

    minecraftcommon.InvalidArgumentError

    InvalidStructureError

  • Returns boolean

    Returns whether the Structure is valid.

    Remarks

    Returns whether the Structure is valid. The Structure may become invalid if it is deleted.