Script API - v1.26.10
    Preparing search index...

    A ClipboardItem is a handle to an object which represents a set of blocks in a contained bounding area (most likely copied from the world)

    export class ClipboardItem {
    private constructor();
    readonly id: string;
    readonly isEmpty: boolean;
    readonly normalizedOrigin: minecraftserver.Vector3;
    readonly originalWorldLocation: minecraftserver.Vector3;
    readonly size: minecraftserver.Vector3;
    clear(): void;
    getPredictedWriteVolume(
    location: minecraftserver.Vector3,
    options?: ClipboardWriteOptions,
    ): RelativeVolumeListBlockVolume;
    readFromStructure(structure: EditorStructure): void;
    readFromWorld(source: minecraftserver.BlockVolumeBase | RelativeVolumeListBlockVolume): void;
    writeToWorld(location: minecraftserver.Vector3, options?: ClipboardWriteOptions): boolean;
    }
    Index

    Constructors

    Properties

    id: string
    isEmpty: boolean

    Return whether there is any block content in the item

    This property can't be read in early-execution mode.

    normalizedOrigin: Vector3
    originalWorldLocation: Vector3
    size: Vector3

    Methods

    • Returns void

      Clear the contents of the item

      This function can't be called in restricted-execution mode.

      This function can throw errors.

      This function can't be called in early-execution mode.

    • Parameters

      Returns void

      This function can't be called in restricted-execution mode.

      This function can throw errors.

      This function can't be called in early-execution mode.

    • Parameters

      • location: Vector3

        The root point of the world location to which the ClipboardItem is written (this is modified by the various anchor, offset and rotation parameters of the ClipboardWriteOptions

      • Optionaloptions: ClipboardWriteOptions

        An optional set of write parameters which modify the properties of the ClipboardItem as it is applied to the world

      Returns boolean

      Success or Failure

      Apply the contents of a ClipboardItem to the world at a given location using a set of write options

      This function can't be called in restricted-execution mode.

      This function can throw errors.

      This function can't be called in early-execution mode.