@minecraft/server-editor 0.1.0-beta.1.21.20-preview.21 → 0.1.0-beta.1.21.3-stable
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/index.d.ts +63 -790
- package/package.json +2 -2
package/index.d.ts
CHANGED
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
* ```json
|
|
15
15
|
* {
|
|
16
16
|
* "module_name": "@minecraft/server-editor",
|
|
17
|
-
* "version": "0.1.0-beta"
|
|
17
|
+
* "version": "0.1.0-beta.1.21.3-stable"
|
|
18
18
|
* }
|
|
19
19
|
* ```
|
|
20
20
|
*
|
|
@@ -36,28 +36,6 @@ export enum BlockPaletteItemType {
|
|
|
36
36
|
Probability = 1,
|
|
37
37
|
}
|
|
38
38
|
|
|
39
|
-
export enum BrushPipelineOperationType {
|
|
40
|
-
Include = 0,
|
|
41
|
-
Exclude = 1,
|
|
42
|
-
}
|
|
43
|
-
|
|
44
|
-
/**
|
|
45
|
-
* The possible variants of a color picker.
|
|
46
|
-
*/
|
|
47
|
-
export declare enum ColorPickerVariant {
|
|
48
|
-
Default = 0,
|
|
49
|
-
Inline = 1,
|
|
50
|
-
Expanded = 2,
|
|
51
|
-
}
|
|
52
|
-
|
|
53
|
-
/**
|
|
54
|
-
* Predefined action bar items
|
|
55
|
-
*/
|
|
56
|
-
export declare enum CoreActionBarItemType {
|
|
57
|
-
Redo = 'editor:actionBarItem:redo',
|
|
58
|
-
Undo = 'editor:actionBarItem:undo',
|
|
59
|
-
}
|
|
60
|
-
|
|
61
39
|
/**
|
|
62
40
|
* Predefined top level menus for core editor
|
|
63
41
|
*/
|
|
@@ -137,21 +115,13 @@ export enum CursorTargetMode {
|
|
|
137
115
|
Face = 1,
|
|
138
116
|
}
|
|
139
117
|
|
|
140
|
-
export enum DaylightCycle {
|
|
141
|
-
Normal = 0,
|
|
142
|
-
AlwaysDay = 1,
|
|
143
|
-
LockTime = 2,
|
|
144
|
-
}
|
|
145
|
-
|
|
146
118
|
/**
|
|
147
119
|
* Type of item that can be added to the property pane
|
|
148
120
|
*/
|
|
149
121
|
export declare enum EDITOR_PANE_PROPERTY_ITEM_TYPE {
|
|
150
122
|
Action = 'editorUI:Action',
|
|
151
|
-
BlockList = 'editorUI:BlockList',
|
|
152
123
|
BlockPicker = 'editorUI:BlockPicker',
|
|
153
124
|
Boolean = 'editorUI:Boolean',
|
|
154
|
-
ColorPicker = 'editorUI:ColorPicker',
|
|
155
125
|
Divider = 'editorUI:Divider',
|
|
156
126
|
Dropdown = 'editorUI:Dropdown',
|
|
157
127
|
Image = 'editorUI:Image',
|
|
@@ -207,14 +177,6 @@ export enum ExportResult {
|
|
|
207
177
|
EditorSystemFailure = 7,
|
|
208
178
|
}
|
|
209
179
|
|
|
210
|
-
export enum GamePublishSetting {
|
|
211
|
-
NoMultiPlay = 0,
|
|
212
|
-
InviteOnly = 1,
|
|
213
|
-
FriendsOnly = 2,
|
|
214
|
-
FriendsOfFriends = 3,
|
|
215
|
-
Public = 4,
|
|
216
|
-
}
|
|
217
|
-
|
|
218
180
|
/**
|
|
219
181
|
* Enumeration representing identifiers for graphics settings
|
|
220
182
|
* properties.
|
|
@@ -245,7 +207,6 @@ export declare enum InputModifier {
|
|
|
245
207
|
* Keyboard key
|
|
246
208
|
*/
|
|
247
209
|
export declare enum KeyboardKey {
|
|
248
|
-
UNDEFINED = 0,
|
|
249
210
|
BACKSPACE = 8,
|
|
250
211
|
TAB = 9,
|
|
251
212
|
ENTER = 13,
|
|
@@ -340,6 +301,24 @@ export declare enum KeyboardKey {
|
|
|
340
301
|
QUOTE = 222,
|
|
341
302
|
}
|
|
342
303
|
|
|
304
|
+
/**
|
|
305
|
+
* Keyboard Key Actions
|
|
306
|
+
*/
|
|
307
|
+
export declare enum KeyInputType {
|
|
308
|
+
/**
|
|
309
|
+
* @remarks
|
|
310
|
+
* Button was pressed.
|
|
311
|
+
*
|
|
312
|
+
*/
|
|
313
|
+
Press = 1,
|
|
314
|
+
/**
|
|
315
|
+
* @remarks
|
|
316
|
+
* Button was released.
|
|
317
|
+
*
|
|
318
|
+
*/
|
|
319
|
+
Release = 2,
|
|
320
|
+
}
|
|
321
|
+
|
|
343
322
|
/**
|
|
344
323
|
* Layout directions for property panes.
|
|
345
324
|
*/
|
|
@@ -395,13 +374,6 @@ export declare enum MouseInputType {
|
|
|
395
374
|
DragEnd = 7,
|
|
396
375
|
}
|
|
397
376
|
|
|
398
|
-
export enum PlayerPermissionLevel {
|
|
399
|
-
Visitor = 0,
|
|
400
|
-
Member = 1,
|
|
401
|
-
Operator = 2,
|
|
402
|
-
Custom = 3,
|
|
403
|
-
}
|
|
404
|
-
|
|
405
377
|
export enum PlaytestSessionResult {
|
|
406
378
|
OK = 0,
|
|
407
379
|
InvalidSessionHandle = 1,
|
|
@@ -487,13 +459,6 @@ export type IActionPropertyItem<T extends PropertyBag, Prop extends keyof T & st
|
|
|
487
459
|
replaceBoundAction(action: RegisteredAction<NoArgsAction> | undefined): void;
|
|
488
460
|
};
|
|
489
461
|
|
|
490
|
-
/**
|
|
491
|
-
* A property item which supports BlockList properties
|
|
492
|
-
*/
|
|
493
|
-
export type IBlockListPropertyItem<T extends PropertyBag, Prop extends keyof T & string> = IPropertyItem<T, Prop> & {
|
|
494
|
-
updateBlockList(newBlockList: string[]): void;
|
|
495
|
-
};
|
|
496
|
-
|
|
497
462
|
/**
|
|
498
463
|
* A property item which supports Dropdown properties
|
|
499
464
|
*/
|
|
@@ -523,7 +488,6 @@ export type IPlayerUISession<PerPlayerStorage = Record<string, never>> = {
|
|
|
523
488
|
readonly actionManager: ActionManager;
|
|
524
489
|
readonly inputManager: IGlobalInputManager;
|
|
525
490
|
readonly menuBar: IMenuContainer;
|
|
526
|
-
readonly actionBar: IActionBar;
|
|
527
491
|
readonly toolRail: IModalToolContainer;
|
|
528
492
|
readonly log: IPlayerLogger;
|
|
529
493
|
readonly extensionContext: ExtensionContext;
|
|
@@ -555,23 +519,6 @@ export type IVector3PropertyItem<T extends PropertyBag, Prop extends keyof T & s
|
|
|
555
519
|
}): void;
|
|
556
520
|
};
|
|
557
521
|
|
|
558
|
-
/**
|
|
559
|
-
* Keyboard binding properties.
|
|
560
|
-
*/
|
|
561
|
-
export type KeyBinding = {
|
|
562
|
-
key: KeyboardKey;
|
|
563
|
-
modifier?: InputModifier;
|
|
564
|
-
};
|
|
565
|
-
|
|
566
|
-
/**
|
|
567
|
-
* Additional information about key binding.
|
|
568
|
-
*/
|
|
569
|
-
export type KeyBindingInfo = {
|
|
570
|
-
uniqueId: string;
|
|
571
|
-
label?: string;
|
|
572
|
-
tooltip?: string;
|
|
573
|
-
};
|
|
574
|
-
|
|
575
522
|
/**
|
|
576
523
|
* Modal tool lifecycle event payload
|
|
577
524
|
*/
|
|
@@ -752,52 +699,17 @@ export class BlockPalette {
|
|
|
752
699
|
|
|
753
700
|
export class BlockPaletteManager {
|
|
754
701
|
private constructor();
|
|
755
|
-
/**
|
|
756
|
-
* @remarks
|
|
757
|
-
* This function can't be called in read-only mode.
|
|
758
|
-
*
|
|
759
|
-
*/
|
|
760
|
-
addOrReplacePalette(paletteId: string, palette: BlockPalette): void;
|
|
761
|
-
getPalette(paletteId: string): BlockPalette | undefined;
|
|
762
|
-
getPaletteIdList(): string[];
|
|
763
|
-
/**
|
|
764
|
-
* @throws This function can throw errors.
|
|
765
|
-
*/
|
|
766
|
-
getPaletteItem(paletteId: string, index: number): IBlockPaletteItem;
|
|
767
|
-
getPrimaryPalette(): BlockPalette;
|
|
768
702
|
/**
|
|
769
703
|
* @throws This function can throw errors.
|
|
770
704
|
*/
|
|
771
705
|
getSelectedBlockType(): minecraftserver.BlockType;
|
|
772
|
-
getSelectedItem(): IBlockPaletteItem;
|
|
773
|
-
/**
|
|
774
|
-
* @remarks
|
|
775
|
-
* This function can't be called in read-only mode.
|
|
776
|
-
*
|
|
777
|
-
* @throws This function can throw errors.
|
|
778
|
-
*/
|
|
779
|
-
removePalette(paletteId: string): void;
|
|
780
706
|
/**
|
|
781
707
|
* @remarks
|
|
782
708
|
* This function can't be called in read-only mode.
|
|
783
709
|
*
|
|
784
710
|
* @throws This function can throw errors.
|
|
785
711
|
*/
|
|
786
|
-
|
|
787
|
-
/**
|
|
788
|
-
* @remarks
|
|
789
|
-
* This function can't be called in read-only mode.
|
|
790
|
-
*
|
|
791
|
-
* @throws This function can throw errors.
|
|
792
|
-
*/
|
|
793
|
-
setPrimaryPalette(paletteId: string): void;
|
|
794
|
-
/**
|
|
795
|
-
* @remarks
|
|
796
|
-
* This function can't be called in read-only mode.
|
|
797
|
-
*
|
|
798
|
-
* @throws This function can throw errors.
|
|
799
|
-
*/
|
|
800
|
-
setSelectedItem(item: IBlockPaletteItem): void;
|
|
712
|
+
setSelectedBlockType(block: minecraftserver.BlockType): void;
|
|
801
713
|
}
|
|
802
714
|
|
|
803
715
|
export class BrushShapeManager {
|
|
@@ -812,15 +724,6 @@ export class BrushShapeManager {
|
|
|
812
724
|
* @throws This function can throw errors.
|
|
813
725
|
*/
|
|
814
726
|
activateBrushShape(name: string): minecraftserver.CompoundBlockVolume;
|
|
815
|
-
/**
|
|
816
|
-
* @remarks
|
|
817
|
-
* This function can't be called in read-only mode.
|
|
818
|
-
*
|
|
819
|
-
*/
|
|
820
|
-
getBrushVolume(
|
|
821
|
-
origin: minecraftserver.Vector3,
|
|
822
|
-
pipeline: BrushPipelineOperation[],
|
|
823
|
-
): minecraftserver.CompoundBlockVolume | undefined;
|
|
824
727
|
/**
|
|
825
728
|
* @remarks
|
|
826
729
|
* This function can't be called in read-only mode.
|
|
@@ -849,28 +752,6 @@ export class BrushShapeManager {
|
|
|
849
752
|
uiSettingValueChanged(elementName: string, newValue: boolean | number | string | minecraftserver.Vector3): boolean;
|
|
850
753
|
}
|
|
851
754
|
|
|
852
|
-
export class ClipboardChangeAfterEvent {
|
|
853
|
-
private constructor();
|
|
854
|
-
readonly isPrimary: boolean;
|
|
855
|
-
readonly itemId: string;
|
|
856
|
-
}
|
|
857
|
-
|
|
858
|
-
export class ClipboardChangeAfterEventSignal {
|
|
859
|
-
private constructor();
|
|
860
|
-
/**
|
|
861
|
-
* @remarks
|
|
862
|
-
* This function can't be called in read-only mode.
|
|
863
|
-
*
|
|
864
|
-
*/
|
|
865
|
-
subscribe(callback: (arg: ClipboardChangeAfterEvent) => void): (arg: ClipboardChangeAfterEvent) => void;
|
|
866
|
-
/**
|
|
867
|
-
* @remarks
|
|
868
|
-
* This function can't be called in read-only mode.
|
|
869
|
-
*
|
|
870
|
-
*/
|
|
871
|
-
unsubscribe(callback: (arg: ClipboardChangeAfterEvent) => void): void;
|
|
872
|
-
}
|
|
873
|
-
|
|
874
755
|
/**
|
|
875
756
|
* A ClipboardItem is a handle to an object which represents a
|
|
876
757
|
* set of blocks in a contained bounding area (most likely
|
|
@@ -1085,27 +966,6 @@ export class Cursor {
|
|
|
1085
966
|
* @throws This property can throw when used.
|
|
1086
967
|
*/
|
|
1087
968
|
readonly isVisible: boolean;
|
|
1088
|
-
/**
|
|
1089
|
-
* @remarks
|
|
1090
|
-
* This function can't be called in read-only mode.
|
|
1091
|
-
*
|
|
1092
|
-
* @throws This function can throw errors.
|
|
1093
|
-
*/
|
|
1094
|
-
attachClipboardItem(item: ClipboardItem): void;
|
|
1095
|
-
/**
|
|
1096
|
-
* @remarks
|
|
1097
|
-
* This function can't be called in read-only mode.
|
|
1098
|
-
*
|
|
1099
|
-
* @throws This function can throw errors.
|
|
1100
|
-
*/
|
|
1101
|
-
clearAttachment(): void;
|
|
1102
|
-
/**
|
|
1103
|
-
* @remarks
|
|
1104
|
-
* This function can't be called in read-only mode.
|
|
1105
|
-
*
|
|
1106
|
-
* @throws This function can throw errors.
|
|
1107
|
-
*/
|
|
1108
|
-
getAttachmentProperties(): CursorAttachmentProperties;
|
|
1109
969
|
/**
|
|
1110
970
|
* @remarks
|
|
1111
971
|
* Get the world position of the 3D block cursor
|
|
@@ -1128,7 +988,8 @@ export class Cursor {
|
|
|
1128
988
|
/**
|
|
1129
989
|
* @remarks
|
|
1130
990
|
* Hide the 3D block cursor from view until the corresponding
|
|
1131
|
-
* {@link Cursor.show} function is
|
|
991
|
+
* {@link @minecraft-server-editor.Cursor.show} function is
|
|
992
|
+
* called
|
|
1132
993
|
*
|
|
1133
994
|
* This function can't be called in read-only mode.
|
|
1134
995
|
*
|
|
@@ -1138,8 +999,9 @@ export class Cursor {
|
|
|
1138
999
|
/**
|
|
1139
1000
|
* @remarks
|
|
1140
1001
|
* Manually offset the 3D block cursor by given amount.
|
|
1141
|
-
* Depending on the {@link
|
|
1142
|
-
*
|
|
1002
|
+
* Depending on the {@link
|
|
1003
|
+
* @minecraft-server-editor.CursorProperties.CursorControlMode}
|
|
1004
|
+
* - this function may have no effect
|
|
1143
1005
|
*
|
|
1144
1006
|
* This function can't be called in read-only mode.
|
|
1145
1007
|
*
|
|
@@ -1160,13 +1022,6 @@ export class Cursor {
|
|
|
1160
1022
|
* @throws This function can throw errors.
|
|
1161
1023
|
*/
|
|
1162
1024
|
resetToDefaultState(): void;
|
|
1163
|
-
/**
|
|
1164
|
-
* @remarks
|
|
1165
|
-
* This function can't be called in read-only mode.
|
|
1166
|
-
*
|
|
1167
|
-
* @throws This function can throw errors.
|
|
1168
|
-
*/
|
|
1169
|
-
setAttachmentProperties(properties: CursorAttachmentProperties): void;
|
|
1170
1025
|
/**
|
|
1171
1026
|
* @remarks
|
|
1172
1027
|
* Set the 3D block cursor properties to a given state
|
|
@@ -1190,29 +1045,6 @@ export class Cursor {
|
|
|
1190
1045
|
show(): void;
|
|
1191
1046
|
}
|
|
1192
1047
|
|
|
1193
|
-
export class CursorAttachmentPropertiesChangeAfterEvent {
|
|
1194
|
-
private constructor();
|
|
1195
|
-
readonly properties: CursorAttachmentProperties;
|
|
1196
|
-
}
|
|
1197
|
-
|
|
1198
|
-
export class CursorAttachmentPropertyChangeAfterEventSignal {
|
|
1199
|
-
private constructor();
|
|
1200
|
-
/**
|
|
1201
|
-
* @remarks
|
|
1202
|
-
* This function can't be called in read-only mode.
|
|
1203
|
-
*
|
|
1204
|
-
*/
|
|
1205
|
-
subscribe(
|
|
1206
|
-
callback: (arg: CursorAttachmentPropertiesChangeAfterEvent) => void,
|
|
1207
|
-
): (arg: CursorAttachmentPropertiesChangeAfterEvent) => void;
|
|
1208
|
-
/**
|
|
1209
|
-
* @remarks
|
|
1210
|
-
* This function can't be called in read-only mode.
|
|
1211
|
-
*
|
|
1212
|
-
*/
|
|
1213
|
-
unsubscribe(callback: (arg: CursorAttachmentPropertiesChangeAfterEvent) => void): void;
|
|
1214
|
-
}
|
|
1215
|
-
|
|
1216
1048
|
export class CursorPropertiesChangeAfterEvent {
|
|
1217
1049
|
private constructor();
|
|
1218
1050
|
readonly properties: CursorProperties;
|
|
@@ -1273,7 +1105,7 @@ export class ExportManager {
|
|
|
1273
1105
|
*
|
|
1274
1106
|
* @throws This function can throw errors.
|
|
1275
1107
|
*/
|
|
1276
|
-
beginExportProject(options:
|
|
1108
|
+
beginExportProject(options: ProjectExportOptions): Promise<ExportResult>;
|
|
1277
1109
|
/**
|
|
1278
1110
|
* @remarks
|
|
1279
1111
|
* This function can't be called in read-only mode.
|
|
@@ -1281,12 +1113,6 @@ export class ExportManager {
|
|
|
1281
1113
|
* @throws This function can throw errors.
|
|
1282
1114
|
*/
|
|
1283
1115
|
canExportProject(): boolean;
|
|
1284
|
-
/**
|
|
1285
|
-
* @remarks
|
|
1286
|
-
* This function can't be called in read-only mode.
|
|
1287
|
-
*
|
|
1288
|
-
*/
|
|
1289
|
-
getGameOptions(useDefault?: boolean): GameOptions;
|
|
1290
1116
|
}
|
|
1291
1117
|
|
|
1292
1118
|
/**
|
|
@@ -1423,8 +1249,6 @@ export class ExtensionContext {
|
|
|
1423
1249
|
*/
|
|
1424
1250
|
export class ExtensionContextAfterEvents {
|
|
1425
1251
|
private constructor();
|
|
1426
|
-
readonly clipboardChange: ClipboardChangeAfterEventSignal;
|
|
1427
|
-
readonly cursorAttachmentPropertyChange: CursorAttachmentPropertyChangeAfterEventSignal;
|
|
1428
1252
|
readonly cursorPropertyChange: CursorPropertyChangeAfterEventSignal;
|
|
1429
1253
|
/**
|
|
1430
1254
|
* @remarks
|
|
@@ -1650,7 +1474,7 @@ export class PlaytestManager {
|
|
|
1650
1474
|
*
|
|
1651
1475
|
* @throws This function can throw errors.
|
|
1652
1476
|
*/
|
|
1653
|
-
beginPlaytest(options:
|
|
1477
|
+
beginPlaytest(options: PlaytestGameOptions): Promise<PlaytestSessionResult>;
|
|
1654
1478
|
/**
|
|
1655
1479
|
* @remarks
|
|
1656
1480
|
* This function can't be called in read-only mode.
|
|
@@ -1846,7 +1670,7 @@ export class Selection {
|
|
|
1846
1670
|
*
|
|
1847
1671
|
* @param forceRelativity
|
|
1848
1672
|
* See the description for {@link
|
|
1849
|
-
* @minecraft/
|
|
1673
|
+
* @minecraft-server/CompoundBlockVolume.peekLastVolume}
|
|
1850
1674
|
* @returns
|
|
1851
1675
|
* Returns undefined if the stack is empty
|
|
1852
1676
|
*/
|
|
@@ -1886,12 +1710,12 @@ export class Selection {
|
|
|
1886
1710
|
* This function can't be called in read-only mode.
|
|
1887
1711
|
*
|
|
1888
1712
|
* @param other
|
|
1889
|
-
* {@link @minecraft/
|
|
1713
|
+
* {@link @minecraft-server/CompoundBlockVolume} - set the
|
|
1890
1714
|
* block component part of this selection to the specified
|
|
1891
1715
|
* compound block volume. This will completely replace all
|
|
1892
1716
|
* block volume definitions in the selection.
|
|
1893
|
-
* {@link Selection} - replace the selection with the
|
|
1894
|
-
* selection
|
|
1717
|
+
* {@link @Selection} - replace the selection with the
|
|
1718
|
+
* specified selection
|
|
1895
1719
|
* @throws This function can throw errors.
|
|
1896
1720
|
*/
|
|
1897
1721
|
set(other: minecraftserver.CompoundBlockVolume | Selection): void;
|
|
@@ -1970,14 +1794,18 @@ export class SettingsManager {
|
|
|
1970
1794
|
|
|
1971
1795
|
export class SettingsUIElement {
|
|
1972
1796
|
readonly initialValue: boolean | number | string | minecraftserver.Vector3;
|
|
1797
|
+
readonly max?: number;
|
|
1798
|
+
readonly min?: number;
|
|
1973
1799
|
readonly name: string;
|
|
1974
|
-
readonly onChange: (arg: boolean | number | string | minecraftserver.Vector3) =>
|
|
1975
|
-
readonly options
|
|
1800
|
+
readonly onChange: (arg: boolean | number | string | minecraftserver.Vector3) => boolean;
|
|
1801
|
+
readonly options?: string[];
|
|
1976
1802
|
constructor(
|
|
1977
1803
|
name: string,
|
|
1978
1804
|
initialValue: boolean | number | string | minecraftserver.Vector3,
|
|
1979
|
-
onChange: (arg: boolean | number | string | minecraftserver.Vector3) =>
|
|
1980
|
-
|
|
1805
|
+
onChange: (arg: boolean | number | string | minecraftserver.Vector3) => boolean,
|
|
1806
|
+
min?: number,
|
|
1807
|
+
max?: number,
|
|
1808
|
+
options?: string[],
|
|
1981
1809
|
);
|
|
1982
1810
|
}
|
|
1983
1811
|
|
|
@@ -1993,37 +1821,9 @@ export class SimpleBlockPaletteItem extends IBlockPaletteItem {
|
|
|
1993
1821
|
* how to use this class and the wrapper framework
|
|
1994
1822
|
*/
|
|
1995
1823
|
export declare class SimpleToolWrapper implements IDisposable {
|
|
1996
|
-
/**
|
|
1997
|
-
* @remarks
|
|
1998
|
-
* The player UI session that the tool is running in Use this
|
|
1999
|
-
* to access the player UI session, or any of the session's
|
|
2000
|
-
* components
|
|
2001
|
-
*
|
|
2002
|
-
*/
|
|
2003
1824
|
get session(): IPlayerUISession;
|
|
2004
|
-
/**
|
|
2005
|
-
* @remarks
|
|
2006
|
-
* The simple tool instance that is created and managed by the
|
|
2007
|
-
* wrapper Use this to access any of the tools components, or
|
|
2008
|
-
* mess with the tools window visibility
|
|
2009
|
-
*
|
|
2010
|
-
*/
|
|
2011
1825
|
get simpleTool(): ISimpleTool;
|
|
2012
|
-
/**
|
|
2013
|
-
* @remarks
|
|
2014
|
-
* Setup the simple tool instance with the given options This
|
|
2015
|
-
* will create and initialize the simple tool instance
|
|
2016
|
-
*
|
|
2017
|
-
*/
|
|
2018
1826
|
setupSimpleTool(session: IPlayerUISession, options: ISimpleToolOptions): void;
|
|
2019
|
-
/**
|
|
2020
|
-
* @remarks
|
|
2021
|
-
* Teardown the simple tool instance This will call the
|
|
2022
|
-
* teardown function on the simple tool instance This function
|
|
2023
|
-
* is automatically invoked by the Editor Extension system when
|
|
2024
|
-
* the editor is shutting down
|
|
2025
|
-
*
|
|
2026
|
-
*/
|
|
2027
1827
|
teardown(): void;
|
|
2028
1828
|
}
|
|
2029
1829
|
|
|
@@ -2200,7 +2000,7 @@ export class TransactionManager {
|
|
|
2200
2000
|
/**
|
|
2201
2001
|
* @remarks
|
|
2202
2002
|
* Begin tracking block changes in an area defined by a {@link
|
|
2203
|
-
* @minecraft/
|
|
2003
|
+
* @minecraft-server/CompoundBlockVolume}. These will be added
|
|
2204
2004
|
* to a pending changes list.
|
|
2205
2005
|
* The pending list will be added to the open transaction
|
|
2206
2006
|
* record when a commit has been issued.
|
|
@@ -2208,7 +2008,7 @@ export class TransactionManager {
|
|
|
2208
2008
|
* This function can't be called in read-only mode.
|
|
2209
2009
|
*
|
|
2210
2010
|
* @param compoundBlockVolume
|
|
2211
|
-
* {@link @minecraft/
|
|
2011
|
+
* {@link @minecraft-server/CompoundBlockVolume} to track.
|
|
2212
2012
|
* Only non-void block locations will be tracked -- any changes
|
|
2213
2013
|
* falling into a void/negative space will not be tracked
|
|
2214
2014
|
* @throws This function can throw errors.
|
|
@@ -2236,7 +2036,7 @@ export class TransactionManager {
|
|
|
2236
2036
|
* Selection Volumes can also represent irregular shapes with
|
|
2237
2037
|
* non-contiguous blocks and this tracking call will honor the
|
|
2238
2038
|
* actual selected areas in the volume (and not the negative
|
|
2239
|
-
* space) (see {@link @minecraft/
|
|
2039
|
+
* space) (see {@link @minecraft-server/CompoundBlockVolume}
|
|
2240
2040
|
* for more details
|
|
2241
2041
|
*
|
|
2242
2042
|
* This function can't be called in read-only mode.
|
|
@@ -2438,11 +2238,6 @@ export class WidgetStateChangeEventData {
|
|
|
2438
2238
|
readonly widget: Widget;
|
|
2439
2239
|
}
|
|
2440
2240
|
|
|
2441
|
-
export interface BrushPipelineOperation {
|
|
2442
|
-
blockTypes: minecraftserver.BlockType[];
|
|
2443
|
-
operation: BrushPipelineOperationType;
|
|
2444
|
-
}
|
|
2445
|
-
|
|
2446
2241
|
export interface BrushShape {
|
|
2447
2242
|
icon: string;
|
|
2448
2243
|
name: string;
|
|
@@ -2494,18 +2289,6 @@ export interface ClipboardWriteOptions {
|
|
|
2494
2289
|
rotation?: minecraftserver.StructureRotation;
|
|
2495
2290
|
}
|
|
2496
2291
|
|
|
2497
|
-
export interface CursorAttachmentProperties {
|
|
2498
|
-
boundsFillColor?: minecraftserver.RGBA;
|
|
2499
|
-
boundsVisible?: boolean;
|
|
2500
|
-
boundsWireframeColor?: minecraftserver.RGBA;
|
|
2501
|
-
contentsFillColor?: minecraftserver.RGBA;
|
|
2502
|
-
contentsWireframeColor?: minecraftserver.RGBA;
|
|
2503
|
-
mirror?: minecraftserver.StructureMirrorAxis;
|
|
2504
|
-
offset?: minecraftserver.Vector3;
|
|
2505
|
-
origin?: minecraftserver.Vector3;
|
|
2506
|
-
rotation?: minecraftserver.StructureRotation;
|
|
2507
|
-
}
|
|
2508
|
-
|
|
2509
2292
|
/**
|
|
2510
2293
|
* The CursorProperties interface is used to describe the
|
|
2511
2294
|
* properties of the Editor 3D block cursor construct.
|
|
@@ -2539,7 +2322,6 @@ export interface CursorProperties {
|
|
|
2539
2322
|
*
|
|
2540
2323
|
*/
|
|
2541
2324
|
controlMode?: CursorControlMode;
|
|
2542
|
-
fillColor?: minecraftserver.RGBA;
|
|
2543
2325
|
/**
|
|
2544
2326
|
* @remarks
|
|
2545
2327
|
* The fixed distance from the players feet at which the cursor
|
|
@@ -2625,46 +2407,6 @@ export interface ExtensionOptionalParameters {
|
|
|
2625
2407
|
toolGroupId?: string;
|
|
2626
2408
|
}
|
|
2627
2409
|
|
|
2628
|
-
export interface GameOptions {
|
|
2629
|
-
bonusChest?: boolean;
|
|
2630
|
-
cheats?: boolean;
|
|
2631
|
-
commandBlockEnabled?: boolean;
|
|
2632
|
-
daylightCycle?: DaylightCycle;
|
|
2633
|
-
difficulty?: minecraftserver.Difficulty;
|
|
2634
|
-
dimensionId?: string;
|
|
2635
|
-
disableWeather?: boolean;
|
|
2636
|
-
educationEdition?: boolean;
|
|
2637
|
-
entitiesDropLoot?: boolean;
|
|
2638
|
-
exportType?: ProjectExportType;
|
|
2639
|
-
fireSpreads?: boolean;
|
|
2640
|
-
friendlyFire?: boolean;
|
|
2641
|
-
gameMode?: minecraftserver.GameMode;
|
|
2642
|
-
immediateRespawn?: boolean;
|
|
2643
|
-
keepInventory?: boolean;
|
|
2644
|
-
lanVisibility?: boolean;
|
|
2645
|
-
mobGriefing?: boolean;
|
|
2646
|
-
mobLoot?: boolean;
|
|
2647
|
-
mobSpawning?: boolean;
|
|
2648
|
-
multiplayerGame?: boolean;
|
|
2649
|
-
naturalRegeneration?: boolean;
|
|
2650
|
-
playerAccess?: GamePublishSetting;
|
|
2651
|
-
playerPermissions?: PlayerPermissionLevel;
|
|
2652
|
-
randomTickSpeed?: number;
|
|
2653
|
-
recipeUnlocking?: boolean;
|
|
2654
|
-
respawnBlocksExplode?: boolean;
|
|
2655
|
-
respawnRadius?: number;
|
|
2656
|
-
showCoordinates?: boolean;
|
|
2657
|
-
showDaysPlayed?: boolean;
|
|
2658
|
-
simulationDistance?: number;
|
|
2659
|
-
spawnPosition?: minecraftserver.Vector3;
|
|
2660
|
-
startingMap?: boolean;
|
|
2661
|
-
tileDrops?: boolean;
|
|
2662
|
-
timeOfDay?: number;
|
|
2663
|
-
tntExplodes?: boolean;
|
|
2664
|
-
weather?: number;
|
|
2665
|
-
worldName?: string;
|
|
2666
|
-
}
|
|
2667
|
-
|
|
2668
2410
|
/**
|
|
2669
2411
|
* A properties class for the global instance of the logger
|
|
2670
2412
|
* object.
|
|
@@ -2690,6 +2432,18 @@ export interface LogProperties {
|
|
|
2690
2432
|
tags?: string[];
|
|
2691
2433
|
}
|
|
2692
2434
|
|
|
2435
|
+
export interface PlaytestGameOptions {
|
|
2436
|
+
alwaysDay?: boolean;
|
|
2437
|
+
difficulty?: minecraftserver.Difficulty;
|
|
2438
|
+
dimensionId?: string;
|
|
2439
|
+
disableWeather?: boolean;
|
|
2440
|
+
gameMode?: minecraftserver.GameMode;
|
|
2441
|
+
showCoordinates?: boolean;
|
|
2442
|
+
spawnPosition?: minecraftserver.Vector3;
|
|
2443
|
+
timeOfDay?: number;
|
|
2444
|
+
weather?: number;
|
|
2445
|
+
}
|
|
2446
|
+
|
|
2693
2447
|
export interface ProjectExportOptions {
|
|
2694
2448
|
alwaysDay?: boolean;
|
|
2695
2449
|
difficulty?: minecraftserver.Difficulty;
|
|
@@ -2700,13 +2454,6 @@ export interface ProjectExportOptions {
|
|
|
2700
2454
|
initialTimOfDay?: number;
|
|
2701
2455
|
}
|
|
2702
2456
|
|
|
2703
|
-
export interface SettingsUIElementOptions {
|
|
2704
|
-
dropdownItems?: string[];
|
|
2705
|
-
max?: number;
|
|
2706
|
-
min?: number;
|
|
2707
|
-
refreshOnChange?: boolean;
|
|
2708
|
-
}
|
|
2709
|
-
|
|
2710
2457
|
export interface WidgetCreateOptions {
|
|
2711
2458
|
initialVisibility?: boolean;
|
|
2712
2459
|
isSelectable?: boolean;
|
|
@@ -2800,103 +2547,6 @@ export declare interface EventSink<T> {
|
|
|
2800
2547
|
subscribe(handler: EventHandler<T>): IEventToken;
|
|
2801
2548
|
}
|
|
2802
2549
|
|
|
2803
|
-
/**
|
|
2804
|
-
* Manager for IActionBarItem objects.
|
|
2805
|
-
*/
|
|
2806
|
-
export interface IActionBar {
|
|
2807
|
-
/**
|
|
2808
|
-
* @remarks
|
|
2809
|
-
* Add a new action bar item to the collection.
|
|
2810
|
-
*
|
|
2811
|
-
* @param id
|
|
2812
|
-
* Unique item identifier.
|
|
2813
|
-
* @param action
|
|
2814
|
-
* Action to be invoked.
|
|
2815
|
-
* @param props
|
|
2816
|
-
* Configuration for the item to create.
|
|
2817
|
-
*/
|
|
2818
|
-
registerItem(
|
|
2819
|
-
id: string,
|
|
2820
|
-
action: RegisteredAction<NoArgsAction>,
|
|
2821
|
-
props: IActionBarItemCreationParams,
|
|
2822
|
-
): IActionBarItem;
|
|
2823
|
-
/**
|
|
2824
|
-
* @remarks
|
|
2825
|
-
* Remove an action item from the collection.
|
|
2826
|
-
*
|
|
2827
|
-
* @param id
|
|
2828
|
-
* Unique item identifier.
|
|
2829
|
-
*/
|
|
2830
|
-
unregisterItem(id: string): void;
|
|
2831
|
-
}
|
|
2832
|
-
|
|
2833
|
-
/**
|
|
2834
|
-
* Registered item handle in the Action Bar collection.
|
|
2835
|
-
*/
|
|
2836
|
-
export interface IActionBarItem {
|
|
2837
|
-
/**
|
|
2838
|
-
* @remarks
|
|
2839
|
-
* Returns the current enabled state of the item.
|
|
2840
|
-
*
|
|
2841
|
-
*/
|
|
2842
|
-
getEnabled: () => boolean;
|
|
2843
|
-
/**
|
|
2844
|
-
* @remarks
|
|
2845
|
-
* Unique identifier of the item.
|
|
2846
|
-
*
|
|
2847
|
-
*/
|
|
2848
|
-
readonly id: string;
|
|
2849
|
-
/**
|
|
2850
|
-
* @remarks
|
|
2851
|
-
* Text label of the item.
|
|
2852
|
-
*
|
|
2853
|
-
*/
|
|
2854
|
-
readonly label: string;
|
|
2855
|
-
/**
|
|
2856
|
-
* @remarks
|
|
2857
|
-
* Modify enabled state of the item.
|
|
2858
|
-
*
|
|
2859
|
-
*/
|
|
2860
|
-
setEnabled: (enabled: boolean) => void;
|
|
2861
|
-
}
|
|
2862
|
-
|
|
2863
|
-
/**
|
|
2864
|
-
* Properties required to create an Action Bar item.
|
|
2865
|
-
*/
|
|
2866
|
-
export interface IActionBarItemCreationParams {
|
|
2867
|
-
/**
|
|
2868
|
-
* @remarks
|
|
2869
|
-
* Initial enabled state of the item. If not defined, default
|
|
2870
|
-
* is true.
|
|
2871
|
-
*
|
|
2872
|
-
*/
|
|
2873
|
-
enabled?: boolean;
|
|
2874
|
-
/**
|
|
2875
|
-
* @remarks
|
|
2876
|
-
* Icon resource for the item.
|
|
2877
|
-
*
|
|
2878
|
-
*/
|
|
2879
|
-
icon: string;
|
|
2880
|
-
/**
|
|
2881
|
-
* @remarks
|
|
2882
|
-
* Text label for item.
|
|
2883
|
-
*
|
|
2884
|
-
*/
|
|
2885
|
-
label: string;
|
|
2886
|
-
/**
|
|
2887
|
-
* @remarks
|
|
2888
|
-
* Tooltip description for the item.
|
|
2889
|
-
*
|
|
2890
|
-
*/
|
|
2891
|
-
tooltipDescription?: string;
|
|
2892
|
-
/**
|
|
2893
|
-
* @remarks
|
|
2894
|
-
* Tooltip title for the item.
|
|
2895
|
-
*
|
|
2896
|
-
*/
|
|
2897
|
-
tooltipTitle?: string;
|
|
2898
|
-
}
|
|
2899
|
-
|
|
2900
2550
|
/**
|
|
2901
2551
|
* Simple abstraction for disposable objects.
|
|
2902
2552
|
*/
|
|
@@ -2961,8 +2611,8 @@ export interface IGlobalInputManager {
|
|
|
2961
2611
|
registerKeyBinding(
|
|
2962
2612
|
inputContextId: EditorInputContext,
|
|
2963
2613
|
action: SupportedKeyboardActionTypes,
|
|
2964
|
-
|
|
2965
|
-
|
|
2614
|
+
button: KeyboardKey,
|
|
2615
|
+
modifier?: InputModifier,
|
|
2966
2616
|
): void;
|
|
2967
2617
|
}
|
|
2968
2618
|
|
|
@@ -2974,12 +2624,6 @@ export interface IMenu {
|
|
|
2974
2624
|
*
|
|
2975
2625
|
*/
|
|
2976
2626
|
checked?: boolean;
|
|
2977
|
-
/**
|
|
2978
|
-
* @remarks
|
|
2979
|
-
* The menu will be in either an enabled or disabled state
|
|
2980
|
-
*
|
|
2981
|
-
*/
|
|
2982
|
-
enabled: boolean;
|
|
2983
2627
|
/**
|
|
2984
2628
|
* @remarks
|
|
2985
2629
|
* Unique ID for the menu
|
|
@@ -3038,12 +2682,6 @@ export interface IMenuCreationParams {
|
|
|
3038
2682
|
*
|
|
3039
2683
|
*/
|
|
3040
2684
|
displayStringId?: string;
|
|
3041
|
-
/**
|
|
3042
|
-
* @remarks
|
|
3043
|
-
* Whether the menu should be enabled or disabled
|
|
3044
|
-
*
|
|
3045
|
-
*/
|
|
3046
|
-
enabled?: boolean;
|
|
3047
2685
|
/**
|
|
3048
2686
|
* @remarks
|
|
3049
2687
|
* The name of the menu
|
|
@@ -3074,7 +2712,7 @@ export interface IModalTool {
|
|
|
3074
2712
|
bindPropertyPane(pane: IPropertyPane): void;
|
|
3075
2713
|
dispose(): void;
|
|
3076
2714
|
hide(): void;
|
|
3077
|
-
registerKeyBinding(action: SupportedKeyboardActionTypes,
|
|
2715
|
+
registerKeyBinding(action: SupportedKeyboardActionTypes, button: KeyboardKey, modifier?: InputModifier): void;
|
|
3078
2716
|
registerMouseButtonBinding(action: SupportedMouseActionTypes): void;
|
|
3079
2717
|
registerMouseDragBinding(action: SupportedMouseActionTypes): void;
|
|
3080
2718
|
registerMouseWheelBinding(action: SupportedMouseActionTypes): void;
|
|
@@ -3226,11 +2864,6 @@ export interface IPropertyItemOptions {
|
|
|
3226
2864
|
visible?: boolean;
|
|
3227
2865
|
}
|
|
3228
2866
|
|
|
3229
|
-
// @ts-ignore Class inheritance allowed for native defined classes
|
|
3230
|
-
export interface IPropertyItemOptionsBlockList extends IPropertyItemOptions {
|
|
3231
|
-
blockList: string[];
|
|
3232
|
-
}
|
|
3233
|
-
|
|
3234
2867
|
// @ts-ignore Class inheritance allowed for native defined classes
|
|
3235
2868
|
export interface IPropertyItemOptionsBool extends IPropertyItemOptions {
|
|
3236
2869
|
/**
|
|
@@ -3252,12 +2885,6 @@ export interface IPropertyItemOptionsButton extends IPropertyItemOptions {
|
|
|
3252
2885
|
variant?: ButtonVariant;
|
|
3253
2886
|
}
|
|
3254
2887
|
|
|
3255
|
-
// @ts-ignore Class inheritance allowed for native defined classes
|
|
3256
|
-
export interface IPropertyItemOptionsColorPicker extends IPropertyItemOptions {
|
|
3257
|
-
showAlpha?: boolean;
|
|
3258
|
-
variant?: ColorPickerVariant;
|
|
3259
|
-
}
|
|
3260
|
-
|
|
3261
2888
|
// @ts-ignore Class inheritance allowed for native defined classes
|
|
3262
2889
|
export interface IPropertyItemOptionsDataPicker extends IPropertyItemOptions {
|
|
3263
2890
|
/**
|
|
@@ -3432,17 +3059,6 @@ export interface IPropertyPane {
|
|
|
3432
3059
|
*
|
|
3433
3060
|
*/
|
|
3434
3061
|
width?: number;
|
|
3435
|
-
/**
|
|
3436
|
-
* @remarks
|
|
3437
|
-
* Adds a block list to the pane.
|
|
3438
|
-
*
|
|
3439
|
-
*/
|
|
3440
|
-
addBlockList(options?: IPropertyItemOptionsBlockList): IBlockListPropertyItem<
|
|
3441
|
-
{
|
|
3442
|
-
EMPTY: undefined;
|
|
3443
|
-
},
|
|
3444
|
-
'EMPTY'
|
|
3445
|
-
>;
|
|
3446
3062
|
/**
|
|
3447
3063
|
* @remarks
|
|
3448
3064
|
* Adds a BlockPicker item to the pane.
|
|
@@ -3478,16 +3094,6 @@ export interface IPropertyPane {
|
|
|
3478
3094
|
},
|
|
3479
3095
|
'EMPTY'
|
|
3480
3096
|
>;
|
|
3481
|
-
/**
|
|
3482
|
-
* @remarks
|
|
3483
|
-
* Adds a color picker item to the pane.
|
|
3484
|
-
*
|
|
3485
|
-
*/
|
|
3486
|
-
addColorPicker<T extends PropertyBag, Prop extends keyof T & string>(
|
|
3487
|
-
obj: T,
|
|
3488
|
-
property: Prop,
|
|
3489
|
-
options?: IPropertyItemOptionsColorPicker,
|
|
3490
|
-
): IPropertyItem<T, Prop>;
|
|
3491
3097
|
/**
|
|
3492
3098
|
* @remarks
|
|
3493
3099
|
* Adds an divider item to the pane.
|
|
@@ -3521,8 +3127,6 @@ export interface IPropertyPane {
|
|
|
3521
3127
|
): IPropertyItem<T, Prop>;
|
|
3522
3128
|
/**
|
|
3523
3129
|
* @remarks
|
|
3524
|
-
* Adds an image item to the pane.
|
|
3525
|
-
*
|
|
3526
3130
|
*/
|
|
3527
3131
|
addImage<T extends PropertyBag, Prop extends keyof T & string>(
|
|
3528
3132
|
obj: T,
|
|
@@ -3699,137 +3303,57 @@ export interface IRegisterExtensionOptionalParameters {
|
|
|
3699
3303
|
* the editor evolves.
|
|
3700
3304
|
*/
|
|
3701
3305
|
export interface ISimpleTool {
|
|
3702
|
-
/**
|
|
3703
|
-
* @remarks
|
|
3704
|
-
* Get a reference to the menu component that was automatically
|
|
3705
|
-
* created for the tool This generally only happens if the tool
|
|
3706
|
-
* is a global tool (i.e. has a pane and does not have a tool
|
|
3707
|
-
* rail component) In this case a menu item is automatically
|
|
3708
|
-
* created and some visibility controls are inserted. If you
|
|
3709
|
-
* have additional menu options you want to add, this is the
|
|
3710
|
-
* ideal control to add children to
|
|
3711
|
-
*
|
|
3712
|
-
*/
|
|
3713
3306
|
get menu(): IMenu | undefined;
|
|
3714
|
-
/**
|
|
3715
|
-
* @remarks
|
|
3716
|
-
* Get the tool name
|
|
3717
|
-
*
|
|
3718
|
-
*/
|
|
3719
3307
|
get name(): string;
|
|
3720
|
-
/**
|
|
3721
|
-
* @remarks
|
|
3722
|
-
* Get a reference to the root (primary) property pane
|
|
3723
|
-
* component - if no component was requested, this function
|
|
3724
|
-
* will throw an error
|
|
3725
|
-
*
|
|
3726
|
-
*/
|
|
3727
3308
|
get pane(): ISimpleToolPaneComponent;
|
|
3728
|
-
/**
|
|
3729
|
-
* @remarks
|
|
3730
|
-
* Get a reference to the IPlayerUISession. This is the primary
|
|
3731
|
-
* interface to the editor UI and all of the editor extension
|
|
3732
|
-
* controls
|
|
3733
|
-
*
|
|
3734
|
-
*/
|
|
3735
3309
|
get session(): IPlayerUISession;
|
|
3736
|
-
/**
|
|
3737
|
-
* @remarks
|
|
3738
|
-
* Get a reference to the status bar component - if no
|
|
3739
|
-
* component was requested, this function will throw an error
|
|
3740
|
-
*
|
|
3741
|
-
*/
|
|
3742
3310
|
get statusBar(): ISimpleToolStatusBarComponent;
|
|
3743
|
-
/**
|
|
3744
|
-
* @remarks
|
|
3745
|
-
* Get a reference to the tool rail component - if no component
|
|
3746
|
-
* was requested, this function will throw an error
|
|
3747
|
-
*
|
|
3748
|
-
*/
|
|
3749
3311
|
get toolRail(): ISimpleToolRailComponent;
|
|
3750
3312
|
/**
|
|
3751
3313
|
* @remarks
|
|
3752
|
-
* Find a pane or subpane by it's unique ID.
|
|
3753
|
-
*
|
|
3754
3314
|
*/
|
|
3755
3315
|
findPane(idString: string): ISimpleToolPaneComponent | undefined;
|
|
3756
3316
|
/**
|
|
3757
3317
|
* @remarks
|
|
3758
|
-
* Hide a particular pane or subpane by it's unique ID. If no
|
|
3759
|
-
* ID is provided (or cannot be found) the function will throw
|
|
3760
|
-
* an error Although the parent pane is used to execute the
|
|
3761
|
-
* visibility request, the hidePane function will NOT affect
|
|
3762
|
-
* the visibility of any sibling panes -- so it is possible to
|
|
3763
|
-
* hide all of the child panes of a parent using this function
|
|
3764
|
-
*
|
|
3765
3318
|
*/
|
|
3766
3319
|
hidePane(idString?: string): void;
|
|
3767
3320
|
/**
|
|
3768
3321
|
* @remarks
|
|
3769
|
-
* Send a tagged Debug log message to the console. The tag will
|
|
3770
|
-
* contain the tool name
|
|
3771
|
-
*
|
|
3772
3322
|
*/
|
|
3773
3323
|
logDebug(message: string): void;
|
|
3774
3324
|
/**
|
|
3775
3325
|
* @remarks
|
|
3776
|
-
* Send a tagged Error log message to the console. The tag will
|
|
3777
|
-
* contain the tool name
|
|
3778
|
-
*
|
|
3779
3326
|
*/
|
|
3780
3327
|
logError(message: string): void;
|
|
3781
3328
|
/**
|
|
3782
3329
|
* @remarks
|
|
3783
|
-
* Send a tagged Informational log message to the console. The
|
|
3784
|
-
* tag will contain the tool name
|
|
3785
|
-
*
|
|
3786
3330
|
*/
|
|
3787
3331
|
logInfo(message: string): void;
|
|
3788
3332
|
/**
|
|
3789
3333
|
* @remarks
|
|
3790
|
-
* Send a tagged Warning log message to the console. The tag
|
|
3791
|
-
* will contain the tool name
|
|
3792
|
-
*
|
|
3793
3334
|
*/
|
|
3794
3335
|
logWarn(message: string): void;
|
|
3795
3336
|
/**
|
|
3796
3337
|
* @remarks
|
|
3797
|
-
* Show a particular pane or subpane by it's unique ID. If no
|
|
3798
|
-
* ID is provided (or cannot be found) the function will throw
|
|
3799
|
-
* an error Note that the showPane function (when used with a
|
|
3800
|
-
* child pane) will use the parent pane to execute the
|
|
3801
|
-
* visibility request. In this case, if the child panes are
|
|
3802
|
-
* marked as mututally exclusive, then the siblings of the
|
|
3803
|
-
* requested pane will be hidden
|
|
3804
|
-
*
|
|
3805
3338
|
*/
|
|
3806
3339
|
showPane(idString?: string): void;
|
|
3807
3340
|
/**
|
|
3808
3341
|
* @remarks
|
|
3809
|
-
* Much like the showPane function, but will hide all other
|
|
3810
|
-
* panes that are not the requested pane irrespective of the
|
|
3811
|
-
* exclusivity setting
|
|
3812
|
-
*
|
|
3813
3342
|
*/
|
|
3814
3343
|
showPaneExclusively(idString: string): void;
|
|
3815
3344
|
/**
|
|
3816
3345
|
* @remarks
|
|
3817
|
-
* A teardown function implemented by the ISimpleTool
|
|
3818
|
-
* implementation, and is called by the system during editor
|
|
3819
|
-
* extension shutdown. Don't override this function - instead,
|
|
3820
|
-
* implement the onTeardown event in the ISimpleToolOptions
|
|
3821
|
-
* structure
|
|
3822
|
-
*
|
|
3823
3346
|
*/
|
|
3824
3347
|
teardown(): void;
|
|
3825
3348
|
}
|
|
3826
3349
|
|
|
3827
3350
|
/**
|
|
3828
|
-
* Define a key
|
|
3351
|
+
* Define a (key & modifier) pair for the simple tool
|
|
3352
|
+
* activation key binding
|
|
3829
3353
|
*/
|
|
3830
|
-
export interface
|
|
3831
|
-
|
|
3832
|
-
|
|
3354
|
+
export interface ISimpleToolKeyPair {
|
|
3355
|
+
button: KeyboardKey;
|
|
3356
|
+
buttonModifier: InputModifier;
|
|
3833
3357
|
}
|
|
3834
3358
|
|
|
3835
3359
|
/**
|
|
@@ -3837,61 +3361,12 @@ export interface ISimpleToolKeyBinding {
|
|
|
3837
3361
|
* simple tool, and the optional components that are desired.
|
|
3838
3362
|
*/
|
|
3839
3363
|
export interface ISimpleToolOptions {
|
|
3840
|
-
|
|
3841
|
-
* @remarks
|
|
3842
|
-
* A key binding that will activate the tool. Note that if the
|
|
3843
|
-
* tool is a modal tool, then the key binding will be tied to
|
|
3844
|
-
* the tool rail activation, and appear as a tooltip on the
|
|
3845
|
-
* tool rail button. If the tool is a global tool, then the key
|
|
3846
|
-
* binding will be tied to a menu item in the View menu, and
|
|
3847
|
-
* appear as a stateful menu item which will control the pane
|
|
3848
|
-
* visibility. If there's no pane required, then the key
|
|
3849
|
-
* binding is ignored
|
|
3850
|
-
*
|
|
3851
|
-
*/
|
|
3852
|
-
activationKeyBinding?: ISimpleToolKeyBinding;
|
|
3853
|
-
/**
|
|
3854
|
-
* @remarks
|
|
3855
|
-
* The name of the tool. This will be used to identify the tool
|
|
3856
|
-
* in the UI and logs and will be used in the View \> [Tool
|
|
3857
|
-
* Name] menu item (if it's a global tool)
|
|
3858
|
-
*
|
|
3859
|
-
*/
|
|
3364
|
+
activationKeyBinding?: ISimpleToolKeyPair;
|
|
3860
3365
|
name: string;
|
|
3861
|
-
/**
|
|
3862
|
-
* @remarks
|
|
3863
|
-
* The finalize function is executed after each of the
|
|
3864
|
-
* components have been created and finalized during
|
|
3865
|
-
* construction
|
|
3866
|
-
*
|
|
3867
|
-
*/
|
|
3868
3366
|
onFinalize?: (tool: ISimpleTool) => void;
|
|
3869
|
-
/**
|
|
3870
|
-
* @remarks
|
|
3871
|
-
* The teardown function is executed when the tool is being
|
|
3872
|
-
* torn down and only after the individual components have
|
|
3873
|
-
* executed their own teardown functions
|
|
3874
|
-
*
|
|
3875
|
-
*/
|
|
3876
3367
|
onTeardown?: (tool: ISimpleTool) => void;
|
|
3877
|
-
/**
|
|
3878
|
-
* @remarks
|
|
3879
|
-
* The options structure for an optional property pane
|
|
3880
|
-
* component
|
|
3881
|
-
*
|
|
3882
|
-
*/
|
|
3883
3368
|
propertyPaneOptions?: ISimpleToolPaneOptions;
|
|
3884
|
-
/**
|
|
3885
|
-
* @remarks
|
|
3886
|
-
* The options structure for an optional status bar component
|
|
3887
|
-
*
|
|
3888
|
-
*/
|
|
3889
3369
|
statusBarOptions?: ISimpleToolStatusBarOptions;
|
|
3890
|
-
/**
|
|
3891
|
-
* @remarks
|
|
3892
|
-
* The options structure for an optional tool rail component
|
|
3893
|
-
*
|
|
3894
|
-
*/
|
|
3895
3370
|
toolRailOptions?: ISimpleToolRailOptions;
|
|
3896
3371
|
}
|
|
3897
3372
|
|
|
@@ -3910,83 +3385,26 @@ export interface ISimpleToolOptions {
|
|
|
3910
3385
|
* to the creator/user)
|
|
3911
3386
|
*/
|
|
3912
3387
|
export interface ISimpleToolPaneComponent {
|
|
3913
|
-
/**
|
|
3914
|
-
* @remarks
|
|
3915
|
-
* Get a list of the unique ID's of all of the child panes
|
|
3916
|
-
*
|
|
3917
|
-
*/
|
|
3918
3388
|
get childPaneList(): string[];
|
|
3919
|
-
/**
|
|
3920
|
-
* @remarks
|
|
3921
|
-
* Get the unique ID of the pane
|
|
3922
|
-
*
|
|
3923
|
-
*/
|
|
3924
3389
|
get id(): string;
|
|
3925
|
-
/**
|
|
3926
|
-
* @remarks
|
|
3927
|
-
* Check the visibility of the pane
|
|
3928
|
-
*
|
|
3929
|
-
*/
|
|
3930
3390
|
get isVisible(): boolean;
|
|
3931
|
-
/**
|
|
3932
|
-
* @remarks
|
|
3933
|
-
* Get a reference to actual property pane implementation that
|
|
3934
|
-
* was constructed by the tool. This reference is used to
|
|
3935
|
-
* construct the UI components that are displayed in the pane.
|
|
3936
|
-
*
|
|
3937
|
-
*/
|
|
3938
3391
|
get pane(): IPropertyPane;
|
|
3939
|
-
/**
|
|
3940
|
-
* @remarks
|
|
3941
|
-
* Get a reference to the IPlayerUISession. This is the primary
|
|
3942
|
-
* interface to the editor UI and all of the editor extension
|
|
3943
|
-
* controls
|
|
3944
|
-
*
|
|
3945
|
-
*/
|
|
3946
3392
|
get session(): IPlayerUISession;
|
|
3947
|
-
/**
|
|
3948
|
-
* @remarks
|
|
3949
|
-
* Get a reference to the parent tool.
|
|
3950
|
-
*
|
|
3951
|
-
*/
|
|
3952
3393
|
get simpleTool(): ISimpleTool;
|
|
3953
3394
|
/**
|
|
3954
3395
|
* @remarks
|
|
3955
|
-
* Find a pane reference by unique ID
|
|
3956
|
-
*
|
|
3957
3396
|
*/
|
|
3958
3397
|
findPane(idString: string): ISimpleToolPaneComponent | undefined;
|
|
3959
3398
|
/**
|
|
3960
3399
|
* @remarks
|
|
3961
|
-
* Hide the pane. Although the parent pane is used to execute
|
|
3962
|
-
* the visibility request, the hidePane function will NOT
|
|
3963
|
-
* affect the visibility of any sibling panes -- so it is
|
|
3964
|
-
* possible to hide all of the child panes of a parent using
|
|
3965
|
-
* this function
|
|
3966
|
-
*
|
|
3967
3400
|
*/
|
|
3968
3401
|
hidePane(): void;
|
|
3969
3402
|
/**
|
|
3970
3403
|
* @remarks
|
|
3971
|
-
* This causes the reconstruction of the pane (and the child
|
|
3972
|
-
* panes) as if the tool was being constructed for the first
|
|
3973
|
-
* time. This is unfortunately necessary until such time that
|
|
3974
|
-
* all of our UI components are able to communicate dynamically
|
|
3975
|
-
* with their client counterparts. Certain controls require a
|
|
3976
|
-
* full teardown and reconstruction to properly update their
|
|
3977
|
-
* state. This is undergoing code changes and should become
|
|
3978
|
-
* unnecessary in the future.
|
|
3979
|
-
*
|
|
3980
3404
|
*/
|
|
3981
3405
|
reconstructPane(): void;
|
|
3982
3406
|
/**
|
|
3983
3407
|
* @remarks
|
|
3984
|
-
* Show the pane. Note, if this is a sub-pane, then this
|
|
3985
|
-
* function will ask the parent for permission to show, and may
|
|
3986
|
-
* result in the visibility of any sibling panes to change as a
|
|
3987
|
-
* result (depending on the `mutually exclusive visibility`
|
|
3988
|
-
* flag)
|
|
3989
|
-
*
|
|
3990
3408
|
*/
|
|
3991
3409
|
showPane(): void;
|
|
3992
3410
|
}
|
|
@@ -4008,85 +3426,22 @@ export interface ISimpleToolPaneComponent {
|
|
|
4008
3426
|
* pane to finalize itself.
|
|
4009
3427
|
*/
|
|
4010
3428
|
export interface ISimpleToolPaneOptions {
|
|
4011
|
-
/**
|
|
4012
|
-
* @remarks
|
|
4013
|
-
* The id of the child pane that should be visible when the
|
|
4014
|
-
* parent pane is first shown, or the editor tool is
|
|
4015
|
-
* constructed and finalized
|
|
4016
|
-
*
|
|
4017
|
-
*/
|
|
4018
3429
|
childPaneInitiallyVisible?: string;
|
|
4019
|
-
/**
|
|
4020
|
-
* @remarks
|
|
4021
|
-
* An optional array of child panes. These panes are set up
|
|
4022
|
-
* exactly the same as the top level pane, but are displayed as
|
|
4023
|
-
* children inside the parent pane.
|
|
4024
|
-
*
|
|
4025
|
-
*/
|
|
4026
3430
|
childPanes?: ISimpleToolPaneOptions[];
|
|
4027
|
-
/**
|
|
4028
|
-
* @remarks
|
|
4029
|
-
* An optional flag to indicate whether the child panes are
|
|
4030
|
-
* mutually exclusive. If this is true, then only one child
|
|
4031
|
-
* pane can be visible at a time. If this is false, then
|
|
4032
|
-
* multiple child panes can be visible at the same time.
|
|
4033
|
-
* Visibility is controlled either through `showPane` or
|
|
4034
|
-
* `hidePane` functions of the `ISimpleToolPaneComponent` or
|
|
4035
|
-
* through the visibility methods in the top level tool
|
|
4036
|
-
* (`ISimpleTool`)
|
|
4037
|
-
*
|
|
4038
|
-
*/
|
|
4039
3431
|
childPanesMutuallyExclusive?: boolean;
|
|
4040
|
-
/**
|
|
4041
|
-
* @remarks
|
|
4042
|
-
* The unique identifier for this pane. This is used to
|
|
4043
|
-
* identify the pane in the tool's pane hierarchy.
|
|
4044
|
-
*
|
|
4045
|
-
*/
|
|
4046
3432
|
id: string;
|
|
4047
3433
|
onBeginFinalize?: (pane: ISimpleToolPaneComponent) => void;
|
|
4048
3434
|
onEndFinalize?: (pane: ISimpleToolPaneComponent) => void;
|
|
4049
3435
|
onHide?: (pane: ISimpleToolPaneComponent) => void;
|
|
4050
3436
|
onShow?: (pane: ISimpleToolPaneComponent) => void;
|
|
4051
3437
|
onTeardown?: (pane: ISimpleToolPaneComponent) => void;
|
|
4052
|
-
/**
|
|
4053
|
-
* @remarks
|
|
4054
|
-
* The title of the pane. This will be displayed in the title
|
|
4055
|
-
* bar of the pane.
|
|
4056
|
-
*
|
|
4057
|
-
*/
|
|
4058
3438
|
titleAltText: string;
|
|
4059
|
-
/**
|
|
4060
|
-
* @remarks
|
|
4061
|
-
* The string id of the title of the pane. This will be
|
|
4062
|
-
* displayed in the title bar of the pane if it exists in the
|
|
4063
|
-
* language file, otherwise the titleAltText will be used.
|
|
4064
|
-
*
|
|
4065
|
-
*/
|
|
4066
3439
|
titleStringId?: string;
|
|
4067
3440
|
}
|
|
4068
3441
|
|
|
4069
3442
|
export interface ISimpleToolRailComponent {
|
|
4070
|
-
/**
|
|
4071
|
-
* @remarks
|
|
4072
|
-
* Get a reference to the IPlayerUISession. This is the primary
|
|
4073
|
-
* interface to the editor UI and all of the editor extension
|
|
4074
|
-
* controls
|
|
4075
|
-
*
|
|
4076
|
-
*/
|
|
4077
3443
|
get session(): IPlayerUISession;
|
|
4078
|
-
/**
|
|
4079
|
-
* @remarks
|
|
4080
|
-
* Get a reference to the parent tool.
|
|
4081
|
-
*
|
|
4082
|
-
*/
|
|
4083
3444
|
get simpleTool(): ISimpleTool;
|
|
4084
|
-
/**
|
|
4085
|
-
* @remarks
|
|
4086
|
-
* Get the implementation interface of the underlying tool rail
|
|
4087
|
-
* component
|
|
4088
|
-
*
|
|
4089
|
-
*/
|
|
4090
3445
|
get toolRail(): IModalTool;
|
|
4091
3446
|
}
|
|
4092
3447
|
|
|
@@ -4104,47 +3459,14 @@ export interface ISimpleToolRailComponent {
|
|
|
4104
3459
|
* gameplay interaction
|
|
4105
3460
|
*/
|
|
4106
3461
|
export interface ISimpleToolRailOptions {
|
|
4107
|
-
/**
|
|
4108
|
-
* @remarks
|
|
4109
|
-
* The text for the tool description
|
|
4110
|
-
*
|
|
4111
|
-
*/
|
|
4112
3462
|
displayAltText: string;
|
|
4113
|
-
/**
|
|
4114
|
-
* @remarks
|
|
4115
|
-
* The string ID for the tool description if it is in the
|
|
4116
|
-
* localization language file.
|
|
4117
|
-
*
|
|
4118
|
-
*/
|
|
4119
3463
|
displayStringId?: string;
|
|
4120
|
-
/**
|
|
4121
|
-
* @remarks
|
|
4122
|
-
* The icon for the tool rail button. This is generally a URL
|
|
4123
|
-
* to an image file in the editor extension resource pack e.g.
|
|
4124
|
-
* `pack://textures/my-tool-icon.png`
|
|
4125
|
-
*
|
|
4126
|
-
*/
|
|
4127
3464
|
icon: string;
|
|
4128
3465
|
onActivate?: (component: ISimpleToolRailComponent) => void;
|
|
4129
3466
|
onDeactivate?: (component: ISimpleToolRailComponent) => void;
|
|
4130
3467
|
onFinalize?: (component: ISimpleToolRailComponent) => void;
|
|
4131
3468
|
onTeardown?: (component: ISimpleToolRailComponent) => void;
|
|
4132
|
-
/**
|
|
4133
|
-
* @remarks
|
|
4134
|
-
* The tooltip string for the tool rail button. Note: if an
|
|
4135
|
-
* activation key binding was added to `ISimpleToolOptions`,
|
|
4136
|
-
* then the key binding will be appended to the tooltip string.
|
|
4137
|
-
*
|
|
4138
|
-
*/
|
|
4139
3469
|
tooltipAltText: string;
|
|
4140
|
-
/**
|
|
4141
|
-
* @remarks
|
|
4142
|
-
* The string ID for the tooltip string if it is in the
|
|
4143
|
-
* localization language file. Note: if an activation key
|
|
4144
|
-
* binding was added to `ISimpleToolOptions`, then the key
|
|
4145
|
-
* binding will be appended to the tooltip string.
|
|
4146
|
-
*
|
|
4147
|
-
*/
|
|
4148
3470
|
tooltipStringId?: string;
|
|
4149
3471
|
}
|
|
4150
3472
|
|
|
@@ -4161,36 +3483,13 @@ export interface ISimpleToolStatusBarComponent {
|
|
|
4161
3483
|
* status bar item for a simple tool.
|
|
4162
3484
|
*/
|
|
4163
3485
|
export interface ISimpleToolStatusBarOptions {
|
|
4164
|
-
/**
|
|
4165
|
-
* @remarks
|
|
4166
|
-
* The alignment of the status bar item within the parent
|
|
4167
|
-
* status bar container
|
|
4168
|
-
*
|
|
4169
|
-
*/
|
|
4170
3486
|
alignment: EditorStatusBarAlignment;
|
|
4171
|
-
/**
|
|
4172
|
-
* @remarks
|
|
4173
|
-
* The text for the status bar item
|
|
4174
|
-
*
|
|
4175
|
-
*/
|
|
4176
3487
|
displayAltText: string;
|
|
4177
3488
|
onFinalize?: (statusBar: ISimpleToolStatusBarComponent) => void;
|
|
4178
3489
|
onHide?: (statusBar: ISimpleToolStatusBarComponent) => void;
|
|
4179
3490
|
onShow?: (statusBar: ISimpleToolStatusBarComponent) => void;
|
|
4180
3491
|
onTeardown?: (statusBar: ISimpleToolStatusBarComponent) => void;
|
|
4181
|
-
/**
|
|
4182
|
-
* @remarks
|
|
4183
|
-
* The size of the status bar item within the parent status bar
|
|
4184
|
-
* container
|
|
4185
|
-
*
|
|
4186
|
-
*/
|
|
4187
3492
|
size: number;
|
|
4188
|
-
/**
|
|
4189
|
-
* @remarks
|
|
4190
|
-
* Determine the status bar visibility based on the existence
|
|
4191
|
-
* and visibility of the tool's root property pane
|
|
4192
|
-
*
|
|
4193
|
-
*/
|
|
4194
3493
|
visibility?: SimpleToolStatusBarVisibility;
|
|
4195
3494
|
}
|
|
4196
3495
|
|
|
@@ -4233,18 +3532,6 @@ export interface ModalToolCreationParameters {
|
|
|
4233
3532
|
*
|
|
4234
3533
|
*/
|
|
4235
3534
|
icon?: string;
|
|
4236
|
-
/**
|
|
4237
|
-
* @remarks
|
|
4238
|
-
* Modal input context identifier
|
|
4239
|
-
*
|
|
4240
|
-
*/
|
|
4241
|
-
inputContextId?: string;
|
|
4242
|
-
/**
|
|
4243
|
-
* @remarks
|
|
4244
|
-
* Localized text label for modal input context
|
|
4245
|
-
*
|
|
4246
|
-
*/
|
|
4247
|
-
inputContextLabel?: string;
|
|
4248
3535
|
/**
|
|
4249
3536
|
* @remarks
|
|
4250
3537
|
* tooltipAltText alt text, if any
|
|
@@ -4289,20 +3576,6 @@ export declare function executeLargeOperation(
|
|
|
4289
3576
|
selection: Selection,
|
|
4290
3577
|
operation: (blockLocation: minecraftserver.Vector3) => void,
|
|
4291
3578
|
): Promise<void>;
|
|
4292
|
-
/**
|
|
4293
|
-
* @remarks
|
|
4294
|
-
* Executes an operation over a BlockLocationIterator via
|
|
4295
|
-
* chunks to allow splitting operation over multiple game ticks
|
|
4296
|
-
*
|
|
4297
|
-
* @param blockLocationIterator
|
|
4298
|
-
* the selection to iterator over
|
|
4299
|
-
* @param operation
|
|
4300
|
-
* the operation to apply over each block location
|
|
4301
|
-
*/
|
|
4302
|
-
export declare function executeLargeOperationFromIterator(
|
|
4303
|
-
blockLocationIterator: minecraftserver.BlockLocationIterator,
|
|
4304
|
-
operation: (blockLocation: minecraftserver.Vector3) => void,
|
|
4305
|
-
): Promise<void>;
|
|
4306
3579
|
/**
|
|
4307
3580
|
* @remarks
|
|
4308
3581
|
* Returns a string array of the default block types for the
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@minecraft/server-editor",
|
|
3
|
-
"version": "0.1.0-beta.1.21.
|
|
3
|
+
"version": "0.1.0-beta.1.21.3-stable",
|
|
4
4
|
"description": "",
|
|
5
5
|
"contributors": [
|
|
6
6
|
{
|
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
],
|
|
15
15
|
"dependencies": {
|
|
16
16
|
"@minecraft/common": "^1.0.0",
|
|
17
|
-
"@minecraft/server": "^1.
|
|
17
|
+
"@minecraft/server": "^1.12.0-beta.1.21.3-stable"
|
|
18
18
|
},
|
|
19
19
|
"license": "MIT"
|
|
20
20
|
}
|