mirror of
https://github.com/XeroAlpha/sapi-typedoc.git
synced 2024-11-22 17:48:50 +00:00
更新至1.21.50.26
This commit is contained in:
parent
10b315f9ef
commit
318e2c2edb
@ -7,6 +7,7 @@
|
||||
*/
|
||||
export class ClipboardItem {
|
||||
private constructor();
|
||||
readonly id: string;
|
||||
/**
|
||||
* @remarks
|
||||
* Return whether there is any block content in the item
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* IMPORT */ import { ClipboardItem, CursorAttachmentProperties, CursorProperties, minecraftserver } from '../index';
|
||||
/* IMPORT */ import { CursorProperties, CursorRay, minecraftserver } from '../index';
|
||||
|
||||
/**
|
||||
* The 3D block cursor is controlled through this read only
|
||||
@ -46,27 +46,6 @@ export class Cursor {
|
||||
* @throws This property can throw when used.
|
||||
*/
|
||||
readonly isVisible: boolean;
|
||||
/**
|
||||
* @remarks
|
||||
* This function can't be called in read-only mode.
|
||||
*
|
||||
* @throws This function can throw errors.
|
||||
*/
|
||||
attachClipboardItem(item: ClipboardItem): void;
|
||||
/**
|
||||
* @remarks
|
||||
* This function can't be called in read-only mode.
|
||||
*
|
||||
* @throws This function can throw errors.
|
||||
*/
|
||||
clearAttachment(): void;
|
||||
/**
|
||||
* @remarks
|
||||
* This function can't be called in read-only mode.
|
||||
*
|
||||
* @throws This function can throw errors.
|
||||
*/
|
||||
getAttachmentProperties(): CursorAttachmentProperties;
|
||||
/**
|
||||
* @remarks
|
||||
* Get the world position of the 3D block cursor
|
||||
@ -86,6 +65,15 @@ export class Cursor {
|
||||
* @throws This function can throw errors.
|
||||
*/
|
||||
getProperties(): CursorProperties;
|
||||
/**
|
||||
* @remarks
|
||||
* This function can't be called in read-only mode.
|
||||
*
|
||||
* @throws This function can throw errors.
|
||||
*
|
||||
* {@link Error}
|
||||
*/
|
||||
getRay(): CursorRay;
|
||||
/**
|
||||
* @remarks
|
||||
* Hide the 3D block cursor from view until the corresponding
|
||||
@ -121,13 +109,6 @@ export class Cursor {
|
||||
* @throws This function can throw errors.
|
||||
*/
|
||||
resetToDefaultState(): void;
|
||||
/**
|
||||
* @remarks
|
||||
* This function can't be called in read-only mode.
|
||||
*
|
||||
* @throws This function can throw errors.
|
||||
*/
|
||||
setAttachmentProperties(properties: CursorAttachmentProperties): void;
|
||||
/**
|
||||
* @remarks
|
||||
* Set the 3D block cursor properties to a given state
|
||||
|
@ -1,6 +0,0 @@
|
||||
/* IMPORT */ import { CursorAttachmentProperties } from '../index';
|
||||
|
||||
export class CursorAttachmentPropertiesChangeAfterEvent {
|
||||
private constructor();
|
||||
readonly properties: CursorAttachmentProperties;
|
||||
}
|
@ -1,23 +0,0 @@
|
||||
/* IMPORT */ import { CursorAttachmentPropertiesChangeAfterEvent } from '../index';
|
||||
|
||||
export class CursorAttachmentPropertyChangeAfterEventSignal {
|
||||
private constructor();
|
||||
/**
|
||||
* @remarks
|
||||
* This function can't be called in read-only mode.
|
||||
*
|
||||
* This function can be called in early-execution mode.
|
||||
*
|
||||
*/
|
||||
subscribe(
|
||||
callback: (arg: CursorAttachmentPropertiesChangeAfterEvent) => void,
|
||||
): (arg: CursorAttachmentPropertiesChangeAfterEvent) => void;
|
||||
/**
|
||||
* @remarks
|
||||
* This function can't be called in read-only mode.
|
||||
*
|
||||
* This function can be called in early-execution mode.
|
||||
*
|
||||
*/
|
||||
unsubscribe(callback: (arg: CursorAttachmentPropertiesChangeAfterEvent) => void): void;
|
||||
}
|
@ -1,4 +1,4 @@
|
||||
/* IMPORT */ import { ClipboardChangeAfterEventSignal, CurrentThemeChangeAfterEventSignal, CurrentThemeColorChangeAfterEventSignal, CursorAttachmentPropertyChangeAfterEventSignal, CursorPropertyChangeAfterEventSignal, ModeChangeAfterEventSignal, PrimarySelectionChangeAfterEventSignal } from '../index';
|
||||
/* IMPORT */ import { ClipboardChangeAfterEventSignal, CurrentThemeChangeAfterEventSignal, CurrentThemeColorChangeAfterEventSignal, CursorPropertyChangeAfterEventSignal, ModeChangeAfterEventSignal, PrimarySelectionChangeAfterEventSignal } from '../index';
|
||||
|
||||
/**
|
||||
* Contains a set of events that are available across the scope
|
||||
@ -9,7 +9,6 @@ export class ExtensionContextAfterEvents {
|
||||
readonly clipboardChange: ClipboardChangeAfterEventSignal;
|
||||
readonly currentThemeChange: CurrentThemeChangeAfterEventSignal;
|
||||
readonly currentThemeColorChange: CurrentThemeColorChangeAfterEventSignal;
|
||||
readonly cursorAttachmentPropertyChange: CursorAttachmentPropertyChangeAfterEventSignal;
|
||||
readonly cursorPropertyChange: CursorPropertyChangeAfterEventSignal;
|
||||
/**
|
||||
* @remarks
|
||||
|
@ -1,7 +1,13 @@
|
||||
/* IMPORT */ import { InvalidWidgetComponentError, InvalidWidgetError, InvalidWidgetGroupError, WidgetComponentBase, WidgetComponentEntity, WidgetComponentEntityOptions, WidgetComponentGizmo, WidgetComponentGizmoOptions, WidgetComponentGuide, WidgetComponentGuideOptions, WidgetComponentRenderPrimitive, WidgetComponentRenderPrimitiveAxialSphere, WidgetComponentRenderPrimitiveBox, WidgetComponentRenderPrimitiveDisc, WidgetComponentRenderPrimitiveLine, WidgetComponentRenderPrimitiveOptions, WidgetComponentSpline, WidgetComponentSplineOptions, WidgetComponentText, WidgetComponentTextOptions, WidgetStateChangeEventData, minecraftserver } from '../index';
|
||||
/* IMPORT */ import { ClipboardItem, InvalidWidgetComponentError, InvalidWidgetError, InvalidWidgetGroupError, WidgetComponentBase, WidgetComponentClipboard, WidgetComponentClipboardOptions, WidgetComponentEntity, WidgetComponentEntityOptions, WidgetComponentGizmo, WidgetComponentGizmoOptions, WidgetComponentGuide, WidgetComponentGuideOptions, WidgetComponentRenderPrimitive, WidgetComponentRenderPrimitiveOptions, WidgetComponentRenderPrimitiveTypeAxialSphere, WidgetComponentRenderPrimitiveTypeBox, WidgetComponentRenderPrimitiveTypeDisc, WidgetComponentRenderPrimitiveTypeLine, WidgetComponentSpline, WidgetComponentSplineOptions, WidgetComponentText, WidgetComponentTextOptions, WidgetStateChangeEventData, minecraftserver } from '../index';
|
||||
|
||||
export class Widget {
|
||||
private constructor();
|
||||
/**
|
||||
* @remarks
|
||||
* This property can't be edited in read-only mode.
|
||||
*
|
||||
*/
|
||||
bindPositionToBlockCursor: boolean;
|
||||
/**
|
||||
* @remarks
|
||||
* This property can't be edited in read-only mode.
|
||||
@ -20,6 +26,12 @@ export class Widget {
|
||||
*
|
||||
*/
|
||||
location: minecraftserver.Vector3;
|
||||
/**
|
||||
* @remarks
|
||||
* This property can't be edited in read-only mode.
|
||||
*
|
||||
*/
|
||||
lockPositionToSurface: boolean;
|
||||
/**
|
||||
* @throws This property can throw when used.
|
||||
*
|
||||
@ -36,6 +48,21 @@ export class Widget {
|
||||
*/
|
||||
snapToBlockLocation: boolean;
|
||||
visible: boolean;
|
||||
/**
|
||||
* @remarks
|
||||
* This function can't be called in read-only mode.
|
||||
*
|
||||
* @throws This function can throw errors.
|
||||
*
|
||||
* {@link Error}
|
||||
*
|
||||
* {@link InvalidWidgetError}
|
||||
*/
|
||||
addClipboardComponent(
|
||||
componentName: string,
|
||||
clipboardItem?: ClipboardItem,
|
||||
options?: WidgetComponentClipboardOptions,
|
||||
): WidgetComponentClipboard;
|
||||
/**
|
||||
* @remarks
|
||||
* This function can't be called in read-only mode.
|
||||
@ -86,10 +113,10 @@ export class Widget {
|
||||
addRenderPrimitiveComponent(
|
||||
componentName: string,
|
||||
primitiveType:
|
||||
| WidgetComponentRenderPrimitiveAxialSphere
|
||||
| WidgetComponentRenderPrimitiveBox
|
||||
| WidgetComponentRenderPrimitiveDisc
|
||||
| WidgetComponentRenderPrimitiveLine,
|
||||
| WidgetComponentRenderPrimitiveTypeAxialSphere
|
||||
| WidgetComponentRenderPrimitiveTypeBox
|
||||
| WidgetComponentRenderPrimitiveTypeDisc
|
||||
| WidgetComponentRenderPrimitiveTypeLine,
|
||||
options?: WidgetComponentRenderPrimitiveOptions,
|
||||
): WidgetComponentRenderPrimitive;
|
||||
/**
|
||||
@ -167,8 +194,6 @@ export class Widget {
|
||||
* @throws This function can throw errors.
|
||||
*
|
||||
* {@link InvalidWidgetError}
|
||||
*
|
||||
* {@link InvalidWidgetError}
|
||||
*/
|
||||
setStateChangeEvent(eventFunction?: (arg: WidgetStateChangeEventData) => void): void;
|
||||
}
|
@ -1,4 +1,4 @@
|
||||
/* IMPORT */ import { InvalidWidgetComponentError, Widget, WidgetComponentType, minecraftserver } from '../index';
|
||||
/* IMPORT */ import { InvalidWidgetComponentError, Widget, WidgetComponentStateChangeEventData, WidgetComponentType, minecraftserver } from '../index';
|
||||
|
||||
export class WidgetComponentBase {
|
||||
private constructor();
|
||||
@ -14,6 +14,12 @@ export class WidgetComponentBase {
|
||||
* {@link minecraftserver.InvalidWidgetComponentError}
|
||||
*/
|
||||
readonly location: minecraftserver.Vector3;
|
||||
/**
|
||||
* @remarks
|
||||
* This property can't be edited in read-only mode.
|
||||
*
|
||||
*/
|
||||
lockToSurface: boolean;
|
||||
/**
|
||||
* @throws This property can throw when used.
|
||||
*
|
||||
@ -43,4 +49,13 @@ export class WidgetComponentBase {
|
||||
* {@link InvalidWidgetComponentError}
|
||||
*/
|
||||
delete(): void;
|
||||
/**
|
||||
* @remarks
|
||||
* This function can't be called in read-only mode.
|
||||
*
|
||||
* @throws This function can throw errors.
|
||||
*
|
||||
* {@link InvalidWidgetComponentError}
|
||||
*/
|
||||
setStateChangeEvent(eventFunction?: (arg: WidgetComponentStateChangeEventData) => void): void;
|
||||
}
|
12
translate-pieces/server-editor/classes/WidgetComponentClipboard.d.ts
vendored
Normal file
12
translate-pieces/server-editor/classes/WidgetComponentClipboard.d.ts
vendored
Normal file
@ -0,0 +1,12 @@
|
||||
/* IMPORT */ import { WidgetComponentBase, minecraftserver } from '../index';
|
||||
|
||||
export class WidgetComponentClipboard extends WidgetComponentBase {
|
||||
private constructor();
|
||||
clipboardMirror: minecraftserver.StructureMirrorAxis;
|
||||
clipboardNormalizedOrigin: minecraftserver.Vector3;
|
||||
clipboardOffset: minecraftserver.Vector3;
|
||||
clipboardRotation: minecraftserver.StructureRotation;
|
||||
fillColor: minecraftserver.RGBA;
|
||||
outlineColor: minecraftserver.RGBA;
|
||||
showBounds: boolean;
|
||||
}
|
@ -2,4 +2,5 @@
|
||||
|
||||
export class WidgetComponentGizmo extends WidgetComponentBase {
|
||||
private constructor();
|
||||
activated: boolean;
|
||||
}
|
@ -1,7 +1,15 @@
|
||||
/* IMPORT */ import { InvalidWidgetComponentError, InvalidWidgetError, WidgetComponentBase, WidgetComponentRenderPrimitiveAxialSphere, WidgetComponentRenderPrimitiveBox, WidgetComponentRenderPrimitiveDisc, WidgetComponentRenderPrimitiveLine } from '../index';
|
||||
/* IMPORT */ import { InvalidWidgetComponentError, InvalidWidgetError, PrimitiveType, WidgetComponentBase, WidgetComponentRenderPrimitiveTypeAxialSphere, WidgetComponentRenderPrimitiveTypeBox, WidgetComponentRenderPrimitiveTypeDisc, WidgetComponentRenderPrimitiveTypeLine } from '../index';
|
||||
|
||||
export class WidgetComponentRenderPrimitive extends WidgetComponentBase {
|
||||
private constructor();
|
||||
/**
|
||||
* @throws This property can throw when used.
|
||||
*
|
||||
* {@link InvalidWidgetComponentError}
|
||||
*
|
||||
* {@link InvalidWidgetError}
|
||||
*/
|
||||
readonly primitiveType: PrimitiveType;
|
||||
/**
|
||||
* @remarks
|
||||
* This function can't be called in read-only mode.
|
||||
@ -14,9 +22,9 @@ export class WidgetComponentRenderPrimitive extends WidgetComponentBase {
|
||||
*/
|
||||
setPrimitive(
|
||||
primitive:
|
||||
| WidgetComponentRenderPrimitiveAxialSphere
|
||||
| WidgetComponentRenderPrimitiveBox
|
||||
| WidgetComponentRenderPrimitiveDisc
|
||||
| WidgetComponentRenderPrimitiveLine,
|
||||
| WidgetComponentRenderPrimitiveTypeAxialSphere
|
||||
| WidgetComponentRenderPrimitiveTypeBox
|
||||
| WidgetComponentRenderPrimitiveTypeDisc
|
||||
| WidgetComponentRenderPrimitiveTypeLine,
|
||||
): void;
|
||||
}
|
@ -1,6 +1,6 @@
|
||||
/* IMPORT */ import { minecraftserver } from '../index';
|
||||
/* IMPORT */ import { WidgetComponentRenderPrimitiveTypeBase, minecraftserver } from '../index';
|
||||
|
||||
export class WidgetComponentRenderPrimitiveAxialSphere {
|
||||
export class WidgetComponentRenderPrimitiveTypeAxialSphere extends WidgetComponentRenderPrimitiveTypeBase {
|
||||
/**
|
||||
* @remarks
|
||||
* This property can't be edited in read-only mode.
|
6
translate-pieces/server-editor/classes/WidgetComponentRenderPrimitiveTypeBase.d.ts
vendored
Normal file
6
translate-pieces/server-editor/classes/WidgetComponentRenderPrimitiveTypeBase.d.ts
vendored
Normal file
@ -0,0 +1,6 @@
|
||||
/* IMPORT */ import { PrimitiveType } from '../index';
|
||||
|
||||
export class WidgetComponentRenderPrimitiveTypeBase {
|
||||
private constructor();
|
||||
readonly primitiveType: PrimitiveType;
|
||||
}
|
@ -1,6 +1,6 @@
|
||||
/* IMPORT */ import { minecraftserver } from '../index';
|
||||
/* IMPORT */ import { WidgetComponentRenderPrimitiveTypeBase, minecraftserver } from '../index';
|
||||
|
||||
export class WidgetComponentRenderPrimitiveBox {
|
||||
export class WidgetComponentRenderPrimitiveTypeBox extends WidgetComponentRenderPrimitiveTypeBase {
|
||||
/**
|
||||
* @remarks
|
||||
* This property can't be edited in read-only mode.
|
@ -1,6 +1,6 @@
|
||||
/* IMPORT */ import { minecraftserver } from '../index';
|
||||
/* IMPORT */ import { WidgetComponentRenderPrimitiveTypeBase, minecraftserver } from '../index';
|
||||
|
||||
export class WidgetComponentRenderPrimitiveDisc {
|
||||
export class WidgetComponentRenderPrimitiveTypeDisc extends WidgetComponentRenderPrimitiveTypeBase {
|
||||
/**
|
||||
* @remarks
|
||||
* This property can't be edited in read-only mode.
|
@ -1,6 +1,6 @@
|
||||
/* IMPORT */ import { minecraftserver } from '../index';
|
||||
/* IMPORT */ import { WidgetComponentRenderPrimitiveTypeBase, minecraftserver } from '../index';
|
||||
|
||||
export class WidgetComponentRenderPrimitiveLine {
|
||||
export class WidgetComponentRenderPrimitiveTypeLine extends WidgetComponentRenderPrimitiveTypeBase {
|
||||
/**
|
||||
* @remarks
|
||||
* This property can't be edited in read-only mode.
|
9
translate-pieces/server-editor/classes/WidgetComponentStateChangeEventData.d.ts
vendored
Normal file
9
translate-pieces/server-editor/classes/WidgetComponentStateChangeEventData.d.ts
vendored
Normal file
@ -0,0 +1,9 @@
|
||||
/* IMPORT */ import { Widget, WidgetComponentBase, WidgetGroup } from '../index';
|
||||
|
||||
export class WidgetComponentStateChangeEventData {
|
||||
private constructor();
|
||||
readonly component: WidgetComponentBase;
|
||||
readonly gizmoActivated?: boolean;
|
||||
readonly group: WidgetGroup;
|
||||
readonly widget: Widget;
|
||||
}
|
@ -1,5 +1,5 @@
|
||||
export enum Plane {
|
||||
XY = 'XY',
|
||||
XZ = 'XZ',
|
||||
YZ = 'YZ',
|
||||
XY = 0,
|
||||
XZ = 1,
|
||||
YZ = 2,
|
||||
}
|
@ -1,7 +1,7 @@
|
||||
export enum PrimitiveType {
|
||||
AxialSphere = 'AxialSphere',
|
||||
Box = 'Box',
|
||||
Disc = 'Disc',
|
||||
Line = 'Line',
|
||||
Text = 'Text',
|
||||
Text = 0,
|
||||
Box = 1,
|
||||
Line = 2,
|
||||
Disc = 4,
|
||||
AxialSphere = 5,
|
||||
}
|
@ -1,4 +1,4 @@
|
||||
export enum SplineType {
|
||||
Hermite = 'Hermite',
|
||||
Line = 'Line',
|
||||
Line = 0,
|
||||
Hermite = 1,
|
||||
}
|
@ -1,4 +1,5 @@
|
||||
export enum WidgetComponentType {
|
||||
Clipboard = 'Clipboard',
|
||||
Entity = 'Entity',
|
||||
Gizmo = 'Gizmo',
|
||||
Guide = 'Guide',
|
||||
|
16
translate-pieces/server-editor/index.d.ts
vendored
16
translate-pieces/server-editor/index.d.ts
vendored
@ -90,8 +90,6 @@ export { CurrentThemeChangeAfterEventSignal } from './classes/CurrentThemeChange
|
||||
export { CurrentThemeColorChangeAfterEvent } from './classes/CurrentThemeColorChangeAfterEvent';
|
||||
export { CurrentThemeColorChangeAfterEventSignal } from './classes/CurrentThemeColorChangeAfterEventSignal';
|
||||
export { Cursor } from './classes/Cursor';
|
||||
export { CursorAttachmentPropertiesChangeAfterEvent } from './classes/CursorAttachmentPropertiesChangeAfterEvent';
|
||||
export { CursorAttachmentPropertyChangeAfterEventSignal } from './classes/CursorAttachmentPropertyChangeAfterEventSignal';
|
||||
export { CursorPropertiesChangeAfterEvent } from './classes/CursorPropertiesChangeAfterEvent';
|
||||
export { CursorPropertyChangeAfterEventSignal } from './classes/CursorPropertyChangeAfterEventSignal';
|
||||
export { EditorStructureManager } from './classes/EditorStructureManager';
|
||||
@ -127,15 +125,18 @@ export { UserDefinedTransactionHandlerId } from './classes/UserDefinedTransactio
|
||||
export { Vector3LimitObservableValidator } from './classes/Vector3LimitObservableValidator';
|
||||
export { Widget } from './classes/Widget';
|
||||
export { WidgetComponentBase } from './classes/WidgetComponentBase';
|
||||
export { WidgetComponentClipboard } from './classes/WidgetComponentClipboard';
|
||||
export { WidgetComponentEntity } from './classes/WidgetComponentEntity';
|
||||
export { WidgetComponentGizmo } from './classes/WidgetComponentGizmo';
|
||||
export { WidgetComponentGuide } from './classes/WidgetComponentGuide';
|
||||
export { WidgetComponentRenderPrimitive } from './classes/WidgetComponentRenderPrimitive';
|
||||
export { WidgetComponentRenderPrimitiveAxialSphere } from './classes/WidgetComponentRenderPrimitiveAxialSphere';
|
||||
export { WidgetComponentRenderPrimitiveBox } from './classes/WidgetComponentRenderPrimitiveBox';
|
||||
export { WidgetComponentRenderPrimitiveDisc } from './classes/WidgetComponentRenderPrimitiveDisc';
|
||||
export { WidgetComponentRenderPrimitiveLine } from './classes/WidgetComponentRenderPrimitiveLine';
|
||||
export { WidgetComponentRenderPrimitiveTypeAxialSphere } from './classes/WidgetComponentRenderPrimitiveTypeAxialSphere';
|
||||
export { WidgetComponentRenderPrimitiveTypeBase } from './classes/WidgetComponentRenderPrimitiveTypeBase';
|
||||
export { WidgetComponentRenderPrimitiveTypeBox } from './classes/WidgetComponentRenderPrimitiveTypeBox';
|
||||
export { WidgetComponentRenderPrimitiveTypeDisc } from './classes/WidgetComponentRenderPrimitiveTypeDisc';
|
||||
export { WidgetComponentRenderPrimitiveTypeLine } from './classes/WidgetComponentRenderPrimitiveTypeLine';
|
||||
export { WidgetComponentSpline } from './classes/WidgetComponentSpline';
|
||||
export { WidgetComponentStateChangeEventData } from './classes/WidgetComponentStateChangeEventData';
|
||||
export { WidgetComponentText } from './classes/WidgetComponentText';
|
||||
export { WidgetGroup } from './classes/WidgetGroup';
|
||||
export { WidgetManager } from './classes/WidgetManager';
|
||||
@ -144,8 +145,8 @@ export { WidgetStateChangeEventData } from './classes/WidgetStateChangeEventData
|
||||
export { BlockMaskList } from './interfaces/BlockMaskList';
|
||||
export { BrushShape } from './interfaces/BrushShape';
|
||||
export { ClipboardWriteOptions } from './interfaces/ClipboardWriteOptions';
|
||||
export { CursorAttachmentProperties } from './interfaces/CursorAttachmentProperties';
|
||||
export { CursorProperties } from './interfaces/CursorProperties';
|
||||
export { CursorRay } from './interfaces/CursorRay';
|
||||
export { EditorStructure } from './interfaces/EditorStructure';
|
||||
export { EditorStructureSearchOptions } from './interfaces/EditorStructureSearchOptions';
|
||||
export { ExtensionOptionalParameters } from './interfaces/ExtensionOptionalParameters';
|
||||
@ -155,6 +156,7 @@ export { ProjectExportOptions } from './interfaces/ProjectExportOptions';
|
||||
export { SettingsUIElementOptions } from './interfaces/SettingsUIElementOptions';
|
||||
export { WeightedBlock } from './interfaces/WeightedBlock';
|
||||
export { WidgetComponentBaseOptions } from './interfaces/WidgetComponentBaseOptions';
|
||||
export { WidgetComponentClipboardOptions } from './interfaces/WidgetComponentClipboardOptions';
|
||||
export { WidgetComponentEntityOptions } from './interfaces/WidgetComponentEntityOptions';
|
||||
export { WidgetComponentGizmoOptions } from './interfaces/WidgetComponentGizmoOptions';
|
||||
export { WidgetComponentGuideOptions } from './interfaces/WidgetComponentGuideOptions';
|
||||
|
@ -5,21 +5,6 @@
|
||||
* is being written to the world
|
||||
*/
|
||||
export interface ClipboardWriteOptions {
|
||||
/**
|
||||
* @remarks
|
||||
* The anchor is a unit vector representation of the side or
|
||||
* corner of the Clipboard Item to be written to the world.
|
||||
* `{0, 0, 0}` represents the center of the Clipboard item,
|
||||
* `{0, 1, 0}` represents the top, `{-1, -1, -1}` represents
|
||||
* the bottom/back/left corner, etc
|
||||
* The anchor is used in conjunction with the item size to
|
||||
* determine the object relative anchor point where the object
|
||||
* will be applied in the world.
|
||||
* Values for the X/Y/Z components should be within the range
|
||||
* `(-1 <= X/Y/Z <=1)`
|
||||
*
|
||||
*/
|
||||
anchor?: minecraftserver.Vector3;
|
||||
/**
|
||||
* @remarks
|
||||
* An enum which represents the axis (or combination of axis')
|
||||
@ -30,6 +15,7 @@ export interface ClipboardWriteOptions {
|
||||
*
|
||||
*/
|
||||
mirror?: minecraftserver.StructureMirrorAxis;
|
||||
normalizedOrigin?: minecraftserver.Vector3;
|
||||
/**
|
||||
* @remarks
|
||||
* A position offset which should be applied to the paste
|
||||
|
@ -1,13 +0,0 @@
|
||||
/* IMPORT */ import { minecraftserver } from '../index';
|
||||
|
||||
export interface CursorAttachmentProperties {
|
||||
boundsFillColor?: minecraftserver.RGBA;
|
||||
boundsVisible?: boolean;
|
||||
boundsWireframeColor?: minecraftserver.RGBA;
|
||||
contentsFillColor?: minecraftserver.RGBA;
|
||||
contentsWireframeColor?: minecraftserver.RGBA;
|
||||
mirror?: minecraftserver.StructureMirrorAxis;
|
||||
offset?: minecraftserver.Vector3;
|
||||
origin?: minecraftserver.Vector3;
|
||||
rotation?: minecraftserver.StructureRotation;
|
||||
}
|
7
translate-pieces/server-editor/interfaces/CursorRay.d.ts
vendored
Normal file
7
translate-pieces/server-editor/interfaces/CursorRay.d.ts
vendored
Normal file
@ -0,0 +1,7 @@
|
||||
/* IMPORT */ import { minecraftserver } from '../index';
|
||||
|
||||
export interface CursorRay {
|
||||
end: minecraftserver.Vector3;
|
||||
hit: boolean;
|
||||
start: minecraftserver.Vector3;
|
||||
}
|
@ -1,9 +1,9 @@
|
||||
/* IMPORT */ import { EventSink, IPropertyPane, KeyBinding, KeyBindingInfo, ModalToolLifecycleEventPayload, SupportedKeyboardActionTypes, SupportedMouseActionTypes } from '../index';
|
||||
/* IMPORT */ import { EventSink, IRootPropertyPane, KeyBinding, KeyBindingInfo, ModalToolLifecycleEventPayload, SupportedKeyboardActionTypes, SupportedMouseActionTypes } from '../index';
|
||||
|
||||
export interface IModalTool {
|
||||
/**
|
||||
* @remarks
|
||||
* Unique ID for the tool
|
||||
* Unique identifier for the tool
|
||||
*
|
||||
*/
|
||||
readonly id: string;
|
||||
@ -13,13 +13,10 @@ export interface IModalTool {
|
||||
*
|
||||
*/
|
||||
onModalToolActivation: EventSink<ModalToolLifecycleEventPayload>;
|
||||
bindPropertyPane(pane: IPropertyPane): void;
|
||||
dispose(): void;
|
||||
hide(): void;
|
||||
bindPropertyPane(pane: IRootPropertyPane): void;
|
||||
registerKeyBinding(action: SupportedKeyboardActionTypes, binding: KeyBinding, info?: KeyBindingInfo): void;
|
||||
registerMouseButtonBinding(action: SupportedMouseActionTypes): void;
|
||||
registerMouseDragBinding(action: SupportedMouseActionTypes): void;
|
||||
registerMouseWheelBinding(action: SupportedMouseActionTypes): void;
|
||||
show(): void;
|
||||
unregisterInputBindings(): void;
|
||||
}
|
@ -1,4 +1,4 @@
|
||||
/* IMPORT */ import { IModalTool, ModalToolCreationParameters, NoArgsAction, RegisteredAction } from '../index';
|
||||
/* IMPORT */ import { IModalTool, ModalToolCreationParameters } from '../index';
|
||||
|
||||
export interface IModalToolContainer {
|
||||
/**
|
||||
@ -7,7 +7,7 @@ export interface IModalToolContainer {
|
||||
*
|
||||
*/
|
||||
readonly currentTools: IModalTool[];
|
||||
addTool(params: ModalToolCreationParameters, action?: RegisteredAction<NoArgsAction>): IModalTool;
|
||||
addTool(id: string, params: ModalToolCreationParameters): IModalTool;
|
||||
focusToolInputContext(): void;
|
||||
getSelectedToolId(): string | undefined;
|
||||
removeTool(id: string): void;
|
||||
|
@ -15,6 +15,12 @@
|
||||
* the editor evolves.
|
||||
*/
|
||||
export interface ISimpleTool {
|
||||
/**
|
||||
* @remarks
|
||||
* Get the tool unique id
|
||||
*
|
||||
*/
|
||||
get id(): string;
|
||||
/**
|
||||
* @remarks
|
||||
* Get a reference to the menu component that was automatically
|
||||
|
@ -18,6 +18,12 @@ export interface ISimpleToolOptions {
|
||||
*
|
||||
*/
|
||||
activationKeyBinding?: ISimpleToolKeyBinding;
|
||||
/**
|
||||
* @remarks
|
||||
* The unique identifier of the tool.
|
||||
*
|
||||
*/
|
||||
id: string;
|
||||
/**
|
||||
* @remarks
|
||||
* The name of the tool. This will be used to identify the tool
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* IMPORT */ import { ISimpleToolPaneComponent } from '../index';
|
||||
/* IMPORT */ import { ISimpleToolPaneComponent, TooltipInteractiveContent } from '../index';
|
||||
|
||||
/**
|
||||
* A set of options which define the basic properties of a
|
||||
@ -53,6 +53,12 @@ export interface ISimpleToolPaneOptions {
|
||||
*
|
||||
*/
|
||||
id: string;
|
||||
/**
|
||||
* @remarks
|
||||
* Information tooltip displayed on the root pane header.
|
||||
*
|
||||
*/
|
||||
infoTooltip?: TooltipInteractiveContent;
|
||||
onBeginFinalize?: (pane: ISimpleToolPaneComponent) => void;
|
||||
onEndFinalize?: (pane: ISimpleToolPaneComponent) => void;
|
||||
onHide?: (pane: ISimpleToolPaneComponent) => void;
|
||||
|
@ -1,34 +1,30 @@
|
||||
/* IMPORT */ import { NoArgsAction, RegisteredAction } from '../index';
|
||||
|
||||
/**
|
||||
* Parameters for creating a modal tool in the tool container
|
||||
*/
|
||||
export interface ModalToolCreationParameters {
|
||||
/**
|
||||
* @remarks
|
||||
* Icon, if any (from resource pack on client)
|
||||
* Action associated with tool activation
|
||||
*
|
||||
*/
|
||||
action?: RegisteredAction<NoArgsAction>;
|
||||
/**
|
||||
* @remarks
|
||||
* Icon resource
|
||||
*
|
||||
*/
|
||||
icon?: string;
|
||||
/**
|
||||
* @remarks
|
||||
* Modal input context identifier
|
||||
* Localized title of the tool
|
||||
*
|
||||
*/
|
||||
inputContextId?: string;
|
||||
title?: string;
|
||||
/**
|
||||
* @remarks
|
||||
* Localized text label for modal input context
|
||||
*
|
||||
*/
|
||||
inputContextLabel?: string;
|
||||
/**
|
||||
* @remarks
|
||||
* Title of the tool
|
||||
*
|
||||
*/
|
||||
title: string;
|
||||
/**
|
||||
* @remarks
|
||||
* Tooltip description of the toll
|
||||
* Tooltip description of the tool
|
||||
*
|
||||
*/
|
||||
tooltip?: string;
|
||||
|
@ -1,6 +1,8 @@
|
||||
/* IMPORT */ import { minecraftserver } from '../index';
|
||||
/* IMPORT */ import { WidgetComponentStateChangeEventData, minecraftserver } from '../index';
|
||||
|
||||
export interface WidgetComponentBaseOptions {
|
||||
lockToSurface?: boolean;
|
||||
offset?: minecraftserver.Vector3;
|
||||
stateChangeEvent?: (arg: WidgetComponentStateChangeEventData) => void;
|
||||
visible?: boolean;
|
||||
}
|
11
translate-pieces/server-editor/interfaces/WidgetComponentClipboardOptions.d.ts
vendored
Normal file
11
translate-pieces/server-editor/interfaces/WidgetComponentClipboardOptions.d.ts
vendored
Normal file
@ -0,0 +1,11 @@
|
||||
/* IMPORT */ import { WidgetComponentBaseOptions, minecraftserver } from '../index';
|
||||
|
||||
export interface WidgetComponentClipboardOptions extends WidgetComponentBaseOptions {
|
||||
boundsFillColor?: minecraftserver.RGBA;
|
||||
boundsOutlineColor?: minecraftserver.RGBA;
|
||||
clipboardMirror?: minecraftserver.StructureMirrorAxis;
|
||||
clipboardNormalizedOrigin?: minecraftserver.Vector3;
|
||||
clipboardOffset?: minecraftserver.Vector3;
|
||||
clipboardRotation?: minecraftserver.StructureRotation;
|
||||
showBounds?: boolean;
|
||||
}
|
@ -1,8 +1,10 @@
|
||||
/* IMPORT */ import { WidgetStateChangeEventData, minecraftserver } from '../index';
|
||||
|
||||
export interface WidgetCreateOptions {
|
||||
bindPositionToBlockCursor?: boolean;
|
||||
collisionOffset?: minecraftserver.Vector3;
|
||||
collisionRadius?: number;
|
||||
lockToSurface?: boolean;
|
||||
selectable?: boolean;
|
||||
snapToBlockLocation?: boolean;
|
||||
stateChangeEvent?: (arg: WidgetStateChangeEventData) => void;
|
||||
|
@ -1,7 +1,7 @@
|
||||
/* IMPORT */ import { PlatformType, SystemInfo } from '../index';
|
||||
|
||||
/**
|
||||
* @beta
|
||||
* @rc
|
||||
* Contains the device information for a client instance.
|
||||
*/
|
||||
// @ts-ignore Class inheritance allowed for native defined classes
|
||||
|
26
translate-pieces/server/classes/ItemCompostableComponent.d.ts
vendored
Normal file
26
translate-pieces/server/classes/ItemCompostableComponent.d.ts
vendored
Normal file
@ -0,0 +1,26 @@
|
||||
/* IMPORT */ import { ItemComponent } from '../index';
|
||||
|
||||
/**
|
||||
* @beta
|
||||
* When present, the item can be composted in the composter
|
||||
* block if the composting chance is in the range [1 - 100].
|
||||
*/
|
||||
// @ts-ignore Class inheritance allowed for native defined classes
|
||||
export class ItemCompostableComponent extends ItemComponent {
|
||||
private constructor();
|
||||
/**
|
||||
* @remarks
|
||||
* This is the percent chance of the item composting in the
|
||||
* composter block and generating a compost layer. Note this
|
||||
* api will not return the percent chance for some vanilla
|
||||
* items. To get the compostable chance for all items, use the
|
||||
* compostingChance property on the ItemStack.
|
||||
*
|
||||
* @throws
|
||||
* Throws if value outside the range [1 - 100]
|
||||
*
|
||||
* {@link Error}
|
||||
*/
|
||||
readonly compostingChance: number;
|
||||
static readonly componentId = 'minecraft:compostable';
|
||||
}
|
12
translate-pieces/server/classes/ItemStack.d.ts
vendored
12
translate-pieces/server/classes/ItemStack.d.ts
vendored
@ -19,6 +19,18 @@ export class ItemStack {
|
||||
* Throws if the value is outside the range of 1-255.
|
||||
*/
|
||||
amount: number;
|
||||
/**
|
||||
* @beta
|
||||
* @remarks
|
||||
* This is the percent chance of the item composting in the
|
||||
* composter block and generating a compost layer.
|
||||
*
|
||||
* @throws
|
||||
* Throws if value outside the range [1 - 100]
|
||||
*
|
||||
* {@link Error}
|
||||
*/
|
||||
readonly compostingChance: number;
|
||||
/**
|
||||
* @remarks
|
||||
* Returns whether the item is stackable. An item is considered
|
||||
|
2
translate-pieces/server/classes/Player.d.ts
vendored
2
translate-pieces/server/classes/Player.d.ts
vendored
@ -14,7 +14,7 @@ export class Player extends Entity {
|
||||
*/
|
||||
readonly camera: Camera;
|
||||
/**
|
||||
* @beta
|
||||
* @rc
|
||||
* @remarks
|
||||
* Contains the player's device information.
|
||||
*
|
||||
|
5
translate-pieces/server/classes/System.d.ts
vendored
5
translate-pieces/server/classes/System.d.ts
vendored
@ -27,13 +27,10 @@ export class System {
|
||||
*/
|
||||
readonly currentTick: number;
|
||||
/**
|
||||
* @beta
|
||||
* @rc
|
||||
* @remarks
|
||||
* Contains the device information for the server.
|
||||
*
|
||||
* @throws This property can throw when used.
|
||||
*
|
||||
* {@link Error}
|
||||
*/
|
||||
readonly serverSystemInfo: SystemInfo;
|
||||
/**
|
||||
|
@ -1,7 +1,7 @@
|
||||
/* IMPORT */ import { MemoryTier } from '../index';
|
||||
|
||||
/**
|
||||
* @beta
|
||||
* @rc
|
||||
* Contains device information, like memory tier.
|
||||
*/
|
||||
export class SystemInfo {
|
||||
|
@ -3,6 +3,10 @@
|
||||
* function ItemStack.getComponent.
|
||||
*/
|
||||
export enum ItemComponentTypes {
|
||||
/**
|
||||
* @beta
|
||||
*/
|
||||
Compostable = 'minecraft:compostable',
|
||||
/**
|
||||
* @remarks
|
||||
* The minecraft:cooldown component.
|
||||
|
18
translate-pieces/server/enums/MemoryTier.d.ts
vendored
18
translate-pieces/server/enums/MemoryTier.d.ts
vendored
@ -1,42 +1,36 @@
|
||||
/**
|
||||
* @beta
|
||||
* @rc
|
||||
* Describes the memory of a device.
|
||||
*/
|
||||
export enum MemoryTier {
|
||||
/**
|
||||
* @remarks
|
||||
* Memory not detected.
|
||||
*
|
||||
*/
|
||||
Undetermined = 0,
|
||||
/**
|
||||
* @remarks
|
||||
* Max memory for Super Low Tier is 1.5GBs.
|
||||
*
|
||||
*/
|
||||
SuperLow = 1,
|
||||
SuperLow = 0,
|
||||
/**
|
||||
* @remarks
|
||||
* Max memory for Low Tier is 2GBs.
|
||||
*
|
||||
*/
|
||||
Low = 2,
|
||||
Low = 1,
|
||||
/**
|
||||
* @remarks
|
||||
* Max memory for Mid Tier is 4GBs.
|
||||
*
|
||||
*/
|
||||
Mid = 3,
|
||||
Mid = 2,
|
||||
/**
|
||||
* @remarks
|
||||
* Max memory for High Tier is 8GBs.
|
||||
*
|
||||
*/
|
||||
High = 4,
|
||||
High = 3,
|
||||
/**
|
||||
* @remarks
|
||||
* Memory for Super High Tier is above 8GBs.
|
||||
*
|
||||
*/
|
||||
SuperHigh = 5,
|
||||
SuperHigh = 4,
|
||||
}
|
@ -1,5 +1,5 @@
|
||||
/**
|
||||
* @beta
|
||||
* @rc
|
||||
* Describes what kind of platform is a device.
|
||||
*/
|
||||
export enum PlatformType {
|
||||
|
1
translate-pieces/server/index.d.ts
vendored
1
translate-pieces/server/index.d.ts
vendored
@ -228,6 +228,7 @@ export { ItemComponentMineBlockEvent } from './classes/ItemComponentMineBlockEve
|
||||
export { ItemComponentRegistry } from './classes/ItemComponentRegistry';
|
||||
export { ItemComponentUseEvent } from './classes/ItemComponentUseEvent';
|
||||
export { ItemComponentUseOnEvent } from './classes/ItemComponentUseOnEvent';
|
||||
export { ItemCompostableComponent } from './classes/ItemCompostableComponent';
|
||||
export { ItemCooldownComponent } from './classes/ItemCooldownComponent';
|
||||
export { ItemDurabilityComponent } from './classes/ItemDurabilityComponent';
|
||||
export { ItemDyeableComponent } from './classes/ItemDyeableComponent';
|
||||
|
@ -1,14 +1,16 @@
|
||||
/* IMPORT */ import { ItemCooldownComponent, ItemDurabilityComponent, ItemDyeableComponent, ItemEnchantableComponent, ItemFoodComponent, ItemPotionComponent } from '../index';
|
||||
/* IMPORT */ import { ItemCompostableComponent, ItemCooldownComponent, ItemDurabilityComponent, ItemDyeableComponent, ItemEnchantableComponent, ItemFoodComponent, ItemPotionComponent } from '../index';
|
||||
|
||||
/**
|
||||
* @beta
|
||||
*/
|
||||
export type ItemComponentTypeMap = {
|
||||
compostable: ItemCompostableComponent;
|
||||
cooldown: ItemCooldownComponent;
|
||||
durability: ItemDurabilityComponent;
|
||||
dyeable: ItemDyeableComponent;
|
||||
enchantable: ItemEnchantableComponent;
|
||||
food: ItemFoodComponent;
|
||||
'minecraft:compostable': ItemCompostableComponent;
|
||||
'minecraft:cooldown': ItemCooldownComponent;
|
||||
'minecraft:durability': ItemDurabilityComponent;
|
||||
'minecraft:dyeable': ItemDyeableComponent;
|
||||
|
@ -17,9 +17,9 @@ NPM 包:
|
||||
|[@minecraft/server-gametest](https://www.npmjs.com/package/@minecraft/server-gametest)|`1.0.0-beta`|
|
||||
|[@minecraft/server-net](https://www.npmjs.com/package/@minecraft/server-net)|`1.0.0-beta`|
|
||||
|[@minecraft/server-ui](https://www.npmjs.com/package/@minecraft/server-ui)|`1.4.0-beta`|
|
||||
|[@minecraft/vanilla-data](https://www.npmjs.com/package/@minecraft/vanilla-data)|`1.21.50-preview.25`|
|
||||
|[@minecraft/vanilla-data](https://www.npmjs.com/package/@minecraft/vanilla-data)|`1.21.50-preview.26`|
|
||||
|
||||
游戏版本号:`1.21.50.25`
|
||||
游戏版本号:`1.21.50.26`
|
||||
|
||||
<!-- summary end -->
|
||||
|
||||
|
@ -1,15 +1,15 @@
|
||||
{
|
||||
"dependencies": {
|
||||
"@minecraft/common": "1.2.0",
|
||||
"@minecraft/debug-utilities": "1.0.0-beta.1.21.50-preview.25",
|
||||
"@minecraft/debug-utilities": "1.0.0-beta.1.21.50-preview.26",
|
||||
"@minecraft/math": "1.4.0",
|
||||
"@minecraft/server": "1.17.0-beta.1.21.50-preview.25",
|
||||
"@minecraft/server-admin": "1.0.0-beta.1.21.50-preview.25",
|
||||
"@minecraft/server-editor": "0.1.0-beta.1.21.50-preview.25",
|
||||
"@minecraft/server-gametest": "1.0.0-beta.1.21.50-preview.25",
|
||||
"@minecraft/server-net": "1.0.0-beta.1.21.50-preview.25",
|
||||
"@minecraft/server-ui": "1.4.0-beta.1.21.50-preview.25",
|
||||
"@minecraft/vanilla-data": "1.21.50-preview.25"
|
||||
"@minecraft/server": "1.17.0-beta.1.21.50-preview.26",
|
||||
"@minecraft/server-admin": "1.0.0-beta.1.21.50-preview.26",
|
||||
"@minecraft/server-editor": "0.1.0-beta.1.21.50-preview.26",
|
||||
"@minecraft/server-gametest": "1.0.0-beta.1.21.50-preview.26",
|
||||
"@minecraft/server-net": "1.0.0-beta.1.21.50-preview.26",
|
||||
"@minecraft/server-ui": "1.4.0-beta.1.21.50-preview.26",
|
||||
"@minecraft/vanilla-data": "1.21.50-preview.26"
|
||||
},
|
||||
"overrides": {
|
||||
"@minecraft/debug-utilities": {
|
||||
|
295
translated/server-editor.d.ts
vendored
295
translated/server-editor.d.ts
vendored
@ -901,9 +901,9 @@ export enum PaintMode {
|
||||
}
|
||||
|
||||
export enum Plane {
|
||||
XY = 'XY',
|
||||
XZ = 'XZ',
|
||||
YZ = 'YZ',
|
||||
XY = 0,
|
||||
XZ = 1,
|
||||
YZ = 2,
|
||||
}
|
||||
|
||||
export enum PlayerPermissionLevel {
|
||||
@ -929,11 +929,11 @@ export enum PlaytestSessionResult {
|
||||
}
|
||||
|
||||
export enum PrimitiveType {
|
||||
AxialSphere = 'AxialSphere',
|
||||
Box = 'Box',
|
||||
Disc = 'Disc',
|
||||
Line = 'Line',
|
||||
Text = 'Text',
|
||||
Text = 0,
|
||||
Box = 1,
|
||||
Line = 2,
|
||||
Disc = 4,
|
||||
AxialSphere = 5,
|
||||
}
|
||||
|
||||
export enum ProjectExportType {
|
||||
@ -974,8 +974,8 @@ export declare enum SimpleToolStatusBarVisibility {
|
||||
}
|
||||
|
||||
export enum SplineType {
|
||||
Hermite = 'Hermite',
|
||||
Line = 'Line',
|
||||
Line = 0,
|
||||
Hermite = 1,
|
||||
}
|
||||
|
||||
/**
|
||||
@ -1052,6 +1052,7 @@ export enum ThemeSettingsColorKey {
|
||||
}
|
||||
|
||||
export enum WidgetComponentType {
|
||||
Clipboard = 'Clipboard',
|
||||
Entity = 'Entity',
|
||||
Gizmo = 'Gizmo',
|
||||
Guide = 'Guide',
|
||||
@ -1641,6 +1642,7 @@ export class ClipboardChangeAfterEventSignal {
|
||||
*/
|
||||
export class ClipboardItem {
|
||||
private constructor();
|
||||
readonly id: string;
|
||||
/**
|
||||
* @remarks
|
||||
* Return whether there is any block content in the item
|
||||
@ -1910,27 +1912,6 @@ export class Cursor {
|
||||
* @throws This property can throw when used.
|
||||
*/
|
||||
readonly isVisible: boolean;
|
||||
/**
|
||||
* @remarks
|
||||
* This function can't be called in read-only mode.
|
||||
*
|
||||
* @throws This function can throw errors.
|
||||
*/
|
||||
attachClipboardItem(item: ClipboardItem): void;
|
||||
/**
|
||||
* @remarks
|
||||
* This function can't be called in read-only mode.
|
||||
*
|
||||
* @throws This function can throw errors.
|
||||
*/
|
||||
clearAttachment(): void;
|
||||
/**
|
||||
* @remarks
|
||||
* This function can't be called in read-only mode.
|
||||
*
|
||||
* @throws This function can throw errors.
|
||||
*/
|
||||
getAttachmentProperties(): CursorAttachmentProperties;
|
||||
/**
|
||||
* @remarks
|
||||
* Get the world position of the 3D block cursor
|
||||
@ -1950,6 +1931,15 @@ export class Cursor {
|
||||
* @throws This function can throw errors.
|
||||
*/
|
||||
getProperties(): CursorProperties;
|
||||
/**
|
||||
* @remarks
|
||||
* This function can't be called in read-only mode.
|
||||
*
|
||||
* @throws This function can throw errors.
|
||||
*
|
||||
* {@link Error}
|
||||
*/
|
||||
getRay(): CursorRay;
|
||||
/**
|
||||
* @remarks
|
||||
* Hide the 3D block cursor from view until the corresponding
|
||||
@ -1985,13 +1975,6 @@ export class Cursor {
|
||||
* @throws This function can throw errors.
|
||||
*/
|
||||
resetToDefaultState(): void;
|
||||
/**
|
||||
* @remarks
|
||||
* This function can't be called in read-only mode.
|
||||
*
|
||||
* @throws This function can throw errors.
|
||||
*/
|
||||
setAttachmentProperties(properties: CursorAttachmentProperties): void;
|
||||
/**
|
||||
* @remarks
|
||||
* Set the 3D block cursor properties to a given state
|
||||
@ -2015,33 +1998,6 @@ export class Cursor {
|
||||
show(): void;
|
||||
}
|
||||
|
||||
export class CursorAttachmentPropertiesChangeAfterEvent {
|
||||
private constructor();
|
||||
readonly properties: CursorAttachmentProperties;
|
||||
}
|
||||
|
||||
export class CursorAttachmentPropertyChangeAfterEventSignal {
|
||||
private constructor();
|
||||
/**
|
||||
* @remarks
|
||||
* This function can't be called in read-only mode.
|
||||
*
|
||||
* This function can be called in early-execution mode.
|
||||
*
|
||||
*/
|
||||
subscribe(
|
||||
callback: (arg: CursorAttachmentPropertiesChangeAfterEvent) => void,
|
||||
): (arg: CursorAttachmentPropertiesChangeAfterEvent) => void;
|
||||
/**
|
||||
* @remarks
|
||||
* This function can't be called in read-only mode.
|
||||
*
|
||||
* This function can be called in early-execution mode.
|
||||
*
|
||||
*/
|
||||
unsubscribe(callback: (arg: CursorAttachmentPropertiesChangeAfterEvent) => void): void;
|
||||
}
|
||||
|
||||
export class CursorPropertiesChangeAfterEvent {
|
||||
private constructor();
|
||||
readonly properties: CursorProperties;
|
||||
@ -2301,7 +2257,6 @@ export class ExtensionContextAfterEvents {
|
||||
readonly clipboardChange: ClipboardChangeAfterEventSignal;
|
||||
readonly currentThemeChange: CurrentThemeChangeAfterEventSignal;
|
||||
readonly currentThemeColorChange: CurrentThemeColorChangeAfterEventSignal;
|
||||
readonly cursorAttachmentPropertyChange: CursorAttachmentPropertyChangeAfterEventSignal;
|
||||
readonly cursorPropertyChange: CursorPropertyChangeAfterEventSignal;
|
||||
/**
|
||||
* @remarks
|
||||
@ -3354,6 +3309,12 @@ export declare class Vector3LimitObservableValidator implements ObservableValida
|
||||
|
||||
export class Widget {
|
||||
private constructor();
|
||||
/**
|
||||
* @remarks
|
||||
* This property can't be edited in read-only mode.
|
||||
*
|
||||
*/
|
||||
bindPositionToBlockCursor: boolean;
|
||||
/**
|
||||
* @remarks
|
||||
* This property can't be edited in read-only mode.
|
||||
@ -3372,6 +3333,12 @@ export class Widget {
|
||||
*
|
||||
*/
|
||||
location: minecraftserver.Vector3;
|
||||
/**
|
||||
* @remarks
|
||||
* This property can't be edited in read-only mode.
|
||||
*
|
||||
*/
|
||||
lockPositionToSurface: boolean;
|
||||
/**
|
||||
* @throws This property can throw when used.
|
||||
*
|
||||
@ -3388,6 +3355,21 @@ export class Widget {
|
||||
*/
|
||||
snapToBlockLocation: boolean;
|
||||
visible: boolean;
|
||||
/**
|
||||
* @remarks
|
||||
* This function can't be called in read-only mode.
|
||||
*
|
||||
* @throws This function can throw errors.
|
||||
*
|
||||
* {@link Error}
|
||||
*
|
||||
* {@link InvalidWidgetError}
|
||||
*/
|
||||
addClipboardComponent(
|
||||
componentName: string,
|
||||
clipboardItem?: ClipboardItem,
|
||||
options?: WidgetComponentClipboardOptions,
|
||||
): WidgetComponentClipboard;
|
||||
/**
|
||||
* @remarks
|
||||
* This function can't be called in read-only mode.
|
||||
@ -3438,10 +3420,10 @@ export class Widget {
|
||||
addRenderPrimitiveComponent(
|
||||
componentName: string,
|
||||
primitiveType:
|
||||
| WidgetComponentRenderPrimitiveAxialSphere
|
||||
| WidgetComponentRenderPrimitiveBox
|
||||
| WidgetComponentRenderPrimitiveDisc
|
||||
| WidgetComponentRenderPrimitiveLine,
|
||||
| WidgetComponentRenderPrimitiveTypeAxialSphere
|
||||
| WidgetComponentRenderPrimitiveTypeBox
|
||||
| WidgetComponentRenderPrimitiveTypeDisc
|
||||
| WidgetComponentRenderPrimitiveTypeLine,
|
||||
options?: WidgetComponentRenderPrimitiveOptions,
|
||||
): WidgetComponentRenderPrimitive;
|
||||
/**
|
||||
@ -3519,8 +3501,6 @@ export class Widget {
|
||||
* @throws This function can throw errors.
|
||||
*
|
||||
* {@link InvalidWidgetError}
|
||||
*
|
||||
* {@link InvalidWidgetError}
|
||||
*/
|
||||
setStateChangeEvent(eventFunction?: (arg: WidgetStateChangeEventData) => void): void;
|
||||
}
|
||||
@ -3539,6 +3519,12 @@ export class WidgetComponentBase {
|
||||
* {@link minecraftserver.InvalidWidgetComponentError}
|
||||
*/
|
||||
readonly location: minecraftserver.Vector3;
|
||||
/**
|
||||
* @remarks
|
||||
* This property can't be edited in read-only mode.
|
||||
*
|
||||
*/
|
||||
lockToSurface: boolean;
|
||||
/**
|
||||
* @throws This property can throw when used.
|
||||
*
|
||||
@ -3568,6 +3554,27 @@ export class WidgetComponentBase {
|
||||
* {@link InvalidWidgetComponentError}
|
||||
*/
|
||||
delete(): void;
|
||||
/**
|
||||
* @remarks
|
||||
* This function can't be called in read-only mode.
|
||||
*
|
||||
* @throws This function can throw errors.
|
||||
*
|
||||
* {@link InvalidWidgetComponentError}
|
||||
*/
|
||||
setStateChangeEvent(eventFunction?: (arg: WidgetComponentStateChangeEventData) => void): void;
|
||||
}
|
||||
|
||||
// @ts-ignore Class inheritance allowed for native defined classes
|
||||
export class WidgetComponentClipboard extends WidgetComponentBase {
|
||||
private constructor();
|
||||
clipboardMirror: minecraftserver.StructureMirrorAxis;
|
||||
clipboardNormalizedOrigin: minecraftserver.Vector3;
|
||||
clipboardOffset: minecraftserver.Vector3;
|
||||
clipboardRotation: minecraftserver.StructureRotation;
|
||||
fillColor: minecraftserver.RGBA;
|
||||
outlineColor: minecraftserver.RGBA;
|
||||
showBounds: boolean;
|
||||
}
|
||||
|
||||
// @ts-ignore Class inheritance allowed for native defined classes
|
||||
@ -3593,6 +3600,7 @@ export class WidgetComponentEntity extends WidgetComponentBase {
|
||||
// @ts-ignore Class inheritance allowed for native defined classes
|
||||
export class WidgetComponentGizmo extends WidgetComponentBase {
|
||||
private constructor();
|
||||
activated: boolean;
|
||||
}
|
||||
|
||||
// @ts-ignore Class inheritance allowed for native defined classes
|
||||
@ -3603,6 +3611,14 @@ export class WidgetComponentGuide extends WidgetComponentBase {
|
||||
// @ts-ignore Class inheritance allowed for native defined classes
|
||||
export class WidgetComponentRenderPrimitive extends WidgetComponentBase {
|
||||
private constructor();
|
||||
/**
|
||||
* @throws This property can throw when used.
|
||||
*
|
||||
* {@link InvalidWidgetComponentError}
|
||||
*
|
||||
* {@link InvalidWidgetError}
|
||||
*/
|
||||
readonly primitiveType: PrimitiveType;
|
||||
/**
|
||||
* @remarks
|
||||
* This function can't be called in read-only mode.
|
||||
@ -3615,14 +3631,15 @@ export class WidgetComponentRenderPrimitive extends WidgetComponentBase {
|
||||
*/
|
||||
setPrimitive(
|
||||
primitive:
|
||||
| WidgetComponentRenderPrimitiveAxialSphere
|
||||
| WidgetComponentRenderPrimitiveBox
|
||||
| WidgetComponentRenderPrimitiveDisc
|
||||
| WidgetComponentRenderPrimitiveLine,
|
||||
| WidgetComponentRenderPrimitiveTypeAxialSphere
|
||||
| WidgetComponentRenderPrimitiveTypeBox
|
||||
| WidgetComponentRenderPrimitiveTypeDisc
|
||||
| WidgetComponentRenderPrimitiveTypeLine,
|
||||
): void;
|
||||
}
|
||||
|
||||
export class WidgetComponentRenderPrimitiveAxialSphere {
|
||||
// @ts-ignore Class inheritance allowed for native defined classes
|
||||
export class WidgetComponentRenderPrimitiveTypeAxialSphere extends WidgetComponentRenderPrimitiveTypeBase {
|
||||
/**
|
||||
* @remarks
|
||||
* This property can't be edited in read-only mode.
|
||||
@ -3644,7 +3661,13 @@ export class WidgetComponentRenderPrimitiveAxialSphere {
|
||||
constructor(center: minecraftserver.Vector3, radius: number, color?: minecraftserver.RGBA);
|
||||
}
|
||||
|
||||
export class WidgetComponentRenderPrimitiveBox {
|
||||
export class WidgetComponentRenderPrimitiveTypeBase {
|
||||
private constructor();
|
||||
readonly primitiveType: PrimitiveType;
|
||||
}
|
||||
|
||||
// @ts-ignore Class inheritance allowed for native defined classes
|
||||
export class WidgetComponentRenderPrimitiveTypeBox extends WidgetComponentRenderPrimitiveTypeBase {
|
||||
/**
|
||||
* @remarks
|
||||
* This property can't be edited in read-only mode.
|
||||
@ -3666,7 +3689,8 @@ export class WidgetComponentRenderPrimitiveBox {
|
||||
constructor(center: minecraftserver.Vector3, color: minecraftserver.RGBA, size?: minecraftserver.Vector3);
|
||||
}
|
||||
|
||||
export class WidgetComponentRenderPrimitiveDisc {
|
||||
// @ts-ignore Class inheritance allowed for native defined classes
|
||||
export class WidgetComponentRenderPrimitiveTypeDisc extends WidgetComponentRenderPrimitiveTypeBase {
|
||||
/**
|
||||
* @remarks
|
||||
* This property can't be edited in read-only mode.
|
||||
@ -3688,7 +3712,8 @@ export class WidgetComponentRenderPrimitiveDisc {
|
||||
constructor(center: minecraftserver.Vector3, radius: number, color: minecraftserver.RGBA);
|
||||
}
|
||||
|
||||
export class WidgetComponentRenderPrimitiveLine {
|
||||
// @ts-ignore Class inheritance allowed for native defined classes
|
||||
export class WidgetComponentRenderPrimitiveTypeLine extends WidgetComponentRenderPrimitiveTypeBase {
|
||||
/**
|
||||
* @remarks
|
||||
* This property can't be edited in read-only mode.
|
||||
@ -3758,6 +3783,14 @@ export class WidgetComponentSpline extends WidgetComponentBase {
|
||||
setControlPoints(widgetList: Widget[]): void;
|
||||
}
|
||||
|
||||
export class WidgetComponentStateChangeEventData {
|
||||
private constructor();
|
||||
readonly component: WidgetComponentBase;
|
||||
readonly gizmoActivated?: boolean;
|
||||
readonly group: WidgetGroup;
|
||||
readonly widget: Widget;
|
||||
}
|
||||
|
||||
// @ts-ignore Class inheritance allowed for native defined classes
|
||||
export class WidgetComponentText extends WidgetComponentBase {
|
||||
private constructor();
|
||||
@ -3900,21 +3933,6 @@ export interface BrushShape {
|
||||
* is being written to the world
|
||||
*/
|
||||
export interface ClipboardWriteOptions {
|
||||
/**
|
||||
* @remarks
|
||||
* The anchor is a unit vector representation of the side or
|
||||
* corner of the Clipboard Item to be written to the world.
|
||||
* `{0, 0, 0}` represents the center of the Clipboard item,
|
||||
* `{0, 1, 0}` represents the top, `{-1, -1, -1}` represents
|
||||
* the bottom/back/left corner, etc
|
||||
* The anchor is used in conjunction with the item size to
|
||||
* determine the object relative anchor point where the object
|
||||
* will be applied in the world.
|
||||
* Values for the X/Y/Z components should be within the range
|
||||
* `(-1 <= X/Y/Z <=1)`
|
||||
*
|
||||
*/
|
||||
anchor?: minecraftserver.Vector3;
|
||||
/**
|
||||
* @remarks
|
||||
* An enum which represents the axis (or combination of axis')
|
||||
@ -3925,6 +3943,7 @@ export interface ClipboardWriteOptions {
|
||||
*
|
||||
*/
|
||||
mirror?: minecraftserver.StructureMirrorAxis;
|
||||
normalizedOrigin?: minecraftserver.Vector3;
|
||||
/**
|
||||
* @remarks
|
||||
* A position offset which should be applied to the paste
|
||||
@ -3941,18 +3960,6 @@ export interface ClipboardWriteOptions {
|
||||
rotation?: minecraftserver.StructureRotation;
|
||||
}
|
||||
|
||||
export interface CursorAttachmentProperties {
|
||||
boundsFillColor?: minecraftserver.RGBA;
|
||||
boundsVisible?: boolean;
|
||||
boundsWireframeColor?: minecraftserver.RGBA;
|
||||
contentsFillColor?: minecraftserver.RGBA;
|
||||
contentsWireframeColor?: minecraftserver.RGBA;
|
||||
mirror?: minecraftserver.StructureMirrorAxis;
|
||||
offset?: minecraftserver.Vector3;
|
||||
origin?: minecraftserver.Vector3;
|
||||
rotation?: minecraftserver.StructureRotation;
|
||||
}
|
||||
|
||||
/**
|
||||
* The CursorProperties interface is used to describe the
|
||||
* properties of the Editor 3D block cursor construct.
|
||||
@ -4023,6 +4030,12 @@ export interface CursorProperties {
|
||||
visible?: boolean;
|
||||
}
|
||||
|
||||
export interface CursorRay {
|
||||
end: minecraftserver.Vector3;
|
||||
hit: boolean;
|
||||
start: minecraftserver.Vector3;
|
||||
}
|
||||
|
||||
export interface EditorStructure {
|
||||
storageLocation: string;
|
||||
structure: minecraftserver.Structure;
|
||||
@ -4166,10 +4179,23 @@ export interface WeightedBlock {
|
||||
}
|
||||
|
||||
export interface WidgetComponentBaseOptions {
|
||||
lockToSurface?: boolean;
|
||||
offset?: minecraftserver.Vector3;
|
||||
stateChangeEvent?: (arg: WidgetComponentStateChangeEventData) => void;
|
||||
visible?: boolean;
|
||||
}
|
||||
|
||||
// @ts-ignore Class inheritance allowed for native defined classes
|
||||
export interface WidgetComponentClipboardOptions extends WidgetComponentBaseOptions {
|
||||
boundsFillColor?: minecraftserver.RGBA;
|
||||
boundsOutlineColor?: minecraftserver.RGBA;
|
||||
clipboardMirror?: minecraftserver.StructureMirrorAxis;
|
||||
clipboardNormalizedOrigin?: minecraftserver.Vector3;
|
||||
clipboardOffset?: minecraftserver.Vector3;
|
||||
clipboardRotation?: minecraftserver.StructureRotation;
|
||||
showBounds?: boolean;
|
||||
}
|
||||
|
||||
// @ts-ignore Class inheritance allowed for native defined classes
|
||||
export interface WidgetComponentEntityOptions extends WidgetComponentBaseOptions {
|
||||
deselectedAnimation?: string;
|
||||
@ -4198,8 +4224,10 @@ export interface WidgetComponentTextOptions extends WidgetComponentBaseOptions {
|
||||
}
|
||||
|
||||
export interface WidgetCreateOptions {
|
||||
bindPositionToBlockCursor?: boolean;
|
||||
collisionOffset?: minecraftserver.Vector3;
|
||||
collisionRadius?: number;
|
||||
lockToSurface?: boolean;
|
||||
selectable?: boolean;
|
||||
snapToBlockLocation?: boolean;
|
||||
stateChangeEvent?: (arg: WidgetStateChangeEventData) => void;
|
||||
@ -5033,7 +5061,7 @@ export interface IMenuCreationParams {
|
||||
export interface IModalTool {
|
||||
/**
|
||||
* @remarks
|
||||
* Unique ID for the tool
|
||||
* Unique identifier for the tool
|
||||
*
|
||||
*/
|
||||
readonly id: string;
|
||||
@ -5043,14 +5071,11 @@ export interface IModalTool {
|
||||
*
|
||||
*/
|
||||
onModalToolActivation: EventSink<ModalToolLifecycleEventPayload>;
|
||||
bindPropertyPane(pane: IPropertyPane): void;
|
||||
dispose(): void;
|
||||
hide(): void;
|
||||
bindPropertyPane(pane: IRootPropertyPane): void;
|
||||
registerKeyBinding(action: SupportedKeyboardActionTypes, binding: KeyBinding, info?: KeyBindingInfo): void;
|
||||
registerMouseButtonBinding(action: SupportedMouseActionTypes): void;
|
||||
registerMouseDragBinding(action: SupportedMouseActionTypes): void;
|
||||
registerMouseWheelBinding(action: SupportedMouseActionTypes): void;
|
||||
show(): void;
|
||||
unregisterInputBindings(): void;
|
||||
}
|
||||
|
||||
@ -5061,7 +5086,7 @@ export interface IModalToolContainer {
|
||||
*
|
||||
*/
|
||||
readonly currentTools: IModalTool[];
|
||||
addTool(params: ModalToolCreationParameters, action?: RegisteredAction<NoArgsAction>): IModalTool;
|
||||
addTool(id: string, params: ModalToolCreationParameters): IModalTool;
|
||||
focusToolInputContext(): void;
|
||||
getSelectedToolId(): string | undefined;
|
||||
removeTool(id: string): void;
|
||||
@ -5820,6 +5845,12 @@ export interface IRootPropertyPaneOptions extends IPropertyPaneOptions {
|
||||
* the editor evolves.
|
||||
*/
|
||||
export interface ISimpleTool {
|
||||
/**
|
||||
* @remarks
|
||||
* Get the tool unique id
|
||||
*
|
||||
*/
|
||||
get id(): string;
|
||||
/**
|
||||
* @remarks
|
||||
* Get a reference to the menu component that was automatically
|
||||
@ -5971,6 +6002,12 @@ export interface ISimpleToolOptions {
|
||||
*
|
||||
*/
|
||||
activationKeyBinding?: ISimpleToolKeyBinding;
|
||||
/**
|
||||
* @remarks
|
||||
* The unique identifier of the tool.
|
||||
*
|
||||
*/
|
||||
id: string;
|
||||
/**
|
||||
* @remarks
|
||||
* The name of the tool. This will be used to identify the tool
|
||||
@ -6165,6 +6202,12 @@ export interface ISimpleToolPaneOptions {
|
||||
*
|
||||
*/
|
||||
id: string;
|
||||
/**
|
||||
* @remarks
|
||||
* Information tooltip displayed on the root pane header.
|
||||
*
|
||||
*/
|
||||
infoTooltip?: TooltipInteractiveContent;
|
||||
onBeginFinalize?: (pane: ISimpleToolPaneComponent) => void;
|
||||
onEndFinalize?: (pane: ISimpleToolPaneComponent) => void;
|
||||
onHide?: (pane: ISimpleToolPaneComponent) => void;
|
||||
@ -6776,31 +6819,25 @@ export interface IVector3PropertyItemOptions extends IPropertyItemOptionsBase {
|
||||
export interface ModalToolCreationParameters {
|
||||
/**
|
||||
* @remarks
|
||||
* Icon, if any (from resource pack on client)
|
||||
* Action associated with tool activation
|
||||
*
|
||||
*/
|
||||
action?: RegisteredAction<NoArgsAction>;
|
||||
/**
|
||||
* @remarks
|
||||
* Icon resource
|
||||
*
|
||||
*/
|
||||
icon?: string;
|
||||
/**
|
||||
* @remarks
|
||||
* Modal input context identifier
|
||||
* Localized title of the tool
|
||||
*
|
||||
*/
|
||||
inputContextId?: string;
|
||||
title?: string;
|
||||
/**
|
||||
* @remarks
|
||||
* Localized text label for modal input context
|
||||
*
|
||||
*/
|
||||
inputContextLabel?: string;
|
||||
/**
|
||||
* @remarks
|
||||
* Title of the tool
|
||||
*
|
||||
*/
|
||||
title: string;
|
||||
/**
|
||||
* @remarks
|
||||
* Tooltip description of the toll
|
||||
* Tooltip description of the tool
|
||||
*
|
||||
*/
|
||||
tooltip?: string;
|
||||
|
74
translated/server.d.ts
vendored
74
translated/server.d.ts
vendored
@ -1759,6 +1759,10 @@ export enum InputPermissionCategory {
|
||||
* function ItemStack.getComponent.
|
||||
*/
|
||||
export enum ItemComponentTypes {
|
||||
/**
|
||||
* @beta
|
||||
*/
|
||||
Compostable = 'minecraft:compostable',
|
||||
/**
|
||||
* @remarks
|
||||
* The minecraft:cooldown component.
|
||||
@ -1819,46 +1823,40 @@ export enum ItemLockMode {
|
||||
}
|
||||
|
||||
/**
|
||||
* @beta
|
||||
* @rc
|
||||
* Describes the memory of a device.
|
||||
*/
|
||||
export enum MemoryTier {
|
||||
/**
|
||||
* @remarks
|
||||
* Memory not detected.
|
||||
*
|
||||
*/
|
||||
Undetermined = 0,
|
||||
/**
|
||||
* @remarks
|
||||
* Max memory for Super Low Tier is 1.5GBs.
|
||||
*
|
||||
*/
|
||||
SuperLow = 1,
|
||||
SuperLow = 0,
|
||||
/**
|
||||
* @remarks
|
||||
* Max memory for Low Tier is 2GBs.
|
||||
*
|
||||
*/
|
||||
Low = 2,
|
||||
Low = 1,
|
||||
/**
|
||||
* @remarks
|
||||
* Max memory for Mid Tier is 4GBs.
|
||||
*
|
||||
*/
|
||||
Mid = 3,
|
||||
Mid = 2,
|
||||
/**
|
||||
* @remarks
|
||||
* Max memory for High Tier is 8GBs.
|
||||
*
|
||||
*/
|
||||
High = 4,
|
||||
High = 3,
|
||||
/**
|
||||
* @remarks
|
||||
* Memory for Super High Tier is above 8GBs.
|
||||
*
|
||||
*/
|
||||
SuperHigh = 5,
|
||||
SuperHigh = 4,
|
||||
}
|
||||
|
||||
/**
|
||||
@ -2049,7 +2047,7 @@ export enum PaletteColor {
|
||||
}
|
||||
|
||||
/**
|
||||
* @beta
|
||||
* @rc
|
||||
* Describes what kind of platform is a device.
|
||||
*/
|
||||
export enum PlatformType {
|
||||
@ -2516,11 +2514,13 @@ export type EntityComponentTypeMap = {
|
||||
* @beta
|
||||
*/
|
||||
export type ItemComponentTypeMap = {
|
||||
compostable: ItemCompostableComponent;
|
||||
cooldown: ItemCooldownComponent;
|
||||
durability: ItemDurabilityComponent;
|
||||
dyeable: ItemDyeableComponent;
|
||||
enchantable: ItemEnchantableComponent;
|
||||
food: ItemFoodComponent;
|
||||
'minecraft:compostable': ItemCompostableComponent;
|
||||
'minecraft:cooldown': ItemCooldownComponent;
|
||||
'minecraft:durability': ItemDurabilityComponent;
|
||||
'minecraft:dyeable': ItemDyeableComponent;
|
||||
@ -4367,7 +4367,7 @@ export class ChatSendBeforeEventSignal {
|
||||
}
|
||||
|
||||
/**
|
||||
* @beta
|
||||
* @rc
|
||||
* Contains the device information for a client instance.
|
||||
*/
|
||||
// @ts-ignore Class inheritance allowed for native defined classes
|
||||
@ -10123,6 +10123,31 @@ export class ItemComponentUseOnEvent extends ItemUseOnEvent {
|
||||
readonly usedOnBlockPermutation: BlockPermutation;
|
||||
}
|
||||
|
||||
/**
|
||||
* @beta
|
||||
* When present, the item can be composted in the composter
|
||||
* block if the composting chance is in the range [1 - 100].
|
||||
*/
|
||||
// @ts-ignore Class inheritance allowed for native defined classes
|
||||
export class ItemCompostableComponent extends ItemComponent {
|
||||
private constructor();
|
||||
/**
|
||||
* @remarks
|
||||
* This is the percent chance of the item composting in the
|
||||
* composter block and generating a compost layer. Note this
|
||||
* api will not return the percent chance for some vanilla
|
||||
* items. To get the compostable chance for all items, use the
|
||||
* compostingChance property on the ItemStack.
|
||||
*
|
||||
* @throws
|
||||
* Throws if value outside the range [1 - 100]
|
||||
*
|
||||
* {@link Error}
|
||||
*/
|
||||
readonly compostingChance: number;
|
||||
static readonly componentId = 'minecraft:compostable';
|
||||
}
|
||||
|
||||
/**
|
||||
* When present on an item, this item has a cooldown effect
|
||||
* when used by entities.
|
||||
@ -10579,6 +10604,18 @@ export class ItemStack {
|
||||
* Throws if the value is outside the range of 1-255.
|
||||
*/
|
||||
amount: number;
|
||||
/**
|
||||
* @beta
|
||||
* @remarks
|
||||
* This is the percent chance of the item composting in the
|
||||
* composter block and generating a compost layer.
|
||||
*
|
||||
* @throws
|
||||
* Throws if value outside the range [1 - 100]
|
||||
*
|
||||
* {@link Error}
|
||||
*/
|
||||
readonly compostingChance: number;
|
||||
/**
|
||||
* @remarks
|
||||
* Returns whether the item is stackable. An item is considered
|
||||
@ -11681,7 +11718,7 @@ export class Player extends Entity {
|
||||
*/
|
||||
readonly camera: Camera;
|
||||
/**
|
||||
* @beta
|
||||
* @rc
|
||||
* @remarks
|
||||
* Contains the player's device information.
|
||||
*
|
||||
@ -14409,13 +14446,10 @@ export class System {
|
||||
*/
|
||||
readonly currentTick: number;
|
||||
/**
|
||||
* @beta
|
||||
* @rc
|
||||
* @remarks
|
||||
* Contains the device information for the server.
|
||||
*
|
||||
* @throws This property can throw when used.
|
||||
*
|
||||
* {@link Error}
|
||||
*/
|
||||
readonly serverSystemInfo: SystemInfo;
|
||||
/**
|
||||
@ -14558,7 +14592,7 @@ export class SystemBeforeEvents {
|
||||
}
|
||||
|
||||
/**
|
||||
* @beta
|
||||
* @rc
|
||||
* Contains device information, like memory tier.
|
||||
*/
|
||||
export class SystemInfo {
|
||||
|
Loading…
Reference in New Issue
Block a user