@minecraft/server-editor 0.1.0-beta.1.21.3-stable → 0.1.0-beta.1.21.30-preview.21
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 +3225 -560
- 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"
|
|
18
18
|
* }
|
|
19
19
|
* ```
|
|
20
20
|
*
|
|
@@ -36,6 +36,55 @@ export enum BlockPaletteItemType {
|
|
|
36
36
|
Probability = 1,
|
|
37
37
|
}
|
|
38
38
|
|
|
39
|
+
/**
|
|
40
|
+
* The possible variants of a bool.
|
|
41
|
+
*/
|
|
42
|
+
export declare enum BoolPropertyItemVariant {
|
|
43
|
+
Checkbox = 0,
|
|
44
|
+
ToggleSwitch = 1,
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
export enum BrushPipelineOperationType {
|
|
48
|
+
Include = 0,
|
|
49
|
+
Exclude = 1,
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
/**
|
|
53
|
+
* The possible variants of a Button property item.
|
|
54
|
+
*/
|
|
55
|
+
export declare enum ButtonPropertyItemVariant {
|
|
56
|
+
Primary = 0,
|
|
57
|
+
Secondary = 1,
|
|
58
|
+
Confirmation = 2,
|
|
59
|
+
Destructive = 3,
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
/**
|
|
63
|
+
* The possible variants of a color picker.
|
|
64
|
+
*/
|
|
65
|
+
export declare enum ColorPickerPropertyItemVariant {
|
|
66
|
+
Default = 0,
|
|
67
|
+
Inline = 1,
|
|
68
|
+
Expanded = 2,
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
/**
|
|
72
|
+
* The possible data types supported by ComboBox property item.
|
|
73
|
+
*/
|
|
74
|
+
export declare enum ComboBoxPropertyItemDataType {
|
|
75
|
+
Custom = 0,
|
|
76
|
+
Block = 1,
|
|
77
|
+
Entity = 2,
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
/**
|
|
81
|
+
* Predefined action bar items
|
|
82
|
+
*/
|
|
83
|
+
export declare enum CoreActionBarItemType {
|
|
84
|
+
Redo = 'editor:actionBarItem:redo',
|
|
85
|
+
Undo = 'editor:actionBarItem:undo',
|
|
86
|
+
}
|
|
87
|
+
|
|
39
88
|
/**
|
|
40
89
|
* Predefined top level menus for core editor
|
|
41
90
|
*/
|
|
@@ -115,22 +164,10 @@ export enum CursorTargetMode {
|
|
|
115
164
|
Face = 1,
|
|
116
165
|
}
|
|
117
166
|
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
Action = 'editorUI:Action',
|
|
123
|
-
BlockPicker = 'editorUI:BlockPicker',
|
|
124
|
-
Boolean = 'editorUI:Boolean',
|
|
125
|
-
Divider = 'editorUI:Divider',
|
|
126
|
-
Dropdown = 'editorUI:Dropdown',
|
|
127
|
-
Image = 'editorUI:Image',
|
|
128
|
-
Number = 'editorUI:Number',
|
|
129
|
-
String = 'editorUI:String',
|
|
130
|
-
SubPane = 'editorUI:SubPane',
|
|
131
|
-
Table = 'editorUI:Table',
|
|
132
|
-
Text = 'editorUI:Text',
|
|
133
|
-
Vec3 = 'editorUI:Vec3',
|
|
167
|
+
export enum DaylightCycle {
|
|
168
|
+
Normal = 0,
|
|
169
|
+
AlwaysDay = 1,
|
|
170
|
+
LockTime = 2,
|
|
134
171
|
}
|
|
135
172
|
|
|
136
173
|
/**
|
|
@@ -166,6 +203,11 @@ export declare enum EditorStatusBarAlignment {
|
|
|
166
203
|
Left = 1,
|
|
167
204
|
}
|
|
168
205
|
|
|
206
|
+
export enum EntityOperationType {
|
|
207
|
+
Create = 0,
|
|
208
|
+
Delete = 1,
|
|
209
|
+
}
|
|
210
|
+
|
|
169
211
|
export enum ExportResult {
|
|
170
212
|
ValidWorldExport = 0,
|
|
171
213
|
LevelFetchFailed = 1,
|
|
@@ -177,6 +219,14 @@ export enum ExportResult {
|
|
|
177
219
|
EditorSystemFailure = 7,
|
|
178
220
|
}
|
|
179
221
|
|
|
222
|
+
export enum GamePublishSetting {
|
|
223
|
+
NoMultiPlay = 0,
|
|
224
|
+
InviteOnly = 1,
|
|
225
|
+
FriendsOnly = 2,
|
|
226
|
+
FriendsOfFriends = 3,
|
|
227
|
+
Public = 4,
|
|
228
|
+
}
|
|
229
|
+
|
|
180
230
|
/**
|
|
181
231
|
* Enumeration representing identifiers for graphics settings
|
|
182
232
|
* properties.
|
|
@@ -191,6 +241,15 @@ export enum GraphicsSettingsProperty {
|
|
|
191
241
|
ShowInvisibleBlocks = 'ShowInvisibleBlocks',
|
|
192
242
|
}
|
|
193
243
|
|
|
244
|
+
/**
|
|
245
|
+
* Supported image types.
|
|
246
|
+
*/
|
|
247
|
+
export declare enum ImageResourceType {
|
|
248
|
+
Default = 0,
|
|
249
|
+
Block = 1,
|
|
250
|
+
Icon = 2,
|
|
251
|
+
}
|
|
252
|
+
|
|
194
253
|
/**
|
|
195
254
|
* Input modifier flags to create chorded bindings
|
|
196
255
|
*/
|
|
@@ -207,116 +266,568 @@ export declare enum InputModifier {
|
|
|
207
266
|
* Keyboard key
|
|
208
267
|
*/
|
|
209
268
|
export declare enum KeyboardKey {
|
|
269
|
+
UNDEFINED = 0,
|
|
270
|
+
/**
|
|
271
|
+
* @remarks
|
|
272
|
+
* KeyboardEvent.DOM_VK_BACK_SPACE
|
|
273
|
+
*
|
|
274
|
+
*/
|
|
210
275
|
BACKSPACE = 8,
|
|
276
|
+
/**
|
|
277
|
+
* @remarks
|
|
278
|
+
* KeyboardEvent.DOM_VK_TAB
|
|
279
|
+
*
|
|
280
|
+
*/
|
|
211
281
|
TAB = 9,
|
|
282
|
+
/**
|
|
283
|
+
* @remarks
|
|
284
|
+
* KeyboardEvent.DOM_VK_RETURN
|
|
285
|
+
*
|
|
286
|
+
*/
|
|
212
287
|
ENTER = 13,
|
|
288
|
+
/**
|
|
289
|
+
* @remarks
|
|
290
|
+
* KeyboardEvent.DOM_VK_SHIFT
|
|
291
|
+
*
|
|
292
|
+
*/
|
|
213
293
|
SHIFT = 16,
|
|
294
|
+
/**
|
|
295
|
+
* @remarks
|
|
296
|
+
* KeyboardEvent.DOM_VK_CONTROL
|
|
297
|
+
*
|
|
298
|
+
*/
|
|
214
299
|
CTRL = 17,
|
|
300
|
+
/**
|
|
301
|
+
* @remarks
|
|
302
|
+
* KeyboardEvent.DOM_VK_ALT
|
|
303
|
+
*
|
|
304
|
+
*/
|
|
215
305
|
ALT = 18,
|
|
306
|
+
/**
|
|
307
|
+
* @remarks
|
|
308
|
+
* KeyboardEvent.DOM_VK_CAPS_LOCK
|
|
309
|
+
*
|
|
310
|
+
*/
|
|
216
311
|
CAPS_LOCK = 20,
|
|
312
|
+
/**
|
|
313
|
+
* @remarks
|
|
314
|
+
* KeyboardEvent.DOM_VK_ESCAPE
|
|
315
|
+
*
|
|
316
|
+
*/
|
|
217
317
|
ESCAPE = 27,
|
|
318
|
+
/**
|
|
319
|
+
* @remarks
|
|
320
|
+
* KeyboardEvent.DOM_VK_SPACE
|
|
321
|
+
*
|
|
322
|
+
*/
|
|
218
323
|
SPACE = 32,
|
|
324
|
+
/**
|
|
325
|
+
* @remarks
|
|
326
|
+
* KeyboardEvent.DOM_VK_PAGE_UP
|
|
327
|
+
*
|
|
328
|
+
*/
|
|
219
329
|
PAGE_UP = 33,
|
|
330
|
+
/**
|
|
331
|
+
* @remarks
|
|
332
|
+
* KeyboardEvent.DOM_VK_PAGE_DOWN
|
|
333
|
+
*
|
|
334
|
+
*/
|
|
220
335
|
PAGE_DOWN = 34,
|
|
336
|
+
/**
|
|
337
|
+
* @remarks
|
|
338
|
+
* KeyboardEvent.DOM_VK_END
|
|
339
|
+
*
|
|
340
|
+
*/
|
|
221
341
|
END = 35,
|
|
342
|
+
/**
|
|
343
|
+
* @remarks
|
|
344
|
+
* KeyboardEvent.DOM_VK_HOME
|
|
345
|
+
*
|
|
346
|
+
*/
|
|
222
347
|
HOME = 36,
|
|
348
|
+
/**
|
|
349
|
+
* @remarks
|
|
350
|
+
* KeyboardEvent.DOM_VK_LEFT
|
|
351
|
+
*
|
|
352
|
+
*/
|
|
223
353
|
LEFT = 37,
|
|
354
|
+
/**
|
|
355
|
+
* @remarks
|
|
356
|
+
* KeyboardEvent.DOM_VK_UP
|
|
357
|
+
*
|
|
358
|
+
*/
|
|
224
359
|
UP = 38,
|
|
360
|
+
/**
|
|
361
|
+
* @remarks
|
|
362
|
+
* KeyboardEvent.DOM_VK_RIGHT
|
|
363
|
+
*
|
|
364
|
+
*/
|
|
225
365
|
RIGHT = 39,
|
|
366
|
+
/**
|
|
367
|
+
* @remarks
|
|
368
|
+
* KeyboardEvent.DOM_VK_DOWN
|
|
369
|
+
*
|
|
370
|
+
*/
|
|
226
371
|
DOWN = 40,
|
|
372
|
+
/**
|
|
373
|
+
* @remarks
|
|
374
|
+
* KeyboardEvent.DOM_VK_PRINTSCREEN
|
|
375
|
+
*
|
|
376
|
+
*/
|
|
227
377
|
PRINT_SCREEN = 44,
|
|
378
|
+
/**
|
|
379
|
+
* @remarks
|
|
380
|
+
* KeyboardEvent.DOM_VK_INSERT
|
|
381
|
+
*
|
|
382
|
+
*/
|
|
228
383
|
INSERT = 45,
|
|
384
|
+
/**
|
|
385
|
+
* @remarks
|
|
386
|
+
* KeyboardEvent.DOM_VK_DELETE
|
|
387
|
+
*
|
|
388
|
+
*/
|
|
229
389
|
DELETE = 46,
|
|
390
|
+
/**
|
|
391
|
+
* @remarks
|
|
392
|
+
* KeyboardEvent.DOM_VK_0
|
|
393
|
+
*
|
|
394
|
+
*/
|
|
230
395
|
KEY_0 = 48,
|
|
396
|
+
/**
|
|
397
|
+
* @remarks
|
|
398
|
+
* KeyboardEvent.DOM_VK_1
|
|
399
|
+
*
|
|
400
|
+
*/
|
|
231
401
|
KEY_1 = 49,
|
|
402
|
+
/**
|
|
403
|
+
* @remarks
|
|
404
|
+
* KeyboardEvent.DOM_VK_2
|
|
405
|
+
*
|
|
406
|
+
*/
|
|
232
407
|
KEY_2 = 50,
|
|
408
|
+
/**
|
|
409
|
+
* @remarks
|
|
410
|
+
* KeyboardEvent.DOM_VK_3
|
|
411
|
+
*
|
|
412
|
+
*/
|
|
233
413
|
KEY_3 = 51,
|
|
414
|
+
/**
|
|
415
|
+
* @remarks
|
|
416
|
+
* KeyboardEvent.DOM_VK_4
|
|
417
|
+
*
|
|
418
|
+
*/
|
|
234
419
|
KEY_4 = 52,
|
|
420
|
+
/**
|
|
421
|
+
* @remarks
|
|
422
|
+
* KeyboardEvent.DOM_VK_5
|
|
423
|
+
*
|
|
424
|
+
*/
|
|
235
425
|
KEY_5 = 53,
|
|
426
|
+
/**
|
|
427
|
+
* @remarks
|
|
428
|
+
* KeyboardEvent.DOM_VK_6
|
|
429
|
+
*
|
|
430
|
+
*/
|
|
236
431
|
KEY_6 = 54,
|
|
432
|
+
/**
|
|
433
|
+
* @remarks
|
|
434
|
+
* KeyboardEvent.DOM_VK_7
|
|
435
|
+
*
|
|
436
|
+
*/
|
|
237
437
|
KEY_7 = 55,
|
|
438
|
+
/**
|
|
439
|
+
* @remarks
|
|
440
|
+
* KeyboardEvent.DOM_VK_8
|
|
441
|
+
*
|
|
442
|
+
*/
|
|
238
443
|
KEY_8 = 56,
|
|
444
|
+
/**
|
|
445
|
+
* @remarks
|
|
446
|
+
* KeyboardEvent.DOM_VK_9
|
|
447
|
+
*
|
|
448
|
+
*/
|
|
239
449
|
KEY_9 = 57,
|
|
450
|
+
/**
|
|
451
|
+
* @remarks
|
|
452
|
+
* KeyboardEvent.DOM_VK_A
|
|
453
|
+
*
|
|
454
|
+
*/
|
|
240
455
|
KEY_A = 65,
|
|
456
|
+
/**
|
|
457
|
+
* @remarks
|
|
458
|
+
* KeyboardEvent.DOM_VK_B
|
|
459
|
+
*
|
|
460
|
+
*/
|
|
241
461
|
KEY_B = 66,
|
|
462
|
+
/**
|
|
463
|
+
* @remarks
|
|
464
|
+
* KeyboardEvent.DOM_VK_C
|
|
465
|
+
*
|
|
466
|
+
*/
|
|
242
467
|
KEY_C = 67,
|
|
468
|
+
/**
|
|
469
|
+
* @remarks
|
|
470
|
+
* KeyboardEvent.DOM_VK_D
|
|
471
|
+
*
|
|
472
|
+
*/
|
|
243
473
|
KEY_D = 68,
|
|
474
|
+
/**
|
|
475
|
+
* @remarks
|
|
476
|
+
* KeyboardEvent.DOM_VK_E
|
|
477
|
+
*
|
|
478
|
+
*/
|
|
244
479
|
KEY_E = 69,
|
|
480
|
+
/**
|
|
481
|
+
* @remarks
|
|
482
|
+
* KeyboardEvent.DOM_VK_F
|
|
483
|
+
*
|
|
484
|
+
*/
|
|
245
485
|
KEY_F = 70,
|
|
486
|
+
/**
|
|
487
|
+
* @remarks
|
|
488
|
+
* KeyboardEvent.DOM_VK_G
|
|
489
|
+
*
|
|
490
|
+
*/
|
|
246
491
|
KEY_G = 71,
|
|
492
|
+
/**
|
|
493
|
+
* @remarks
|
|
494
|
+
* KeyboardEvent.DOM_VK_H
|
|
495
|
+
*
|
|
496
|
+
*/
|
|
247
497
|
KEY_H = 72,
|
|
498
|
+
/**
|
|
499
|
+
* @remarks
|
|
500
|
+
* KeyboardEvent.DOM_VK_I
|
|
501
|
+
*
|
|
502
|
+
*/
|
|
248
503
|
KEY_I = 73,
|
|
504
|
+
/**
|
|
505
|
+
* @remarks
|
|
506
|
+
* KeyboardEvent.DOM_VK_J
|
|
507
|
+
*
|
|
508
|
+
*/
|
|
249
509
|
KEY_J = 74,
|
|
510
|
+
/**
|
|
511
|
+
* @remarks
|
|
512
|
+
* KeyboardEvent.DOM_VK_K
|
|
513
|
+
*
|
|
514
|
+
*/
|
|
250
515
|
KEY_K = 75,
|
|
516
|
+
/**
|
|
517
|
+
* @remarks
|
|
518
|
+
* KeyboardEvent.DOM_VK_L
|
|
519
|
+
*
|
|
520
|
+
*/
|
|
251
521
|
KEY_L = 76,
|
|
522
|
+
/**
|
|
523
|
+
* @remarks
|
|
524
|
+
* KeyboardEvent.DOM_VK_M
|
|
525
|
+
*
|
|
526
|
+
*/
|
|
252
527
|
KEY_M = 77,
|
|
528
|
+
/**
|
|
529
|
+
* @remarks
|
|
530
|
+
* KeyboardEvent.DOM_VK_N
|
|
531
|
+
*
|
|
532
|
+
*/
|
|
253
533
|
KEY_N = 78,
|
|
534
|
+
/**
|
|
535
|
+
* @remarks
|
|
536
|
+
* KeyboardEvent.DOM_VK_O
|
|
537
|
+
*
|
|
538
|
+
*/
|
|
254
539
|
KEY_O = 79,
|
|
540
|
+
/**
|
|
541
|
+
* @remarks
|
|
542
|
+
* KeyboardEvent.DOM_VK_P
|
|
543
|
+
*
|
|
544
|
+
*/
|
|
255
545
|
KEY_P = 80,
|
|
546
|
+
/**
|
|
547
|
+
* @remarks
|
|
548
|
+
* KeyboardEvent.DOM_VK_Q
|
|
549
|
+
*
|
|
550
|
+
*/
|
|
256
551
|
KEY_Q = 81,
|
|
552
|
+
/**
|
|
553
|
+
* @remarks
|
|
554
|
+
* KeyboardEvent.DOM_VK_R
|
|
555
|
+
*
|
|
556
|
+
*/
|
|
257
557
|
KEY_R = 82,
|
|
558
|
+
/**
|
|
559
|
+
* @remarks
|
|
560
|
+
* KeyboardEvent.DOM_VK_S
|
|
561
|
+
*
|
|
562
|
+
*/
|
|
258
563
|
KEY_S = 83,
|
|
564
|
+
/**
|
|
565
|
+
* @remarks
|
|
566
|
+
* KeyboardEvent.DOM_VK_T
|
|
567
|
+
*
|
|
568
|
+
*/
|
|
259
569
|
KEY_T = 84,
|
|
570
|
+
/**
|
|
571
|
+
* @remarks
|
|
572
|
+
* KeyboardEvent.DOM_VK_U
|
|
573
|
+
*
|
|
574
|
+
*/
|
|
260
575
|
KEY_U = 85,
|
|
576
|
+
/**
|
|
577
|
+
* @remarks
|
|
578
|
+
* KeyboardEvent.DOM_VK_V
|
|
579
|
+
*
|
|
580
|
+
*/
|
|
261
581
|
KEY_V = 86,
|
|
582
|
+
/**
|
|
583
|
+
* @remarks
|
|
584
|
+
* KeyboardEvent.DOM_VK_W
|
|
585
|
+
*
|
|
586
|
+
*/
|
|
262
587
|
KEY_W = 87,
|
|
263
|
-
|
|
264
|
-
|
|
588
|
+
/**
|
|
589
|
+
* @remarks
|
|
590
|
+
* KeyboardEvent.DOM_VK_X
|
|
591
|
+
*
|
|
592
|
+
*/
|
|
593
|
+
KEY_X = 88,
|
|
594
|
+
/**
|
|
595
|
+
* @remarks
|
|
596
|
+
* KeyboardEvent.DOM_VK_Y
|
|
597
|
+
*
|
|
598
|
+
*/
|
|
599
|
+
KEY_Y = 89,
|
|
600
|
+
/**
|
|
601
|
+
* @remarks
|
|
602
|
+
* KeyboardEvent.DOM_VK_Z
|
|
603
|
+
*
|
|
604
|
+
*/
|
|
265
605
|
KEY_Z = 90,
|
|
606
|
+
/**
|
|
607
|
+
* @remarks
|
|
608
|
+
* KeyboardEvent.DOM_VK_NUMPAD0
|
|
609
|
+
*
|
|
610
|
+
*/
|
|
266
611
|
NUMPAD_0 = 96,
|
|
612
|
+
/**
|
|
613
|
+
* @remarks
|
|
614
|
+
* KeyboardEvent.DOM_VK_NUMPAD1
|
|
615
|
+
*
|
|
616
|
+
*/
|
|
267
617
|
NUMPAD_1 = 97,
|
|
618
|
+
/**
|
|
619
|
+
* @remarks
|
|
620
|
+
* KeyboardEvent.DOM_VK_NUMPAD2
|
|
621
|
+
*
|
|
622
|
+
*/
|
|
268
623
|
NUMPAD_2 = 98,
|
|
624
|
+
/**
|
|
625
|
+
* @remarks
|
|
626
|
+
* KeyboardEvent.DOM_VK_NUMPAD3
|
|
627
|
+
*
|
|
628
|
+
*/
|
|
269
629
|
NUMPAD_3 = 99,
|
|
630
|
+
/**
|
|
631
|
+
* @remarks
|
|
632
|
+
* KeyboardEvent.DOM_VK_NUMPAD4
|
|
633
|
+
*
|
|
634
|
+
*/
|
|
270
635
|
NUMPAD_4 = 100,
|
|
636
|
+
/**
|
|
637
|
+
* @remarks
|
|
638
|
+
* KeyboardEvent.DOM_VK_NUMPAD5
|
|
639
|
+
*
|
|
640
|
+
*/
|
|
271
641
|
NUMPAD_5 = 101,
|
|
642
|
+
/**
|
|
643
|
+
* @remarks
|
|
644
|
+
* KeyboardEvent.DOM_VK_NUMPAD6
|
|
645
|
+
*
|
|
646
|
+
*/
|
|
272
647
|
NUMPAD_6 = 102,
|
|
648
|
+
/**
|
|
649
|
+
* @remarks
|
|
650
|
+
* KeyboardEvent.DOM_VK_NUMPAD7
|
|
651
|
+
*
|
|
652
|
+
*/
|
|
273
653
|
NUMPAD_7 = 103,
|
|
654
|
+
/**
|
|
655
|
+
* @remarks
|
|
656
|
+
* KeyboardEvent.DOM_VK_NUMPAD8
|
|
657
|
+
*
|
|
658
|
+
*/
|
|
274
659
|
NUMPAD_8 = 104,
|
|
660
|
+
/**
|
|
661
|
+
* @remarks
|
|
662
|
+
* KeyboardEvent.DOM_VK_NUMPAD9
|
|
663
|
+
*
|
|
664
|
+
*/
|
|
275
665
|
NUMPAD_9 = 105,
|
|
666
|
+
/**
|
|
667
|
+
* @remarks
|
|
668
|
+
* KeyboardEvent.DOM_VK_MULTIPLY
|
|
669
|
+
*
|
|
670
|
+
*/
|
|
276
671
|
NUMPAD_MULTIPLY = 106,
|
|
672
|
+
/**
|
|
673
|
+
* @remarks
|
|
674
|
+
* KeyboardEvent.DOM_VK_ADD
|
|
675
|
+
*
|
|
676
|
+
*/
|
|
277
677
|
NUMPAD_ADD = 107,
|
|
678
|
+
/**
|
|
679
|
+
* @remarks
|
|
680
|
+
* KeyboardEvent.DOM_VK_SEPARATOR
|
|
681
|
+
*
|
|
682
|
+
*/
|
|
278
683
|
NUMPAD_SEPARATOR = 108,
|
|
684
|
+
/**
|
|
685
|
+
* @remarks
|
|
686
|
+
* KeyboardEvent.DOM_VK_SUBTRACT
|
|
687
|
+
*
|
|
688
|
+
*/
|
|
279
689
|
NUMPAD_SUBTRACT = 109,
|
|
690
|
+
/**
|
|
691
|
+
* @remarks
|
|
692
|
+
* KeyboardEvent.DOM_VK_DECIMAL
|
|
693
|
+
*
|
|
694
|
+
*/
|
|
280
695
|
NUMPAD_DECIMAL = 110,
|
|
696
|
+
/**
|
|
697
|
+
* @remarks
|
|
698
|
+
* KeyboardEvent.DOM_VK_DIVIDE
|
|
699
|
+
*
|
|
700
|
+
*/
|
|
281
701
|
NUMPAD_DIVIDE = 111,
|
|
702
|
+
/**
|
|
703
|
+
* @remarks
|
|
704
|
+
* KeyboardEvent.DOM_VK_F1
|
|
705
|
+
*
|
|
706
|
+
*/
|
|
282
707
|
F1 = 112,
|
|
708
|
+
/**
|
|
709
|
+
* @remarks
|
|
710
|
+
* KeyboardEvent.DOM_VK_F2
|
|
711
|
+
*
|
|
712
|
+
*/
|
|
283
713
|
F2 = 113,
|
|
714
|
+
/**
|
|
715
|
+
* @remarks
|
|
716
|
+
* KeyboardEvent.DOM_VK_F3
|
|
717
|
+
*
|
|
718
|
+
*/
|
|
284
719
|
F3 = 114,
|
|
720
|
+
/**
|
|
721
|
+
* @remarks
|
|
722
|
+
* KeyboardEvent.DOM_VK_F4
|
|
723
|
+
*
|
|
724
|
+
*/
|
|
285
725
|
F4 = 115,
|
|
726
|
+
/**
|
|
727
|
+
* @remarks
|
|
728
|
+
* KeyboardEvent.DOM_VK_F5
|
|
729
|
+
*
|
|
730
|
+
*/
|
|
286
731
|
F5 = 116,
|
|
732
|
+
/**
|
|
733
|
+
* @remarks
|
|
734
|
+
* KeyboardEvent.DOM_VK_F6
|
|
735
|
+
*
|
|
736
|
+
*/
|
|
287
737
|
F6 = 117,
|
|
738
|
+
/**
|
|
739
|
+
* @remarks
|
|
740
|
+
* KeyboardEvent.DOM_VK_F7
|
|
741
|
+
*
|
|
742
|
+
*/
|
|
288
743
|
F7 = 118,
|
|
744
|
+
/**
|
|
745
|
+
* @remarks
|
|
746
|
+
* KeyboardEvent.DOM_VK_F8
|
|
747
|
+
*
|
|
748
|
+
*/
|
|
289
749
|
F8 = 119,
|
|
750
|
+
/**
|
|
751
|
+
* @remarks
|
|
752
|
+
* KeyboardEvent.DOM_VK_F9
|
|
753
|
+
*
|
|
754
|
+
*/
|
|
290
755
|
F9 = 120,
|
|
756
|
+
/**
|
|
757
|
+
* @remarks
|
|
758
|
+
* KeyboardEvent.DOM_VK_F10
|
|
759
|
+
*
|
|
760
|
+
*/
|
|
291
761
|
F10 = 121,
|
|
762
|
+
/**
|
|
763
|
+
* @remarks
|
|
764
|
+
* KeyboardEvent.DOM_VK_F11
|
|
765
|
+
*
|
|
766
|
+
*/
|
|
292
767
|
F11 = 122,
|
|
768
|
+
/**
|
|
769
|
+
* @remarks
|
|
770
|
+
* KeyboardEvent.DOM_VK_F12
|
|
771
|
+
*
|
|
772
|
+
*/
|
|
293
773
|
F12 = 123,
|
|
774
|
+
/**
|
|
775
|
+
* @remarks
|
|
776
|
+
* KeyboardEvent.DOM_VK_COMMA, ie. ','
|
|
777
|
+
*
|
|
778
|
+
*/
|
|
294
779
|
COMMA = 188,
|
|
780
|
+
/**
|
|
781
|
+
* @remarks
|
|
782
|
+
* KeyboardEvent.DOM_VK_PERIOD, ie. '.'
|
|
783
|
+
*
|
|
784
|
+
*/
|
|
295
785
|
PERIOD = 190,
|
|
786
|
+
/**
|
|
787
|
+
* @remarks
|
|
788
|
+
* KeyboardEvent.DOM_VK_SLASH, ie. '/'
|
|
789
|
+
*
|
|
790
|
+
*/
|
|
296
791
|
SLASH = 191,
|
|
792
|
+
/**
|
|
793
|
+
* @remarks
|
|
794
|
+
* KeyboardEvent.DOM_VK_BACK_QUOTE, ie. '`'
|
|
795
|
+
*
|
|
796
|
+
*/
|
|
297
797
|
BACK_QUOTE = 192,
|
|
798
|
+
/**
|
|
799
|
+
* @remarks
|
|
800
|
+
* KeyboardEvent.DOM_VK_OPEN_BRACKET, ie. '['
|
|
801
|
+
*
|
|
802
|
+
*/
|
|
298
803
|
BRACKET_OPEN = 219,
|
|
804
|
+
/**
|
|
805
|
+
* @remarks
|
|
806
|
+
* KeyboardEvent.DOM_VK_BACK_SLASH, ie. '\'
|
|
807
|
+
*
|
|
808
|
+
*/
|
|
299
809
|
BACK_SLASH = 220,
|
|
300
|
-
BRACKET_CLOSE = 221,
|
|
301
|
-
QUOTE = 222,
|
|
302
|
-
}
|
|
303
|
-
|
|
304
|
-
/**
|
|
305
|
-
* Keyboard Key Actions
|
|
306
|
-
*/
|
|
307
|
-
export declare enum KeyInputType {
|
|
308
810
|
/**
|
|
309
811
|
* @remarks
|
|
310
|
-
*
|
|
812
|
+
* KeyboardEvent.DOM_VK_CLOSE_BRACKET, ie. ']'
|
|
311
813
|
*
|
|
312
814
|
*/
|
|
313
|
-
|
|
815
|
+
BRACKET_CLOSE = 221,
|
|
314
816
|
/**
|
|
315
817
|
* @remarks
|
|
316
|
-
*
|
|
818
|
+
* KeyboardEvent.DOM_VK_BACK_QUOTE, ie. '"'
|
|
317
819
|
*
|
|
318
820
|
*/
|
|
319
|
-
|
|
821
|
+
QUOTE = 222,
|
|
822
|
+
}
|
|
823
|
+
|
|
824
|
+
/**
|
|
825
|
+
* Alignment options for UI elements
|
|
826
|
+
*/
|
|
827
|
+
export declare enum LayoutAlignment {
|
|
828
|
+
Left = 0,
|
|
829
|
+
Center = 1,
|
|
830
|
+
Right = 2,
|
|
320
831
|
}
|
|
321
832
|
|
|
322
833
|
/**
|
|
@@ -374,6 +885,27 @@ export declare enum MouseInputType {
|
|
|
374
885
|
DragEnd = 7,
|
|
375
886
|
}
|
|
376
887
|
|
|
888
|
+
/**
|
|
889
|
+
* The possible variants of a Number property item.
|
|
890
|
+
*/
|
|
891
|
+
export declare enum NumberPropertyItemVariant {
|
|
892
|
+
InputField = 0,
|
|
893
|
+
InputFieldAndSlider = 1,
|
|
894
|
+
}
|
|
895
|
+
|
|
896
|
+
export enum Plane {
|
|
897
|
+
XY = 'XY',
|
|
898
|
+
XZ = 'XZ',
|
|
899
|
+
YZ = 'YZ',
|
|
900
|
+
}
|
|
901
|
+
|
|
902
|
+
export enum PlayerPermissionLevel {
|
|
903
|
+
Visitor = 0,
|
|
904
|
+
Member = 1,
|
|
905
|
+
Operator = 2,
|
|
906
|
+
Custom = 3,
|
|
907
|
+
}
|
|
908
|
+
|
|
377
909
|
export enum PlaytestSessionResult {
|
|
378
910
|
OK = 0,
|
|
379
911
|
InvalidSessionHandle = 1,
|
|
@@ -389,12 +921,40 @@ export enum PlaytestSessionResult {
|
|
|
389
921
|
UnspecifiedError = 11,
|
|
390
922
|
}
|
|
391
923
|
|
|
924
|
+
export enum PrimitiveType {
|
|
925
|
+
AxialSphere = 'AxialSphere',
|
|
926
|
+
Box = 'Box',
|
|
927
|
+
Disc = 'Disc',
|
|
928
|
+
Line = 'Line',
|
|
929
|
+
Text = 'Text',
|
|
930
|
+
}
|
|
931
|
+
|
|
392
932
|
export enum ProjectExportType {
|
|
393
933
|
PlayableWorld = 0,
|
|
394
934
|
ProjectBackup = 1,
|
|
395
935
|
WorldTemplate = 2,
|
|
396
936
|
}
|
|
397
937
|
|
|
938
|
+
/**
|
|
939
|
+
* Type of item that can be added to the property pane
|
|
940
|
+
*/
|
|
941
|
+
export declare enum PropertyItemType {
|
|
942
|
+
BlockList = 'editorUI:BlockList',
|
|
943
|
+
Boolean = 'editorUI:Boolean',
|
|
944
|
+
Button = 'editorUI:Button',
|
|
945
|
+
ColorPicker = 'editorUI:ColorPicker',
|
|
946
|
+
ComboBox = 'editorUI:ComboBox',
|
|
947
|
+
Divider = 'editorUI:Divider',
|
|
948
|
+
Dropdown = 'editorUI:Dropdown',
|
|
949
|
+
Image = 'editorUI:Image',
|
|
950
|
+
Number = 'editorUI:Number',
|
|
951
|
+
String = 'editorUI:String',
|
|
952
|
+
SubPane = 'editorUI:SubPane',
|
|
953
|
+
Table = 'editorUI:Table',
|
|
954
|
+
Text = 'editorUI:Text',
|
|
955
|
+
Vector3 = 'editorUI:Vector3',
|
|
956
|
+
}
|
|
957
|
+
|
|
398
958
|
/**
|
|
399
959
|
* Define the visibility of the status bar item If the tool
|
|
400
960
|
* does not have an `ISimpleToolPropertyPane` component, then
|
|
@@ -405,6 +965,36 @@ export declare enum SimpleToolStatusBarVisibility {
|
|
|
405
965
|
VisibleWhenActive = 1,
|
|
406
966
|
}
|
|
407
967
|
|
|
968
|
+
export enum SplineType {
|
|
969
|
+
Hermite = 'Hermite',
|
|
970
|
+
Line = 'Line',
|
|
971
|
+
}
|
|
972
|
+
|
|
973
|
+
export enum ThemeSettingsColorKey {
|
|
974
|
+
ControlsGeneralFill = 'ControlsGeneralFill',
|
|
975
|
+
ControlsGeneralHighlight = 'ControlsGeneralHighlight',
|
|
976
|
+
CoordinateControlX = 'CoordinateControlX',
|
|
977
|
+
CoordinateControlY = 'CoordinateControlY',
|
|
978
|
+
CoordinateControlZ = 'CoordinateControlZ',
|
|
979
|
+
CursorVolumeBorder = 'CursorVolumeBorder',
|
|
980
|
+
CursorVolumeFill = 'CursorVolumeFill',
|
|
981
|
+
PlacementVolumeBorder = 'PlacementVolumeBorder',
|
|
982
|
+
PlacementVolumeFill = 'PlacementVolumeFill',
|
|
983
|
+
PrefillVolumeBorder = 'PrefillVolumeBorder',
|
|
984
|
+
PrefillVolumeFill = 'PrefillVolumeFill',
|
|
985
|
+
SelectionVolumeBorder = 'SelectionVolumeBorder',
|
|
986
|
+
SelectionVolumeFill = 'SelectionVolumeFill',
|
|
987
|
+
}
|
|
988
|
+
|
|
989
|
+
export enum WidgetComponentType {
|
|
990
|
+
Entity = 'Entity',
|
|
991
|
+
Gizmo = 'Gizmo',
|
|
992
|
+
Guide = 'Guide',
|
|
993
|
+
RenderPrim = 'RenderPrim',
|
|
994
|
+
Spline = 'Spline',
|
|
995
|
+
Text = 'Text',
|
|
996
|
+
}
|
|
997
|
+
|
|
408
998
|
export enum WidgetGroupSelectionMode {
|
|
409
999
|
Multiple = 'Multiple',
|
|
410
1000
|
None = 'None',
|
|
@@ -441,34 +1031,38 @@ export type ActivationFunctionType<PerPlayerStorageType> = (
|
|
|
441
1031
|
uiSession: IPlayerUISession<PerPlayerStorageType>,
|
|
442
1032
|
) => IDisposable[];
|
|
443
1033
|
|
|
444
|
-
/**
|
|
445
|
-
* The possible variants of a button.
|
|
446
|
-
*/
|
|
447
|
-
export declare type ButtonVariant = 'secondary' | 'primary' | 'destructive' | 'hero';
|
|
448
|
-
|
|
449
1034
|
/**
|
|
450
1035
|
* A generic handler for an event sink.
|
|
451
1036
|
*/
|
|
452
1037
|
export declare type EventHandler<T> = (eventArg: T) => void;
|
|
453
1038
|
|
|
454
1039
|
/**
|
|
455
|
-
* A property item which supports
|
|
456
|
-
* the bound action
|
|
1040
|
+
* A property item which supports BlockList properties
|
|
457
1041
|
*/
|
|
458
|
-
export type
|
|
459
|
-
|
|
1042
|
+
export type IBlockListPropertyItem<T extends PropertyBag, Prop extends keyof T & string> = IPropertyItem<T, Prop> & {
|
|
1043
|
+
updateBlockList(newBlockList: string[]): void;
|
|
460
1044
|
};
|
|
461
1045
|
|
|
462
1046
|
/**
|
|
463
1047
|
* A property item which supports Dropdown properties
|
|
464
1048
|
*/
|
|
465
|
-
export type
|
|
1049
|
+
export type IDropdownPropertyItem_deprecated<
|
|
466
1050
|
T extends Omit<PropertyBag, Prop> & {
|
|
467
1051
|
[key in Prop]: number;
|
|
468
1052
|
},
|
|
469
1053
|
Prop extends keyof T & string,
|
|
470
1054
|
> = IPropertyItem<T, Prop> & IDropdownPropertyItemMixIn;
|
|
471
1055
|
|
|
1056
|
+
export declare type ImageResourceData = {
|
|
1057
|
+
path: string;
|
|
1058
|
+
type: ImageResourceType;
|
|
1059
|
+
};
|
|
1060
|
+
|
|
1061
|
+
/**
|
|
1062
|
+
* Type that can be an observable or a value.
|
|
1063
|
+
*/
|
|
1064
|
+
export type IObservableProp<T> = IObservable<T> | T;
|
|
1065
|
+
|
|
472
1066
|
/**
|
|
473
1067
|
* The IPlayerUISession represents the editor user interface
|
|
474
1068
|
* for a given player and given extension. Extensions
|
|
@@ -488,6 +1082,7 @@ export type IPlayerUISession<PerPlayerStorage = Record<string, never>> = {
|
|
|
488
1082
|
readonly actionManager: ActionManager;
|
|
489
1083
|
readonly inputManager: IGlobalInputManager;
|
|
490
1084
|
readonly menuBar: IMenuContainer;
|
|
1085
|
+
readonly actionBar: IActionBar;
|
|
491
1086
|
readonly toolRail: IModalToolContainer;
|
|
492
1087
|
readonly log: IPlayerLogger;
|
|
493
1088
|
readonly extensionContext: ExtensionContext;
|
|
@@ -508,7 +1103,10 @@ export type ITablePropertyItem<T extends PropertyBag, Prop extends keyof T & str
|
|
|
508
1103
|
/**
|
|
509
1104
|
* A property item which supports Vector3 properties
|
|
510
1105
|
*/
|
|
511
|
-
export type
|
|
1106
|
+
export type IVector3PropertyItem_deprecated<T extends PropertyBag, Prop extends keyof T & string> = IPropertyItem<
|
|
1107
|
+
T,
|
|
1108
|
+
Prop
|
|
1109
|
+
> & {
|
|
512
1110
|
updateAxisLimits(limits: {
|
|
513
1111
|
minX?: number;
|
|
514
1112
|
maxX?: number;
|
|
@@ -519,6 +1117,34 @@ export type IVector3PropertyItem<T extends PropertyBag, Prop extends keyof T & s
|
|
|
519
1117
|
}): void;
|
|
520
1118
|
};
|
|
521
1119
|
|
|
1120
|
+
/**
|
|
1121
|
+
* Keyboard binding properties.
|
|
1122
|
+
*/
|
|
1123
|
+
export type KeyBinding = {
|
|
1124
|
+
key: KeyboardKey;
|
|
1125
|
+
modifier?: InputModifier;
|
|
1126
|
+
};
|
|
1127
|
+
|
|
1128
|
+
/**
|
|
1129
|
+
* Additional information about key binding.
|
|
1130
|
+
*/
|
|
1131
|
+
export type KeyBindingInfo = {
|
|
1132
|
+
uniqueId: string;
|
|
1133
|
+
label?: string;
|
|
1134
|
+
tooltip?: string;
|
|
1135
|
+
};
|
|
1136
|
+
|
|
1137
|
+
/**
|
|
1138
|
+
* Represents a localized string or an object with a localized
|
|
1139
|
+
* string and optional properties
|
|
1140
|
+
*/
|
|
1141
|
+
export declare type LocalizedString =
|
|
1142
|
+
| string
|
|
1143
|
+
| {
|
|
1144
|
+
id: string;
|
|
1145
|
+
props?: string[];
|
|
1146
|
+
};
|
|
1147
|
+
|
|
522
1148
|
/**
|
|
523
1149
|
* Modal tool lifecycle event payload
|
|
524
1150
|
*/
|
|
@@ -664,6 +1290,28 @@ export declare class BedrockEventSubscriptionCache {
|
|
|
664
1290
|
teardown(): void;
|
|
665
1291
|
}
|
|
666
1292
|
|
|
1293
|
+
/**
|
|
1294
|
+
* Validates observable objects that support string as
|
|
1295
|
+
* BlockType
|
|
1296
|
+
*/
|
|
1297
|
+
export declare class BlockIdentifierObservableValidator implements ObservableValidator<string> {
|
|
1298
|
+
/**
|
|
1299
|
+
* @remarks
|
|
1300
|
+
* This property can't be edited in read-only mode.
|
|
1301
|
+
*
|
|
1302
|
+
*/
|
|
1303
|
+
protected _defaultValue: string;
|
|
1304
|
+
get defaultValue(): string;
|
|
1305
|
+
/**
|
|
1306
|
+
* @remarks
|
|
1307
|
+
* Constructs a new instance of the
|
|
1308
|
+
* `BlockIdentifierObservableValidator` class
|
|
1309
|
+
*
|
|
1310
|
+
*/
|
|
1311
|
+
constructor(defaultName: string);
|
|
1312
|
+
validate(newValue: string): string;
|
|
1313
|
+
}
|
|
1314
|
+
|
|
667
1315
|
export class BlockPalette {
|
|
668
1316
|
/**
|
|
669
1317
|
* @throws This function can throw errors.
|
|
@@ -699,17 +1347,52 @@ export class BlockPalette {
|
|
|
699
1347
|
|
|
700
1348
|
export class BlockPaletteManager {
|
|
701
1349
|
private constructor();
|
|
1350
|
+
/**
|
|
1351
|
+
* @remarks
|
|
1352
|
+
* This function can't be called in read-only mode.
|
|
1353
|
+
*
|
|
1354
|
+
*/
|
|
1355
|
+
addOrReplacePalette(paletteId: string, palette: BlockPalette): void;
|
|
1356
|
+
getPalette(paletteId: string): BlockPalette | undefined;
|
|
1357
|
+
getPaletteIdList(): string[];
|
|
1358
|
+
/**
|
|
1359
|
+
* @throws This function can throw errors.
|
|
1360
|
+
*/
|
|
1361
|
+
getPaletteItem(paletteId: string, index: number): IBlockPaletteItem;
|
|
1362
|
+
getPrimaryPalette(): BlockPalette;
|
|
702
1363
|
/**
|
|
703
1364
|
* @throws This function can throw errors.
|
|
704
1365
|
*/
|
|
705
1366
|
getSelectedBlockType(): minecraftserver.BlockType;
|
|
1367
|
+
getSelectedItem(): IBlockPaletteItem;
|
|
1368
|
+
/**
|
|
1369
|
+
* @remarks
|
|
1370
|
+
* This function can't be called in read-only mode.
|
|
1371
|
+
*
|
|
1372
|
+
* @throws This function can throw errors.
|
|
1373
|
+
*/
|
|
1374
|
+
removePalette(paletteId: string): void;
|
|
1375
|
+
/**
|
|
1376
|
+
* @remarks
|
|
1377
|
+
* This function can't be called in read-only mode.
|
|
1378
|
+
*
|
|
1379
|
+
* @throws This function can throw errors.
|
|
1380
|
+
*/
|
|
1381
|
+
setPaletteItem(paletteId: string, index: number, item: IBlockPaletteItem): void;
|
|
1382
|
+
/**
|
|
1383
|
+
* @remarks
|
|
1384
|
+
* This function can't be called in read-only mode.
|
|
1385
|
+
*
|
|
1386
|
+
* @throws This function can throw errors.
|
|
1387
|
+
*/
|
|
1388
|
+
setPrimaryPalette(paletteId: string): void;
|
|
706
1389
|
/**
|
|
707
1390
|
* @remarks
|
|
708
1391
|
* This function can't be called in read-only mode.
|
|
709
1392
|
*
|
|
710
1393
|
* @throws This function can throw errors.
|
|
711
1394
|
*/
|
|
712
|
-
|
|
1395
|
+
setSelectedItem(item: IBlockPaletteItem): void;
|
|
713
1396
|
}
|
|
714
1397
|
|
|
715
1398
|
export class BrushShapeManager {
|
|
@@ -724,6 +1407,15 @@ export class BrushShapeManager {
|
|
|
724
1407
|
* @throws This function can throw errors.
|
|
725
1408
|
*/
|
|
726
1409
|
activateBrushShape(name: string): minecraftserver.CompoundBlockVolume;
|
|
1410
|
+
/**
|
|
1411
|
+
* @remarks
|
|
1412
|
+
* This function can't be called in read-only mode.
|
|
1413
|
+
*
|
|
1414
|
+
*/
|
|
1415
|
+
getBrushVolume(
|
|
1416
|
+
origin: minecraftserver.Vector3,
|
|
1417
|
+
pipeline: BrushPipelineOperation[],
|
|
1418
|
+
): minecraftserver.CompoundBlockVolume | undefined;
|
|
727
1419
|
/**
|
|
728
1420
|
* @remarks
|
|
729
1421
|
* This function can't be called in read-only mode.
|
|
@@ -752,6 +1444,28 @@ export class BrushShapeManager {
|
|
|
752
1444
|
uiSettingValueChanged(elementName: string, newValue: boolean | number | string | minecraftserver.Vector3): boolean;
|
|
753
1445
|
}
|
|
754
1446
|
|
|
1447
|
+
export class ClipboardChangeAfterEvent {
|
|
1448
|
+
private constructor();
|
|
1449
|
+
readonly isPrimary: boolean;
|
|
1450
|
+
readonly itemId: string;
|
|
1451
|
+
}
|
|
1452
|
+
|
|
1453
|
+
export class ClipboardChangeAfterEventSignal {
|
|
1454
|
+
private constructor();
|
|
1455
|
+
/**
|
|
1456
|
+
* @remarks
|
|
1457
|
+
* This function can't be called in read-only mode.
|
|
1458
|
+
*
|
|
1459
|
+
*/
|
|
1460
|
+
subscribe(callback: (arg: ClipboardChangeAfterEvent) => void): (arg: ClipboardChangeAfterEvent) => void;
|
|
1461
|
+
/**
|
|
1462
|
+
* @remarks
|
|
1463
|
+
* This function can't be called in read-only mode.
|
|
1464
|
+
*
|
|
1465
|
+
*/
|
|
1466
|
+
unsubscribe(callback: (arg: ClipboardChangeAfterEvent) => void): void;
|
|
1467
|
+
}
|
|
1468
|
+
|
|
755
1469
|
/**
|
|
756
1470
|
* A ClipboardItem is a handle to an object which represents a
|
|
757
1471
|
* set of blocks in a contained bounding area (most likely
|
|
@@ -966,6 +1680,27 @@ export class Cursor {
|
|
|
966
1680
|
* @throws This property can throw when used.
|
|
967
1681
|
*/
|
|
968
1682
|
readonly isVisible: boolean;
|
|
1683
|
+
/**
|
|
1684
|
+
* @remarks
|
|
1685
|
+
* This function can't be called in read-only mode.
|
|
1686
|
+
*
|
|
1687
|
+
* @throws This function can throw errors.
|
|
1688
|
+
*/
|
|
1689
|
+
attachClipboardItem(item: ClipboardItem): void;
|
|
1690
|
+
/**
|
|
1691
|
+
* @remarks
|
|
1692
|
+
* This function can't be called in read-only mode.
|
|
1693
|
+
*
|
|
1694
|
+
* @throws This function can throw errors.
|
|
1695
|
+
*/
|
|
1696
|
+
clearAttachment(): void;
|
|
1697
|
+
/**
|
|
1698
|
+
* @remarks
|
|
1699
|
+
* This function can't be called in read-only mode.
|
|
1700
|
+
*
|
|
1701
|
+
* @throws This function can throw errors.
|
|
1702
|
+
*/
|
|
1703
|
+
getAttachmentProperties(): CursorAttachmentProperties;
|
|
969
1704
|
/**
|
|
970
1705
|
* @remarks
|
|
971
1706
|
* Get the world position of the 3D block cursor
|
|
@@ -988,8 +1723,7 @@ export class Cursor {
|
|
|
988
1723
|
/**
|
|
989
1724
|
* @remarks
|
|
990
1725
|
* Hide the 3D block cursor from view until the corresponding
|
|
991
|
-
* {@link
|
|
992
|
-
* called
|
|
1726
|
+
* {@link Cursor.show} function is called
|
|
993
1727
|
*
|
|
994
1728
|
* This function can't be called in read-only mode.
|
|
995
1729
|
*
|
|
@@ -999,9 +1733,8 @@ export class Cursor {
|
|
|
999
1733
|
/**
|
|
1000
1734
|
* @remarks
|
|
1001
1735
|
* Manually offset the 3D block cursor by given amount.
|
|
1002
|
-
* Depending on the {@link
|
|
1003
|
-
*
|
|
1004
|
-
* - this function may have no effect
|
|
1736
|
+
* Depending on the {@link CursorProperties.controlMode} - this
|
|
1737
|
+
* function may have no effect
|
|
1005
1738
|
*
|
|
1006
1739
|
* This function can't be called in read-only mode.
|
|
1007
1740
|
*
|
|
@@ -1022,6 +1755,13 @@ export class Cursor {
|
|
|
1022
1755
|
* @throws This function can throw errors.
|
|
1023
1756
|
*/
|
|
1024
1757
|
resetToDefaultState(): void;
|
|
1758
|
+
/**
|
|
1759
|
+
* @remarks
|
|
1760
|
+
* This function can't be called in read-only mode.
|
|
1761
|
+
*
|
|
1762
|
+
* @throws This function can throw errors.
|
|
1763
|
+
*/
|
|
1764
|
+
setAttachmentProperties(properties: CursorAttachmentProperties): void;
|
|
1025
1765
|
/**
|
|
1026
1766
|
* @remarks
|
|
1027
1767
|
* Set the 3D block cursor properties to a given state
|
|
@@ -1045,6 +1785,29 @@ export class Cursor {
|
|
|
1045
1785
|
show(): void;
|
|
1046
1786
|
}
|
|
1047
1787
|
|
|
1788
|
+
export class CursorAttachmentPropertiesChangeAfterEvent {
|
|
1789
|
+
private constructor();
|
|
1790
|
+
readonly properties: CursorAttachmentProperties;
|
|
1791
|
+
}
|
|
1792
|
+
|
|
1793
|
+
export class CursorAttachmentPropertyChangeAfterEventSignal {
|
|
1794
|
+
private constructor();
|
|
1795
|
+
/**
|
|
1796
|
+
* @remarks
|
|
1797
|
+
* This function can't be called in read-only mode.
|
|
1798
|
+
*
|
|
1799
|
+
*/
|
|
1800
|
+
subscribe(
|
|
1801
|
+
callback: (arg: CursorAttachmentPropertiesChangeAfterEvent) => void,
|
|
1802
|
+
): (arg: CursorAttachmentPropertiesChangeAfterEvent) => void;
|
|
1803
|
+
/**
|
|
1804
|
+
* @remarks
|
|
1805
|
+
* This function can't be called in read-only mode.
|
|
1806
|
+
*
|
|
1807
|
+
*/
|
|
1808
|
+
unsubscribe(callback: (arg: CursorAttachmentPropertiesChangeAfterEvent) => void): void;
|
|
1809
|
+
}
|
|
1810
|
+
|
|
1048
1811
|
export class CursorPropertiesChangeAfterEvent {
|
|
1049
1812
|
private constructor();
|
|
1050
1813
|
readonly properties: CursorProperties;
|
|
@@ -1068,33 +1831,26 @@ export class CursorPropertyChangeAfterEventSignal {
|
|
|
1068
1831
|
unsubscribe(callback: (arg: CursorPropertiesChangeAfterEvent) => void): void;
|
|
1069
1832
|
}
|
|
1070
1833
|
|
|
1071
|
-
|
|
1072
|
-
|
|
1073
|
-
|
|
1074
|
-
|
|
1075
|
-
|
|
1076
|
-
readonly showTextOnlyWhenSelected: boolean;
|
|
1077
|
-
getText(): string;
|
|
1834
|
+
/**
|
|
1835
|
+
* Validates observable objects that support string as
|
|
1836
|
+
* EntityType
|
|
1837
|
+
*/
|
|
1838
|
+
export declare class EntityIdentifierObservableValidator implements ObservableValidator<string> {
|
|
1078
1839
|
/**
|
|
1079
1840
|
* @remarks
|
|
1080
|
-
* This
|
|
1841
|
+
* This property can't be edited in read-only mode.
|
|
1081
1842
|
*
|
|
1082
1843
|
*/
|
|
1083
|
-
|
|
1844
|
+
protected _defaultValue: string;
|
|
1845
|
+
get defaultValue(): string;
|
|
1084
1846
|
/**
|
|
1085
1847
|
* @remarks
|
|
1086
|
-
*
|
|
1848
|
+
* Constructs a new instance of the
|
|
1849
|
+
* `EntityIdentifierObservableValidator` class
|
|
1087
1850
|
*
|
|
1088
1851
|
*/
|
|
1089
|
-
|
|
1090
|
-
|
|
1091
|
-
|
|
1092
|
-
export class CustomWidgetMoveEventData {
|
|
1093
|
-
private constructor();
|
|
1094
|
-
readonly group: WidgetGroup;
|
|
1095
|
-
readonly location?: minecraftserver.Vector3;
|
|
1096
|
-
readonly rotation?: minecraftserver.Vector2;
|
|
1097
|
-
readonly widget: CustomWidget;
|
|
1852
|
+
constructor(defaultValue: string);
|
|
1853
|
+
validate(newValue: string): string;
|
|
1098
1854
|
}
|
|
1099
1855
|
|
|
1100
1856
|
export class ExportManager {
|
|
@@ -1105,7 +1861,7 @@ export class ExportManager {
|
|
|
1105
1861
|
*
|
|
1106
1862
|
* @throws This function can throw errors.
|
|
1107
1863
|
*/
|
|
1108
|
-
beginExportProject(options:
|
|
1864
|
+
beginExportProject(options: GameOptions): Promise<ExportResult>;
|
|
1109
1865
|
/**
|
|
1110
1866
|
* @remarks
|
|
1111
1867
|
* This function can't be called in read-only mode.
|
|
@@ -1113,6 +1869,21 @@ export class ExportManager {
|
|
|
1113
1869
|
* @throws This function can throw errors.
|
|
1114
1870
|
*/
|
|
1115
1871
|
canExportProject(): boolean;
|
|
1872
|
+
/**
|
|
1873
|
+
* @remarks
|
|
1874
|
+
* This function can't be called in read-only mode.
|
|
1875
|
+
*
|
|
1876
|
+
*/
|
|
1877
|
+
getGameOptions(useDefault?: boolean): GameOptions;
|
|
1878
|
+
/**
|
|
1879
|
+
* @remarks
|
|
1880
|
+
* This function can't be called in read-only mode.
|
|
1881
|
+
*
|
|
1882
|
+
* @throws This function can throw errors.
|
|
1883
|
+
*
|
|
1884
|
+
* {@link Error}
|
|
1885
|
+
*/
|
|
1886
|
+
getGameVersion(): string;
|
|
1116
1887
|
}
|
|
1117
1888
|
|
|
1118
1889
|
/**
|
|
@@ -1249,6 +2020,8 @@ export class ExtensionContext {
|
|
|
1249
2020
|
*/
|
|
1250
2021
|
export class ExtensionContextAfterEvents {
|
|
1251
2022
|
private constructor();
|
|
2023
|
+
readonly clipboardChange: ClipboardChangeAfterEventSignal;
|
|
2024
|
+
readonly cursorAttachmentPropertyChange: CursorAttachmentPropertyChangeAfterEventSignal;
|
|
1252
2025
|
readonly cursorPropertyChange: CursorPropertyChangeAfterEventSignal;
|
|
1253
2026
|
/**
|
|
1254
2027
|
* @remarks
|
|
@@ -1324,11 +2097,6 @@ export class IBlockPaletteItem {
|
|
|
1324
2097
|
setBlock(block: minecraftserver.BlockPermutation | minecraftserver.BlockType | string): void;
|
|
1325
2098
|
}
|
|
1326
2099
|
|
|
1327
|
-
// @ts-ignore Class inheritance allowed for native defined classes
|
|
1328
|
-
export class LineWidget extends Widget {
|
|
1329
|
-
private constructor();
|
|
1330
|
-
}
|
|
1331
|
-
|
|
1332
2100
|
/**
|
|
1333
2101
|
* The logger class is a utility class which allows editor
|
|
1334
2102
|
* extensions to communicate with the player from the server to
|
|
@@ -1466,6 +2234,47 @@ export class ModeChangeAfterEventSignal {
|
|
|
1466
2234
|
unsubscribe(callback: (arg: ModeChangeAfterEvent) => void): void;
|
|
1467
2235
|
}
|
|
1468
2236
|
|
|
2237
|
+
/**
|
|
2238
|
+
* Validates min/max limits of observable objects that support
|
|
2239
|
+
* number
|
|
2240
|
+
*/
|
|
2241
|
+
export declare class NumberLimitObservableValidator implements ObservableValidator<number> {
|
|
2242
|
+
/**
|
|
2243
|
+
* @remarks
|
|
2244
|
+
* This property can't be edited in read-only mode.
|
|
2245
|
+
*
|
|
2246
|
+
*/
|
|
2247
|
+
protected _isInteger?: boolean;
|
|
2248
|
+
/**
|
|
2249
|
+
* @remarks
|
|
2250
|
+
* This property can't be edited in read-only mode.
|
|
2251
|
+
*
|
|
2252
|
+
*/
|
|
2253
|
+
protected _max?: number;
|
|
2254
|
+
/**
|
|
2255
|
+
* @remarks
|
|
2256
|
+
* This property can't be edited in read-only mode.
|
|
2257
|
+
*
|
|
2258
|
+
*/
|
|
2259
|
+
protected _min?: number;
|
|
2260
|
+
/**
|
|
2261
|
+
* @remarks
|
|
2262
|
+
* Constructs a new instance of the
|
|
2263
|
+
* `NumberLimitObservableValidator` class
|
|
2264
|
+
*
|
|
2265
|
+
*/
|
|
2266
|
+
constructor(min: number | undefined, max: number | undefined, isInteger?: boolean);
|
|
2267
|
+
updateLimits(min: number | undefined, max: number | undefined): void;
|
|
2268
|
+
validate(newValue: number): number;
|
|
2269
|
+
}
|
|
2270
|
+
|
|
2271
|
+
/**
|
|
2272
|
+
* Used for validating an observable value before it gets set
|
|
2273
|
+
*/
|
|
2274
|
+
export declare abstract class ObservableValidator<T> {
|
|
2275
|
+
abstract validate(newValue: T): T | undefined;
|
|
2276
|
+
}
|
|
2277
|
+
|
|
1469
2278
|
export class PlaytestManager {
|
|
1470
2279
|
private constructor();
|
|
1471
2280
|
/**
|
|
@@ -1474,7 +2283,7 @@ export class PlaytestManager {
|
|
|
1474
2283
|
*
|
|
1475
2284
|
* @throws This function can throw errors.
|
|
1476
2285
|
*/
|
|
1477
|
-
beginPlaytest(options:
|
|
2286
|
+
beginPlaytest(options: GameOptions): Promise<PlaytestSessionResult>;
|
|
1478
2287
|
/**
|
|
1479
2288
|
* @remarks
|
|
1480
2289
|
* This function can't be called in read-only mode.
|
|
@@ -1517,6 +2326,7 @@ export class ProbabilityBlockPaletteItem extends IBlockPaletteItem {
|
|
|
1517
2326
|
* {@link Error}
|
|
1518
2327
|
*/
|
|
1519
2328
|
addBlock(block: minecraftserver.BlockPermutation | minecraftserver.BlockType | string, weight: number): void;
|
|
2329
|
+
getBlocks(): WeightedBlock[];
|
|
1520
2330
|
/**
|
|
1521
2331
|
* @remarks
|
|
1522
2332
|
* This function can't be called in read-only mode.
|
|
@@ -1670,7 +2480,7 @@ export class Selection {
|
|
|
1670
2480
|
*
|
|
1671
2481
|
* @param forceRelativity
|
|
1672
2482
|
* See the description for {@link
|
|
1673
|
-
* @minecraft
|
|
2483
|
+
* @minecraft/server.CompoundBlockVolume.peekLastVolume}
|
|
1674
2484
|
* @returns
|
|
1675
2485
|
* Returns undefined if the stack is empty
|
|
1676
2486
|
*/
|
|
@@ -1710,12 +2520,12 @@ export class Selection {
|
|
|
1710
2520
|
* This function can't be called in read-only mode.
|
|
1711
2521
|
*
|
|
1712
2522
|
* @param other
|
|
1713
|
-
* {@link @minecraft
|
|
2523
|
+
* {@link @minecraft/server.CompoundBlockVolume} - set the
|
|
1714
2524
|
* block component part of this selection to the specified
|
|
1715
2525
|
* compound block volume. This will completely replace all
|
|
1716
2526
|
* block volume definitions in the selection.
|
|
1717
|
-
* {@link
|
|
1718
|
-
*
|
|
2527
|
+
* {@link Selection} - replace the selection with the specified
|
|
2528
|
+
* selection
|
|
1719
2529
|
* @throws This function can throw errors.
|
|
1720
2530
|
*/
|
|
1721
2531
|
set(other: minecraftserver.CompoundBlockVolume | Selection): void;
|
|
@@ -1790,22 +2600,19 @@ export class SettingsManager {
|
|
|
1790
2600
|
*
|
|
1791
2601
|
*/
|
|
1792
2602
|
readonly graphics: GraphicsSettings;
|
|
2603
|
+
readonly theme: ThemeSettings;
|
|
1793
2604
|
}
|
|
1794
2605
|
|
|
1795
2606
|
export class SettingsUIElement {
|
|
1796
2607
|
readonly initialValue: boolean | number | string | minecraftserver.Vector3;
|
|
1797
|
-
readonly max?: number;
|
|
1798
|
-
readonly min?: number;
|
|
1799
2608
|
readonly name: string;
|
|
1800
|
-
readonly onChange: (arg: boolean | number | string | minecraftserver.Vector3) =>
|
|
1801
|
-
readonly options
|
|
2609
|
+
readonly onChange: (arg: boolean | number | string | minecraftserver.Vector3) => void;
|
|
2610
|
+
readonly options: SettingsUIElementOptions;
|
|
1802
2611
|
constructor(
|
|
1803
2612
|
name: string,
|
|
1804
2613
|
initialValue: boolean | number | string | minecraftserver.Vector3,
|
|
1805
|
-
onChange: (arg: boolean | number | string | minecraftserver.Vector3) =>
|
|
1806
|
-
|
|
1807
|
-
max?: number,
|
|
1808
|
-
options?: string[],
|
|
2614
|
+
onChange: (arg: boolean | number | string | minecraftserver.Vector3) => void,
|
|
2615
|
+
options?: SettingsUIElementOptions,
|
|
1809
2616
|
);
|
|
1810
2617
|
}
|
|
1811
2618
|
|
|
@@ -1821,9 +2628,37 @@ export class SimpleBlockPaletteItem extends IBlockPaletteItem {
|
|
|
1821
2628
|
* how to use this class and the wrapper framework
|
|
1822
2629
|
*/
|
|
1823
2630
|
export declare class SimpleToolWrapper implements IDisposable {
|
|
2631
|
+
/**
|
|
2632
|
+
* @remarks
|
|
2633
|
+
* The player UI session that the tool is running in Use this
|
|
2634
|
+
* to access the player UI session, or any of the session's
|
|
2635
|
+
* components
|
|
2636
|
+
*
|
|
2637
|
+
*/
|
|
1824
2638
|
get session(): IPlayerUISession;
|
|
2639
|
+
/**
|
|
2640
|
+
* @remarks
|
|
2641
|
+
* The simple tool instance that is created and managed by the
|
|
2642
|
+
* wrapper Use this to access any of the tools components, or
|
|
2643
|
+
* mess with the tools window visibility
|
|
2644
|
+
*
|
|
2645
|
+
*/
|
|
1825
2646
|
get simpleTool(): ISimpleTool;
|
|
2647
|
+
/**
|
|
2648
|
+
* @remarks
|
|
2649
|
+
* Setup the simple tool instance with the given options This
|
|
2650
|
+
* will create and initialize the simple tool instance
|
|
2651
|
+
*
|
|
2652
|
+
*/
|
|
1826
2653
|
setupSimpleTool(session: IPlayerUISession, options: ISimpleToolOptions): void;
|
|
2654
|
+
/**
|
|
2655
|
+
* @remarks
|
|
2656
|
+
* Teardown the simple tool instance This will call the
|
|
2657
|
+
* teardown function on the simple tool instance This function
|
|
2658
|
+
* is automatically invoked by the Editor Extension system when
|
|
2659
|
+
* the editor is shutting down
|
|
2660
|
+
*
|
|
2661
|
+
*/
|
|
1827
2662
|
teardown(): void;
|
|
1828
2663
|
}
|
|
1829
2664
|
|
|
@@ -1851,6 +2686,49 @@ export class SimulationState {
|
|
|
1851
2686
|
setPaused(isPaused: boolean): void;
|
|
1852
2687
|
}
|
|
1853
2688
|
|
|
2689
|
+
export class ThemeSettings {
|
|
2690
|
+
private constructor();
|
|
2691
|
+
/**
|
|
2692
|
+
* @remarks
|
|
2693
|
+
* This function can't be called in read-only mode.
|
|
2694
|
+
*
|
|
2695
|
+
* @throws This function can throw errors.
|
|
2696
|
+
*
|
|
2697
|
+
* {@link Error}
|
|
2698
|
+
*/
|
|
2699
|
+
addNewTheme(name: string): void;
|
|
2700
|
+
/**
|
|
2701
|
+
* @remarks
|
|
2702
|
+
* This function can't be called in read-only mode.
|
|
2703
|
+
*
|
|
2704
|
+
* @throws This function can throw errors.
|
|
2705
|
+
*
|
|
2706
|
+
* {@link Error}
|
|
2707
|
+
*/
|
|
2708
|
+
deleteTheme(name: string): void;
|
|
2709
|
+
getCurrentTheme(): string;
|
|
2710
|
+
getThemeList(): string[];
|
|
2711
|
+
resolveColorKey(key: ThemeSettingsColorKey): minecraftserver.RGBA | undefined;
|
|
2712
|
+
/**
|
|
2713
|
+
* @remarks
|
|
2714
|
+
* This function can't be called in read-only mode.
|
|
2715
|
+
*
|
|
2716
|
+
* @throws This function can throw errors.
|
|
2717
|
+
*
|
|
2718
|
+
* {@link Error}
|
|
2719
|
+
*/
|
|
2720
|
+
setCurrentTheme(name: string): void;
|
|
2721
|
+
/**
|
|
2722
|
+
* @remarks
|
|
2723
|
+
* This function can't be called in read-only mode.
|
|
2724
|
+
*
|
|
2725
|
+
* @throws This function can throw errors.
|
|
2726
|
+
*
|
|
2727
|
+
* {@link Error}
|
|
2728
|
+
*/
|
|
2729
|
+
updateThemeColor(name: string, key: ThemeSettingsColorKey, newColor: minecraftserver.RGBA): void;
|
|
2730
|
+
}
|
|
2731
|
+
|
|
1854
2732
|
/**
|
|
1855
2733
|
* The Transaction Manager is responsible for tracking and
|
|
1856
2734
|
* managing all of the registered transaction operations which
|
|
@@ -1865,6 +2743,15 @@ export class SimulationState {
|
|
|
1865
2743
|
*/
|
|
1866
2744
|
export class TransactionManager {
|
|
1867
2745
|
private constructor();
|
|
2746
|
+
/**
|
|
2747
|
+
* @remarks
|
|
2748
|
+
* This function can't be called in read-only mode.
|
|
2749
|
+
*
|
|
2750
|
+
* @throws This function can throw errors.
|
|
2751
|
+
*
|
|
2752
|
+
* {@link Error}
|
|
2753
|
+
*/
|
|
2754
|
+
addEntityOperation(entity: minecraftserver.Entity, type: EntityOperationType): boolean;
|
|
1868
2755
|
/**
|
|
1869
2756
|
* @remarks
|
|
1870
2757
|
* This function can't be called in read-only mode.
|
|
@@ -2000,7 +2887,7 @@ export class TransactionManager {
|
|
|
2000
2887
|
/**
|
|
2001
2888
|
* @remarks
|
|
2002
2889
|
* Begin tracking block changes in an area defined by a {@link
|
|
2003
|
-
* @minecraft
|
|
2890
|
+
* @minecraft/server.CompoundBlockVolume}. These will be added
|
|
2004
2891
|
* to a pending changes list.
|
|
2005
2892
|
* The pending list will be added to the open transaction
|
|
2006
2893
|
* record when a commit has been issued.
|
|
@@ -2008,7 +2895,7 @@ export class TransactionManager {
|
|
|
2008
2895
|
* This function can't be called in read-only mode.
|
|
2009
2896
|
*
|
|
2010
2897
|
* @param compoundBlockVolume
|
|
2011
|
-
* {@link @minecraft
|
|
2898
|
+
* {@link @minecraft/server.CompoundBlockVolume} to track.
|
|
2012
2899
|
* Only non-void block locations will be tracked -- any changes
|
|
2013
2900
|
* falling into a void/negative space will not be tracked
|
|
2014
2901
|
* @throws This function can throw errors.
|
|
@@ -2036,7 +2923,7 @@ export class TransactionManager {
|
|
|
2036
2923
|
* Selection Volumes can also represent irregular shapes with
|
|
2037
2924
|
* non-contiguous blocks and this tracking call will honor the
|
|
2038
2925
|
* actual selected areas in the volume (and not the negative
|
|
2039
|
-
* space) (see {@link @minecraft
|
|
2926
|
+
* space) (see {@link @minecraft/server.CompoundBlockVolume}
|
|
2040
2927
|
* for more details
|
|
2041
2928
|
*
|
|
2042
2929
|
* This function can't be called in read-only mode.
|
|
@@ -2126,619 +3013,1858 @@ export class UserDefinedTransactionHandlerId {
|
|
|
2126
3013
|
private constructor();
|
|
2127
3014
|
}
|
|
2128
3015
|
|
|
2129
|
-
|
|
2130
|
-
|
|
2131
|
-
|
|
3016
|
+
/**
|
|
3017
|
+
* Validates min/max limits of observable objects that support
|
|
3018
|
+
* Vector3
|
|
3019
|
+
*/
|
|
3020
|
+
export declare class Vector3LimitObservableValidator implements ObservableValidator<minecraftserver.Vector3> {
|
|
2132
3021
|
/**
|
|
2133
3022
|
* @remarks
|
|
2134
|
-
* This
|
|
3023
|
+
* This property can't be edited in read-only mode.
|
|
2135
3024
|
*
|
|
2136
3025
|
*/
|
|
2137
|
-
|
|
2138
|
-
getIsSelected(): boolean;
|
|
2139
|
-
getIsVisible(): boolean;
|
|
3026
|
+
protected _isInteger?: boolean;
|
|
2140
3027
|
/**
|
|
2141
3028
|
* @remarks
|
|
2142
|
-
* This
|
|
3029
|
+
* This property can't be edited in read-only mode.
|
|
2143
3030
|
*
|
|
2144
|
-
* @throws This function can throw errors.
|
|
2145
3031
|
*/
|
|
2146
|
-
|
|
3032
|
+
protected _max: Partial<minecraftserver.Vector3>;
|
|
2147
3033
|
/**
|
|
2148
3034
|
* @remarks
|
|
2149
|
-
* This
|
|
3035
|
+
* This property can't be edited in read-only mode.
|
|
3036
|
+
*
|
|
3037
|
+
*/
|
|
3038
|
+
protected _min: Partial<minecraftserver.Vector3>;
|
|
3039
|
+
/**
|
|
3040
|
+
* @remarks
|
|
3041
|
+
* Constructs a new instance of the
|
|
3042
|
+
* `Vector3LimitObservableValidator` class
|
|
2150
3043
|
*
|
|
2151
3044
|
*/
|
|
2152
|
-
|
|
3045
|
+
constructor(min: Partial<minecraftserver.Vector3>, max: Partial<minecraftserver.Vector3>, isInteger?: boolean);
|
|
3046
|
+
updateLimits(min: Partial<minecraftserver.Vector3>, max: Partial<minecraftserver.Vector3>): void;
|
|
3047
|
+
validate(newValue: minecraftserver.Vector3): minecraftserver.Vector3;
|
|
2153
3048
|
}
|
|
2154
3049
|
|
|
2155
|
-
export class
|
|
3050
|
+
export class Widget {
|
|
2156
3051
|
private constructor();
|
|
2157
|
-
readonly valid: boolean;
|
|
2158
3052
|
/**
|
|
2159
3053
|
* @remarks
|
|
2160
|
-
* This
|
|
3054
|
+
* This property can't be edited in read-only mode.
|
|
2161
3055
|
*
|
|
2162
3056
|
*/
|
|
2163
|
-
|
|
3057
|
+
collisionOffset: minecraftserver.Vector3;
|
|
2164
3058
|
/**
|
|
2165
3059
|
* @remarks
|
|
2166
|
-
* This
|
|
3060
|
+
* This property can't be edited in read-only mode.
|
|
2167
3061
|
*
|
|
2168
|
-
* @throws This function can throw errors.
|
|
2169
3062
|
*/
|
|
2170
|
-
|
|
2171
|
-
|
|
2172
|
-
|
|
2173
|
-
|
|
2174
|
-
|
|
2175
|
-
|
|
3063
|
+
collisionRadius: number;
|
|
3064
|
+
/**
|
|
3065
|
+
* @remarks
|
|
3066
|
+
* This property can't be edited in read-only mode.
|
|
3067
|
+
*
|
|
3068
|
+
*/
|
|
3069
|
+
location: minecraftserver.Vector3;
|
|
3070
|
+
/**
|
|
3071
|
+
* @throws This property can throw when used.
|
|
3072
|
+
*
|
|
3073
|
+
* {@link InvalidWidgetError}
|
|
3074
|
+
*/
|
|
3075
|
+
readonly selectable: boolean;
|
|
3076
|
+
selected: boolean;
|
|
3077
|
+
showBoundingBox: boolean;
|
|
3078
|
+
showCollisionRadius: boolean;
|
|
3079
|
+
/**
|
|
3080
|
+
* @remarks
|
|
3081
|
+
* This property can't be edited in read-only mode.
|
|
3082
|
+
*
|
|
3083
|
+
*/
|
|
3084
|
+
snapToBlockLocation: boolean;
|
|
3085
|
+
visible: boolean;
|
|
2176
3086
|
/**
|
|
2177
3087
|
* @remarks
|
|
2178
3088
|
* This function can't be called in read-only mode.
|
|
2179
3089
|
*
|
|
2180
3090
|
* @throws This function can throw errors.
|
|
3091
|
+
*
|
|
3092
|
+
* {@link Error}
|
|
3093
|
+
*
|
|
3094
|
+
* {@link InvalidWidgetError}
|
|
2181
3095
|
*/
|
|
2182
|
-
|
|
3096
|
+
addEntityComponent(
|
|
3097
|
+
componentName: string,
|
|
3098
|
+
actorNameId: string,
|
|
3099
|
+
options?: WidgetComponentEntityOptions,
|
|
3100
|
+
): WidgetComponentEntity;
|
|
2183
3101
|
/**
|
|
2184
3102
|
* @remarks
|
|
2185
3103
|
* This function can't be called in read-only mode.
|
|
2186
3104
|
*
|
|
3105
|
+
* @throws This function can throw errors.
|
|
3106
|
+
*
|
|
3107
|
+
* {@link Error}
|
|
3108
|
+
*
|
|
3109
|
+
* {@link InvalidWidgetError}
|
|
2187
3110
|
*/
|
|
2188
|
-
|
|
3111
|
+
addGizmoComponent(componentName: string, options?: WidgetComponentGizmoOptions): WidgetComponentGizmo;
|
|
2189
3112
|
/**
|
|
2190
3113
|
* @remarks
|
|
2191
3114
|
* This function can't be called in read-only mode.
|
|
2192
3115
|
*
|
|
3116
|
+
* @throws This function can throw errors.
|
|
3117
|
+
*
|
|
3118
|
+
* {@link Error}
|
|
3119
|
+
*
|
|
3120
|
+
* {@link InvalidWidgetError}
|
|
2193
3121
|
*/
|
|
2194
|
-
|
|
3122
|
+
addGuideComponent(componentName: string, options?: WidgetComponentGuideOptions): WidgetComponentGuide;
|
|
2195
3123
|
/**
|
|
2196
3124
|
* @remarks
|
|
2197
3125
|
* This function can't be called in read-only mode.
|
|
2198
3126
|
*
|
|
3127
|
+
* @throws This function can throw errors.
|
|
3128
|
+
*
|
|
3129
|
+
* {@link Error}
|
|
3130
|
+
*
|
|
3131
|
+
* {@link InvalidWidgetError}
|
|
2199
3132
|
*/
|
|
2200
|
-
|
|
3133
|
+
addRenderPrimitiveComponent(
|
|
3134
|
+
componentName: string,
|
|
3135
|
+
primitiveType:
|
|
3136
|
+
| WidgetComponentRenderPrimitiveAxialSphere
|
|
3137
|
+
| WidgetComponentRenderPrimitiveBox
|
|
3138
|
+
| WidgetComponentRenderPrimitiveDisc
|
|
3139
|
+
| WidgetComponentRenderPrimitiveLine,
|
|
3140
|
+
options?: WidgetComponentRenderPrimitiveOptions,
|
|
3141
|
+
): WidgetComponentRenderPrimitive;
|
|
2201
3142
|
/**
|
|
2202
3143
|
* @remarks
|
|
2203
3144
|
* This function can't be called in read-only mode.
|
|
2204
3145
|
*
|
|
3146
|
+
* @throws This function can throw errors.
|
|
3147
|
+
*
|
|
3148
|
+
* {@link Error}
|
|
3149
|
+
*
|
|
3150
|
+
* {@link InvalidWidgetError}
|
|
2205
3151
|
*/
|
|
2206
|
-
|
|
3152
|
+
addSplineComponent(componentName: string, options?: WidgetComponentSplineOptions): WidgetComponentSpline;
|
|
2207
3153
|
/**
|
|
2208
3154
|
* @remarks
|
|
2209
3155
|
* This function can't be called in read-only mode.
|
|
2210
3156
|
*
|
|
3157
|
+
* @throws This function can throw errors.
|
|
3158
|
+
*
|
|
3159
|
+
* {@link Error}
|
|
3160
|
+
*
|
|
3161
|
+
* {@link InvalidWidgetError}
|
|
2211
3162
|
*/
|
|
2212
|
-
|
|
2213
|
-
}
|
|
2214
|
-
|
|
2215
|
-
export class WidgetManager {
|
|
2216
|
-
private constructor();
|
|
3163
|
+
addTextComponent(componentName: string, label: string, options?: WidgetComponentTextOptions): WidgetComponentText;
|
|
2217
3164
|
/**
|
|
2218
3165
|
* @remarks
|
|
2219
3166
|
* This function can't be called in read-only mode.
|
|
2220
3167
|
*
|
|
2221
3168
|
* @throws This function can throw errors.
|
|
3169
|
+
*
|
|
3170
|
+
* {@link Error}
|
|
3171
|
+
*
|
|
3172
|
+
* {@link InvalidWidgetError}
|
|
3173
|
+
*
|
|
3174
|
+
* {@link InvalidWidgetGroupError}
|
|
2222
3175
|
*/
|
|
2223
|
-
|
|
3176
|
+
delete(): void;
|
|
2224
3177
|
/**
|
|
2225
3178
|
* @remarks
|
|
2226
3179
|
* This function can't be called in read-only mode.
|
|
2227
3180
|
*
|
|
2228
3181
|
* @throws This function can throw errors.
|
|
3182
|
+
*
|
|
3183
|
+
* {@link Error}
|
|
3184
|
+
*
|
|
3185
|
+
* {@link InvalidWidgetComponentError}
|
|
3186
|
+
*
|
|
3187
|
+
* {@link InvalidWidgetError}
|
|
3188
|
+
*/
|
|
3189
|
+
deleteComponent(componentOrName: string | WidgetComponentBase): void;
|
|
3190
|
+
/**
|
|
3191
|
+
* @remarks
|
|
3192
|
+
* This function can't be called in read-only mode.
|
|
3193
|
+
*
|
|
3194
|
+
* @throws This function can throw errors.
|
|
3195
|
+
*
|
|
3196
|
+
* {@link Error}
|
|
3197
|
+
*
|
|
3198
|
+
* {@link InvalidWidgetError}
|
|
3199
|
+
*/
|
|
3200
|
+
getComponent(componentName: string): WidgetComponentBase;
|
|
3201
|
+
/**
|
|
3202
|
+
* @remarks
|
|
3203
|
+
* This function can't be called in read-only mode.
|
|
3204
|
+
*
|
|
3205
|
+
* @throws This function can throw errors.
|
|
3206
|
+
*
|
|
3207
|
+
* {@link InvalidWidgetError}
|
|
3208
|
+
*/
|
|
3209
|
+
getComponents(): WidgetComponentBase[];
|
|
3210
|
+
/**
|
|
3211
|
+
* @remarks
|
|
3212
|
+
* This function can't be called in read-only mode.
|
|
3213
|
+
*
|
|
3214
|
+
* @throws This function can throw errors.
|
|
3215
|
+
*
|
|
3216
|
+
* {@link InvalidWidgetError}
|
|
3217
|
+
*
|
|
3218
|
+
* {@link InvalidWidgetError}
|
|
3219
|
+
*/
|
|
3220
|
+
setStateChangeEvent(eventFunction?: (arg: WidgetStateChangeEventData) => void): void;
|
|
3221
|
+
}
|
|
3222
|
+
|
|
3223
|
+
export class WidgetComponentBase {
|
|
3224
|
+
private constructor();
|
|
3225
|
+
/**
|
|
3226
|
+
* @throws This property can throw when used.
|
|
3227
|
+
*
|
|
3228
|
+
* {@link InvalidWidgetComponentError}
|
|
3229
|
+
*/
|
|
3230
|
+
readonly componentType: WidgetComponentType;
|
|
3231
|
+
/**
|
|
3232
|
+
* @throws This property can throw when used.
|
|
3233
|
+
*
|
|
3234
|
+
* {@link minecraftserver.InvalidWidgetComponentError}
|
|
3235
|
+
*/
|
|
3236
|
+
readonly location: minecraftserver.Vector3;
|
|
3237
|
+
/**
|
|
3238
|
+
* @throws This property can throw when used.
|
|
3239
|
+
*
|
|
3240
|
+
* {@link InvalidWidgetComponentError}
|
|
3241
|
+
*/
|
|
3242
|
+
readonly name: string;
|
|
3243
|
+
/**
|
|
3244
|
+
* @remarks
|
|
3245
|
+
* This property can't be edited in read-only mode.
|
|
3246
|
+
*
|
|
3247
|
+
*/
|
|
3248
|
+
offset: minecraftserver.Vector3;
|
|
3249
|
+
readonly valid: boolean;
|
|
3250
|
+
visible: boolean;
|
|
3251
|
+
/**
|
|
3252
|
+
* @throws This property can throw when used.
|
|
3253
|
+
*
|
|
3254
|
+
* {@link InvalidWidgetComponentError}
|
|
3255
|
+
*/
|
|
3256
|
+
readonly widget: Widget;
|
|
3257
|
+
/**
|
|
3258
|
+
* @remarks
|
|
3259
|
+
* This function can't be called in read-only mode.
|
|
3260
|
+
*
|
|
3261
|
+
* @throws This function can throw errors.
|
|
3262
|
+
*
|
|
3263
|
+
* {@link InvalidWidgetComponentError}
|
|
3264
|
+
*/
|
|
3265
|
+
delete(): void;
|
|
3266
|
+
}
|
|
3267
|
+
|
|
3268
|
+
// @ts-ignore Class inheritance allowed for native defined classes
|
|
3269
|
+
export class WidgetComponentEntity extends WidgetComponentBase {
|
|
3270
|
+
private constructor();
|
|
3271
|
+
/**
|
|
3272
|
+
* @remarks
|
|
3273
|
+
* This property can't be edited in read-only mode.
|
|
3274
|
+
*
|
|
3275
|
+
*/
|
|
3276
|
+
clickable: boolean;
|
|
3277
|
+
/**
|
|
3278
|
+
* @remarks
|
|
3279
|
+
* This function can't be called in read-only mode.
|
|
3280
|
+
*
|
|
3281
|
+
* @throws This function can throw errors.
|
|
3282
|
+
*
|
|
3283
|
+
* {@link InvalidWidgetComponentError}
|
|
3284
|
+
*/
|
|
3285
|
+
playAnimation(animationName: string): void;
|
|
3286
|
+
}
|
|
3287
|
+
|
|
3288
|
+
// @ts-ignore Class inheritance allowed for native defined classes
|
|
3289
|
+
export class WidgetComponentGizmo extends WidgetComponentBase {
|
|
3290
|
+
private constructor();
|
|
3291
|
+
}
|
|
3292
|
+
|
|
3293
|
+
// @ts-ignore Class inheritance allowed for native defined classes
|
|
3294
|
+
export class WidgetComponentGuide extends WidgetComponentBase {
|
|
3295
|
+
private constructor();
|
|
3296
|
+
}
|
|
3297
|
+
|
|
3298
|
+
// @ts-ignore Class inheritance allowed for native defined classes
|
|
3299
|
+
export class WidgetComponentRenderPrimitive extends WidgetComponentBase {
|
|
3300
|
+
private constructor();
|
|
3301
|
+
/**
|
|
3302
|
+
* @remarks
|
|
3303
|
+
* This function can't be called in read-only mode.
|
|
3304
|
+
*
|
|
3305
|
+
* @throws This function can throw errors.
|
|
3306
|
+
*
|
|
3307
|
+
* {@link InvalidWidgetComponentError}
|
|
3308
|
+
*
|
|
3309
|
+
* {@link InvalidWidgetError}
|
|
3310
|
+
*/
|
|
3311
|
+
setPrimitive(
|
|
3312
|
+
primitive:
|
|
3313
|
+
| WidgetComponentRenderPrimitiveAxialSphere
|
|
3314
|
+
| WidgetComponentRenderPrimitiveBox
|
|
3315
|
+
| WidgetComponentRenderPrimitiveDisc
|
|
3316
|
+
| WidgetComponentRenderPrimitiveLine,
|
|
3317
|
+
): void;
|
|
3318
|
+
}
|
|
3319
|
+
|
|
3320
|
+
export class WidgetComponentRenderPrimitiveAxialSphere {
|
|
3321
|
+
/**
|
|
3322
|
+
* @remarks
|
|
3323
|
+
* This property can't be edited in read-only mode.
|
|
3324
|
+
*
|
|
3325
|
+
*/
|
|
3326
|
+
center: minecraftserver.Vector3;
|
|
3327
|
+
/**
|
|
3328
|
+
* @remarks
|
|
3329
|
+
* This property can't be edited in read-only mode.
|
|
3330
|
+
*
|
|
3331
|
+
*/
|
|
3332
|
+
color?: minecraftserver.RGBA;
|
|
3333
|
+
/**
|
|
3334
|
+
* @remarks
|
|
3335
|
+
* This property can't be edited in read-only mode.
|
|
3336
|
+
*
|
|
3337
|
+
*/
|
|
3338
|
+
radius: number;
|
|
3339
|
+
constructor(center: minecraftserver.Vector3, radius: number, color?: minecraftserver.RGBA);
|
|
3340
|
+
}
|
|
3341
|
+
|
|
3342
|
+
export class WidgetComponentRenderPrimitiveBox {
|
|
3343
|
+
/**
|
|
3344
|
+
* @remarks
|
|
3345
|
+
* This property can't be edited in read-only mode.
|
|
3346
|
+
*
|
|
3347
|
+
*/
|
|
3348
|
+
center: minecraftserver.Vector3;
|
|
3349
|
+
/**
|
|
3350
|
+
* @remarks
|
|
3351
|
+
* This property can't be edited in read-only mode.
|
|
3352
|
+
*
|
|
3353
|
+
*/
|
|
3354
|
+
color: minecraftserver.RGBA;
|
|
3355
|
+
/**
|
|
3356
|
+
* @remarks
|
|
3357
|
+
* This property can't be edited in read-only mode.
|
|
3358
|
+
*
|
|
3359
|
+
*/
|
|
3360
|
+
size?: minecraftserver.Vector3;
|
|
3361
|
+
constructor(center: minecraftserver.Vector3, color: minecraftserver.RGBA, size?: minecraftserver.Vector3);
|
|
3362
|
+
}
|
|
3363
|
+
|
|
3364
|
+
export class WidgetComponentRenderPrimitiveDisc {
|
|
3365
|
+
/**
|
|
3366
|
+
* @remarks
|
|
3367
|
+
* This property can't be edited in read-only mode.
|
|
3368
|
+
*
|
|
3369
|
+
*/
|
|
3370
|
+
center: minecraftserver.Vector3;
|
|
3371
|
+
/**
|
|
3372
|
+
* @remarks
|
|
3373
|
+
* This property can't be edited in read-only mode.
|
|
3374
|
+
*
|
|
3375
|
+
*/
|
|
3376
|
+
color: minecraftserver.RGBA;
|
|
3377
|
+
/**
|
|
3378
|
+
* @remarks
|
|
3379
|
+
* This property can't be edited in read-only mode.
|
|
3380
|
+
*
|
|
3381
|
+
*/
|
|
3382
|
+
radius: number;
|
|
3383
|
+
constructor(center: minecraftserver.Vector3, radius: number, color: minecraftserver.RGBA);
|
|
3384
|
+
}
|
|
3385
|
+
|
|
3386
|
+
export class WidgetComponentRenderPrimitiveLine {
|
|
3387
|
+
/**
|
|
3388
|
+
* @remarks
|
|
3389
|
+
* This property can't be edited in read-only mode.
|
|
3390
|
+
*
|
|
3391
|
+
*/
|
|
3392
|
+
color: minecraftserver.RGBA;
|
|
3393
|
+
/**
|
|
3394
|
+
* @remarks
|
|
3395
|
+
* This property can't be edited in read-only mode.
|
|
3396
|
+
*
|
|
3397
|
+
*/
|
|
3398
|
+
end: minecraftserver.Vector3;
|
|
3399
|
+
/**
|
|
3400
|
+
* @remarks
|
|
3401
|
+
* This property can't be edited in read-only mode.
|
|
3402
|
+
*
|
|
3403
|
+
*/
|
|
3404
|
+
start: minecraftserver.Vector3;
|
|
3405
|
+
constructor(start: minecraftserver.Vector3, end: minecraftserver.Vector3, color: minecraftserver.RGBA);
|
|
3406
|
+
}
|
|
3407
|
+
|
|
3408
|
+
// @ts-ignore Class inheritance allowed for native defined classes
|
|
3409
|
+
export class WidgetComponentSpline extends WidgetComponentBase {
|
|
3410
|
+
private constructor();
|
|
3411
|
+
/**
|
|
3412
|
+
* @remarks
|
|
3413
|
+
* This property can't be edited in read-only mode.
|
|
3414
|
+
*
|
|
3415
|
+
*/
|
|
3416
|
+
splineType: SplineType;
|
|
3417
|
+
/**
|
|
3418
|
+
* @remarks
|
|
3419
|
+
* This function can't be called in read-only mode.
|
|
3420
|
+
*
|
|
3421
|
+
* @throws This function can throw errors.
|
|
3422
|
+
*
|
|
3423
|
+
* {@link Error}
|
|
3424
|
+
*
|
|
3425
|
+
* {@link InvalidWidgetComponentError}
|
|
3426
|
+
*
|
|
3427
|
+
* {@link InvalidWidgetError}
|
|
3428
|
+
*/
|
|
3429
|
+
getControlPoints(): Widget[];
|
|
3430
|
+
/**
|
|
3431
|
+
* @remarks
|
|
3432
|
+
* This function can't be called in read-only mode.
|
|
3433
|
+
*
|
|
3434
|
+
* @throws This function can throw errors.
|
|
3435
|
+
*
|
|
3436
|
+
* {@link Error}
|
|
3437
|
+
*
|
|
3438
|
+
* {@link InvalidWidgetComponentError}
|
|
3439
|
+
*
|
|
3440
|
+
* {@link InvalidWidgetError}
|
|
3441
|
+
*/
|
|
3442
|
+
getInterpolatedPoints(maxPointsPerControlSegment?: number): minecraftserver.Vector3[];
|
|
3443
|
+
/**
|
|
3444
|
+
* @remarks
|
|
3445
|
+
* This function can't be called in read-only mode.
|
|
3446
|
+
*
|
|
3447
|
+
* @throws This function can throw errors.
|
|
3448
|
+
*
|
|
3449
|
+
* {@link InvalidWidgetComponentError}
|
|
3450
|
+
*
|
|
3451
|
+
* {@link InvalidWidgetError}
|
|
3452
|
+
*/
|
|
3453
|
+
setControlPoints(widgetList: Widget[]): void;
|
|
3454
|
+
}
|
|
3455
|
+
|
|
3456
|
+
// @ts-ignore Class inheritance allowed for native defined classes
|
|
3457
|
+
export class WidgetComponentText extends WidgetComponentBase {
|
|
3458
|
+
private constructor();
|
|
3459
|
+
/**
|
|
3460
|
+
* @remarks
|
|
3461
|
+
* This property can't be edited in read-only mode.
|
|
3462
|
+
*
|
|
3463
|
+
*/
|
|
3464
|
+
color: minecraftserver.RGBA;
|
|
3465
|
+
/**
|
|
3466
|
+
* @remarks
|
|
3467
|
+
* This property can't be edited in read-only mode.
|
|
3468
|
+
*
|
|
3469
|
+
*/
|
|
3470
|
+
label: string;
|
|
3471
|
+
}
|
|
3472
|
+
|
|
3473
|
+
export class WidgetGroup {
|
|
3474
|
+
private constructor();
|
|
3475
|
+
/**
|
|
3476
|
+
* @throws This property can throw when used.
|
|
3477
|
+
*
|
|
3478
|
+
* {@link InvalidWidgetGroupError}
|
|
3479
|
+
*/
|
|
3480
|
+
readonly selectedWidgetCount: number;
|
|
3481
|
+
/**
|
|
3482
|
+
* @remarks
|
|
3483
|
+
* This property can't be edited in read-only mode.
|
|
3484
|
+
*
|
|
3485
|
+
*/
|
|
3486
|
+
visible: boolean;
|
|
3487
|
+
/**
|
|
3488
|
+
* @remarks
|
|
3489
|
+
* This property can't be edited in read-only mode.
|
|
3490
|
+
*
|
|
3491
|
+
*/
|
|
3492
|
+
visibleBounds: boolean;
|
|
3493
|
+
/**
|
|
3494
|
+
* @remarks
|
|
3495
|
+
* This function can't be called in read-only mode.
|
|
3496
|
+
*
|
|
3497
|
+
* @throws This function can throw errors.
|
|
3498
|
+
*
|
|
3499
|
+
* {@link InvalidWidgetGroupError}
|
|
3500
|
+
*/
|
|
3501
|
+
createWidget(location: minecraftserver.Vector3, options?: WidgetCreateOptions): Widget;
|
|
3502
|
+
/**
|
|
3503
|
+
* @remarks
|
|
3504
|
+
* This function can't be called in read-only mode.
|
|
3505
|
+
*
|
|
3506
|
+
*/
|
|
3507
|
+
delete(): void;
|
|
3508
|
+
/**
|
|
3509
|
+
* @remarks
|
|
3510
|
+
* This function can't be called in read-only mode.
|
|
3511
|
+
*
|
|
3512
|
+
* @throws This function can throw errors.
|
|
3513
|
+
*
|
|
3514
|
+
* {@link Error}
|
|
3515
|
+
*
|
|
3516
|
+
* {@link InvalidWidgetError}
|
|
3517
|
+
*
|
|
3518
|
+
* {@link InvalidWidgetGroupError}
|
|
3519
|
+
*/
|
|
3520
|
+
deleteWidget(widgetToDelete: Widget): void;
|
|
3521
|
+
/**
|
|
3522
|
+
* @remarks
|
|
3523
|
+
* This function can't be called in read-only mode.
|
|
3524
|
+
*
|
|
3525
|
+
* @throws This function can throw errors.
|
|
3526
|
+
*
|
|
3527
|
+
* {@link InvalidWidgetGroupError}
|
|
3528
|
+
*/
|
|
3529
|
+
deselectAllWidgets(): void;
|
|
3530
|
+
/**
|
|
3531
|
+
* @remarks
|
|
3532
|
+
* This function can't be called in read-only mode.
|
|
3533
|
+
*
|
|
3534
|
+
* @throws This function can throw errors.
|
|
3535
|
+
*
|
|
3536
|
+
* {@link InvalidWidgetGroupError}
|
|
3537
|
+
*/
|
|
3538
|
+
selectAllWidgets(): void;
|
|
3539
|
+
}
|
|
3540
|
+
|
|
3541
|
+
export class WidgetManager {
|
|
3542
|
+
private constructor();
|
|
3543
|
+
/**
|
|
3544
|
+
* @remarks
|
|
3545
|
+
* This function can't be called in read-only mode.
|
|
3546
|
+
*
|
|
3547
|
+
* @throws This function can throw errors.
|
|
3548
|
+
*
|
|
3549
|
+
* {@link Error}
|
|
3550
|
+
*/
|
|
3551
|
+
createGroup(options?: WidgetGroupCreateOptions): WidgetGroup;
|
|
3552
|
+
/**
|
|
3553
|
+
* @remarks
|
|
3554
|
+
* This function can't be called in read-only mode.
|
|
3555
|
+
*
|
|
3556
|
+
* @throws This function can throw errors.
|
|
3557
|
+
*
|
|
3558
|
+
* {@link Error}
|
|
3559
|
+
*
|
|
3560
|
+
* {@link InvalidWidgetGroupError}
|
|
2229
3561
|
*/
|
|
2230
3562
|
deleteGroup(groupToDelete: WidgetGroup): void;
|
|
2231
3563
|
}
|
|
2232
3564
|
|
|
2233
|
-
export class WidgetStateChangeEventData {
|
|
2234
|
-
private constructor();
|
|
2235
|
-
readonly group: WidgetGroup;
|
|
2236
|
-
readonly
|
|
2237
|
-
readonly
|
|
2238
|
-
readonly
|
|
3565
|
+
export class WidgetStateChangeEventData {
|
|
3566
|
+
private constructor();
|
|
3567
|
+
readonly group: WidgetGroup;
|
|
3568
|
+
readonly location?: minecraftserver.Vector3;
|
|
3569
|
+
readonly selected?: boolean;
|
|
3570
|
+
readonly visible?: boolean;
|
|
3571
|
+
readonly widget: Widget;
|
|
3572
|
+
}
|
|
3573
|
+
|
|
3574
|
+
export interface BrushPipelineOperation {
|
|
3575
|
+
blockTypes: minecraftserver.BlockType[];
|
|
3576
|
+
operation: BrushPipelineOperationType;
|
|
3577
|
+
}
|
|
3578
|
+
|
|
3579
|
+
export interface BrushShape {
|
|
3580
|
+
icon: string;
|
|
3581
|
+
name: string;
|
|
3582
|
+
}
|
|
3583
|
+
|
|
3584
|
+
/**
|
|
3585
|
+
* Interface used to specify the options when a clipboard item
|
|
3586
|
+
* is being written to the world
|
|
3587
|
+
*/
|
|
3588
|
+
export interface ClipboardWriteOptions {
|
|
3589
|
+
/**
|
|
3590
|
+
* @remarks
|
|
3591
|
+
* The anchor is a unit vector representation of the side or
|
|
3592
|
+
* corner of the Clipboard Item to be written to the world.
|
|
3593
|
+
* `{0, 0, 0}` represents the center of the Clipboard item,
|
|
3594
|
+
* `{0, 1, 0}` represents the top, `{-1, -1, -1}` represents
|
|
3595
|
+
* the bottom/back/left corner, etc
|
|
3596
|
+
* The anchor is used in conjunction with the item size to
|
|
3597
|
+
* determine the object relative anchor point where the object
|
|
3598
|
+
* will be applied in the world.
|
|
3599
|
+
* Values for the X/Y/Z components should be within the range
|
|
3600
|
+
* `(-1 <= X/Y/Z <=1)`
|
|
3601
|
+
*
|
|
3602
|
+
*/
|
|
3603
|
+
anchor?: minecraftserver.Vector3;
|
|
3604
|
+
/**
|
|
3605
|
+
* @remarks
|
|
3606
|
+
* An enum which represents the axis (or combination of axis')
|
|
3607
|
+
* along which the item should be mirrored
|
|
3608
|
+
* - X
|
|
3609
|
+
* - Z
|
|
3610
|
+
* - XZ
|
|
3611
|
+
*
|
|
3612
|
+
*/
|
|
3613
|
+
mirror?: minecraftserver.StructureMirrorAxis;
|
|
3614
|
+
/**
|
|
3615
|
+
* @remarks
|
|
3616
|
+
* A position offset which should be applied to the paste
|
|
3617
|
+
* location while the clipboard item is being written
|
|
3618
|
+
*
|
|
3619
|
+
*/
|
|
3620
|
+
offset?: minecraftserver.Vector3;
|
|
3621
|
+
/**
|
|
3622
|
+
* @remarks
|
|
3623
|
+
* An enum representing the rotation around the Y-Axis which
|
|
3624
|
+
* should be applied while the clipboard item is being written
|
|
3625
|
+
*
|
|
3626
|
+
*/
|
|
3627
|
+
rotation?: minecraftserver.StructureRotation;
|
|
3628
|
+
}
|
|
3629
|
+
|
|
3630
|
+
export interface CursorAttachmentProperties {
|
|
3631
|
+
boundsFillColor?: minecraftserver.RGBA;
|
|
3632
|
+
boundsVisible?: boolean;
|
|
3633
|
+
boundsWireframeColor?: minecraftserver.RGBA;
|
|
3634
|
+
contentsFillColor?: minecraftserver.RGBA;
|
|
3635
|
+
contentsWireframeColor?: minecraftserver.RGBA;
|
|
3636
|
+
mirror?: minecraftserver.StructureMirrorAxis;
|
|
3637
|
+
offset?: minecraftserver.Vector3;
|
|
3638
|
+
origin?: minecraftserver.Vector3;
|
|
3639
|
+
rotation?: minecraftserver.StructureRotation;
|
|
3640
|
+
}
|
|
3641
|
+
|
|
3642
|
+
/**
|
|
3643
|
+
* The CursorProperties interface is used to describe the
|
|
3644
|
+
* properties of the Editor 3D block cursor construct.
|
|
3645
|
+
* The 3D block cursor can be queried to retrieve the current
|
|
3646
|
+
* properties, and the same property class can be used to set
|
|
3647
|
+
* the current properties of the cursor.
|
|
3648
|
+
* This interface is generally used at the activation stage of
|
|
3649
|
+
* the active tool to set up the color, visibility and input
|
|
3650
|
+
* properties of the 3D block cursor
|
|
3651
|
+
*/
|
|
3652
|
+
export interface CursorProperties {
|
|
3653
|
+
/**
|
|
3654
|
+
* @remarks
|
|
3655
|
+
* Enum representing the cursor control mode
|
|
3656
|
+
* - Fixed Mode locks the cursor to a position which is <X>
|
|
3657
|
+
* blocks offset from the current player position. The cursor
|
|
3658
|
+
* is camera relative, so it will always appear <X> blocks
|
|
3659
|
+
* ahead of the players feet
|
|
3660
|
+
* - Keyboard Mode puts the cursor under direct control of the
|
|
3661
|
+
* API, and ignores any mouse input. The cursor can only be
|
|
3662
|
+
* moved around using the moveBy method
|
|
3663
|
+
* - KeyboardAndMouse mode puts the cursor under a shared
|
|
3664
|
+
* control of onMouseMove and keyboard input. Any mouse
|
|
3665
|
+
* movement events will set the cursor to the position of the
|
|
3666
|
+
* mouse/world raycast. This can be modified using the moveBy
|
|
3667
|
+
* method, but any subsequent mouse events will reset the
|
|
3668
|
+
* position back to where the raycast intersection occurs
|
|
3669
|
+
* - Mouse mode puts the cursor under control of mouse move
|
|
3670
|
+
* events, and moveBy method will be ignored
|
|
3671
|
+
*
|
|
3672
|
+
*
|
|
3673
|
+
*/
|
|
3674
|
+
controlMode?: CursorControlMode;
|
|
3675
|
+
fillColor?: minecraftserver.RGBA;
|
|
3676
|
+
/**
|
|
3677
|
+
* @remarks
|
|
3678
|
+
* The fixed distance from the players feet at which the cursor
|
|
3679
|
+
* is attached, relative to camera direction.
|
|
3680
|
+
* This is only used when [controlMode] is set to `Fixed`
|
|
3681
|
+
*
|
|
3682
|
+
*/
|
|
3683
|
+
fixedModeDistance?: number;
|
|
3684
|
+
/**
|
|
3685
|
+
* @remarks
|
|
3686
|
+
* A [Color] Property representing the color of the block
|
|
3687
|
+
* cursor object outline
|
|
3688
|
+
*
|
|
3689
|
+
*/
|
|
3690
|
+
outlineColor?: minecraftserver.RGBA;
|
|
3691
|
+
projectThroughLiquid?: boolean;
|
|
3692
|
+
/**
|
|
3693
|
+
* @remarks
|
|
3694
|
+
* An enum representing the cursor target mode
|
|
3695
|
+
* - Block Mode records the block position of the mouse/world
|
|
3696
|
+
* raycast intersection
|
|
3697
|
+
* - Face Mode records the block position of the block adjacent
|
|
3698
|
+
* to the mouse/world raycast intersection, according to the
|
|
3699
|
+
* face of the collision point of the selected block
|
|
3700
|
+
*
|
|
3701
|
+
*/
|
|
3702
|
+
targetMode?: CursorTargetMode;
|
|
3703
|
+
/**
|
|
3704
|
+
* @remarks
|
|
3705
|
+
* Boolean flag controlling the visibility of the 3D block
|
|
3706
|
+
* cursor
|
|
3707
|
+
*
|
|
3708
|
+
*/
|
|
3709
|
+
visible?: boolean;
|
|
3710
|
+
}
|
|
3711
|
+
|
|
3712
|
+
/**
|
|
3713
|
+
* An interface which defines the set of optional parameters
|
|
3714
|
+
* which can be used when calling the `registerEditorExtension`
|
|
3715
|
+
* function
|
|
3716
|
+
*/
|
|
3717
|
+
export interface ExtensionOptionalParameters {
|
|
3718
|
+
/**
|
|
3719
|
+
* @remarks
|
|
3720
|
+
* An optional text description of the extension being
|
|
3721
|
+
* registered.
|
|
3722
|
+
* This can be a straight textual description or a string
|
|
3723
|
+
* identifier key for a localized string in the extension's
|
|
3724
|
+
* resource pack text files.
|
|
3725
|
+
* The description is meant to be a very short snappy one-liner
|
|
3726
|
+
* which quickly and uniquely identifies the extension
|
|
3727
|
+
* The length of the string is capped to 256 characters
|
|
3728
|
+
*
|
|
3729
|
+
*/
|
|
3730
|
+
description?: string;
|
|
3731
|
+
/**
|
|
3732
|
+
* @remarks
|
|
3733
|
+
* Optional notes for the extension being registered.
|
|
3734
|
+
* This can be a straight textual description or a string
|
|
3735
|
+
* identifier key for a localized string in the extension's
|
|
3736
|
+
* resource pack text files.
|
|
3737
|
+
* The notes section is meant to convey more detailed
|
|
3738
|
+
* information and notes (e.g. a link to the author's website)
|
|
3739
|
+
* The length of this string is capped to 1024 characters
|
|
3740
|
+
*
|
|
3741
|
+
*/
|
|
3742
|
+
notes?: string;
|
|
3743
|
+
/**
|
|
3744
|
+
* @remarks
|
|
3745
|
+
* An optional custom identifier that will be used for all
|
|
3746
|
+
* Modal Tools created from the registered extension.
|
|
3747
|
+
* The length of the string is capped to 256 characters
|
|
3748
|
+
*
|
|
3749
|
+
*/
|
|
3750
|
+
toolGroupId?: string;
|
|
3751
|
+
}
|
|
3752
|
+
|
|
3753
|
+
export interface GameOptions {
|
|
3754
|
+
bonusChest?: boolean;
|
|
3755
|
+
cheats?: boolean;
|
|
3756
|
+
commandBlockEnabled?: boolean;
|
|
3757
|
+
daylightCycle?: DaylightCycle;
|
|
3758
|
+
difficulty?: minecraftserver.Difficulty;
|
|
3759
|
+
dimensionId?: string;
|
|
3760
|
+
disableWeather?: boolean;
|
|
3761
|
+
educationEdition?: boolean;
|
|
3762
|
+
entitiesDropLoot?: boolean;
|
|
3763
|
+
exportType?: ProjectExportType;
|
|
3764
|
+
fireSpreads?: boolean;
|
|
3765
|
+
friendlyFire?: boolean;
|
|
3766
|
+
gameMode?: minecraftserver.GameMode;
|
|
3767
|
+
immediateRespawn?: boolean;
|
|
3768
|
+
keepInventory?: boolean;
|
|
3769
|
+
lanVisibility?: boolean;
|
|
3770
|
+
mobGriefing?: boolean;
|
|
3771
|
+
mobLoot?: boolean;
|
|
3772
|
+
mobSpawning?: boolean;
|
|
3773
|
+
multiplayerGame?: boolean;
|
|
3774
|
+
naturalRegeneration?: boolean;
|
|
3775
|
+
playerAccess?: GamePublishSetting;
|
|
3776
|
+
playerPermissions?: PlayerPermissionLevel;
|
|
3777
|
+
randomTickSpeed?: number;
|
|
3778
|
+
recipeUnlocking?: boolean;
|
|
3779
|
+
respawnBlocksExplode?: boolean;
|
|
3780
|
+
respawnRadius?: number;
|
|
3781
|
+
showCoordinates?: boolean;
|
|
3782
|
+
showDaysPlayed?: boolean;
|
|
3783
|
+
simulationDistance?: number;
|
|
3784
|
+
spawnPosition?: minecraftserver.Vector3;
|
|
3785
|
+
startingMap?: boolean;
|
|
3786
|
+
tileDrops?: boolean;
|
|
3787
|
+
timeOfDay?: number;
|
|
3788
|
+
tntExplodes?: boolean;
|
|
3789
|
+
weather?: number;
|
|
3790
|
+
worldName?: string;
|
|
3791
|
+
}
|
|
3792
|
+
|
|
3793
|
+
/**
|
|
3794
|
+
* A properties class for the global instance of the logger
|
|
3795
|
+
* object.
|
|
3796
|
+
* While the logger object is available through the {@link
|
|
3797
|
+
* ExtensionContext} - using the global instance allows the
|
|
3798
|
+
* creator to use this properties class to perform direct
|
|
3799
|
+
* server->client messaging and broadcasts.
|
|
3800
|
+
*/
|
|
3801
|
+
export interface LogProperties {
|
|
3802
|
+
/**
|
|
3803
|
+
* @remarks
|
|
3804
|
+
* Direct a log message to a specific player. If no player is
|
|
3805
|
+
* specified, then all players will receive the message
|
|
3806
|
+
*
|
|
3807
|
+
*/
|
|
3808
|
+
player?: minecraftserver.Player;
|
|
3809
|
+
/**
|
|
3810
|
+
* @remarks
|
|
3811
|
+
* Add additional tags to the log message which can be used by
|
|
3812
|
+
* the client session to filter/search in the log window
|
|
3813
|
+
*
|
|
3814
|
+
*/
|
|
3815
|
+
tags?: string[];
|
|
3816
|
+
}
|
|
3817
|
+
|
|
3818
|
+
export interface ProjectExportOptions {
|
|
3819
|
+
alwaysDay?: boolean;
|
|
3820
|
+
difficulty?: minecraftserver.Difficulty;
|
|
3821
|
+
disableWeather?: boolean;
|
|
3822
|
+
exportName?: string;
|
|
3823
|
+
exportType: ProjectExportType;
|
|
3824
|
+
gameMode?: minecraftserver.GameMode;
|
|
3825
|
+
initialTimOfDay?: number;
|
|
3826
|
+
}
|
|
3827
|
+
|
|
3828
|
+
export interface SettingsUIElementOptions {
|
|
3829
|
+
dropdownItems?: string[];
|
|
3830
|
+
max?: number;
|
|
3831
|
+
min?: number;
|
|
3832
|
+
refreshOnChange?: boolean;
|
|
3833
|
+
}
|
|
3834
|
+
|
|
3835
|
+
export interface WeightedBlock {
|
|
3836
|
+
block: minecraftserver.BlockType;
|
|
3837
|
+
weight: number;
|
|
3838
|
+
}
|
|
3839
|
+
|
|
3840
|
+
export interface WidgetComponentBaseOptions {
|
|
3841
|
+
offset?: minecraftserver.Vector3;
|
|
3842
|
+
visible?: boolean;
|
|
3843
|
+
}
|
|
3844
|
+
|
|
3845
|
+
// @ts-ignore Class inheritance allowed for native defined classes
|
|
3846
|
+
export interface WidgetComponentEntityOptions extends WidgetComponentBaseOptions {
|
|
3847
|
+
deselectedAnimation?: string;
|
|
3848
|
+
isClickable?: boolean;
|
|
3849
|
+
selectedAnimation?: string;
|
|
3850
|
+
}
|
|
3851
|
+
|
|
3852
|
+
// @ts-ignore Class inheritance allowed for native defined classes
|
|
3853
|
+
export interface WidgetComponentGizmoOptions extends WidgetComponentBaseOptions {}
|
|
3854
|
+
|
|
3855
|
+
// @ts-ignore Class inheritance allowed for native defined classes
|
|
3856
|
+
export interface WidgetComponentGuideOptions extends WidgetComponentBaseOptions {}
|
|
3857
|
+
|
|
3858
|
+
// @ts-ignore Class inheritance allowed for native defined classes
|
|
3859
|
+
export interface WidgetComponentRenderPrimitiveOptions extends WidgetComponentBaseOptions {}
|
|
3860
|
+
|
|
3861
|
+
// @ts-ignore Class inheritance allowed for native defined classes
|
|
3862
|
+
export interface WidgetComponentSplineOptions extends WidgetComponentBaseOptions {
|
|
3863
|
+
controlPoints: Widget[];
|
|
3864
|
+
splineType?: SplineType;
|
|
3865
|
+
}
|
|
3866
|
+
|
|
3867
|
+
// @ts-ignore Class inheritance allowed for native defined classes
|
|
3868
|
+
export interface WidgetComponentTextOptions extends WidgetComponentBaseOptions {
|
|
3869
|
+
color?: minecraftserver.RGBA;
|
|
3870
|
+
}
|
|
3871
|
+
|
|
3872
|
+
export interface WidgetGroupCreateOptions {
|
|
3873
|
+
groupSelectionMode?: WidgetGroupSelectionMode;
|
|
3874
|
+
showBounds?: boolean;
|
|
3875
|
+
visible?: boolean;
|
|
3876
|
+
}
|
|
3877
|
+
|
|
3878
|
+
/**
|
|
3879
|
+
* Binds actions to the client and manages their lifetime.
|
|
3880
|
+
* Action managers are managed on a per player basis since
|
|
3881
|
+
* client side UI is per player.
|
|
3882
|
+
*/
|
|
3883
|
+
export interface ActionManager {
|
|
3884
|
+
/**
|
|
3885
|
+
* @remarks
|
|
3886
|
+
* The active tool ID
|
|
3887
|
+
*
|
|
3888
|
+
*/
|
|
3889
|
+
activeToolId: string | undefined;
|
|
3890
|
+
/**
|
|
3891
|
+
* @remarks
|
|
3892
|
+
* Creates an action and registers it on the client
|
|
3893
|
+
*
|
|
3894
|
+
* @param rawAction
|
|
3895
|
+
* The raw action to create. See ActionTypes for supported
|
|
3896
|
+
* parameters
|
|
3897
|
+
*/
|
|
3898
|
+
createAction<T extends Action>(rawAction: T): RegisteredAction<T>;
|
|
3899
|
+
}
|
|
3900
|
+
|
|
3901
|
+
/**
|
|
3902
|
+
* Represents a UI session for a given player
|
|
3903
|
+
*/
|
|
3904
|
+
export interface BuiltInUIManager {
|
|
3905
|
+
/**
|
|
3906
|
+
* @remarks
|
|
3907
|
+
* Navigates to the documentation site.
|
|
3908
|
+
*
|
|
3909
|
+
*/
|
|
3910
|
+
navigateToDocumentation(): void;
|
|
3911
|
+
/**
|
|
3912
|
+
* @remarks
|
|
3913
|
+
* Navigates to the feedback site
|
|
3914
|
+
*
|
|
3915
|
+
*/
|
|
3916
|
+
navigateToFeedback(): void;
|
|
3917
|
+
/**
|
|
3918
|
+
* @remarks
|
|
3919
|
+
* Navigates to the pause screen
|
|
3920
|
+
*
|
|
3921
|
+
*/
|
|
3922
|
+
navigateToPauseScreen(): void;
|
|
3923
|
+
/**
|
|
3924
|
+
* @remarks
|
|
3925
|
+
* Updates the visibility of the log panel
|
|
3926
|
+
*
|
|
3927
|
+
*/
|
|
3928
|
+
updateLogPanelVisibility(visibility: boolean): void;
|
|
3929
|
+
/**
|
|
3930
|
+
* @remarks
|
|
3931
|
+
* Updates the visibility of the control demo
|
|
3932
|
+
*
|
|
3933
|
+
*/
|
|
3934
|
+
updateUISettingsPanelVisibility(visibility: boolean): void;
|
|
3935
|
+
/**
|
|
3936
|
+
* @remarks
|
|
3937
|
+
* Updates the visibility of the welcome panel
|
|
3938
|
+
*
|
|
3939
|
+
*/
|
|
3940
|
+
updateWelcomePanelVisibility(visibility: boolean): void;
|
|
3941
|
+
}
|
|
3942
|
+
|
|
3943
|
+
/**
|
|
3944
|
+
* An event that can be subscribed to. You can use the token,
|
|
3945
|
+
* returned from the subscribe method, to clean up handlers.
|
|
3946
|
+
*/
|
|
3947
|
+
export declare interface EventSink<T> {
|
|
3948
|
+
/**
|
|
3949
|
+
* @remarks
|
|
3950
|
+
* Subscribes an event handler to a particular subscription.
|
|
3951
|
+
*
|
|
3952
|
+
* @param handler
|
|
3953
|
+
* Handler function to subscribe with.
|
|
3954
|
+
* @returns
|
|
3955
|
+
* An event handler subscription token that can be used to
|
|
3956
|
+
* unsubscribe and clean-up handlers.
|
|
3957
|
+
*/
|
|
3958
|
+
subscribe(handler: EventHandler<T>): IEventToken;
|
|
3959
|
+
}
|
|
3960
|
+
|
|
3961
|
+
/**
|
|
3962
|
+
* Manager for IActionBarItem objects.
|
|
3963
|
+
*/
|
|
3964
|
+
export interface IActionBar {
|
|
3965
|
+
/**
|
|
3966
|
+
* @remarks
|
|
3967
|
+
* Add a new action bar item to the collection.
|
|
3968
|
+
*
|
|
3969
|
+
* @param id
|
|
3970
|
+
* Unique item identifier.
|
|
3971
|
+
* @param action
|
|
3972
|
+
* Action to be invoked.
|
|
3973
|
+
* @param props
|
|
3974
|
+
* Configuration for the item to create.
|
|
3975
|
+
*/
|
|
3976
|
+
registerItem(
|
|
3977
|
+
id: string,
|
|
3978
|
+
action: RegisteredAction<NoArgsAction>,
|
|
3979
|
+
props: IActionBarItemCreationParams,
|
|
3980
|
+
): IActionBarItem;
|
|
3981
|
+
/**
|
|
3982
|
+
* @remarks
|
|
3983
|
+
* Remove an action item from the collection.
|
|
3984
|
+
*
|
|
3985
|
+
* @param id
|
|
3986
|
+
* Unique item identifier.
|
|
3987
|
+
*/
|
|
3988
|
+
unregisterItem(id: string): void;
|
|
3989
|
+
}
|
|
3990
|
+
|
|
3991
|
+
/**
|
|
3992
|
+
* Registered item handle in the Action Bar collection.
|
|
3993
|
+
*/
|
|
3994
|
+
export interface IActionBarItem {
|
|
3995
|
+
/**
|
|
3996
|
+
* @remarks
|
|
3997
|
+
* Returns the current enabled state of the item.
|
|
3998
|
+
*
|
|
3999
|
+
*/
|
|
4000
|
+
getEnabled: () => boolean;
|
|
4001
|
+
/**
|
|
4002
|
+
* @remarks
|
|
4003
|
+
* Unique identifier of the item.
|
|
4004
|
+
*
|
|
4005
|
+
*/
|
|
4006
|
+
readonly id: string;
|
|
4007
|
+
/**
|
|
4008
|
+
* @remarks
|
|
4009
|
+
* Text label of the item.
|
|
4010
|
+
*
|
|
4011
|
+
*/
|
|
4012
|
+
readonly label: string;
|
|
4013
|
+
/**
|
|
4014
|
+
* @remarks
|
|
4015
|
+
* Modify enabled state of the item.
|
|
4016
|
+
*
|
|
4017
|
+
*/
|
|
4018
|
+
setEnabled: (enabled: boolean) => void;
|
|
4019
|
+
}
|
|
4020
|
+
|
|
4021
|
+
/**
|
|
4022
|
+
* Properties required to create an Action Bar item.
|
|
4023
|
+
*/
|
|
4024
|
+
export interface IActionBarItemCreationParams {
|
|
4025
|
+
/**
|
|
4026
|
+
* @remarks
|
|
4027
|
+
* Initial enabled state of the item. If not defined, default
|
|
4028
|
+
* is true.
|
|
4029
|
+
*
|
|
4030
|
+
*/
|
|
4031
|
+
enabled?: boolean;
|
|
4032
|
+
/**
|
|
4033
|
+
* @remarks
|
|
4034
|
+
* Icon resource for the item.
|
|
4035
|
+
*
|
|
4036
|
+
*/
|
|
4037
|
+
icon: string;
|
|
4038
|
+
/**
|
|
4039
|
+
* @remarks
|
|
4040
|
+
* Text label for item.
|
|
4041
|
+
*
|
|
4042
|
+
*/
|
|
4043
|
+
label: string;
|
|
4044
|
+
/**
|
|
4045
|
+
* @remarks
|
|
4046
|
+
* Tooltip description for the item.
|
|
4047
|
+
*
|
|
4048
|
+
*/
|
|
4049
|
+
tooltipDescription?: string;
|
|
4050
|
+
/**
|
|
4051
|
+
* @remarks
|
|
4052
|
+
* Tooltip title for the item.
|
|
4053
|
+
*
|
|
4054
|
+
*/
|
|
4055
|
+
tooltipTitle?: string;
|
|
4056
|
+
}
|
|
4057
|
+
|
|
4058
|
+
/**
|
|
4059
|
+
* A property item which supports Vector3 properties
|
|
4060
|
+
*/
|
|
4061
|
+
// @ts-ignore Class inheritance allowed for native defined classes
|
|
4062
|
+
export interface IBoolPropertyItem extends IPropertyItemBase {
|
|
4063
|
+
/**
|
|
4064
|
+
* @remarks
|
|
4065
|
+
* Current value of the property item.
|
|
4066
|
+
*
|
|
4067
|
+
*/
|
|
4068
|
+
readonly value: boolean;
|
|
4069
|
+
/**
|
|
4070
|
+
* @remarks
|
|
4071
|
+
* Sets title of the property item.
|
|
4072
|
+
*
|
|
4073
|
+
*/
|
|
4074
|
+
setTitle(title: LocalizedString | undefined): void;
|
|
4075
|
+
/**
|
|
4076
|
+
* @remarks
|
|
4077
|
+
* Sets tooltip description of the property item.
|
|
4078
|
+
*
|
|
4079
|
+
*/
|
|
4080
|
+
setTooltip(title: LocalizedString | undefined): void;
|
|
4081
|
+
}
|
|
4082
|
+
|
|
4083
|
+
/**
|
|
4084
|
+
* Optional properties for Bool property item
|
|
4085
|
+
*/
|
|
4086
|
+
// @ts-ignore Class inheritance allowed for native defined classes
|
|
4087
|
+
export interface IBoolPropertyItemOptions extends IPropertyItemOptionsBase {
|
|
4088
|
+
/**
|
|
4089
|
+
* @remarks
|
|
4090
|
+
* If true label text will be hidden. It will be visible by
|
|
4091
|
+
* default.
|
|
4092
|
+
*
|
|
4093
|
+
*/
|
|
4094
|
+
hiddenLabel?: boolean;
|
|
4095
|
+
/**
|
|
4096
|
+
* @remarks
|
|
4097
|
+
* This callback is called when UI control value is changed.
|
|
4098
|
+
*
|
|
4099
|
+
*/
|
|
4100
|
+
onChange?: (newValue: boolean, oldValue: boolean) => void;
|
|
4101
|
+
/**
|
|
4102
|
+
* @remarks
|
|
4103
|
+
* Localized title of the text item.
|
|
4104
|
+
*
|
|
4105
|
+
*/
|
|
4106
|
+
title?: LocalizedString;
|
|
4107
|
+
/**
|
|
4108
|
+
* @remarks
|
|
4109
|
+
* Tooltip description of the property item
|
|
4110
|
+
*
|
|
4111
|
+
*/
|
|
4112
|
+
tooltip?: LocalizedString;
|
|
4113
|
+
/**
|
|
4114
|
+
* @remarks
|
|
4115
|
+
* Determines how we display bool as a UI element. If
|
|
4116
|
+
* undefined, it will default to Checkbox.
|
|
4117
|
+
*
|
|
4118
|
+
*/
|
|
4119
|
+
variant?: BoolPropertyItemVariant;
|
|
4120
|
+
}
|
|
4121
|
+
|
|
4122
|
+
/**
|
|
4123
|
+
* A property item which supports Button properties
|
|
4124
|
+
*/
|
|
4125
|
+
// @ts-ignore Class inheritance allowed for native defined classes
|
|
4126
|
+
export interface IButtonPropertyItem extends IPropertyItemBase {
|
|
4127
|
+
/**
|
|
4128
|
+
* @remarks
|
|
4129
|
+
* Replace action assigned to the button.
|
|
4130
|
+
*
|
|
4131
|
+
* @param action
|
|
4132
|
+
* New action to replace the existing with.
|
|
4133
|
+
*/
|
|
4134
|
+
replaceAction(action: RegisteredAction<NoArgsAction>): void;
|
|
4135
|
+
/**
|
|
4136
|
+
* @remarks
|
|
4137
|
+
* Updates icon of the button.
|
|
4138
|
+
*
|
|
4139
|
+
* @param icon
|
|
4140
|
+
* New button icon.
|
|
4141
|
+
*/
|
|
4142
|
+
setIcon(icon: string | undefined): void;
|
|
4143
|
+
/**
|
|
4144
|
+
* @remarks
|
|
4145
|
+
* Updates title of the button.
|
|
4146
|
+
*
|
|
4147
|
+
* @param title
|
|
4148
|
+
* New button title.
|
|
4149
|
+
*/
|
|
4150
|
+
setTitle(title: LocalizedString | undefined): void;
|
|
4151
|
+
/**
|
|
4152
|
+
* @remarks
|
|
4153
|
+
* Updates tooltip description of the button.
|
|
4154
|
+
*
|
|
4155
|
+
* @param tooltip
|
|
4156
|
+
* New button tooltip.
|
|
4157
|
+
*/
|
|
4158
|
+
setTooltip(tooltip: LocalizedString | undefined): void;
|
|
2239
4159
|
}
|
|
2240
4160
|
|
|
2241
|
-
|
|
2242
|
-
|
|
2243
|
-
|
|
4161
|
+
/**
|
|
4162
|
+
* Optional properties for Button property item
|
|
4163
|
+
*/
|
|
4164
|
+
// @ts-ignore Class inheritance allowed for native defined classes
|
|
4165
|
+
export interface IButtonPropertyItemOptions extends IPropertyItemOptionsBase {
|
|
4166
|
+
/**
|
|
4167
|
+
* @remarks
|
|
4168
|
+
* If true label text will be hidden. It will be visible by
|
|
4169
|
+
* default.
|
|
4170
|
+
*
|
|
4171
|
+
*/
|
|
4172
|
+
hiddenLabel?: boolean;
|
|
4173
|
+
/**
|
|
4174
|
+
* @remarks
|
|
4175
|
+
* Icon image of the property item.
|
|
4176
|
+
*
|
|
4177
|
+
*/
|
|
4178
|
+
icon?: string;
|
|
4179
|
+
/**
|
|
4180
|
+
* @remarks
|
|
4181
|
+
* Localized title of the property item.
|
|
4182
|
+
*
|
|
4183
|
+
*/
|
|
4184
|
+
title?: LocalizedString;
|
|
4185
|
+
/**
|
|
4186
|
+
* @remarks
|
|
4187
|
+
* Tooltip description of the property item.
|
|
4188
|
+
*
|
|
4189
|
+
*/
|
|
4190
|
+
tooltip?: LocalizedString;
|
|
4191
|
+
/**
|
|
4192
|
+
* @remarks
|
|
4193
|
+
* The variant for the button. By default it is Primary.
|
|
4194
|
+
*
|
|
4195
|
+
*/
|
|
4196
|
+
variant?: ButtonPropertyItemVariant;
|
|
2244
4197
|
}
|
|
2245
4198
|
|
|
2246
4199
|
/**
|
|
2247
|
-
*
|
|
2248
|
-
* is being written to the world
|
|
4200
|
+
* A property item which supports Color Picker properties
|
|
2249
4201
|
*/
|
|
2250
|
-
|
|
4202
|
+
// @ts-ignore Class inheritance allowed for native defined classes
|
|
4203
|
+
export interface IColorPickerPropertyItem extends IPropertyItemBase {
|
|
2251
4204
|
/**
|
|
2252
4205
|
* @remarks
|
|
2253
|
-
*
|
|
2254
|
-
* corner of the Clipboard Item to be written to the world.
|
|
2255
|
-
* `{0, 0, 0}` represents the center of the Clipboard item,
|
|
2256
|
-
* `{0, 1, 0}` represents the top, `{-1, -1, -1}` represents
|
|
2257
|
-
* the bottom/back/left corner, etc
|
|
2258
|
-
* The anchor is used in conjunction with the item size to
|
|
2259
|
-
* determine the object relative anchor point where the object
|
|
2260
|
-
* will be applied in the world.
|
|
2261
|
-
* Values for the X/Y/Z components should be within the range
|
|
2262
|
-
* `(-1 <= X/Y/Z <=1)`
|
|
4206
|
+
* Current value of the property item.
|
|
2263
4207
|
*
|
|
2264
4208
|
*/
|
|
2265
|
-
|
|
4209
|
+
readonly value: minecraftserver.RGBA;
|
|
2266
4210
|
/**
|
|
2267
4211
|
* @remarks
|
|
2268
|
-
*
|
|
2269
|
-
* along which the item should be mirrored
|
|
2270
|
-
* - X
|
|
2271
|
-
* - Z
|
|
2272
|
-
* - XZ
|
|
4212
|
+
* Updates title of the property item.
|
|
2273
4213
|
*
|
|
4214
|
+
* @param title
|
|
4215
|
+
* New title.
|
|
2274
4216
|
*/
|
|
2275
|
-
|
|
4217
|
+
setTitle(title: LocalizedString | undefined): void;
|
|
2276
4218
|
/**
|
|
2277
4219
|
* @remarks
|
|
2278
|
-
*
|
|
2279
|
-
* location while the clipboard item is being written
|
|
4220
|
+
* Updates tooltip of the property item.
|
|
2280
4221
|
*
|
|
4222
|
+
* @param tooltip
|
|
4223
|
+
* New tooltip.
|
|
2281
4224
|
*/
|
|
2282
|
-
|
|
4225
|
+
setTooltip(tooltip: LocalizedString | undefined): void;
|
|
4226
|
+
}
|
|
4227
|
+
|
|
4228
|
+
/**
|
|
4229
|
+
* Optional properties for Color Picker property item
|
|
4230
|
+
*/
|
|
4231
|
+
// @ts-ignore Class inheritance allowed for native defined classes
|
|
4232
|
+
export interface IColorPickerPropertyItemOptions extends IPropertyItemOptionsBase {
|
|
2283
4233
|
/**
|
|
2284
4234
|
* @remarks
|
|
2285
|
-
*
|
|
2286
|
-
*
|
|
4235
|
+
* If true alpha control will be hidden. If undefined, it will
|
|
4236
|
+
* default to false.
|
|
2287
4237
|
*
|
|
2288
4238
|
*/
|
|
2289
|
-
|
|
4239
|
+
hiddenAlpha?: boolean;
|
|
4240
|
+
/**
|
|
4241
|
+
* @remarks
|
|
4242
|
+
* If true label text will be hidden. It will be visible by
|
|
4243
|
+
* default.
|
|
4244
|
+
*
|
|
4245
|
+
*/
|
|
4246
|
+
hiddenLabel?: boolean;
|
|
4247
|
+
/**
|
|
4248
|
+
* @remarks
|
|
4249
|
+
* This callback is called when UI control value is changed.
|
|
4250
|
+
*
|
|
4251
|
+
*/
|
|
4252
|
+
onChange?: (newValue: minecraftserver.RGBA, oldValue: minecraftserver.RGBA) => void;
|
|
4253
|
+
/**
|
|
4254
|
+
* @remarks
|
|
4255
|
+
* Localized title of the property item.
|
|
4256
|
+
*
|
|
4257
|
+
*/
|
|
4258
|
+
title?: LocalizedString;
|
|
4259
|
+
/**
|
|
4260
|
+
* @remarks
|
|
4261
|
+
* Tooltip description of the property item.
|
|
4262
|
+
*
|
|
4263
|
+
*/
|
|
4264
|
+
tooltip?: LocalizedString;
|
|
4265
|
+
/**
|
|
4266
|
+
* @remarks
|
|
4267
|
+
* The variant for the button. By default it is Primary.
|
|
4268
|
+
*
|
|
4269
|
+
*/
|
|
4270
|
+
variant?: ColorPickerPropertyItemVariant;
|
|
2290
4271
|
}
|
|
2291
4272
|
|
|
2292
4273
|
/**
|
|
2293
|
-
*
|
|
2294
|
-
* properties of the Editor 3D block cursor construct.
|
|
2295
|
-
* The 3D block cursor can be queried to retrieve the current
|
|
2296
|
-
* properties, and the same property class can be used to set
|
|
2297
|
-
* the current properties of the cursor.
|
|
2298
|
-
* This interface is generally used at the activation stage of
|
|
2299
|
-
* the active tool to set up the color, visibility and input
|
|
2300
|
-
* properties of the 3D block cursor
|
|
4274
|
+
* A property item which supports Combo Box properties
|
|
2301
4275
|
*/
|
|
2302
|
-
|
|
4276
|
+
// @ts-ignore Class inheritance allowed for native defined classes
|
|
4277
|
+
export interface IComboBoxPropertyItem extends IPropertyItemBase {
|
|
2303
4278
|
/**
|
|
2304
4279
|
* @remarks
|
|
2305
|
-
*
|
|
2306
|
-
* - Fixed Mode locks the cursor to a position which is <X>
|
|
2307
|
-
* blocks offset from the current player position. The cursor
|
|
2308
|
-
* is camera relative, so it will always appear <X> blocks
|
|
2309
|
-
* ahead of the players feet
|
|
2310
|
-
* - Keyboard Mode puts the cursor under direct control of the
|
|
2311
|
-
* API, and ignores any mouse input. The cursor can only be
|
|
2312
|
-
* moved around using the moveBy method
|
|
2313
|
-
* - KeyboardAndMouse mode puts the cursor under a shared
|
|
2314
|
-
* control of onMouseMove and keyboard input. Any mouse
|
|
2315
|
-
* movement events will set the cursor to the position of the
|
|
2316
|
-
* mouse/world raycast. This can be modified using the moveBy
|
|
2317
|
-
* method, but any subsequent mouse events will reset the
|
|
2318
|
-
* position back to where the raycast intersection occurs
|
|
2319
|
-
* - Mouse mode puts the cursor under control of mouse move
|
|
2320
|
-
* events, and moveBy method will be ignored
|
|
4280
|
+
* Current value of the property item.
|
|
2321
4281
|
*
|
|
4282
|
+
*/
|
|
4283
|
+
readonly value: string;
|
|
4284
|
+
/**
|
|
4285
|
+
* @remarks
|
|
4286
|
+
* Updates title of the property item.
|
|
2322
4287
|
*
|
|
4288
|
+
* @param title
|
|
4289
|
+
* New title.
|
|
2323
4290
|
*/
|
|
2324
|
-
|
|
4291
|
+
setTitle(title: LocalizedString | undefined): void;
|
|
2325
4292
|
/**
|
|
2326
4293
|
* @remarks
|
|
2327
|
-
*
|
|
2328
|
-
* is attached, relative to camera direction.
|
|
2329
|
-
* This is only used when [controlMode] is set to `Fixed`
|
|
4294
|
+
* Updates tooltip of the property item.
|
|
2330
4295
|
*
|
|
4296
|
+
* @param tooltip
|
|
4297
|
+
* New tooltip.
|
|
2331
4298
|
*/
|
|
2332
|
-
|
|
4299
|
+
setTooltip(tooltip: LocalizedString | undefined): void;
|
|
4300
|
+
}
|
|
4301
|
+
|
|
4302
|
+
/**
|
|
4303
|
+
* Optional properties for ComboBox property item
|
|
4304
|
+
*/
|
|
4305
|
+
// @ts-ignore Class inheritance allowed for native defined classes
|
|
4306
|
+
export interface IComboBoxPropertyItemOptions extends IPropertyItemOptionsBase {
|
|
2333
4307
|
/**
|
|
2334
4308
|
* @remarks
|
|
2335
|
-
*
|
|
2336
|
-
*
|
|
4309
|
+
* Possible data types supported by combo box. If undefined, it
|
|
4310
|
+
* will be Custom by default.
|
|
2337
4311
|
*
|
|
2338
4312
|
*/
|
|
2339
|
-
|
|
2340
|
-
projectThroughLiquid?: boolean;
|
|
4313
|
+
dataType?: ComboBoxPropertyItemDataType;
|
|
2341
4314
|
/**
|
|
2342
4315
|
* @remarks
|
|
2343
|
-
*
|
|
2344
|
-
*
|
|
2345
|
-
*
|
|
2346
|
-
* - Face Mode records the block position of the block adjacent
|
|
2347
|
-
* to the mouse/world raycast intersection, according to the
|
|
2348
|
-
* face of the collision point of the selected block
|
|
4316
|
+
* Default value to fall back to if entry is not found. If
|
|
4317
|
+
* undefined, data type will determine the default value (empty
|
|
4318
|
+
* string for Custom data type).
|
|
2349
4319
|
*
|
|
2350
4320
|
*/
|
|
2351
|
-
|
|
4321
|
+
defaultValue?: string;
|
|
2352
4322
|
/**
|
|
2353
4323
|
* @remarks
|
|
2354
|
-
*
|
|
2355
|
-
*
|
|
4324
|
+
* List of combo box entries. If undefined, data type will
|
|
4325
|
+
* determine the default list (empty list for Custom data
|
|
4326
|
+
* type).
|
|
4327
|
+
*
|
|
4328
|
+
*/
|
|
4329
|
+
entries?: string[];
|
|
4330
|
+
/**
|
|
4331
|
+
* @remarks
|
|
4332
|
+
* If true label text will be hidden. It will be visible by
|
|
4333
|
+
* default.
|
|
4334
|
+
*
|
|
4335
|
+
*/
|
|
4336
|
+
hiddenLabel?: boolean;
|
|
4337
|
+
/**
|
|
4338
|
+
* @remarks
|
|
4339
|
+
* This callback is called when UI control value is changed.
|
|
4340
|
+
*
|
|
4341
|
+
*/
|
|
4342
|
+
onChange?: (newValue: string, oldValue: string) => void;
|
|
4343
|
+
/**
|
|
4344
|
+
* @remarks
|
|
4345
|
+
* If true the image for the selected value will be displayed
|
|
4346
|
+
* (if data type supports it). If undefined, it will default to
|
|
4347
|
+
* false.
|
|
4348
|
+
*
|
|
4349
|
+
*/
|
|
4350
|
+
showImage?: boolean;
|
|
4351
|
+
/**
|
|
4352
|
+
* @remarks
|
|
4353
|
+
* Localized title of the property item.
|
|
4354
|
+
*
|
|
4355
|
+
*/
|
|
4356
|
+
title?: LocalizedString;
|
|
4357
|
+
/**
|
|
4358
|
+
* @remarks
|
|
4359
|
+
* Tooltip description of the property item.
|
|
4360
|
+
*
|
|
4361
|
+
*/
|
|
4362
|
+
tooltip?: LocalizedString;
|
|
4363
|
+
}
|
|
4364
|
+
|
|
4365
|
+
/**
|
|
4366
|
+
* Simple abstraction for disposable objects.
|
|
4367
|
+
*/
|
|
4368
|
+
export interface IDisposable {
|
|
4369
|
+
/**
|
|
4370
|
+
* @remarks
|
|
4371
|
+
* Initiates the teardown and cleanup of this disposable item.
|
|
4372
|
+
*
|
|
4373
|
+
*/
|
|
4374
|
+
teardown(): void;
|
|
4375
|
+
}
|
|
4376
|
+
|
|
4377
|
+
/**
|
|
4378
|
+
* Properties of dropdown property item children
|
|
4379
|
+
*/
|
|
4380
|
+
export interface IDropdownItem {
|
|
4381
|
+
/**
|
|
4382
|
+
* @remarks
|
|
4383
|
+
* Localized display text of the dropdown item.
|
|
4384
|
+
*
|
|
4385
|
+
*/
|
|
4386
|
+
readonly label: string;
|
|
4387
|
+
/**
|
|
4388
|
+
* @remarks
|
|
4389
|
+
* The selectable value of the dropdown item.
|
|
4390
|
+
*
|
|
4391
|
+
*/
|
|
4392
|
+
readonly value: number;
|
|
4393
|
+
}
|
|
4394
|
+
|
|
4395
|
+
/**
|
|
4396
|
+
* A property item which supports Dropdown properties
|
|
4397
|
+
*/
|
|
4398
|
+
// @ts-ignore Class inheritance allowed for native defined classes
|
|
4399
|
+
export interface IDropdownPropertyItem extends IPropertyItemBase {
|
|
4400
|
+
/**
|
|
4401
|
+
* @remarks
|
|
4402
|
+
* Current selected entry value of the property item list.
|
|
4403
|
+
*
|
|
4404
|
+
*/
|
|
4405
|
+
readonly value: number;
|
|
4406
|
+
/**
|
|
4407
|
+
* @remarks
|
|
4408
|
+
* Find a dropdown entry at an index in the dropdown list.
|
|
4409
|
+
*
|
|
4410
|
+
* @param index
|
|
4411
|
+
* Index of the dropdown entry in the list.
|
|
4412
|
+
*/
|
|
4413
|
+
getEntryByIndex(index: number): IDropdownPropertyItemEntry | undefined;
|
|
4414
|
+
/**
|
|
4415
|
+
* @remarks
|
|
4416
|
+
* Find a dropdown entry with a specific value associated with
|
|
4417
|
+
* property item.
|
|
4418
|
+
*
|
|
4419
|
+
* @param value
|
|
4420
|
+
* Value of the dropdown entry in the list.
|
|
4421
|
+
*/
|
|
4422
|
+
getEntryByValue(value: number): IDropdownPropertyItemEntry | undefined;
|
|
4423
|
+
/**
|
|
4424
|
+
* @remarks
|
|
4425
|
+
* Updates title of the property item.
|
|
4426
|
+
*
|
|
4427
|
+
* @param title
|
|
4428
|
+
* New title.
|
|
4429
|
+
*/
|
|
4430
|
+
setTitle(title: LocalizedString | undefined): void;
|
|
4431
|
+
/**
|
|
4432
|
+
* @remarks
|
|
4433
|
+
* Updates tooltip of the property item.
|
|
4434
|
+
*
|
|
4435
|
+
* @param tooltip
|
|
4436
|
+
* New tooltip.
|
|
4437
|
+
*/
|
|
4438
|
+
setTooltip(tooltip: LocalizedString | undefined): void;
|
|
4439
|
+
/**
|
|
4440
|
+
* @remarks
|
|
4441
|
+
* Update list of dropdown entries.
|
|
4442
|
+
*
|
|
4443
|
+
* @param entries
|
|
4444
|
+
* New list of updated entries.
|
|
4445
|
+
* @param newValue
|
|
4446
|
+
* New value value to use for the dropdown.
|
|
4447
|
+
*/
|
|
4448
|
+
updateEntries(entries: IDropdownPropertyItemEntry[], newValue?: number): void;
|
|
4449
|
+
}
|
|
4450
|
+
|
|
4451
|
+
/**
|
|
4452
|
+
* Properties of dropdown property item menu entry
|
|
4453
|
+
*/
|
|
4454
|
+
export interface IDropdownPropertyItemEntry {
|
|
4455
|
+
/**
|
|
4456
|
+
* @remarks
|
|
4457
|
+
* Optional image of the dropdown entry.
|
|
4458
|
+
*
|
|
4459
|
+
*/
|
|
4460
|
+
readonly imageData?: ImageResourceData;
|
|
4461
|
+
/**
|
|
4462
|
+
* @remarks
|
|
4463
|
+
* Localized display text of the entry.
|
|
4464
|
+
*
|
|
4465
|
+
*/
|
|
4466
|
+
readonly label: string;
|
|
4467
|
+
/**
|
|
4468
|
+
* @remarks
|
|
4469
|
+
* The selectable value of the entry.
|
|
2356
4470
|
*
|
|
2357
4471
|
*/
|
|
2358
|
-
|
|
4472
|
+
readonly value: number;
|
|
2359
4473
|
}
|
|
2360
4474
|
|
|
2361
|
-
|
|
2362
|
-
|
|
2363
|
-
|
|
2364
|
-
|
|
2365
|
-
|
|
2366
|
-
|
|
4475
|
+
/**
|
|
4476
|
+
* Dropdown property item specific functionality
|
|
4477
|
+
*/
|
|
4478
|
+
export interface IDropdownPropertyItemMixIn {
|
|
4479
|
+
/**
|
|
4480
|
+
* @remarks
|
|
4481
|
+
* Used to update the Dropdown options in the control. Will
|
|
4482
|
+
* trigger onChange with -1 as the old value due to the list
|
|
4483
|
+
* changing entries.
|
|
4484
|
+
*
|
|
4485
|
+
*/
|
|
4486
|
+
updateDropdownItems(dropdownItems: IDropdownItem[], newValue: number): void;
|
|
2367
4487
|
}
|
|
2368
4488
|
|
|
2369
4489
|
/**
|
|
2370
|
-
*
|
|
2371
|
-
* which can be used when calling the `registerEditorExtension`
|
|
2372
|
-
* function
|
|
4490
|
+
* Optional properties for Dropdown property item
|
|
2373
4491
|
*/
|
|
2374
|
-
|
|
4492
|
+
// @ts-ignore Class inheritance allowed for native defined classes
|
|
4493
|
+
export interface IDropdownPropertyItemOptions extends IPropertyItemOptionsBase {
|
|
2375
4494
|
/**
|
|
2376
4495
|
* @remarks
|
|
2377
|
-
*
|
|
2378
|
-
*
|
|
2379
|
-
* This can be a straight textual description or a string
|
|
2380
|
-
* identifier key for a localized string in the extension's
|
|
2381
|
-
* resource pack text files.
|
|
2382
|
-
* The description is meant to be a very short snappy one-liner
|
|
2383
|
-
* which quickly and uniquely identifies the extension
|
|
2384
|
-
* The length of the string is capped to 256 characters
|
|
4496
|
+
* List of dropdown entries associated with the property item.
|
|
4497
|
+
* If undefined, list will be empty.
|
|
2385
4498
|
*
|
|
2386
4499
|
*/
|
|
2387
|
-
|
|
4500
|
+
entries?: IDropdownPropertyItemEntry[];
|
|
2388
4501
|
/**
|
|
2389
4502
|
* @remarks
|
|
2390
|
-
*
|
|
2391
|
-
*
|
|
2392
|
-
* identifier key for a localized string in the extension's
|
|
2393
|
-
* resource pack text files.
|
|
2394
|
-
* The notes section is meant to convey more detailed
|
|
2395
|
-
* information and notes (e.g. a link to the author's website)
|
|
2396
|
-
* The length of this string is capped to 1024 characters
|
|
4503
|
+
* If true label text will be hidden. It will be visible by
|
|
4504
|
+
* default.
|
|
2397
4505
|
*
|
|
2398
4506
|
*/
|
|
2399
|
-
|
|
4507
|
+
hiddenLabel?: boolean;
|
|
2400
4508
|
/**
|
|
2401
4509
|
* @remarks
|
|
2402
|
-
*
|
|
2403
|
-
* Modal Tools created from the registered extension.
|
|
2404
|
-
* The length of the string is capped to 256 characters
|
|
4510
|
+
* This callback is called when UI control value is changed.
|
|
2405
4511
|
*
|
|
2406
4512
|
*/
|
|
2407
|
-
|
|
2408
|
-
}
|
|
2409
|
-
|
|
2410
|
-
/**
|
|
2411
|
-
* A properties class for the global instance of the logger
|
|
2412
|
-
* object.
|
|
2413
|
-
* While the logger object is available through the {@link
|
|
2414
|
-
* ExtensionContext} - using the global instance allows the
|
|
2415
|
-
* creator to use this properties class to perform direct
|
|
2416
|
-
* server->client messaging and broadcasts.
|
|
2417
|
-
*/
|
|
2418
|
-
export interface LogProperties {
|
|
4513
|
+
onChange?: (newValue: number, oldValue: number, items: IDropdownPropertyItemEntry[]) => void;
|
|
2419
4514
|
/**
|
|
2420
4515
|
* @remarks
|
|
2421
|
-
*
|
|
2422
|
-
* specified, then all players will receive the message
|
|
4516
|
+
* Localized title of the property item.
|
|
2423
4517
|
*
|
|
2424
4518
|
*/
|
|
2425
|
-
|
|
4519
|
+
title?: LocalizedString;
|
|
2426
4520
|
/**
|
|
2427
4521
|
* @remarks
|
|
2428
|
-
*
|
|
2429
|
-
* the client session to filter/search in the log window
|
|
4522
|
+
* Tooltip description of the property item.
|
|
2430
4523
|
*
|
|
2431
4524
|
*/
|
|
2432
|
-
|
|
2433
|
-
}
|
|
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
|
-
|
|
2447
|
-
export interface ProjectExportOptions {
|
|
2448
|
-
alwaysDay?: boolean;
|
|
2449
|
-
difficulty?: minecraftserver.Difficulty;
|
|
2450
|
-
disableWeather?: boolean;
|
|
2451
|
-
exportName?: string;
|
|
2452
|
-
exportType: ProjectExportType;
|
|
2453
|
-
gameMode?: minecraftserver.GameMode;
|
|
2454
|
-
initialTimOfDay?: number;
|
|
4525
|
+
tooltip?: LocalizedString;
|
|
2455
4526
|
}
|
|
2456
4527
|
|
|
2457
|
-
|
|
2458
|
-
|
|
2459
|
-
|
|
2460
|
-
|
|
4528
|
+
/**
|
|
4529
|
+
* Returned from an event subscription. Provides functionality
|
|
4530
|
+
* for cleaning up listeners
|
|
4531
|
+
*/
|
|
4532
|
+
export declare interface IEventToken {
|
|
4533
|
+
/**
|
|
4534
|
+
* @remarks
|
|
4535
|
+
* Removes registered listener from an event
|
|
4536
|
+
*
|
|
4537
|
+
*/
|
|
4538
|
+
unsubscribe(): void;
|
|
2461
4539
|
}
|
|
2462
4540
|
|
|
2463
|
-
export interface
|
|
2464
|
-
|
|
4541
|
+
export interface IGlobalInputManager {
|
|
4542
|
+
registerKeyBinding(
|
|
4543
|
+
inputContextId: EditorInputContext,
|
|
4544
|
+
action: SupportedKeyboardActionTypes,
|
|
4545
|
+
binding: KeyBinding,
|
|
4546
|
+
info?: KeyBindingInfo,
|
|
4547
|
+
): void;
|
|
2465
4548
|
}
|
|
2466
4549
|
|
|
2467
4550
|
/**
|
|
2468
|
-
*
|
|
2469
|
-
* Action managers are managed on a per player basis since
|
|
2470
|
-
* client side UI is per player.
|
|
4551
|
+
* A property item which supports Image properties
|
|
2471
4552
|
*/
|
|
2472
|
-
|
|
4553
|
+
// @ts-ignore Class inheritance allowed for native defined classes
|
|
4554
|
+
export interface IImagePropertyItem extends IPropertyItemBase {
|
|
2473
4555
|
/**
|
|
2474
4556
|
* @remarks
|
|
2475
|
-
*
|
|
4557
|
+
* Height of the image.
|
|
2476
4558
|
*
|
|
2477
4559
|
*/
|
|
2478
|
-
|
|
4560
|
+
readonly imageHeight: number;
|
|
2479
4561
|
/**
|
|
2480
4562
|
* @remarks
|
|
2481
|
-
*
|
|
4563
|
+
* Width of the image.
|
|
2482
4564
|
*
|
|
2483
|
-
* @param rawAction
|
|
2484
|
-
* The raw action to create. See ActionTypes for supported
|
|
2485
|
-
* parameters
|
|
2486
4565
|
*/
|
|
2487
|
-
|
|
4566
|
+
readonly imageWidth: number;
|
|
4567
|
+
/**
|
|
4568
|
+
* @remarks
|
|
4569
|
+
* Current value of the property item.
|
|
4570
|
+
*
|
|
4571
|
+
*/
|
|
4572
|
+
readonly value: Readonly<string | ImageResourceData>;
|
|
4573
|
+
/**
|
|
4574
|
+
* @remarks
|
|
4575
|
+
* Updates the size of the image.
|
|
4576
|
+
*
|
|
4577
|
+
* @param width
|
|
4578
|
+
* New width of the image.
|
|
4579
|
+
* @param height
|
|
4580
|
+
* New height of the image.
|
|
4581
|
+
*/
|
|
4582
|
+
resizeImage(width: number, height: number): void;
|
|
2488
4583
|
}
|
|
2489
4584
|
|
|
2490
4585
|
/**
|
|
2491
|
-
*
|
|
4586
|
+
* Optional properties for Image property item
|
|
2492
4587
|
*/
|
|
2493
|
-
|
|
4588
|
+
// @ts-ignore Class inheritance allowed for native defined classes
|
|
4589
|
+
export interface IImagePropertyItemOptions extends IPropertyItemOptionsBase {
|
|
2494
4590
|
/**
|
|
2495
4591
|
* @remarks
|
|
2496
|
-
*
|
|
4592
|
+
* Alignment of the image in the container. If not defined,
|
|
4593
|
+
* LayoutAlignment.Left is used.
|
|
2497
4594
|
*
|
|
2498
4595
|
*/
|
|
2499
|
-
|
|
4596
|
+
alignment?: LayoutAlignment;
|
|
2500
4597
|
/**
|
|
2501
4598
|
* @remarks
|
|
2502
|
-
*
|
|
4599
|
+
* Size of the image. If undefined, defaults to 10.
|
|
2503
4600
|
*
|
|
2504
4601
|
*/
|
|
2505
|
-
|
|
4602
|
+
imageSize?:
|
|
4603
|
+
| number
|
|
4604
|
+
| {
|
|
4605
|
+
width: number;
|
|
4606
|
+
height: number;
|
|
4607
|
+
};
|
|
2506
4608
|
/**
|
|
2507
4609
|
* @remarks
|
|
2508
|
-
*
|
|
4610
|
+
* Called when image is clicked.
|
|
2509
4611
|
*
|
|
2510
4612
|
*/
|
|
2511
|
-
|
|
4613
|
+
onClick?: (x: number, y: number) => void;
|
|
4614
|
+
}
|
|
4615
|
+
|
|
4616
|
+
export interface IMenu {
|
|
2512
4617
|
/**
|
|
2513
4618
|
* @remarks
|
|
2514
|
-
*
|
|
4619
|
+
* If defined, the menu will show a checked or unchecked
|
|
4620
|
+
* checkbox.
|
|
2515
4621
|
*
|
|
2516
4622
|
*/
|
|
2517
|
-
|
|
4623
|
+
checked?: boolean;
|
|
2518
4624
|
/**
|
|
2519
4625
|
* @remarks
|
|
2520
|
-
*
|
|
4626
|
+
* The menu will be in either an enabled or disabled state
|
|
2521
4627
|
*
|
|
2522
4628
|
*/
|
|
2523
|
-
|
|
4629
|
+
enabled: boolean;
|
|
2524
4630
|
/**
|
|
2525
4631
|
* @remarks
|
|
2526
|
-
*
|
|
4632
|
+
* Unique ID for the menu
|
|
2527
4633
|
*
|
|
2528
4634
|
*/
|
|
2529
|
-
|
|
4635
|
+
readonly id: string;
|
|
4636
|
+
/**
|
|
4637
|
+
* @remarks
|
|
4638
|
+
* Sub menus of this menu
|
|
4639
|
+
*
|
|
4640
|
+
*/
|
|
4641
|
+
readonly submenu: IMenu[];
|
|
4642
|
+
addItem(params: IMenuCreationParams, action?: RegisteredAction<NoArgsAction>): IMenu;
|
|
4643
|
+
dispose(): void;
|
|
4644
|
+
hide(): void;
|
|
4645
|
+
replaceAction(action: RegisteredAction<NoArgsAction>): void;
|
|
4646
|
+
show(): void;
|
|
2530
4647
|
}
|
|
2531
4648
|
|
|
2532
4649
|
/**
|
|
2533
|
-
*
|
|
2534
|
-
* returned from the subscribe method, to clean up handlers.
|
|
4650
|
+
* Manager and container for IMenu objects
|
|
2535
4651
|
*/
|
|
2536
|
-
export
|
|
4652
|
+
export interface IMenuContainer {
|
|
2537
4653
|
/**
|
|
2538
4654
|
* @remarks
|
|
2539
|
-
*
|
|
4655
|
+
* Create a top level item in the container.
|
|
2540
4656
|
*
|
|
2541
|
-
* @param
|
|
2542
|
-
*
|
|
2543
|
-
* @returns
|
|
2544
|
-
* An event handler subscription token that can be used to
|
|
2545
|
-
* unsubscribe and clean-up handlers.
|
|
4657
|
+
* @param props
|
|
4658
|
+
* Configuration for the menu to create
|
|
2546
4659
|
*/
|
|
2547
|
-
|
|
4660
|
+
createMenu(props: IMenuCreationParams): IMenu;
|
|
4661
|
+
/**
|
|
4662
|
+
* @remarks
|
|
4663
|
+
* Search for a menu item, if it's not found defer it to next
|
|
4664
|
+
* tick.
|
|
4665
|
+
*
|
|
4666
|
+
* @param id
|
|
4667
|
+
* Menu identifier
|
|
4668
|
+
*/
|
|
4669
|
+
getMenu(id: string): Promise<IMenu>;
|
|
2548
4670
|
}
|
|
2549
4671
|
|
|
2550
4672
|
/**
|
|
2551
|
-
*
|
|
4673
|
+
* Properties required to create a Menu
|
|
2552
4674
|
*/
|
|
2553
|
-
export interface
|
|
4675
|
+
export interface IMenuCreationParams {
|
|
2554
4676
|
/**
|
|
2555
4677
|
* @remarks
|
|
2556
|
-
*
|
|
4678
|
+
* Whether the menu should show a checkmark
|
|
2557
4679
|
*
|
|
2558
4680
|
*/
|
|
2559
|
-
|
|
2560
|
-
}
|
|
2561
|
-
|
|
2562
|
-
export interface IDropdownItem {
|
|
4681
|
+
checked?: boolean;
|
|
2563
4682
|
/**
|
|
2564
4683
|
* @remarks
|
|
2565
|
-
*
|
|
4684
|
+
* Whether the menu should be enabled or disabled
|
|
2566
4685
|
*
|
|
2567
4686
|
*/
|
|
2568
|
-
|
|
4687
|
+
enabled?: boolean;
|
|
2569
4688
|
/**
|
|
2570
4689
|
* @remarks
|
|
2571
|
-
*
|
|
4690
|
+
* Localized display text of the menu
|
|
2572
4691
|
*
|
|
2573
4692
|
*/
|
|
2574
|
-
|
|
4693
|
+
label: string;
|
|
2575
4694
|
/**
|
|
2576
4695
|
* @remarks
|
|
2577
|
-
*
|
|
4696
|
+
* Custom unique identifier that will replace random id
|
|
2578
4697
|
*
|
|
2579
4698
|
*/
|
|
2580
|
-
|
|
4699
|
+
uniqueId?: string;
|
|
2581
4700
|
}
|
|
2582
4701
|
|
|
2583
|
-
|
|
2584
|
-
* Dropdown property item specific functionality
|
|
2585
|
-
*/
|
|
2586
|
-
export interface IDropdownPropertyItemMixIn {
|
|
4702
|
+
export interface IModalTool {
|
|
2587
4703
|
/**
|
|
2588
4704
|
* @remarks
|
|
2589
|
-
*
|
|
2590
|
-
* trigger onChange with -1 as the old value due to the list
|
|
2591
|
-
* changing entries.
|
|
4705
|
+
* Unique ID for the tool
|
|
2592
4706
|
*
|
|
2593
4707
|
*/
|
|
2594
|
-
|
|
2595
|
-
}
|
|
2596
|
-
|
|
2597
|
-
/**
|
|
2598
|
-
* Returned from an event subscription. Provides functionality
|
|
2599
|
-
* for cleaning up listeners
|
|
2600
|
-
*/
|
|
2601
|
-
export declare interface IEventToken {
|
|
4708
|
+
readonly id: string;
|
|
2602
4709
|
/**
|
|
2603
4710
|
* @remarks
|
|
2604
|
-
*
|
|
4711
|
+
* Provides lifecycle activation events for a modal tool
|
|
2605
4712
|
*
|
|
2606
4713
|
*/
|
|
2607
|
-
|
|
4714
|
+
onModalToolActivation: EventSink<ModalToolLifecycleEventPayload>;
|
|
4715
|
+
bindPropertyPane(pane: IPropertyPane): void;
|
|
4716
|
+
dispose(): void;
|
|
4717
|
+
hide(): void;
|
|
4718
|
+
registerKeyBinding(action: SupportedKeyboardActionTypes, binding: KeyBinding, info?: KeyBindingInfo): void;
|
|
4719
|
+
registerMouseButtonBinding(action: SupportedMouseActionTypes): void;
|
|
4720
|
+
registerMouseDragBinding(action: SupportedMouseActionTypes): void;
|
|
4721
|
+
registerMouseWheelBinding(action: SupportedMouseActionTypes): void;
|
|
4722
|
+
show(): void;
|
|
4723
|
+
unregisterInputBindings(): void;
|
|
2608
4724
|
}
|
|
2609
4725
|
|
|
2610
|
-
export interface
|
|
2611
|
-
|
|
2612
|
-
|
|
2613
|
-
|
|
2614
|
-
|
|
2615
|
-
|
|
2616
|
-
|
|
4726
|
+
export interface IModalToolContainer {
|
|
4727
|
+
/**
|
|
4728
|
+
* @remarks
|
|
4729
|
+
* Tools within this container.
|
|
4730
|
+
*
|
|
4731
|
+
*/
|
|
4732
|
+
readonly currentTools: IModalTool[];
|
|
4733
|
+
/**
|
|
4734
|
+
* @remarks
|
|
4735
|
+
* The id of the selected tool in container.
|
|
4736
|
+
*
|
|
4737
|
+
*/
|
|
4738
|
+
readonly selectedOptionId?: string;
|
|
4739
|
+
addTool(params: ModalToolCreationParameters, action?: RegisteredAction<NoArgsAction>): IModalTool;
|
|
4740
|
+
dispose(): void;
|
|
4741
|
+
hide(): void;
|
|
4742
|
+
removeTool(id: string): void;
|
|
4743
|
+
setSelectedOptionId(value: string | undefined, update?: boolean): void;
|
|
4744
|
+
show(): void;
|
|
2617
4745
|
}
|
|
2618
4746
|
|
|
2619
|
-
|
|
4747
|
+
/**
|
|
4748
|
+
* A property item which supports Number properties
|
|
4749
|
+
*/
|
|
4750
|
+
// @ts-ignore Class inheritance allowed for native defined classes
|
|
4751
|
+
export interface INumberPropertyItem extends IPropertyItemBase {
|
|
2620
4752
|
/**
|
|
2621
4753
|
* @remarks
|
|
2622
|
-
*
|
|
2623
|
-
* checkbox.
|
|
4754
|
+
* Current value of the property item.
|
|
2624
4755
|
*
|
|
2625
4756
|
*/
|
|
2626
|
-
|
|
4757
|
+
readonly value: Readonly<number>;
|
|
4758
|
+
/**
|
|
4759
|
+
* @remarks
|
|
4760
|
+
* Updates title of the property item.
|
|
4761
|
+
*
|
|
4762
|
+
* @param title
|
|
4763
|
+
* New title.
|
|
4764
|
+
*/
|
|
4765
|
+
setTitle(title: LocalizedString | undefined): void;
|
|
2627
4766
|
/**
|
|
2628
4767
|
* @remarks
|
|
2629
|
-
*
|
|
4768
|
+
* Updates tooltip description of property item.
|
|
2630
4769
|
*
|
|
4770
|
+
* @param tooltip
|
|
4771
|
+
* New tooltip.
|
|
2631
4772
|
*/
|
|
2632
|
-
|
|
4773
|
+
setTooltip(tooltip: LocalizedString | undefined): void;
|
|
2633
4774
|
/**
|
|
2634
4775
|
* @remarks
|
|
2635
|
-
*
|
|
4776
|
+
* Updates number limits and clamps the current value.
|
|
2636
4777
|
*
|
|
2637
4778
|
*/
|
|
2638
|
-
|
|
2639
|
-
addItem(params: IMenuCreationParams, action?: RegisteredAction<NoArgsAction>): IMenu;
|
|
2640
|
-
dispose(): void;
|
|
2641
|
-
hide(): void;
|
|
2642
|
-
replaceAction(action: RegisteredAction<NoArgsAction>): void;
|
|
2643
|
-
show(): void;
|
|
4779
|
+
updateLimits(limits: { min?: number; max?: number }): void;
|
|
2644
4780
|
}
|
|
2645
4781
|
|
|
2646
4782
|
/**
|
|
2647
|
-
*
|
|
4783
|
+
* Optional properties for Number property item
|
|
2648
4784
|
*/
|
|
2649
|
-
|
|
4785
|
+
// @ts-ignore Class inheritance allowed for native defined classes
|
|
4786
|
+
export interface INumberPropertyItemOptions extends IPropertyItemOptionsBase {
|
|
2650
4787
|
/**
|
|
2651
4788
|
* @remarks
|
|
2652
|
-
*
|
|
4789
|
+
* If true label text will be hidden. If undefined, the label
|
|
4790
|
+
* will be visible by default.
|
|
2653
4791
|
*
|
|
2654
|
-
* @param props
|
|
2655
|
-
* Configuration for the menu to create
|
|
2656
4792
|
*/
|
|
2657
|
-
|
|
4793
|
+
hiddenLabel?: boolean;
|
|
2658
4794
|
/**
|
|
2659
4795
|
* @remarks
|
|
2660
|
-
*
|
|
2661
|
-
*
|
|
4796
|
+
* If we should treat the number as integer. By default is
|
|
4797
|
+
* false.
|
|
2662
4798
|
*
|
|
2663
|
-
* @param id
|
|
2664
|
-
* Menu identifier
|
|
2665
4799
|
*/
|
|
2666
|
-
|
|
2667
|
-
}
|
|
2668
|
-
|
|
2669
|
-
/**
|
|
2670
|
-
* Properties required to create a Menu
|
|
2671
|
-
*/
|
|
2672
|
-
export interface IMenuCreationParams {
|
|
4800
|
+
isInteger?: boolean;
|
|
2673
4801
|
/**
|
|
2674
4802
|
* @remarks
|
|
2675
|
-
*
|
|
4803
|
+
* The min possible number. If undefined,
|
|
4804
|
+
* Number.MAX_SAFE_INTEGER will be used.
|
|
2676
4805
|
*
|
|
2677
4806
|
*/
|
|
2678
|
-
|
|
4807
|
+
max?: number;
|
|
2679
4808
|
/**
|
|
2680
4809
|
* @remarks
|
|
2681
|
-
*
|
|
4810
|
+
* The min possible number. If undefined,
|
|
4811
|
+
* Number.MIN_SAFE_INTEGER will be used.
|
|
2682
4812
|
*
|
|
2683
4813
|
*/
|
|
2684
|
-
|
|
4814
|
+
min?: number;
|
|
2685
4815
|
/**
|
|
2686
4816
|
* @remarks
|
|
2687
|
-
*
|
|
4817
|
+
* This callback is called when UI control value is changed.
|
|
2688
4818
|
*
|
|
2689
4819
|
*/
|
|
2690
|
-
|
|
4820
|
+
onChange?: (newValue: number, oldValue: number) => void;
|
|
2691
4821
|
/**
|
|
2692
4822
|
* @remarks
|
|
2693
|
-
*
|
|
4823
|
+
* Localized title of the property item.
|
|
2694
4824
|
*
|
|
2695
4825
|
*/
|
|
2696
|
-
|
|
2697
|
-
}
|
|
2698
|
-
|
|
2699
|
-
export interface IModalTool {
|
|
4826
|
+
title?: LocalizedString;
|
|
2700
4827
|
/**
|
|
2701
4828
|
* @remarks
|
|
2702
|
-
*
|
|
4829
|
+
* Tooltip description of the property item.
|
|
2703
4830
|
*
|
|
2704
4831
|
*/
|
|
2705
|
-
|
|
4832
|
+
tooltip?: LocalizedString;
|
|
2706
4833
|
/**
|
|
2707
4834
|
* @remarks
|
|
2708
|
-
*
|
|
4835
|
+
* Determines how we display bool as a UI element. If
|
|
4836
|
+
* undefined, it will default to InputField.
|
|
2709
4837
|
*
|
|
2710
4838
|
*/
|
|
2711
|
-
|
|
2712
|
-
bindPropertyPane(pane: IPropertyPane): void;
|
|
2713
|
-
dispose(): void;
|
|
2714
|
-
hide(): void;
|
|
2715
|
-
registerKeyBinding(action: SupportedKeyboardActionTypes, button: KeyboardKey, modifier?: InputModifier): void;
|
|
2716
|
-
registerMouseButtonBinding(action: SupportedMouseActionTypes): void;
|
|
2717
|
-
registerMouseDragBinding(action: SupportedMouseActionTypes): void;
|
|
2718
|
-
registerMouseWheelBinding(action: SupportedMouseActionTypes): void;
|
|
2719
|
-
show(): void;
|
|
2720
|
-
unregisterInputBindings(): void;
|
|
4839
|
+
variant?: NumberPropertyItemVariant;
|
|
2721
4840
|
}
|
|
2722
4841
|
|
|
2723
|
-
|
|
4842
|
+
/**
|
|
4843
|
+
* Represents a stateful value that can be observed by
|
|
4844
|
+
* different objects.
|
|
4845
|
+
*/
|
|
4846
|
+
export interface IObservable<T> {
|
|
2724
4847
|
/**
|
|
2725
4848
|
* @remarks
|
|
2726
|
-
*
|
|
4849
|
+
* Optional validator that will pre-process the new value.
|
|
2727
4850
|
*
|
|
2728
4851
|
*/
|
|
2729
|
-
readonly
|
|
4852
|
+
readonly validator?: ObservableValidator<T>;
|
|
2730
4853
|
/**
|
|
2731
4854
|
* @remarks
|
|
2732
|
-
*
|
|
4855
|
+
* Current value of the observable.
|
|
2733
4856
|
*
|
|
2734
4857
|
*/
|
|
2735
|
-
readonly
|
|
2736
|
-
|
|
2737
|
-
|
|
2738
|
-
|
|
2739
|
-
|
|
2740
|
-
|
|
2741
|
-
|
|
4858
|
+
readonly value: Readonly<T>;
|
|
4859
|
+
/**
|
|
4860
|
+
* @remarks
|
|
4861
|
+
* Updates the value and notifies dependent objects.
|
|
4862
|
+
*
|
|
4863
|
+
* @param newValue
|
|
4864
|
+
* New value to be set (will be processed by the validator if
|
|
4865
|
+
* it exists).
|
|
4866
|
+
*/
|
|
4867
|
+
set(newValue: T): boolean;
|
|
2742
4868
|
}
|
|
2743
4869
|
|
|
2744
4870
|
/**
|
|
@@ -2779,56 +4905,63 @@ export interface IPlayerLogger {
|
|
|
2779
4905
|
warning(message: string): void;
|
|
2780
4906
|
}
|
|
2781
4907
|
|
|
2782
|
-
|
|
4908
|
+
// @ts-ignore Class inheritance allowed for native defined classes
|
|
4909
|
+
export interface IPropertyItem<T extends PropertyBag, Prop extends keyof T & string> extends IPropertyItemBase {
|
|
2783
4910
|
/**
|
|
2784
4911
|
* @remarks
|
|
2785
|
-
*
|
|
4912
|
+
* The object associated.
|
|
2786
4913
|
*
|
|
2787
4914
|
*/
|
|
2788
|
-
|
|
4915
|
+
readonly obj: T;
|
|
2789
4916
|
/**
|
|
2790
4917
|
* @remarks
|
|
2791
|
-
*
|
|
4918
|
+
* The target property of the object associated.
|
|
2792
4919
|
*
|
|
2793
4920
|
*/
|
|
2794
|
-
readonly
|
|
4921
|
+
readonly property: Prop;
|
|
2795
4922
|
/**
|
|
2796
4923
|
* @remarks
|
|
2797
|
-
* The
|
|
4924
|
+
* The value of the property.
|
|
2798
4925
|
*
|
|
2799
4926
|
*/
|
|
2800
|
-
readonly
|
|
4927
|
+
readonly value: T[Prop];
|
|
4928
|
+
dispose(): void;
|
|
4929
|
+
}
|
|
4930
|
+
|
|
4931
|
+
/**
|
|
4932
|
+
* Common base for all property items
|
|
4933
|
+
*/
|
|
4934
|
+
export interface IPropertyItemBase {
|
|
2801
4935
|
/**
|
|
2802
4936
|
* @remarks
|
|
2803
|
-
*
|
|
4937
|
+
* If the item is enabled in the UI.
|
|
2804
4938
|
*
|
|
2805
4939
|
*/
|
|
2806
|
-
|
|
4940
|
+
enable: boolean;
|
|
2807
4941
|
/**
|
|
2808
4942
|
* @remarks
|
|
2809
|
-
*
|
|
4943
|
+
* Unique ID for the property item.
|
|
2810
4944
|
*
|
|
2811
4945
|
*/
|
|
2812
|
-
readonly
|
|
4946
|
+
readonly id: string;
|
|
2813
4947
|
/**
|
|
2814
4948
|
* @remarks
|
|
2815
|
-
* The
|
|
4949
|
+
* The parent pane id.
|
|
2816
4950
|
*
|
|
2817
4951
|
*/
|
|
2818
|
-
readonly
|
|
4952
|
+
readonly paneId: string;
|
|
2819
4953
|
/**
|
|
2820
4954
|
* @remarks
|
|
2821
|
-
* The
|
|
4955
|
+
* The type name of the target property.
|
|
2822
4956
|
*
|
|
2823
4957
|
*/
|
|
2824
|
-
readonly
|
|
4958
|
+
readonly typeName: PropertyItemType;
|
|
2825
4959
|
/**
|
|
2826
4960
|
* @remarks
|
|
2827
4961
|
* If the item should be visible in the UI.
|
|
2828
4962
|
*
|
|
2829
4963
|
*/
|
|
2830
4964
|
visible: boolean;
|
|
2831
|
-
dispose(): void;
|
|
2832
4965
|
}
|
|
2833
4966
|
|
|
2834
4967
|
export interface IPropertyItemOptions {
|
|
@@ -2846,16 +4979,10 @@ export interface IPropertyItemOptions {
|
|
|
2846
4979
|
onChange?: OnChangeCallback<PropertyBag, string>;
|
|
2847
4980
|
/**
|
|
2848
4981
|
* @remarks
|
|
2849
|
-
*
|
|
2850
|
-
*
|
|
2851
|
-
*/
|
|
2852
|
-
titleAltText?: string;
|
|
2853
|
-
/**
|
|
2854
|
-
* @remarks
|
|
2855
|
-
* Loc ID (resolved on client)
|
|
4982
|
+
* Localized title of the property item
|
|
2856
4983
|
*
|
|
2857
4984
|
*/
|
|
2858
|
-
|
|
4985
|
+
title?: string;
|
|
2859
4986
|
/**
|
|
2860
4987
|
* @remarks
|
|
2861
4988
|
* If the item should be visible in the UI.
|
|
@@ -2864,35 +4991,45 @@ export interface IPropertyItemOptions {
|
|
|
2864
4991
|
visible?: boolean;
|
|
2865
4992
|
}
|
|
2866
4993
|
|
|
2867
|
-
|
|
2868
|
-
|
|
4994
|
+
/**
|
|
4995
|
+
* Common optional properties for property items
|
|
4996
|
+
*/
|
|
4997
|
+
export interface IPropertyItemOptionsBase {
|
|
2869
4998
|
/**
|
|
2870
4999
|
* @remarks
|
|
2871
|
-
*
|
|
5000
|
+
* Initial enabled state of property item. If undefined, it
|
|
5001
|
+
* will default to true.
|
|
2872
5002
|
*
|
|
2873
5003
|
*/
|
|
2874
|
-
|
|
2875
|
-
}
|
|
2876
|
-
|
|
2877
|
-
// @ts-ignore Class inheritance allowed for native defined classes
|
|
2878
|
-
export interface IPropertyItemOptionsButton extends IPropertyItemOptions {
|
|
2879
|
-
icon?: string;
|
|
5004
|
+
enable?: boolean;
|
|
2880
5005
|
/**
|
|
2881
5006
|
* @remarks
|
|
2882
|
-
*
|
|
5007
|
+
* Initial visibility state of property item. If undefined, it
|
|
5008
|
+
* will default to true.
|
|
2883
5009
|
*
|
|
2884
5010
|
*/
|
|
2885
|
-
|
|
5011
|
+
visible?: boolean;
|
|
5012
|
+
}
|
|
5013
|
+
|
|
5014
|
+
// @ts-ignore Class inheritance allowed for native defined classes
|
|
5015
|
+
export interface IPropertyItemOptionsBlockList extends IPropertyItemOptions {
|
|
5016
|
+
blockList: string[];
|
|
2886
5017
|
}
|
|
2887
5018
|
|
|
2888
5019
|
// @ts-ignore Class inheritance allowed for native defined classes
|
|
2889
|
-
export interface
|
|
5020
|
+
export interface IPropertyItemOptionsBool extends IPropertyItemOptions {
|
|
2890
5021
|
/**
|
|
2891
5022
|
* @remarks
|
|
2892
|
-
*
|
|
5023
|
+
* controls appearance of the boolean. checkbox or toggleswitch
|
|
2893
5024
|
*
|
|
2894
5025
|
*/
|
|
2895
|
-
|
|
5026
|
+
displayAsToggleSwitch?: boolean;
|
|
5027
|
+
}
|
|
5028
|
+
|
|
5029
|
+
// @ts-ignore Class inheritance allowed for native defined classes
|
|
5030
|
+
export interface IPropertyItemOptionsColorPicker_deprecated extends IPropertyItemOptions {
|
|
5031
|
+
showAlpha?: boolean;
|
|
5032
|
+
variant?: ColorPickerPropertyItemVariant;
|
|
2896
5033
|
}
|
|
2897
5034
|
|
|
2898
5035
|
// @ts-ignore Class inheritance allowed for native defined classes
|
|
@@ -2905,14 +5042,15 @@ export interface IPropertyItemOptionsDropdown extends IPropertyItemOptions {
|
|
|
2905
5042
|
dropdownItems: IDropdownItem[];
|
|
2906
5043
|
}
|
|
2907
5044
|
|
|
2908
|
-
// @ts-ignore Class inheritance allowed for native defined classes
|
|
2909
|
-
export interface IPropertyItemOptionsImage extends IPropertyItemOptions {
|
|
2910
|
-
imageHeight: number;
|
|
2911
|
-
imageWidth: number;
|
|
2912
|
-
}
|
|
2913
|
-
|
|
2914
5045
|
// @ts-ignore Class inheritance allowed for native defined classes
|
|
2915
5046
|
export interface IPropertyItemOptionsNumber extends IPropertyItemOptions {
|
|
5047
|
+
/**
|
|
5048
|
+
* @remarks
|
|
5049
|
+
* If we should treat the number as floating point. By default
|
|
5050
|
+
* is false
|
|
5051
|
+
*
|
|
5052
|
+
*/
|
|
5053
|
+
isFloat?: boolean;
|
|
2916
5054
|
/**
|
|
2917
5055
|
* @remarks
|
|
2918
5056
|
* The min possible value for the number.
|
|
@@ -2949,16 +5087,6 @@ export interface IPropertyItemOptionsTable extends IPropertyItemOptions {
|
|
|
2949
5087
|
titleId?: string;
|
|
2950
5088
|
}
|
|
2951
5089
|
|
|
2952
|
-
/**
|
|
2953
|
-
* Localization string id and border enable boolean for
|
|
2954
|
-
* multiline text component.
|
|
2955
|
-
*/
|
|
2956
|
-
// @ts-ignore Class inheritance allowed for native defined classes
|
|
2957
|
-
export interface IPropertyItemOptionsText extends IPropertyItemOptions {
|
|
2958
|
-
border: boolean;
|
|
2959
|
-
valueStringId: string;
|
|
2960
|
-
}
|
|
2961
|
-
|
|
2962
5090
|
// @ts-ignore Class inheritance allowed for native defined classes
|
|
2963
5091
|
export interface IPropertyItemOptionsVector3 extends IPropertyItemOptions {
|
|
2964
5092
|
/**
|
|
@@ -3037,16 +5165,10 @@ export interface IPropertyPane {
|
|
|
3037
5165
|
readonly parentPaneId?: string;
|
|
3038
5166
|
/**
|
|
3039
5167
|
* @remarks
|
|
3040
|
-
*
|
|
5168
|
+
* Localized title of the property pane
|
|
3041
5169
|
*
|
|
3042
5170
|
*/
|
|
3043
|
-
|
|
3044
|
-
/**
|
|
3045
|
-
* @remarks
|
|
3046
|
-
* Loc ID (resolved on client)
|
|
3047
|
-
*
|
|
3048
|
-
*/
|
|
3049
|
-
titleStringId: string;
|
|
5171
|
+
title: string;
|
|
3050
5172
|
/**
|
|
3051
5173
|
* @remarks
|
|
3052
5174
|
* Check visibility of the pane
|
|
@@ -3061,20 +5183,25 @@ export interface IPropertyPane {
|
|
|
3061
5183
|
width?: number;
|
|
3062
5184
|
/**
|
|
3063
5185
|
* @remarks
|
|
3064
|
-
* Adds a
|
|
5186
|
+
* Adds a block list to the pane.
|
|
3065
5187
|
*
|
|
3066
5188
|
*/
|
|
3067
|
-
|
|
3068
|
-
|
|
3069
|
-
|
|
3070
|
-
|
|
3071
|
-
|
|
5189
|
+
addBlockList(options?: IPropertyItemOptionsBlockList): IBlockListPropertyItem<
|
|
5190
|
+
{
|
|
5191
|
+
EMPTY: undefined;
|
|
5192
|
+
},
|
|
5193
|
+
'EMPTY'
|
|
5194
|
+
>;
|
|
5195
|
+
/**
|
|
5196
|
+
* @remarks
|
|
5197
|
+
*/
|
|
5198
|
+
addBool(value: IObservableProp<boolean>, options?: IBoolPropertyItemOptions): IBoolPropertyItem;
|
|
3072
5199
|
/**
|
|
3073
5200
|
* @remarks
|
|
3074
5201
|
* Adds a boolean item to the pane.
|
|
3075
5202
|
*
|
|
3076
5203
|
*/
|
|
3077
|
-
|
|
5204
|
+
addBool_deprecated<T extends PropertyBag, Prop extends keyof T & string>(
|
|
3078
5205
|
obj: T,
|
|
3079
5206
|
property: Prop,
|
|
3080
5207
|
options?: IPropertyItemOptionsBool,
|
|
@@ -3086,26 +5213,52 @@ export interface IPropertyPane {
|
|
|
3086
5213
|
*
|
|
3087
5214
|
*/
|
|
3088
5215
|
addButton(
|
|
3089
|
-
action: RegisteredAction<NoArgsAction>,
|
|
3090
|
-
options?:
|
|
3091
|
-
):
|
|
3092
|
-
|
|
3093
|
-
|
|
3094
|
-
|
|
3095
|
-
|
|
3096
|
-
|
|
5216
|
+
action: (() => void) | RegisteredAction<NoArgsAction>,
|
|
5217
|
+
options?: IButtonPropertyItemOptions,
|
|
5218
|
+
): IButtonPropertyItem;
|
|
5219
|
+
/**
|
|
5220
|
+
* @remarks
|
|
5221
|
+
* Adds a color picker item to the pane.
|
|
5222
|
+
*
|
|
5223
|
+
*/
|
|
5224
|
+
addColorPicker(
|
|
5225
|
+
value: IObservableProp<minecraftserver.RGBA>,
|
|
5226
|
+
options?: IColorPickerPropertyItemOptions,
|
|
5227
|
+
): IColorPickerPropertyItem;
|
|
5228
|
+
/**
|
|
5229
|
+
* @remarks
|
|
5230
|
+
* Adds a color picker item to the pane.
|
|
5231
|
+
*
|
|
5232
|
+
*/
|
|
5233
|
+
addColorPicker_deprecated<T extends PropertyBag, Prop extends keyof T & string>(
|
|
5234
|
+
obj: T,
|
|
5235
|
+
property: Prop,
|
|
5236
|
+
options?: IPropertyItemOptionsColorPicker_deprecated,
|
|
5237
|
+
): IPropertyItem<T, Prop>;
|
|
5238
|
+
/**
|
|
5239
|
+
* @remarks
|
|
5240
|
+
* Adds a combo box item to the pane.
|
|
5241
|
+
*
|
|
5242
|
+
*/
|
|
5243
|
+
addComboBox(value: IObservableProp<string>, options?: IComboBoxPropertyItemOptions): IComboBoxPropertyItem;
|
|
3097
5244
|
/**
|
|
3098
5245
|
* @remarks
|
|
3099
5246
|
* Adds an divider item to the pane.
|
|
3100
5247
|
*
|
|
3101
5248
|
*/
|
|
3102
|
-
addDivider():
|
|
5249
|
+
addDivider(): IPropertyItemBase;
|
|
5250
|
+
/**
|
|
5251
|
+
* @remarks
|
|
5252
|
+
* Adds an Dropdown item to the pane.
|
|
5253
|
+
*
|
|
5254
|
+
*/
|
|
5255
|
+
addDropdown(value: IObservableProp<number>, options?: IDropdownPropertyItemOptions): IDropdownPropertyItem;
|
|
3103
5256
|
/**
|
|
3104
5257
|
* @remarks
|
|
3105
5258
|
* Adds an DropDown item to the pane.
|
|
3106
5259
|
*
|
|
3107
5260
|
*/
|
|
3108
|
-
|
|
5261
|
+
addDropdown_deprecated<
|
|
3109
5262
|
T extends Omit<PropertyBag, Prop> & {
|
|
3110
5263
|
[key in Prop]: number;
|
|
3111
5264
|
},
|
|
@@ -3114,41 +5267,42 @@ export interface IPropertyPane {
|
|
|
3114
5267
|
obj: T,
|
|
3115
5268
|
property: Prop,
|
|
3116
5269
|
options?: IPropertyItemOptionsDropdown,
|
|
3117
|
-
):
|
|
5270
|
+
): IDropdownPropertyItem_deprecated<T, Prop>;
|
|
3118
5271
|
/**
|
|
3119
5272
|
* @remarks
|
|
3120
|
-
* Adds an
|
|
5273
|
+
* Adds an image item to the pane.
|
|
3121
5274
|
*
|
|
3122
5275
|
*/
|
|
3123
|
-
|
|
3124
|
-
|
|
3125
|
-
|
|
3126
|
-
|
|
3127
|
-
): IPropertyItem<T, Prop>;
|
|
5276
|
+
addImage(
|
|
5277
|
+
value: IObservableProp<string | ImageResourceData>,
|
|
5278
|
+
options?: IImagePropertyItemOptions,
|
|
5279
|
+
): IImagePropertyItem;
|
|
3128
5280
|
/**
|
|
3129
5281
|
* @remarks
|
|
5282
|
+
* Adds a number item to the pane.
|
|
5283
|
+
*
|
|
3130
5284
|
*/
|
|
3131
|
-
|
|
3132
|
-
obj: T,
|
|
3133
|
-
property: Prop,
|
|
3134
|
-
options?: IPropertyItemOptionsImage,
|
|
3135
|
-
): IPropertyItem<T, Prop>;
|
|
5285
|
+
addNumber(value: IObservableProp<number>, options?: INumberPropertyItemOptions): INumberPropertyItem;
|
|
3136
5286
|
/**
|
|
3137
5287
|
* @remarks
|
|
3138
5288
|
* Adds a number item to the pane.
|
|
3139
5289
|
*
|
|
3140
5290
|
*/
|
|
3141
|
-
|
|
5291
|
+
addNumber_deprecated<T extends PropertyBag, Prop extends keyof T & string>(
|
|
3142
5292
|
obj: T,
|
|
3143
5293
|
property: Prop,
|
|
3144
5294
|
options?: IPropertyItemOptionsNumber,
|
|
3145
5295
|
): IPropertyItem<T, Prop>;
|
|
5296
|
+
/**
|
|
5297
|
+
* @remarks
|
|
5298
|
+
*/
|
|
5299
|
+
addString(value: IObservableProp<string>, options?: IStringPropertyItemOptions): IStringPropertyItem;
|
|
3146
5300
|
/**
|
|
3147
5301
|
* @remarks
|
|
3148
5302
|
* Adds a string item to the pane
|
|
3149
5303
|
*
|
|
3150
5304
|
*/
|
|
3151
|
-
|
|
5305
|
+
addString_deprecated<T extends PropertyBag, Prop extends keyof T & string>(
|
|
3152
5306
|
obj: T,
|
|
3153
5307
|
property: Prop,
|
|
3154
5308
|
options?: IPropertyItemOptions,
|
|
@@ -3169,21 +5323,26 @@ export interface IPropertyPane {
|
|
|
3169
5323
|
* Adds a multiline Text item to the pane.
|
|
3170
5324
|
*
|
|
3171
5325
|
*/
|
|
3172
|
-
addText<
|
|
3173
|
-
|
|
3174
|
-
|
|
3175
|
-
|
|
3176
|
-
|
|
5326
|
+
addText(value: IObservableProp<LocalizedString>, options?: ITextPropertyItemOptions): ITextPropertyItem;
|
|
5327
|
+
/**
|
|
5328
|
+
* @remarks
|
|
5329
|
+
* Adds a Vec3 item to the pane.
|
|
5330
|
+
*
|
|
5331
|
+
*/
|
|
5332
|
+
addVector3(
|
|
5333
|
+
value: IObservableProp<minecraftserver.Vector3>,
|
|
5334
|
+
options?: IVector3PropertyItemOptions,
|
|
5335
|
+
): IVector3PropertyItem;
|
|
3177
5336
|
/**
|
|
3178
5337
|
* @remarks
|
|
3179
5338
|
* Adds a Vec3 item to the pane.
|
|
3180
5339
|
*
|
|
3181
5340
|
*/
|
|
3182
|
-
|
|
5341
|
+
addVector3_deprecated<T extends PropertyBag, Prop extends keyof T & string>(
|
|
3183
5342
|
obj: T,
|
|
3184
5343
|
property: Prop,
|
|
3185
5344
|
options?: IPropertyItemOptionsVector3,
|
|
3186
|
-
):
|
|
5345
|
+
): IVector3PropertyItem_deprecated<T, Prop>;
|
|
3187
5346
|
/**
|
|
3188
5347
|
* @remarks
|
|
3189
5348
|
* Collapse the pane.
|
|
@@ -3235,23 +5394,10 @@ export interface IPropertyPaneOptions {
|
|
|
3235
5394
|
direction?: LayoutDirection;
|
|
3236
5395
|
/**
|
|
3237
5396
|
* @remarks
|
|
3238
|
-
*
|
|
3239
|
-
*
|
|
3240
|
-
*/
|
|
3241
|
-
titleAltText: string;
|
|
3242
|
-
/**
|
|
3243
|
-
* @remarks
|
|
3244
|
-
* Loc ID (resolved on client)
|
|
3245
|
-
*
|
|
3246
|
-
*/
|
|
3247
|
-
titleStringId: string;
|
|
3248
|
-
/**
|
|
3249
|
-
* @remarks
|
|
3250
|
-
* Width of the panel in rem. This property is ignored in case
|
|
3251
|
-
* of sub panes
|
|
5397
|
+
* Localized title of the property pane
|
|
3252
5398
|
*
|
|
3253
5399
|
*/
|
|
3254
|
-
|
|
5400
|
+
title: string;
|
|
3255
5401
|
}
|
|
3256
5402
|
|
|
3257
5403
|
export interface IPropertyTableCellItem {
|
|
@@ -3303,57 +5449,137 @@ export interface IRegisterExtensionOptionalParameters {
|
|
|
3303
5449
|
* the editor evolves.
|
|
3304
5450
|
*/
|
|
3305
5451
|
export interface ISimpleTool {
|
|
5452
|
+
/**
|
|
5453
|
+
* @remarks
|
|
5454
|
+
* Get a reference to the menu component that was automatically
|
|
5455
|
+
* created for the tool This generally only happens if the tool
|
|
5456
|
+
* is a global tool (i.e. has a pane and does not have a tool
|
|
5457
|
+
* rail component) In this case a menu item is automatically
|
|
5458
|
+
* created and some visibility controls are inserted. If you
|
|
5459
|
+
* have additional menu options you want to add, this is the
|
|
5460
|
+
* ideal control to add children to
|
|
5461
|
+
*
|
|
5462
|
+
*/
|
|
3306
5463
|
get menu(): IMenu | undefined;
|
|
5464
|
+
/**
|
|
5465
|
+
* @remarks
|
|
5466
|
+
* Get the tool name
|
|
5467
|
+
*
|
|
5468
|
+
*/
|
|
3307
5469
|
get name(): string;
|
|
5470
|
+
/**
|
|
5471
|
+
* @remarks
|
|
5472
|
+
* Get a reference to the root (primary) property pane
|
|
5473
|
+
* component - if no component was requested, this function
|
|
5474
|
+
* will throw an error
|
|
5475
|
+
*
|
|
5476
|
+
*/
|
|
3308
5477
|
get pane(): ISimpleToolPaneComponent;
|
|
5478
|
+
/**
|
|
5479
|
+
* @remarks
|
|
5480
|
+
* Get a reference to the IPlayerUISession. This is the primary
|
|
5481
|
+
* interface to the editor UI and all of the editor extension
|
|
5482
|
+
* controls
|
|
5483
|
+
*
|
|
5484
|
+
*/
|
|
3309
5485
|
get session(): IPlayerUISession;
|
|
5486
|
+
/**
|
|
5487
|
+
* @remarks
|
|
5488
|
+
* Get a reference to the status bar component - if no
|
|
5489
|
+
* component was requested, this function will throw an error
|
|
5490
|
+
*
|
|
5491
|
+
*/
|
|
3310
5492
|
get statusBar(): ISimpleToolStatusBarComponent;
|
|
5493
|
+
/**
|
|
5494
|
+
* @remarks
|
|
5495
|
+
* Get a reference to the tool rail component - if no component
|
|
5496
|
+
* was requested, this function will throw an error
|
|
5497
|
+
*
|
|
5498
|
+
*/
|
|
3311
5499
|
get toolRail(): ISimpleToolRailComponent;
|
|
3312
5500
|
/**
|
|
3313
5501
|
* @remarks
|
|
5502
|
+
* Find a pane or subpane by it's unique ID.
|
|
5503
|
+
*
|
|
3314
5504
|
*/
|
|
3315
5505
|
findPane(idString: string): ISimpleToolPaneComponent | undefined;
|
|
3316
5506
|
/**
|
|
3317
5507
|
* @remarks
|
|
5508
|
+
* Hide a particular pane or subpane by it's unique ID. If no
|
|
5509
|
+
* ID is provided (or cannot be found) the function will throw
|
|
5510
|
+
* an error Although the parent pane is used to execute the
|
|
5511
|
+
* visibility request, the hidePane function will NOT affect
|
|
5512
|
+
* the visibility of any sibling panes -- so it is possible to
|
|
5513
|
+
* hide all of the child panes of a parent using this function
|
|
5514
|
+
*
|
|
3318
5515
|
*/
|
|
3319
5516
|
hidePane(idString?: string): void;
|
|
3320
5517
|
/**
|
|
3321
5518
|
* @remarks
|
|
5519
|
+
* Send a tagged Debug log message to the console. The tag will
|
|
5520
|
+
* contain the tool name
|
|
5521
|
+
*
|
|
3322
5522
|
*/
|
|
3323
5523
|
logDebug(message: string): void;
|
|
3324
5524
|
/**
|
|
3325
5525
|
* @remarks
|
|
5526
|
+
* Send a tagged Error log message to the console. The tag will
|
|
5527
|
+
* contain the tool name
|
|
5528
|
+
*
|
|
3326
5529
|
*/
|
|
3327
5530
|
logError(message: string): void;
|
|
3328
5531
|
/**
|
|
3329
5532
|
* @remarks
|
|
5533
|
+
* Send a tagged Informational log message to the console. The
|
|
5534
|
+
* tag will contain the tool name
|
|
5535
|
+
*
|
|
3330
5536
|
*/
|
|
3331
5537
|
logInfo(message: string): void;
|
|
3332
5538
|
/**
|
|
3333
5539
|
* @remarks
|
|
5540
|
+
* Send a tagged Warning log message to the console. The tag
|
|
5541
|
+
* will contain the tool name
|
|
5542
|
+
*
|
|
3334
5543
|
*/
|
|
3335
5544
|
logWarn(message: string): void;
|
|
3336
5545
|
/**
|
|
3337
5546
|
* @remarks
|
|
5547
|
+
* Show a particular pane or subpane by it's unique ID. If no
|
|
5548
|
+
* ID is provided (or cannot be found) the function will throw
|
|
5549
|
+
* an error Note that the showPane function (when used with a
|
|
5550
|
+
* child pane) will use the parent pane to execute the
|
|
5551
|
+
* visibility request. In this case, if the child panes are
|
|
5552
|
+
* marked as mututally exclusive, then the siblings of the
|
|
5553
|
+
* requested pane will be hidden
|
|
5554
|
+
*
|
|
3338
5555
|
*/
|
|
3339
5556
|
showPane(idString?: string): void;
|
|
3340
5557
|
/**
|
|
3341
5558
|
* @remarks
|
|
5559
|
+
* Much like the showPane function, but will hide all other
|
|
5560
|
+
* panes that are not the requested pane irrespective of the
|
|
5561
|
+
* exclusivity setting
|
|
5562
|
+
*
|
|
3342
5563
|
*/
|
|
3343
5564
|
showPaneExclusively(idString: string): void;
|
|
3344
5565
|
/**
|
|
3345
5566
|
* @remarks
|
|
5567
|
+
* A teardown function implemented by the ISimpleTool
|
|
5568
|
+
* implementation, and is called by the system during editor
|
|
5569
|
+
* extension shutdown. Don't override this function - instead,
|
|
5570
|
+
* implement the onTeardown event in the ISimpleToolOptions
|
|
5571
|
+
* structure
|
|
5572
|
+
*
|
|
3346
5573
|
*/
|
|
3347
5574
|
teardown(): void;
|
|
3348
5575
|
}
|
|
3349
5576
|
|
|
3350
5577
|
/**
|
|
3351
|
-
* Define a
|
|
3352
|
-
* activation key binding
|
|
5578
|
+
* Define a key binding for the simple tool activation
|
|
3353
5579
|
*/
|
|
3354
|
-
export interface
|
|
3355
|
-
|
|
3356
|
-
|
|
5580
|
+
export interface ISimpleToolKeyBinding {
|
|
5581
|
+
binding: KeyBinding;
|
|
5582
|
+
info?: KeyBindingInfo;
|
|
3357
5583
|
}
|
|
3358
5584
|
|
|
3359
5585
|
/**
|
|
@@ -3361,12 +5587,61 @@ export interface ISimpleToolKeyPair {
|
|
|
3361
5587
|
* simple tool, and the optional components that are desired.
|
|
3362
5588
|
*/
|
|
3363
5589
|
export interface ISimpleToolOptions {
|
|
3364
|
-
|
|
5590
|
+
/**
|
|
5591
|
+
* @remarks
|
|
5592
|
+
* A key binding that will activate the tool. Note that if the
|
|
5593
|
+
* tool is a modal tool, then the key binding will be tied to
|
|
5594
|
+
* the tool rail activation, and appear as a tooltip on the
|
|
5595
|
+
* tool rail button. If the tool is a global tool, then the key
|
|
5596
|
+
* binding will be tied to a menu item in the View menu, and
|
|
5597
|
+
* appear as a stateful menu item which will control the pane
|
|
5598
|
+
* visibility. If there's no pane required, then the key
|
|
5599
|
+
* binding is ignored
|
|
5600
|
+
*
|
|
5601
|
+
*/
|
|
5602
|
+
activationKeyBinding?: ISimpleToolKeyBinding;
|
|
5603
|
+
/**
|
|
5604
|
+
* @remarks
|
|
5605
|
+
* The name of the tool. This will be used to identify the tool
|
|
5606
|
+
* in the UI and logs and will be used in the View \> [Tool
|
|
5607
|
+
* Name] menu item (if it's a global tool)
|
|
5608
|
+
*
|
|
5609
|
+
*/
|
|
3365
5610
|
name: string;
|
|
5611
|
+
/**
|
|
5612
|
+
* @remarks
|
|
5613
|
+
* The finalize function is executed after each of the
|
|
5614
|
+
* components have been created and finalized during
|
|
5615
|
+
* construction
|
|
5616
|
+
*
|
|
5617
|
+
*/
|
|
3366
5618
|
onFinalize?: (tool: ISimpleTool) => void;
|
|
5619
|
+
/**
|
|
5620
|
+
* @remarks
|
|
5621
|
+
* The teardown function is executed when the tool is being
|
|
5622
|
+
* torn down and only after the individual components have
|
|
5623
|
+
* executed their own teardown functions
|
|
5624
|
+
*
|
|
5625
|
+
*/
|
|
3367
5626
|
onTeardown?: (tool: ISimpleTool) => void;
|
|
5627
|
+
/**
|
|
5628
|
+
* @remarks
|
|
5629
|
+
* The options structure for an optional property pane
|
|
5630
|
+
* component
|
|
5631
|
+
*
|
|
5632
|
+
*/
|
|
3368
5633
|
propertyPaneOptions?: ISimpleToolPaneOptions;
|
|
5634
|
+
/**
|
|
5635
|
+
* @remarks
|
|
5636
|
+
* The options structure for an optional status bar component
|
|
5637
|
+
*
|
|
5638
|
+
*/
|
|
3369
5639
|
statusBarOptions?: ISimpleToolStatusBarOptions;
|
|
5640
|
+
/**
|
|
5641
|
+
* @remarks
|
|
5642
|
+
* The options structure for an optional tool rail component
|
|
5643
|
+
*
|
|
5644
|
+
*/
|
|
3370
5645
|
toolRailOptions?: ISimpleToolRailOptions;
|
|
3371
5646
|
}
|
|
3372
5647
|
|
|
@@ -3385,26 +5660,83 @@ export interface ISimpleToolOptions {
|
|
|
3385
5660
|
* to the creator/user)
|
|
3386
5661
|
*/
|
|
3387
5662
|
export interface ISimpleToolPaneComponent {
|
|
5663
|
+
/**
|
|
5664
|
+
* @remarks
|
|
5665
|
+
* Get a list of the unique ID's of all of the child panes
|
|
5666
|
+
*
|
|
5667
|
+
*/
|
|
3388
5668
|
get childPaneList(): string[];
|
|
5669
|
+
/**
|
|
5670
|
+
* @remarks
|
|
5671
|
+
* Get the unique ID of the pane
|
|
5672
|
+
*
|
|
5673
|
+
*/
|
|
3389
5674
|
get id(): string;
|
|
5675
|
+
/**
|
|
5676
|
+
* @remarks
|
|
5677
|
+
* Check the visibility of the pane
|
|
5678
|
+
*
|
|
5679
|
+
*/
|
|
3390
5680
|
get isVisible(): boolean;
|
|
5681
|
+
/**
|
|
5682
|
+
* @remarks
|
|
5683
|
+
* Get a reference to actual property pane implementation that
|
|
5684
|
+
* was constructed by the tool. This reference is used to
|
|
5685
|
+
* construct the UI components that are displayed in the pane.
|
|
5686
|
+
*
|
|
5687
|
+
*/
|
|
3391
5688
|
get pane(): IPropertyPane;
|
|
5689
|
+
/**
|
|
5690
|
+
* @remarks
|
|
5691
|
+
* Get a reference to the IPlayerUISession. This is the primary
|
|
5692
|
+
* interface to the editor UI and all of the editor extension
|
|
5693
|
+
* controls
|
|
5694
|
+
*
|
|
5695
|
+
*/
|
|
3392
5696
|
get session(): IPlayerUISession;
|
|
5697
|
+
/**
|
|
5698
|
+
* @remarks
|
|
5699
|
+
* Get a reference to the parent tool.
|
|
5700
|
+
*
|
|
5701
|
+
*/
|
|
3393
5702
|
get simpleTool(): ISimpleTool;
|
|
3394
5703
|
/**
|
|
3395
5704
|
* @remarks
|
|
5705
|
+
* Find a pane reference by unique ID
|
|
5706
|
+
*
|
|
3396
5707
|
*/
|
|
3397
5708
|
findPane(idString: string): ISimpleToolPaneComponent | undefined;
|
|
3398
5709
|
/**
|
|
3399
5710
|
* @remarks
|
|
5711
|
+
* Hide the pane. Although the parent pane is used to execute
|
|
5712
|
+
* the visibility request, the hidePane function will NOT
|
|
5713
|
+
* affect the visibility of any sibling panes -- so it is
|
|
5714
|
+
* possible to hide all of the child panes of a parent using
|
|
5715
|
+
* this function
|
|
5716
|
+
*
|
|
3400
5717
|
*/
|
|
3401
5718
|
hidePane(): void;
|
|
3402
5719
|
/**
|
|
3403
5720
|
* @remarks
|
|
5721
|
+
* This causes the reconstruction of the pane (and the child
|
|
5722
|
+
* panes) as if the tool was being constructed for the first
|
|
5723
|
+
* time. This is unfortunately necessary until such time that
|
|
5724
|
+
* all of our UI components are able to communicate dynamically
|
|
5725
|
+
* with their client counterparts. Certain controls require a
|
|
5726
|
+
* full teardown and reconstruction to properly update their
|
|
5727
|
+
* state. This is undergoing code changes and should become
|
|
5728
|
+
* unnecessary in the future.
|
|
5729
|
+
*
|
|
3404
5730
|
*/
|
|
3405
5731
|
reconstructPane(): void;
|
|
3406
5732
|
/**
|
|
3407
5733
|
* @remarks
|
|
5734
|
+
* Show the pane. Note, if this is a sub-pane, then this
|
|
5735
|
+
* function will ask the parent for permission to show, and may
|
|
5736
|
+
* result in the visibility of any sibling panes to change as a
|
|
5737
|
+
* result (depending on the `mutually exclusive visibility`
|
|
5738
|
+
* flag)
|
|
5739
|
+
*
|
|
3408
5740
|
*/
|
|
3409
5741
|
showPane(): void;
|
|
3410
5742
|
}
|
|
@@ -3426,22 +5758,77 @@ export interface ISimpleToolPaneComponent {
|
|
|
3426
5758
|
* pane to finalize itself.
|
|
3427
5759
|
*/
|
|
3428
5760
|
export interface ISimpleToolPaneOptions {
|
|
5761
|
+
/**
|
|
5762
|
+
* @remarks
|
|
5763
|
+
* The id of the child pane that should be visible when the
|
|
5764
|
+
* parent pane is first shown, or the editor tool is
|
|
5765
|
+
* constructed and finalized
|
|
5766
|
+
*
|
|
5767
|
+
*/
|
|
3429
5768
|
childPaneInitiallyVisible?: string;
|
|
5769
|
+
/**
|
|
5770
|
+
* @remarks
|
|
5771
|
+
* An optional array of child panes. These panes are set up
|
|
5772
|
+
* exactly the same as the top level pane, but are displayed as
|
|
5773
|
+
* children inside the parent pane.
|
|
5774
|
+
*
|
|
5775
|
+
*/
|
|
3430
5776
|
childPanes?: ISimpleToolPaneOptions[];
|
|
5777
|
+
/**
|
|
5778
|
+
* @remarks
|
|
5779
|
+
* An optional flag to indicate whether the child panes are
|
|
5780
|
+
* mutually exclusive. If this is true, then only one child
|
|
5781
|
+
* pane can be visible at a time. If this is false, then
|
|
5782
|
+
* multiple child panes can be visible at the same time.
|
|
5783
|
+
* Visibility is controlled either through `showPane` or
|
|
5784
|
+
* `hidePane` functions of the `ISimpleToolPaneComponent` or
|
|
5785
|
+
* through the visibility methods in the top level tool
|
|
5786
|
+
* (`ISimpleTool`)
|
|
5787
|
+
*
|
|
5788
|
+
*/
|
|
3431
5789
|
childPanesMutuallyExclusive?: boolean;
|
|
5790
|
+
/**
|
|
5791
|
+
* @remarks
|
|
5792
|
+
* The unique identifier for this pane. This is used to
|
|
5793
|
+
* identify the pane in the tool's pane hierarchy.
|
|
5794
|
+
*
|
|
5795
|
+
*/
|
|
3432
5796
|
id: string;
|
|
3433
5797
|
onBeginFinalize?: (pane: ISimpleToolPaneComponent) => void;
|
|
3434
5798
|
onEndFinalize?: (pane: ISimpleToolPaneComponent) => void;
|
|
3435
5799
|
onHide?: (pane: ISimpleToolPaneComponent) => void;
|
|
3436
5800
|
onShow?: (pane: ISimpleToolPaneComponent) => void;
|
|
3437
5801
|
onTeardown?: (pane: ISimpleToolPaneComponent) => void;
|
|
3438
|
-
|
|
3439
|
-
|
|
5802
|
+
/**
|
|
5803
|
+
* @remarks
|
|
5804
|
+
* The title of the pane. This will be displayed in the title
|
|
5805
|
+
* bar of the pane.
|
|
5806
|
+
*
|
|
5807
|
+
*/
|
|
5808
|
+
title: string;
|
|
3440
5809
|
}
|
|
3441
5810
|
|
|
3442
5811
|
export interface ISimpleToolRailComponent {
|
|
5812
|
+
/**
|
|
5813
|
+
* @remarks
|
|
5814
|
+
* Get a reference to the IPlayerUISession. This is the primary
|
|
5815
|
+
* interface to the editor UI and all of the editor extension
|
|
5816
|
+
* controls
|
|
5817
|
+
*
|
|
5818
|
+
*/
|
|
3443
5819
|
get session(): IPlayerUISession;
|
|
5820
|
+
/**
|
|
5821
|
+
* @remarks
|
|
5822
|
+
* Get a reference to the parent tool.
|
|
5823
|
+
*
|
|
5824
|
+
*/
|
|
3444
5825
|
get simpleTool(): ISimpleTool;
|
|
5826
|
+
/**
|
|
5827
|
+
* @remarks
|
|
5828
|
+
* Get the implementation interface of the underlying tool rail
|
|
5829
|
+
* component
|
|
5830
|
+
*
|
|
5831
|
+
*/
|
|
3445
5832
|
get toolRail(): IModalTool;
|
|
3446
5833
|
}
|
|
3447
5834
|
|
|
@@ -3459,15 +5846,32 @@ export interface ISimpleToolRailComponent {
|
|
|
3459
5846
|
* gameplay interaction
|
|
3460
5847
|
*/
|
|
3461
5848
|
export interface ISimpleToolRailOptions {
|
|
3462
|
-
|
|
3463
|
-
|
|
5849
|
+
/**
|
|
5850
|
+
* @remarks
|
|
5851
|
+
* The icon for the tool rail button. This is generally a URL
|
|
5852
|
+
* to an image file in the editor extension resource pack e.g.
|
|
5853
|
+
* `pack://textures/my-tool-icon.png`
|
|
5854
|
+
*
|
|
5855
|
+
*/
|
|
3464
5856
|
icon: string;
|
|
3465
5857
|
onActivate?: (component: ISimpleToolRailComponent) => void;
|
|
3466
5858
|
onDeactivate?: (component: ISimpleToolRailComponent) => void;
|
|
3467
5859
|
onFinalize?: (component: ISimpleToolRailComponent) => void;
|
|
3468
5860
|
onTeardown?: (component: ISimpleToolRailComponent) => void;
|
|
3469
|
-
|
|
3470
|
-
|
|
5861
|
+
/**
|
|
5862
|
+
* @remarks
|
|
5863
|
+
* The text for the tool title
|
|
5864
|
+
*
|
|
5865
|
+
*/
|
|
5866
|
+
title: string;
|
|
5867
|
+
/**
|
|
5868
|
+
* @remarks
|
|
5869
|
+
* The tooltip description for the tool. Note: if an activation
|
|
5870
|
+
* key binding was added to `ISimpleToolOptions`, then the key
|
|
5871
|
+
* binding will be appended to the tooltip string.
|
|
5872
|
+
*
|
|
5873
|
+
*/
|
|
5874
|
+
tooltip: string;
|
|
3471
5875
|
}
|
|
3472
5876
|
|
|
3473
5877
|
export interface ISimpleToolStatusBarComponent {
|
|
@@ -3483,13 +5887,36 @@ export interface ISimpleToolStatusBarComponent {
|
|
|
3483
5887
|
* status bar item for a simple tool.
|
|
3484
5888
|
*/
|
|
3485
5889
|
export interface ISimpleToolStatusBarOptions {
|
|
5890
|
+
/**
|
|
5891
|
+
* @remarks
|
|
5892
|
+
* The alignment of the status bar item within the parent
|
|
5893
|
+
* status bar container
|
|
5894
|
+
*
|
|
5895
|
+
*/
|
|
3486
5896
|
alignment: EditorStatusBarAlignment;
|
|
5897
|
+
/**
|
|
5898
|
+
* @remarks
|
|
5899
|
+
* The text for the status bar item
|
|
5900
|
+
*
|
|
5901
|
+
*/
|
|
3487
5902
|
displayAltText: string;
|
|
3488
5903
|
onFinalize?: (statusBar: ISimpleToolStatusBarComponent) => void;
|
|
3489
5904
|
onHide?: (statusBar: ISimpleToolStatusBarComponent) => void;
|
|
3490
5905
|
onShow?: (statusBar: ISimpleToolStatusBarComponent) => void;
|
|
3491
5906
|
onTeardown?: (statusBar: ISimpleToolStatusBarComponent) => void;
|
|
5907
|
+
/**
|
|
5908
|
+
* @remarks
|
|
5909
|
+
* The size of the status bar item within the parent status bar
|
|
5910
|
+
* container
|
|
5911
|
+
*
|
|
5912
|
+
*/
|
|
3492
5913
|
size: number;
|
|
5914
|
+
/**
|
|
5915
|
+
* @remarks
|
|
5916
|
+
* Determine the status bar visibility based on the existence
|
|
5917
|
+
* and visibility of the tool's root property pane
|
|
5918
|
+
*
|
|
5919
|
+
*/
|
|
3493
5920
|
visibility?: SimpleToolStatusBarVisibility;
|
|
3494
5921
|
}
|
|
3495
5922
|
|
|
@@ -3511,21 +5938,216 @@ export interface IStatusBarItem {
|
|
|
3511
5938
|
}
|
|
3512
5939
|
|
|
3513
5940
|
/**
|
|
3514
|
-
*
|
|
5941
|
+
* A property item which supports String properties
|
|
3515
5942
|
*/
|
|
3516
|
-
|
|
5943
|
+
// @ts-ignore Class inheritance allowed for native defined classes
|
|
5944
|
+
export interface IStringPropertyItem extends IPropertyItemBase {
|
|
3517
5945
|
/**
|
|
3518
5946
|
* @remarks
|
|
3519
|
-
*
|
|
5947
|
+
* Current value of the property item.
|
|
3520
5948
|
*
|
|
3521
5949
|
*/
|
|
3522
|
-
|
|
5950
|
+
readonly value: Readonly<string>;
|
|
5951
|
+
/**
|
|
5952
|
+
* @remarks
|
|
5953
|
+
* Updates title of the property item.
|
|
5954
|
+
*
|
|
5955
|
+
* @param title
|
|
5956
|
+
* New title.
|
|
5957
|
+
*/
|
|
5958
|
+
setTitle(title: LocalizedString | undefined): void;
|
|
5959
|
+
/**
|
|
5960
|
+
* @remarks
|
|
5961
|
+
* Updates tooltip description of property item.
|
|
5962
|
+
*
|
|
5963
|
+
* @param tooltip
|
|
5964
|
+
* New tooltip.
|
|
5965
|
+
*/
|
|
5966
|
+
setTooltip(tooltip: LocalizedString | undefined): void;
|
|
5967
|
+
}
|
|
5968
|
+
|
|
5969
|
+
/**
|
|
5970
|
+
* Optional properties for String property item
|
|
5971
|
+
*/
|
|
5972
|
+
// @ts-ignore Class inheritance allowed for native defined classes
|
|
5973
|
+
export interface IStringPropertyItemOptions extends IPropertyItemOptionsBase {
|
|
5974
|
+
/**
|
|
5975
|
+
* @remarks
|
|
5976
|
+
* If true label text will be hidden. If undefined, the label
|
|
5977
|
+
* will be visible by default.
|
|
5978
|
+
*
|
|
5979
|
+
*/
|
|
5980
|
+
hiddenLabel?: boolean;
|
|
5981
|
+
/**
|
|
5982
|
+
* @remarks
|
|
5983
|
+
* This callback is called when UI control value is changed.
|
|
5984
|
+
*
|
|
5985
|
+
*/
|
|
5986
|
+
onChange?: (newValue: string, oldValue: string) => void;
|
|
5987
|
+
/**
|
|
5988
|
+
* @remarks
|
|
5989
|
+
* Optional regular expression pattern to validate string.
|
|
5990
|
+
*
|
|
5991
|
+
*/
|
|
5992
|
+
regexPattern?: string;
|
|
5993
|
+
/**
|
|
5994
|
+
* @remarks
|
|
5995
|
+
* Localized title of the property item.
|
|
5996
|
+
*
|
|
5997
|
+
*/
|
|
5998
|
+
title?: LocalizedString;
|
|
5999
|
+
/**
|
|
6000
|
+
* @remarks
|
|
6001
|
+
* Tooltip description of the property item.
|
|
6002
|
+
*
|
|
6003
|
+
*/
|
|
6004
|
+
tooltip?: LocalizedString;
|
|
6005
|
+
}
|
|
6006
|
+
|
|
6007
|
+
/**
|
|
6008
|
+
* A property item which supports Vector3 properties
|
|
6009
|
+
*/
|
|
6010
|
+
// @ts-ignore Class inheritance allowed for native defined classes
|
|
6011
|
+
export interface ITextPropertyItem extends IPropertyItemBase {
|
|
6012
|
+
/**
|
|
6013
|
+
* @remarks
|
|
6014
|
+
* Current value of the property item.
|
|
6015
|
+
*
|
|
6016
|
+
*/
|
|
6017
|
+
readonly value: Readonly<LocalizedString>;
|
|
6018
|
+
/**
|
|
6019
|
+
* @remarks
|
|
6020
|
+
* Gets layout alignment of the property item.
|
|
6021
|
+
*
|
|
6022
|
+
*/
|
|
6023
|
+
setAlignment(alignment: LayoutAlignment): void;
|
|
6024
|
+
/**
|
|
6025
|
+
* @remarks
|
|
6026
|
+
* Sets title of the property item.
|
|
6027
|
+
*
|
|
6028
|
+
*/
|
|
6029
|
+
setTitle(title: LocalizedString | undefined): void;
|
|
6030
|
+
}
|
|
6031
|
+
|
|
6032
|
+
/**
|
|
6033
|
+
* Optional properties for Text property item
|
|
6034
|
+
*/
|
|
6035
|
+
// @ts-ignore Class inheritance allowed for native defined classes
|
|
6036
|
+
export interface ITextPropertyItemOptions extends IPropertyItemOptionsBase {
|
|
6037
|
+
/**
|
|
6038
|
+
* @remarks
|
|
6039
|
+
* Determines alignment of the text. If undefined, it will
|
|
6040
|
+
* default to left aligned.
|
|
6041
|
+
*
|
|
6042
|
+
*/
|
|
6043
|
+
alignment?: LayoutAlignment;
|
|
6044
|
+
/**
|
|
6045
|
+
* @remarks
|
|
6046
|
+
* Adds a border around the text. If undefined, it will default
|
|
6047
|
+
* to true.
|
|
6048
|
+
*
|
|
6049
|
+
*/
|
|
6050
|
+
border?: boolean;
|
|
6051
|
+
/**
|
|
6052
|
+
* @remarks
|
|
6053
|
+
* Localized title of the text item.
|
|
6054
|
+
*
|
|
6055
|
+
*/
|
|
6056
|
+
title?: LocalizedString;
|
|
6057
|
+
}
|
|
6058
|
+
|
|
6059
|
+
/**
|
|
6060
|
+
* A property item which supports Vector3 properties
|
|
6061
|
+
*/
|
|
6062
|
+
// @ts-ignore Class inheritance allowed for native defined classes
|
|
6063
|
+
export interface IVector3PropertyItem extends IPropertyItemBase {
|
|
6064
|
+
/**
|
|
6065
|
+
* @remarks
|
|
6066
|
+
* Current value of the property item.
|
|
6067
|
+
*
|
|
6068
|
+
*/
|
|
6069
|
+
readonly value: Readonly<minecraftserver.Vector3>;
|
|
6070
|
+
/**
|
|
6071
|
+
* @remarks
|
|
6072
|
+
* Updates title of the button.
|
|
6073
|
+
*
|
|
6074
|
+
* @param title
|
|
6075
|
+
* New button title.
|
|
6076
|
+
*/
|
|
6077
|
+
setTitle(title: LocalizedString | undefined): void;
|
|
6078
|
+
/**
|
|
6079
|
+
* @remarks
|
|
6080
|
+
* Updates tooltip description of the button.
|
|
6081
|
+
*
|
|
6082
|
+
* @param tooltip
|
|
6083
|
+
* New button tooltip.
|
|
6084
|
+
*/
|
|
6085
|
+
setTooltip(tooltip: LocalizedString | undefined): void;
|
|
6086
|
+
/**
|
|
6087
|
+
* @remarks
|
|
6088
|
+
* Updates Vector3 limits and clamps the current value.
|
|
6089
|
+
*
|
|
6090
|
+
*/
|
|
6091
|
+
updateAxisLimits(limits: { min?: Partial<minecraftserver.Vector3>; max?: Partial<minecraftserver.Vector3> }): void;
|
|
6092
|
+
}
|
|
6093
|
+
|
|
6094
|
+
/**
|
|
6095
|
+
* Optional properties for Vector3 property item
|
|
6096
|
+
*/
|
|
6097
|
+
// @ts-ignore Class inheritance allowed for native defined classes
|
|
6098
|
+
export interface IVector3PropertyItemOptions extends IPropertyItemOptionsBase {
|
|
6099
|
+
/**
|
|
6100
|
+
* @remarks
|
|
6101
|
+
* If true label text will be hidden. It will be visible by
|
|
6102
|
+
* default.
|
|
6103
|
+
*
|
|
6104
|
+
*/
|
|
6105
|
+
hiddenLabel?: boolean;
|
|
6106
|
+
/**
|
|
6107
|
+
* @remarks
|
|
6108
|
+
* If we should treat the Vector3 properties as integer values.
|
|
6109
|
+
* By default is false.
|
|
6110
|
+
*
|
|
6111
|
+
*/
|
|
6112
|
+
isInteger?: boolean;
|
|
6113
|
+
/**
|
|
6114
|
+
* @remarks
|
|
6115
|
+
* The min possible limits. If undefined,
|
|
6116
|
+
* Number.MAX_SAFE_INTEGER will be used.
|
|
6117
|
+
*
|
|
6118
|
+
*/
|
|
6119
|
+
max?: Partial<minecraftserver.Vector3>;
|
|
6120
|
+
/**
|
|
6121
|
+
* @remarks
|
|
6122
|
+
* The min possible limits. If undefined,
|
|
6123
|
+
* Number.MIN_SAFE_INTEGER will be used.
|
|
6124
|
+
*
|
|
6125
|
+
*/
|
|
6126
|
+
min?: Partial<minecraftserver.Vector3>;
|
|
6127
|
+
/**
|
|
6128
|
+
* @remarks
|
|
6129
|
+
* This callback is called when UI control is changed.
|
|
6130
|
+
*
|
|
6131
|
+
*/
|
|
6132
|
+
onChange?: (newValue: minecraftserver.Vector3, oldValue: minecraftserver.Vector3) => void;
|
|
6133
|
+
/**
|
|
6134
|
+
* @remarks
|
|
6135
|
+
* Localized title of the property item
|
|
6136
|
+
*
|
|
6137
|
+
*/
|
|
6138
|
+
title?: LocalizedString;
|
|
3523
6139
|
/**
|
|
3524
6140
|
* @remarks
|
|
3525
|
-
*
|
|
6141
|
+
* Tooltip description of the property item
|
|
3526
6142
|
*
|
|
3527
6143
|
*/
|
|
3528
|
-
|
|
6144
|
+
tooltip?: LocalizedString;
|
|
6145
|
+
}
|
|
6146
|
+
|
|
6147
|
+
/**
|
|
6148
|
+
* Parameters for creating a modal tool in the tool container
|
|
6149
|
+
*/
|
|
6150
|
+
export interface ModalToolCreationParameters {
|
|
3529
6151
|
/**
|
|
3530
6152
|
* @remarks
|
|
3531
6153
|
* Icon, if any (from resource pack on client)
|
|
@@ -3534,16 +6156,43 @@ export interface ModalToolCreationParameters {
|
|
|
3534
6156
|
icon?: string;
|
|
3535
6157
|
/**
|
|
3536
6158
|
* @remarks
|
|
3537
|
-
*
|
|
6159
|
+
* Modal input context identifier
|
|
6160
|
+
*
|
|
6161
|
+
*/
|
|
6162
|
+
inputContextId?: string;
|
|
6163
|
+
/**
|
|
6164
|
+
* @remarks
|
|
6165
|
+
* Localized text label for modal input context
|
|
6166
|
+
*
|
|
6167
|
+
*/
|
|
6168
|
+
inputContextLabel?: string;
|
|
6169
|
+
/**
|
|
6170
|
+
* @remarks
|
|
6171
|
+
* Title of the tool
|
|
3538
6172
|
*
|
|
3539
6173
|
*/
|
|
3540
|
-
|
|
6174
|
+
title: string;
|
|
3541
6175
|
/**
|
|
3542
6176
|
* @remarks
|
|
3543
|
-
* Tooltip
|
|
6177
|
+
* Tooltip description of the toll
|
|
3544
6178
|
*
|
|
3545
6179
|
*/
|
|
3546
|
-
|
|
6180
|
+
tooltip?: string;
|
|
6181
|
+
}
|
|
6182
|
+
|
|
6183
|
+
// @ts-ignore Class inheritance allowed for native defined classes
|
|
6184
|
+
export class InvalidWidgetComponentError extends Error {
|
|
6185
|
+
private constructor();
|
|
6186
|
+
}
|
|
6187
|
+
|
|
6188
|
+
// @ts-ignore Class inheritance allowed for native defined classes
|
|
6189
|
+
export class InvalidWidgetError extends Error {
|
|
6190
|
+
private constructor();
|
|
6191
|
+
}
|
|
6192
|
+
|
|
6193
|
+
// @ts-ignore Class inheritance allowed for native defined classes
|
|
6194
|
+
export class InvalidWidgetGroupError extends Error {
|
|
6195
|
+
private constructor();
|
|
3547
6196
|
}
|
|
3548
6197
|
|
|
3549
6198
|
/**
|
|
@@ -3578,21 +6227,37 @@ export declare function executeLargeOperation(
|
|
|
3578
6227
|
): Promise<void>;
|
|
3579
6228
|
/**
|
|
3580
6229
|
* @remarks
|
|
3581
|
-
*
|
|
3582
|
-
*
|
|
3583
|
-
*
|
|
6230
|
+
* Executes an operation over a BlockLocationIterator via
|
|
6231
|
+
* chunks to allow splitting operation over multiple game ticks
|
|
6232
|
+
*
|
|
6233
|
+
* @param blockLocationIterator
|
|
6234
|
+
* the selection to iterator over
|
|
6235
|
+
* @param operation
|
|
6236
|
+
* the operation to apply over each block location
|
|
6237
|
+
*/
|
|
6238
|
+
export declare function executeLargeOperationFromIterator(
|
|
6239
|
+
blockLocationIterator: minecraftserver.BlockLocationIterator,
|
|
6240
|
+
operation: (blockLocation: minecraftserver.Vector3) => void,
|
|
6241
|
+
): Promise<void>;
|
|
6242
|
+
/**
|
|
6243
|
+
* @remarks
|
|
6244
|
+
* Returns a string array of the default block types for editor
|
|
6245
|
+
* operations. Can be used to further filter blocks.
|
|
3584
6246
|
*
|
|
3585
6247
|
* @returns
|
|
3586
6248
|
* Default allowed block list
|
|
3587
6249
|
*/
|
|
3588
|
-
export declare function
|
|
6250
|
+
export declare function getDefaultAllowBlockList(): string[];
|
|
3589
6251
|
/**
|
|
3590
6252
|
* @remarks
|
|
3591
|
-
*
|
|
3592
|
-
* localization ID
|
|
6253
|
+
* Creates an observable object that stores a value state.
|
|
3593
6254
|
*
|
|
6255
|
+
* @param initialValue
|
|
6256
|
+
* Initial value of the observable.
|
|
6257
|
+
* @param validator
|
|
6258
|
+
* Optional validator to use for the setter.
|
|
3594
6259
|
*/
|
|
3595
|
-
export declare function
|
|
6260
|
+
export declare function makeObservable<T>(initialValue: T, validator?: ObservableValidator<T>): IObservable<T>;
|
|
3596
6261
|
/**
|
|
3597
6262
|
* @remarks
|
|
3598
6263
|
* Registers an editor extension into Minecraft. This function
|