For AI agents: the complete documentation index is available at /llms.txt, the full documentation bundle is available at /llms-full.txt, and this page is available as Markdown at /server-editor/classes/ClipboardItem.md.

Class: ClipboardItem

Beta

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)

Properties

id

实验性

readonly id: string

Beta


isEmpty

readonly isEmpty: boolean

Beta

Remarks

Return whether there is any block content in the item


normalizedOrigin

实验性

readonly normalizedOrigin: Vector3

Beta


originalWorldLocation

实验性

readonly originalWorldLocation: Vector3

Beta


size

实验性

readonly size: Vector3

Beta

Methods

clear()

clear(): void

World Mutation Beta

Returns

void

Remarks

Clear the contents of the item

Throws

This function can throw errors.


getPredictedWriteVolume()

getPredictedWriteVolume(location, options?): RelativeVolumeListBlockVolume

World Mutation Beta

Parameters

location

Vector3

options?

ClipboardWriteOptions

Returns

RelativeVolumeListBlockVolume

Remarks

Throws

This function can throw errors.


readFromStructure()

readFromStructure(structure): void

World Mutation Beta

Parameters

structure

EditorStructure

Returns

void

Remarks

Throws

This function can throw errors.


readFromWorld()

readFromWorld(source): void

World Mutation Beta

Parameters

source

any

Returns

void

Remarks

Copy the contents of a rectangular volume into the Clipboard Item

Throws

This function can throw errors.


writeToWorld()

writeToWorld(location, options?, transaction?): boolean

World Mutation Beta

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

options?

ClipboardWriteOptions

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

transaction?

PendingTransaction

Returns

boolean

Success or Failure

Remarks

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

Throws

This function can throw errors.