Readonly
idThe 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".
This property can't be read in early-execution mode.
Readonly
isThis property can't be read in early-execution mode.
Readonly
sizeThe dimensions of the structure. For example, a single block structure will have a size of {x:1, y:1, z:1}
This property can't be read in early-execution mode.
The block location relative to the Structure's origin.
Returns a BlockPermutation. Returns undefined if a block does not exist at the given location.
Returns a BlockPermutation representing the block contained within the Structure at the given location.
Throws if the location is outside the structure's bounds. Throws if the Structure has been deleted.
This function can't be called in early-execution mode.
The block location relative to the Structure's origin.
Returns whether the block at the given location is waterlogged. Returns false if a block does not exist at the given location.
Throws if the location is outside the structure's bounds. Throws if the Structure has been deleted.
This function can't be called in early-execution mode.
The name of the newly created Structure.
Optional
saveMode: StructureSaveModeDetermines how the Structure should be saved. Defaults to saving to the world. Defaults to: 1
Returns the newly created structure.
This function can't be called in read-only mode.
Throws if the identifier is invalid. A valid identifier must include a namespace and must be unique. Throws if the Structure has been deleted.
This function can't be called in early-execution mode.
This function can't be called in read-only mode.
This function can't be called in early-execution mode.
The block location relative to the Structure's origin.
Optional
blockPermutation: BlockPermutationThe BlockPermutation to set. Defaults to: null
Optional
waterlogged: booleanSpecifies whether the block should be waterlogged. Air and undefined blocks cannot be waterlogged. Defaults to: false
This function can't be called in read-only mode.
Throws if the type of block is StructureVoid. Throws if the block is undefined and waterlogged is set to true. Throws if the block is air and waterlogged is set to true. Throws if the location is outside the structure's bounds. Throws if the Structure has been deleted.
This function can't be called in early-execution mode.
Represents a loaded structure template (.mcstructure file). Structures can be placed in a world using the /structure command or the StructureManager APIs.