跳转至

Widget

文档版本:1.21.60.21

Widget类。script_api.minecraft/server-editor-bindings.widget.description

属性

bindPositionToBlockCursor
bindPositionToBlockCursor: boolean;
collisionOffset
collisionOffset: Vector3;
collisionRadius
collisionRadius: float;
location
location: Vector3;
lockPositionToSurface
lockPositionToSurface: boolean;
selectable
read-only selectable: boolean;
selected
selected: boolean;
showBoundingBox
showBoundingBox: boolean;
showCollisionRadius
showCollisionRadius: boolean;
snapToBlockLocation
snapToBlockLocation: boolean;
visible
visible: boolean;

方法

addClipboardComponent

script_api.minecraft/server-editor-bindings.widget.addclipboardcomponent.description

addClipboardComponent(componentName: string, clipboardItem?: ClipboardItem, options?: WidgetComponentClipboardOptions): WidgetComponentClipboard
addEntityComponent

script_api.minecraft/server-editor-bindings.widget.addentitycomponent.description

addEntityComponent(componentName: string, actorNameId: string, options?: WidgetComponentEntityOptions): WidgetComponentEntity
addGizmoComponent

script_api.minecraft/server-editor-bindings.widget.addgizmocomponent.description

addGizmoComponent(componentName: string, options?: WidgetComponentGizmoOptions): WidgetComponentGizmo
addGuideComponent

script_api.minecraft/server-editor-bindings.widget.addguidecomponent.description

addGuideComponent(componentName: string, options?: WidgetComponentGuideOptions): WidgetComponentGuide
addRenderPrimitiveComponent

script_api.minecraft/server-editor-bindings.widget.addrenderprimitivecomponent.description

addRenderPrimitiveComponent(componentName: string, primitiveType: WidgetComponentRenderPrimitiveTypeAxialSphere | WidgetComponentRenderPrimitiveTypeBox | WidgetComponentRenderPrimitiveTypeDisc | WidgetComponentRenderPrimitiveTypeLine, options?: WidgetComponentRenderPrimitiveOptions): WidgetComponentRenderPrimitive
addSplineComponent

script_api.minecraft/server-editor-bindings.widget.addsplinecomponent.description

addSplineComponent(componentName: string, options?: WidgetComponentSplineOptions): WidgetComponentSpline
addTextComponent

script_api.minecraft/server-editor-bindings.widget.addtextcomponent.description

addTextComponent(componentName: string, label: string, options?: WidgetComponentTextOptions): WidgetComponentText
delete

script_api.minecraft/server-editor-bindings.widget.delete.description

delete(): void
deleteComponent

script_api.minecraft/server-editor-bindings.widget.deletecomponent.description

deleteComponent(componentOrName: string | WidgetComponentBase): void
getComponent

script_api.minecraft/server-editor-bindings.widget.getcomponent.description

getComponent(componentName: string): WidgetComponentBase
getComponents

script_api.minecraft/server-editor-bindings.widget.getcomponents.description

getComponents(): WidgetComponentBase[]
setStateChangeEvent

script_api.minecraft/server-editor-bindings.widget.setstatechangeevent.description

setStateChangeEvent(eventFunction?: (arg: WidgetStateChangeEventData) => void): void