@minecraft/server-editor 0.1.0-beta.1.21.2-stable → 0.1.0-beta.1.21.20-preview.22
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 +1293 -153
- 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,28 @@ export enum BlockPaletteItemType {
|
|
|
36
36
|
Probability = 1,
|
|
37
37
|
}
|
|
38
38
|
|
|
39
|
+
export enum BrushPipelineOperationType {
|
|
40
|
+
Include = 0,
|
|
41
|
+
Exclude = 1,
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
/**
|
|
45
|
+
* The possible variants of a color picker.
|
|
46
|
+
*/
|
|
47
|
+
export declare enum ColorPickerVariant {
|
|
48
|
+
Default = 0,
|
|
49
|
+
Inline = 1,
|
|
50
|
+
Expanded = 2,
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
/**
|
|
54
|
+
* Predefined action bar items
|
|
55
|
+
*/
|
|
56
|
+
export declare enum CoreActionBarItemType {
|
|
57
|
+
Redo = 'editor:actionBarItem:redo',
|
|
58
|
+
Undo = 'editor:actionBarItem:undo',
|
|
59
|
+
}
|
|
60
|
+
|
|
39
61
|
/**
|
|
40
62
|
* Predefined top level menus for core editor
|
|
41
63
|
*/
|
|
@@ -115,13 +137,21 @@ export enum CursorTargetMode {
|
|
|
115
137
|
Face = 1,
|
|
116
138
|
}
|
|
117
139
|
|
|
140
|
+
export enum DaylightCycle {
|
|
141
|
+
Normal = 0,
|
|
142
|
+
AlwaysDay = 1,
|
|
143
|
+
LockTime = 2,
|
|
144
|
+
}
|
|
145
|
+
|
|
118
146
|
/**
|
|
119
147
|
* Type of item that can be added to the property pane
|
|
120
148
|
*/
|
|
121
149
|
export declare enum EDITOR_PANE_PROPERTY_ITEM_TYPE {
|
|
122
150
|
Action = 'editorUI:Action',
|
|
151
|
+
BlockList = 'editorUI:BlockList',
|
|
123
152
|
BlockPicker = 'editorUI:BlockPicker',
|
|
124
153
|
Boolean = 'editorUI:Boolean',
|
|
154
|
+
ColorPicker = 'editorUI:ColorPicker',
|
|
125
155
|
Divider = 'editorUI:Divider',
|
|
126
156
|
Dropdown = 'editorUI:Dropdown',
|
|
127
157
|
Image = 'editorUI:Image',
|
|
@@ -166,6 +196,11 @@ export declare enum EditorStatusBarAlignment {
|
|
|
166
196
|
Left = 1,
|
|
167
197
|
}
|
|
168
198
|
|
|
199
|
+
export enum EntityOperationType {
|
|
200
|
+
Create = 0,
|
|
201
|
+
Delete = 1,
|
|
202
|
+
}
|
|
203
|
+
|
|
169
204
|
export enum ExportResult {
|
|
170
205
|
ValidWorldExport = 0,
|
|
171
206
|
LevelFetchFailed = 1,
|
|
@@ -177,6 +212,14 @@ export enum ExportResult {
|
|
|
177
212
|
EditorSystemFailure = 7,
|
|
178
213
|
}
|
|
179
214
|
|
|
215
|
+
export enum GamePublishSetting {
|
|
216
|
+
NoMultiPlay = 0,
|
|
217
|
+
InviteOnly = 1,
|
|
218
|
+
FriendsOnly = 2,
|
|
219
|
+
FriendsOfFriends = 3,
|
|
220
|
+
Public = 4,
|
|
221
|
+
}
|
|
222
|
+
|
|
180
223
|
/**
|
|
181
224
|
* Enumeration representing identifiers for graphics settings
|
|
182
225
|
* properties.
|
|
@@ -207,116 +250,559 @@ export declare enum InputModifier {
|
|
|
207
250
|
* Keyboard key
|
|
208
251
|
*/
|
|
209
252
|
export declare enum KeyboardKey {
|
|
253
|
+
UNDEFINED = 0,
|
|
254
|
+
/**
|
|
255
|
+
* @remarks
|
|
256
|
+
* KeyboardEvent.DOM_VK_BACK_SPACE
|
|
257
|
+
*
|
|
258
|
+
*/
|
|
210
259
|
BACKSPACE = 8,
|
|
260
|
+
/**
|
|
261
|
+
* @remarks
|
|
262
|
+
* KeyboardEvent.DOM_VK_TAB
|
|
263
|
+
*
|
|
264
|
+
*/
|
|
211
265
|
TAB = 9,
|
|
266
|
+
/**
|
|
267
|
+
* @remarks
|
|
268
|
+
* KeyboardEvent.DOM_VK_RETURN
|
|
269
|
+
*
|
|
270
|
+
*/
|
|
212
271
|
ENTER = 13,
|
|
272
|
+
/**
|
|
273
|
+
* @remarks
|
|
274
|
+
* KeyboardEvent.DOM_VK_SHIFT
|
|
275
|
+
*
|
|
276
|
+
*/
|
|
213
277
|
SHIFT = 16,
|
|
278
|
+
/**
|
|
279
|
+
* @remarks
|
|
280
|
+
* KeyboardEvent.DOM_VK_CONTROL
|
|
281
|
+
*
|
|
282
|
+
*/
|
|
214
283
|
CTRL = 17,
|
|
284
|
+
/**
|
|
285
|
+
* @remarks
|
|
286
|
+
* KeyboardEvent.DOM_VK_ALT
|
|
287
|
+
*
|
|
288
|
+
*/
|
|
215
289
|
ALT = 18,
|
|
290
|
+
/**
|
|
291
|
+
* @remarks
|
|
292
|
+
* KeyboardEvent.DOM_VK_CAPS_LOCK
|
|
293
|
+
*
|
|
294
|
+
*/
|
|
216
295
|
CAPS_LOCK = 20,
|
|
296
|
+
/**
|
|
297
|
+
* @remarks
|
|
298
|
+
* KeyboardEvent.DOM_VK_ESCAPE
|
|
299
|
+
*
|
|
300
|
+
*/
|
|
217
301
|
ESCAPE = 27,
|
|
302
|
+
/**
|
|
303
|
+
* @remarks
|
|
304
|
+
* KeyboardEvent.DOM_VK_SPACE
|
|
305
|
+
*
|
|
306
|
+
*/
|
|
218
307
|
SPACE = 32,
|
|
308
|
+
/**
|
|
309
|
+
* @remarks
|
|
310
|
+
* KeyboardEvent.DOM_VK_PAGE_UP
|
|
311
|
+
*
|
|
312
|
+
*/
|
|
219
313
|
PAGE_UP = 33,
|
|
314
|
+
/**
|
|
315
|
+
* @remarks
|
|
316
|
+
* KeyboardEvent.DOM_VK_PAGE_DOWN
|
|
317
|
+
*
|
|
318
|
+
*/
|
|
220
319
|
PAGE_DOWN = 34,
|
|
320
|
+
/**
|
|
321
|
+
* @remarks
|
|
322
|
+
* KeyboardEvent.DOM_VK_END
|
|
323
|
+
*
|
|
324
|
+
*/
|
|
221
325
|
END = 35,
|
|
326
|
+
/**
|
|
327
|
+
* @remarks
|
|
328
|
+
* KeyboardEvent.DOM_VK_HOME
|
|
329
|
+
*
|
|
330
|
+
*/
|
|
222
331
|
HOME = 36,
|
|
332
|
+
/**
|
|
333
|
+
* @remarks
|
|
334
|
+
* KeyboardEvent.DOM_VK_LEFT
|
|
335
|
+
*
|
|
336
|
+
*/
|
|
223
337
|
LEFT = 37,
|
|
338
|
+
/**
|
|
339
|
+
* @remarks
|
|
340
|
+
* KeyboardEvent.DOM_VK_UP
|
|
341
|
+
*
|
|
342
|
+
*/
|
|
224
343
|
UP = 38,
|
|
344
|
+
/**
|
|
345
|
+
* @remarks
|
|
346
|
+
* KeyboardEvent.DOM_VK_RIGHT
|
|
347
|
+
*
|
|
348
|
+
*/
|
|
225
349
|
RIGHT = 39,
|
|
350
|
+
/**
|
|
351
|
+
* @remarks
|
|
352
|
+
* KeyboardEvent.DOM_VK_DOWN
|
|
353
|
+
*
|
|
354
|
+
*/
|
|
226
355
|
DOWN = 40,
|
|
356
|
+
/**
|
|
357
|
+
* @remarks
|
|
358
|
+
* KeyboardEvent.DOM_VK_PRINTSCREEN
|
|
359
|
+
*
|
|
360
|
+
*/
|
|
227
361
|
PRINT_SCREEN = 44,
|
|
362
|
+
/**
|
|
363
|
+
* @remarks
|
|
364
|
+
* KeyboardEvent.DOM_VK_INSERT
|
|
365
|
+
*
|
|
366
|
+
*/
|
|
228
367
|
INSERT = 45,
|
|
368
|
+
/**
|
|
369
|
+
* @remarks
|
|
370
|
+
* KeyboardEvent.DOM_VK_DELETE
|
|
371
|
+
*
|
|
372
|
+
*/
|
|
229
373
|
DELETE = 46,
|
|
374
|
+
/**
|
|
375
|
+
* @remarks
|
|
376
|
+
* KeyboardEvent.DOM_VK_0
|
|
377
|
+
*
|
|
378
|
+
*/
|
|
230
379
|
KEY_0 = 48,
|
|
380
|
+
/**
|
|
381
|
+
* @remarks
|
|
382
|
+
* KeyboardEvent.DOM_VK_1
|
|
383
|
+
*
|
|
384
|
+
*/
|
|
231
385
|
KEY_1 = 49,
|
|
386
|
+
/**
|
|
387
|
+
* @remarks
|
|
388
|
+
* KeyboardEvent.DOM_VK_2
|
|
389
|
+
*
|
|
390
|
+
*/
|
|
232
391
|
KEY_2 = 50,
|
|
392
|
+
/**
|
|
393
|
+
* @remarks
|
|
394
|
+
* KeyboardEvent.DOM_VK_3
|
|
395
|
+
*
|
|
396
|
+
*/
|
|
233
397
|
KEY_3 = 51,
|
|
398
|
+
/**
|
|
399
|
+
* @remarks
|
|
400
|
+
* KeyboardEvent.DOM_VK_4
|
|
401
|
+
*
|
|
402
|
+
*/
|
|
234
403
|
KEY_4 = 52,
|
|
404
|
+
/**
|
|
405
|
+
* @remarks
|
|
406
|
+
* KeyboardEvent.DOM_VK_5
|
|
407
|
+
*
|
|
408
|
+
*/
|
|
235
409
|
KEY_5 = 53,
|
|
410
|
+
/**
|
|
411
|
+
* @remarks
|
|
412
|
+
* KeyboardEvent.DOM_VK_6
|
|
413
|
+
*
|
|
414
|
+
*/
|
|
236
415
|
KEY_6 = 54,
|
|
416
|
+
/**
|
|
417
|
+
* @remarks
|
|
418
|
+
* KeyboardEvent.DOM_VK_7
|
|
419
|
+
*
|
|
420
|
+
*/
|
|
237
421
|
KEY_7 = 55,
|
|
422
|
+
/**
|
|
423
|
+
* @remarks
|
|
424
|
+
* KeyboardEvent.DOM_VK_8
|
|
425
|
+
*
|
|
426
|
+
*/
|
|
238
427
|
KEY_8 = 56,
|
|
428
|
+
/**
|
|
429
|
+
* @remarks
|
|
430
|
+
* KeyboardEvent.DOM_VK_9
|
|
431
|
+
*
|
|
432
|
+
*/
|
|
239
433
|
KEY_9 = 57,
|
|
434
|
+
/**
|
|
435
|
+
* @remarks
|
|
436
|
+
* KeyboardEvent.DOM_VK_A
|
|
437
|
+
*
|
|
438
|
+
*/
|
|
240
439
|
KEY_A = 65,
|
|
440
|
+
/**
|
|
441
|
+
* @remarks
|
|
442
|
+
* KeyboardEvent.DOM_VK_B
|
|
443
|
+
*
|
|
444
|
+
*/
|
|
241
445
|
KEY_B = 66,
|
|
446
|
+
/**
|
|
447
|
+
* @remarks
|
|
448
|
+
* KeyboardEvent.DOM_VK_C
|
|
449
|
+
*
|
|
450
|
+
*/
|
|
242
451
|
KEY_C = 67,
|
|
452
|
+
/**
|
|
453
|
+
* @remarks
|
|
454
|
+
* KeyboardEvent.DOM_VK_D
|
|
455
|
+
*
|
|
456
|
+
*/
|
|
243
457
|
KEY_D = 68,
|
|
458
|
+
/**
|
|
459
|
+
* @remarks
|
|
460
|
+
* KeyboardEvent.DOM_VK_E
|
|
461
|
+
*
|
|
462
|
+
*/
|
|
244
463
|
KEY_E = 69,
|
|
464
|
+
/**
|
|
465
|
+
* @remarks
|
|
466
|
+
* KeyboardEvent.DOM_VK_F
|
|
467
|
+
*
|
|
468
|
+
*/
|
|
245
469
|
KEY_F = 70,
|
|
470
|
+
/**
|
|
471
|
+
* @remarks
|
|
472
|
+
* KeyboardEvent.DOM_VK_G
|
|
473
|
+
*
|
|
474
|
+
*/
|
|
246
475
|
KEY_G = 71,
|
|
476
|
+
/**
|
|
477
|
+
* @remarks
|
|
478
|
+
* KeyboardEvent.DOM_VK_H
|
|
479
|
+
*
|
|
480
|
+
*/
|
|
247
481
|
KEY_H = 72,
|
|
482
|
+
/**
|
|
483
|
+
* @remarks
|
|
484
|
+
* KeyboardEvent.DOM_VK_I
|
|
485
|
+
*
|
|
486
|
+
*/
|
|
248
487
|
KEY_I = 73,
|
|
488
|
+
/**
|
|
489
|
+
* @remarks
|
|
490
|
+
* KeyboardEvent.DOM_VK_J
|
|
491
|
+
*
|
|
492
|
+
*/
|
|
249
493
|
KEY_J = 74,
|
|
494
|
+
/**
|
|
495
|
+
* @remarks
|
|
496
|
+
* KeyboardEvent.DOM_VK_K
|
|
497
|
+
*
|
|
498
|
+
*/
|
|
250
499
|
KEY_K = 75,
|
|
500
|
+
/**
|
|
501
|
+
* @remarks
|
|
502
|
+
* KeyboardEvent.DOM_VK_L
|
|
503
|
+
*
|
|
504
|
+
*/
|
|
251
505
|
KEY_L = 76,
|
|
506
|
+
/**
|
|
507
|
+
* @remarks
|
|
508
|
+
* KeyboardEvent.DOM_VK_M
|
|
509
|
+
*
|
|
510
|
+
*/
|
|
252
511
|
KEY_M = 77,
|
|
512
|
+
/**
|
|
513
|
+
* @remarks
|
|
514
|
+
* KeyboardEvent.DOM_VK_N
|
|
515
|
+
*
|
|
516
|
+
*/
|
|
253
517
|
KEY_N = 78,
|
|
518
|
+
/**
|
|
519
|
+
* @remarks
|
|
520
|
+
* KeyboardEvent.DOM_VK_O
|
|
521
|
+
*
|
|
522
|
+
*/
|
|
254
523
|
KEY_O = 79,
|
|
524
|
+
/**
|
|
525
|
+
* @remarks
|
|
526
|
+
* KeyboardEvent.DOM_VK_P
|
|
527
|
+
*
|
|
528
|
+
*/
|
|
255
529
|
KEY_P = 80,
|
|
530
|
+
/**
|
|
531
|
+
* @remarks
|
|
532
|
+
* KeyboardEvent.DOM_VK_Q
|
|
533
|
+
*
|
|
534
|
+
*/
|
|
256
535
|
KEY_Q = 81,
|
|
536
|
+
/**
|
|
537
|
+
* @remarks
|
|
538
|
+
* KeyboardEvent.DOM_VK_R
|
|
539
|
+
*
|
|
540
|
+
*/
|
|
257
541
|
KEY_R = 82,
|
|
542
|
+
/**
|
|
543
|
+
* @remarks
|
|
544
|
+
* KeyboardEvent.DOM_VK_S
|
|
545
|
+
*
|
|
546
|
+
*/
|
|
258
547
|
KEY_S = 83,
|
|
548
|
+
/**
|
|
549
|
+
* @remarks
|
|
550
|
+
* KeyboardEvent.DOM_VK_T
|
|
551
|
+
*
|
|
552
|
+
*/
|
|
259
553
|
KEY_T = 84,
|
|
554
|
+
/**
|
|
555
|
+
* @remarks
|
|
556
|
+
* KeyboardEvent.DOM_VK_U
|
|
557
|
+
*
|
|
558
|
+
*/
|
|
260
559
|
KEY_U = 85,
|
|
560
|
+
/**
|
|
561
|
+
* @remarks
|
|
562
|
+
* KeyboardEvent.DOM_VK_V
|
|
563
|
+
*
|
|
564
|
+
*/
|
|
261
565
|
KEY_V = 86,
|
|
566
|
+
/**
|
|
567
|
+
* @remarks
|
|
568
|
+
* KeyboardEvent.DOM_VK_W
|
|
569
|
+
*
|
|
570
|
+
*/
|
|
262
571
|
KEY_W = 87,
|
|
572
|
+
/**
|
|
573
|
+
* @remarks
|
|
574
|
+
* KeyboardEvent.DOM_VK_X
|
|
575
|
+
*
|
|
576
|
+
*/
|
|
263
577
|
KEY_X = 88,
|
|
578
|
+
/**
|
|
579
|
+
* @remarks
|
|
580
|
+
* KeyboardEvent.DOM_VK_Y
|
|
581
|
+
*
|
|
582
|
+
*/
|
|
264
583
|
KEY_Y = 89,
|
|
584
|
+
/**
|
|
585
|
+
* @remarks
|
|
586
|
+
* KeyboardEvent.DOM_VK_Z
|
|
587
|
+
*
|
|
588
|
+
*/
|
|
265
589
|
KEY_Z = 90,
|
|
590
|
+
/**
|
|
591
|
+
* @remarks
|
|
592
|
+
* KeyboardEvent.DOM_VK_NUMPAD0
|
|
593
|
+
*
|
|
594
|
+
*/
|
|
266
595
|
NUMPAD_0 = 96,
|
|
596
|
+
/**
|
|
597
|
+
* @remarks
|
|
598
|
+
* KeyboardEvent.DOM_VK_NUMPAD1
|
|
599
|
+
*
|
|
600
|
+
*/
|
|
267
601
|
NUMPAD_1 = 97,
|
|
602
|
+
/**
|
|
603
|
+
* @remarks
|
|
604
|
+
* KeyboardEvent.DOM_VK_NUMPAD2
|
|
605
|
+
*
|
|
606
|
+
*/
|
|
268
607
|
NUMPAD_2 = 98,
|
|
608
|
+
/**
|
|
609
|
+
* @remarks
|
|
610
|
+
* KeyboardEvent.DOM_VK_NUMPAD3
|
|
611
|
+
*
|
|
612
|
+
*/
|
|
269
613
|
NUMPAD_3 = 99,
|
|
614
|
+
/**
|
|
615
|
+
* @remarks
|
|
616
|
+
* KeyboardEvent.DOM_VK_NUMPAD4
|
|
617
|
+
*
|
|
618
|
+
*/
|
|
270
619
|
NUMPAD_4 = 100,
|
|
620
|
+
/**
|
|
621
|
+
* @remarks
|
|
622
|
+
* KeyboardEvent.DOM_VK_NUMPAD5
|
|
623
|
+
*
|
|
624
|
+
*/
|
|
271
625
|
NUMPAD_5 = 101,
|
|
626
|
+
/**
|
|
627
|
+
* @remarks
|
|
628
|
+
* KeyboardEvent.DOM_VK_NUMPAD6
|
|
629
|
+
*
|
|
630
|
+
*/
|
|
272
631
|
NUMPAD_6 = 102,
|
|
632
|
+
/**
|
|
633
|
+
* @remarks
|
|
634
|
+
* KeyboardEvent.DOM_VK_NUMPAD7
|
|
635
|
+
*
|
|
636
|
+
*/
|
|
273
637
|
NUMPAD_7 = 103,
|
|
638
|
+
/**
|
|
639
|
+
* @remarks
|
|
640
|
+
* KeyboardEvent.DOM_VK_NUMPAD8
|
|
641
|
+
*
|
|
642
|
+
*/
|
|
274
643
|
NUMPAD_8 = 104,
|
|
644
|
+
/**
|
|
645
|
+
* @remarks
|
|
646
|
+
* KeyboardEvent.DOM_VK_NUMPAD9
|
|
647
|
+
*
|
|
648
|
+
*/
|
|
275
649
|
NUMPAD_9 = 105,
|
|
650
|
+
/**
|
|
651
|
+
* @remarks
|
|
652
|
+
* KeyboardEvent.DOM_VK_MULTIPLY
|
|
653
|
+
*
|
|
654
|
+
*/
|
|
276
655
|
NUMPAD_MULTIPLY = 106,
|
|
656
|
+
/**
|
|
657
|
+
* @remarks
|
|
658
|
+
* KeyboardEvent.DOM_VK_ADD
|
|
659
|
+
*
|
|
660
|
+
*/
|
|
277
661
|
NUMPAD_ADD = 107,
|
|
662
|
+
/**
|
|
663
|
+
* @remarks
|
|
664
|
+
* KeyboardEvent.DOM_VK_SEPARATOR
|
|
665
|
+
*
|
|
666
|
+
*/
|
|
278
667
|
NUMPAD_SEPARATOR = 108,
|
|
668
|
+
/**
|
|
669
|
+
* @remarks
|
|
670
|
+
* KeyboardEvent.DOM_VK_SUBTRACT
|
|
671
|
+
*
|
|
672
|
+
*/
|
|
279
673
|
NUMPAD_SUBTRACT = 109,
|
|
674
|
+
/**
|
|
675
|
+
* @remarks
|
|
676
|
+
* KeyboardEvent.DOM_VK_DECIMAL
|
|
677
|
+
*
|
|
678
|
+
*/
|
|
280
679
|
NUMPAD_DECIMAL = 110,
|
|
680
|
+
/**
|
|
681
|
+
* @remarks
|
|
682
|
+
* KeyboardEvent.DOM_VK_DIVIDE
|
|
683
|
+
*
|
|
684
|
+
*/
|
|
281
685
|
NUMPAD_DIVIDE = 111,
|
|
686
|
+
/**
|
|
687
|
+
* @remarks
|
|
688
|
+
* KeyboardEvent.DOM_VK_F1
|
|
689
|
+
*
|
|
690
|
+
*/
|
|
282
691
|
F1 = 112,
|
|
692
|
+
/**
|
|
693
|
+
* @remarks
|
|
694
|
+
* KeyboardEvent.DOM_VK_F2
|
|
695
|
+
*
|
|
696
|
+
*/
|
|
283
697
|
F2 = 113,
|
|
698
|
+
/**
|
|
699
|
+
* @remarks
|
|
700
|
+
* KeyboardEvent.DOM_VK_F3
|
|
701
|
+
*
|
|
702
|
+
*/
|
|
284
703
|
F3 = 114,
|
|
704
|
+
/**
|
|
705
|
+
* @remarks
|
|
706
|
+
* KeyboardEvent.DOM_VK_F4
|
|
707
|
+
*
|
|
708
|
+
*/
|
|
285
709
|
F4 = 115,
|
|
710
|
+
/**
|
|
711
|
+
* @remarks
|
|
712
|
+
* KeyboardEvent.DOM_VK_F5
|
|
713
|
+
*
|
|
714
|
+
*/
|
|
286
715
|
F5 = 116,
|
|
716
|
+
/**
|
|
717
|
+
* @remarks
|
|
718
|
+
* KeyboardEvent.DOM_VK_F6
|
|
719
|
+
*
|
|
720
|
+
*/
|
|
287
721
|
F6 = 117,
|
|
722
|
+
/**
|
|
723
|
+
* @remarks
|
|
724
|
+
* KeyboardEvent.DOM_VK_F7
|
|
725
|
+
*
|
|
726
|
+
*/
|
|
288
727
|
F7 = 118,
|
|
728
|
+
/**
|
|
729
|
+
* @remarks
|
|
730
|
+
* KeyboardEvent.DOM_VK_F8
|
|
731
|
+
*
|
|
732
|
+
*/
|
|
289
733
|
F8 = 119,
|
|
734
|
+
/**
|
|
735
|
+
* @remarks
|
|
736
|
+
* KeyboardEvent.DOM_VK_F9
|
|
737
|
+
*
|
|
738
|
+
*/
|
|
290
739
|
F9 = 120,
|
|
740
|
+
/**
|
|
741
|
+
* @remarks
|
|
742
|
+
* KeyboardEvent.DOM_VK_F10
|
|
743
|
+
*
|
|
744
|
+
*/
|
|
291
745
|
F10 = 121,
|
|
746
|
+
/**
|
|
747
|
+
* @remarks
|
|
748
|
+
* KeyboardEvent.DOM_VK_F11
|
|
749
|
+
*
|
|
750
|
+
*/
|
|
292
751
|
F11 = 122,
|
|
752
|
+
/**
|
|
753
|
+
* @remarks
|
|
754
|
+
* KeyboardEvent.DOM_VK_F12
|
|
755
|
+
*
|
|
756
|
+
*/
|
|
293
757
|
F12 = 123,
|
|
758
|
+
/**
|
|
759
|
+
* @remarks
|
|
760
|
+
* KeyboardEvent.DOM_VK_COMMA, ie. ','
|
|
761
|
+
*
|
|
762
|
+
*/
|
|
294
763
|
COMMA = 188,
|
|
764
|
+
/**
|
|
765
|
+
* @remarks
|
|
766
|
+
* KeyboardEvent.DOM_VK_PERIOD, ie. '.'
|
|
767
|
+
*
|
|
768
|
+
*/
|
|
295
769
|
PERIOD = 190,
|
|
770
|
+
/**
|
|
771
|
+
* @remarks
|
|
772
|
+
* KeyboardEvent.DOM_VK_SLASH, ie. '/'
|
|
773
|
+
*
|
|
774
|
+
*/
|
|
296
775
|
SLASH = 191,
|
|
776
|
+
/**
|
|
777
|
+
* @remarks
|
|
778
|
+
* KeyboardEvent.DOM_VK_BACK_QUOTE, ie. '`'
|
|
779
|
+
*
|
|
780
|
+
*/
|
|
297
781
|
BACK_QUOTE = 192,
|
|
782
|
+
/**
|
|
783
|
+
* @remarks
|
|
784
|
+
* KeyboardEvent.DOM_VK_OPEN_BRACKET, ie. '['
|
|
785
|
+
*
|
|
786
|
+
*/
|
|
298
787
|
BRACKET_OPEN = 219,
|
|
299
|
-
BACK_SLASH = 220,
|
|
300
|
-
BRACKET_CLOSE = 221,
|
|
301
|
-
QUOTE = 222,
|
|
302
|
-
}
|
|
303
|
-
|
|
304
|
-
/**
|
|
305
|
-
* Keyboard Key Actions
|
|
306
|
-
*/
|
|
307
|
-
export declare enum KeyInputType {
|
|
308
788
|
/**
|
|
309
789
|
* @remarks
|
|
310
|
-
*
|
|
790
|
+
* KeyboardEvent.DOM_VK_BACK_SLASH, ie. '\'
|
|
791
|
+
*
|
|
792
|
+
*/
|
|
793
|
+
BACK_SLASH = 220,
|
|
794
|
+
/**
|
|
795
|
+
* @remarks
|
|
796
|
+
* KeyboardEvent.DOM_VK_CLOSE_BRACKET, ie. ']'
|
|
311
797
|
*
|
|
312
798
|
*/
|
|
313
|
-
|
|
799
|
+
BRACKET_CLOSE = 221,
|
|
314
800
|
/**
|
|
315
801
|
* @remarks
|
|
316
|
-
*
|
|
802
|
+
* KeyboardEvent.DOM_VK_BACK_QUOTE, ie. '"'
|
|
317
803
|
*
|
|
318
804
|
*/
|
|
319
|
-
|
|
805
|
+
QUOTE = 222,
|
|
320
806
|
}
|
|
321
807
|
|
|
322
808
|
/**
|
|
@@ -374,6 +860,13 @@ export declare enum MouseInputType {
|
|
|
374
860
|
DragEnd = 7,
|
|
375
861
|
}
|
|
376
862
|
|
|
863
|
+
export enum PlayerPermissionLevel {
|
|
864
|
+
Visitor = 0,
|
|
865
|
+
Member = 1,
|
|
866
|
+
Operator = 2,
|
|
867
|
+
Custom = 3,
|
|
868
|
+
}
|
|
869
|
+
|
|
377
870
|
export enum PlaytestSessionResult {
|
|
378
871
|
OK = 0,
|
|
379
872
|
InvalidSessionHandle = 1,
|
|
@@ -459,6 +952,13 @@ export type IActionPropertyItem<T extends PropertyBag, Prop extends keyof T & st
|
|
|
459
952
|
replaceBoundAction(action: RegisteredAction<NoArgsAction> | undefined): void;
|
|
460
953
|
};
|
|
461
954
|
|
|
955
|
+
/**
|
|
956
|
+
* A property item which supports BlockList properties
|
|
957
|
+
*/
|
|
958
|
+
export type IBlockListPropertyItem<T extends PropertyBag, Prop extends keyof T & string> = IPropertyItem<T, Prop> & {
|
|
959
|
+
updateBlockList(newBlockList: string[]): void;
|
|
960
|
+
};
|
|
961
|
+
|
|
462
962
|
/**
|
|
463
963
|
* A property item which supports Dropdown properties
|
|
464
964
|
*/
|
|
@@ -488,6 +988,7 @@ export type IPlayerUISession<PerPlayerStorage = Record<string, never>> = {
|
|
|
488
988
|
readonly actionManager: ActionManager;
|
|
489
989
|
readonly inputManager: IGlobalInputManager;
|
|
490
990
|
readonly menuBar: IMenuContainer;
|
|
991
|
+
readonly actionBar: IActionBar;
|
|
491
992
|
readonly toolRail: IModalToolContainer;
|
|
492
993
|
readonly log: IPlayerLogger;
|
|
493
994
|
readonly extensionContext: ExtensionContext;
|
|
@@ -519,6 +1020,23 @@ export type IVector3PropertyItem<T extends PropertyBag, Prop extends keyof T & s
|
|
|
519
1020
|
}): void;
|
|
520
1021
|
};
|
|
521
1022
|
|
|
1023
|
+
/**
|
|
1024
|
+
* Keyboard binding properties.
|
|
1025
|
+
*/
|
|
1026
|
+
export type KeyBinding = {
|
|
1027
|
+
key: KeyboardKey;
|
|
1028
|
+
modifier?: InputModifier;
|
|
1029
|
+
};
|
|
1030
|
+
|
|
1031
|
+
/**
|
|
1032
|
+
* Additional information about key binding.
|
|
1033
|
+
*/
|
|
1034
|
+
export type KeyBindingInfo = {
|
|
1035
|
+
uniqueId: string;
|
|
1036
|
+
label?: string;
|
|
1037
|
+
tooltip?: string;
|
|
1038
|
+
};
|
|
1039
|
+
|
|
522
1040
|
/**
|
|
523
1041
|
* Modal tool lifecycle event payload
|
|
524
1042
|
*/
|
|
@@ -699,17 +1217,52 @@ export class BlockPalette {
|
|
|
699
1217
|
|
|
700
1218
|
export class BlockPaletteManager {
|
|
701
1219
|
private constructor();
|
|
1220
|
+
/**
|
|
1221
|
+
* @remarks
|
|
1222
|
+
* This function can't be called in read-only mode.
|
|
1223
|
+
*
|
|
1224
|
+
*/
|
|
1225
|
+
addOrReplacePalette(paletteId: string, palette: BlockPalette): void;
|
|
1226
|
+
getPalette(paletteId: string): BlockPalette | undefined;
|
|
1227
|
+
getPaletteIdList(): string[];
|
|
1228
|
+
/**
|
|
1229
|
+
* @throws This function can throw errors.
|
|
1230
|
+
*/
|
|
1231
|
+
getPaletteItem(paletteId: string, index: number): IBlockPaletteItem;
|
|
1232
|
+
getPrimaryPalette(): BlockPalette;
|
|
702
1233
|
/**
|
|
703
1234
|
* @throws This function can throw errors.
|
|
704
1235
|
*/
|
|
705
1236
|
getSelectedBlockType(): minecraftserver.BlockType;
|
|
1237
|
+
getSelectedItem(): IBlockPaletteItem;
|
|
1238
|
+
/**
|
|
1239
|
+
* @remarks
|
|
1240
|
+
* This function can't be called in read-only mode.
|
|
1241
|
+
*
|
|
1242
|
+
* @throws This function can throw errors.
|
|
1243
|
+
*/
|
|
1244
|
+
removePalette(paletteId: string): void;
|
|
706
1245
|
/**
|
|
707
1246
|
* @remarks
|
|
708
1247
|
* This function can't be called in read-only mode.
|
|
709
1248
|
*
|
|
710
1249
|
* @throws This function can throw errors.
|
|
711
1250
|
*/
|
|
712
|
-
|
|
1251
|
+
setPaletteItem(paletteId: string, index: number, item: IBlockPaletteItem): void;
|
|
1252
|
+
/**
|
|
1253
|
+
* @remarks
|
|
1254
|
+
* This function can't be called in read-only mode.
|
|
1255
|
+
*
|
|
1256
|
+
* @throws This function can throw errors.
|
|
1257
|
+
*/
|
|
1258
|
+
setPrimaryPalette(paletteId: string): void;
|
|
1259
|
+
/**
|
|
1260
|
+
* @remarks
|
|
1261
|
+
* This function can't be called in read-only mode.
|
|
1262
|
+
*
|
|
1263
|
+
* @throws This function can throw errors.
|
|
1264
|
+
*/
|
|
1265
|
+
setSelectedItem(item: IBlockPaletteItem): void;
|
|
713
1266
|
}
|
|
714
1267
|
|
|
715
1268
|
export class BrushShapeManager {
|
|
@@ -724,6 +1277,15 @@ export class BrushShapeManager {
|
|
|
724
1277
|
* @throws This function can throw errors.
|
|
725
1278
|
*/
|
|
726
1279
|
activateBrushShape(name: string): minecraftserver.CompoundBlockVolume;
|
|
1280
|
+
/**
|
|
1281
|
+
* @remarks
|
|
1282
|
+
* This function can't be called in read-only mode.
|
|
1283
|
+
*
|
|
1284
|
+
*/
|
|
1285
|
+
getBrushVolume(
|
|
1286
|
+
origin: minecraftserver.Vector3,
|
|
1287
|
+
pipeline: BrushPipelineOperation[],
|
|
1288
|
+
): minecraftserver.CompoundBlockVolume | undefined;
|
|
727
1289
|
/**
|
|
728
1290
|
* @remarks
|
|
729
1291
|
* This function can't be called in read-only mode.
|
|
@@ -752,6 +1314,28 @@ export class BrushShapeManager {
|
|
|
752
1314
|
uiSettingValueChanged(elementName: string, newValue: boolean | number | string | minecraftserver.Vector3): boolean;
|
|
753
1315
|
}
|
|
754
1316
|
|
|
1317
|
+
export class ClipboardChangeAfterEvent {
|
|
1318
|
+
private constructor();
|
|
1319
|
+
readonly isPrimary: boolean;
|
|
1320
|
+
readonly itemId: string;
|
|
1321
|
+
}
|
|
1322
|
+
|
|
1323
|
+
export class ClipboardChangeAfterEventSignal {
|
|
1324
|
+
private constructor();
|
|
1325
|
+
/**
|
|
1326
|
+
* @remarks
|
|
1327
|
+
* This function can't be called in read-only mode.
|
|
1328
|
+
*
|
|
1329
|
+
*/
|
|
1330
|
+
subscribe(callback: (arg: ClipboardChangeAfterEvent) => void): (arg: ClipboardChangeAfterEvent) => void;
|
|
1331
|
+
/**
|
|
1332
|
+
* @remarks
|
|
1333
|
+
* This function can't be called in read-only mode.
|
|
1334
|
+
*
|
|
1335
|
+
*/
|
|
1336
|
+
unsubscribe(callback: (arg: ClipboardChangeAfterEvent) => void): void;
|
|
1337
|
+
}
|
|
1338
|
+
|
|
755
1339
|
/**
|
|
756
1340
|
* A ClipboardItem is a handle to an object which represents a
|
|
757
1341
|
* set of blocks in a contained bounding area (most likely
|
|
@@ -966,6 +1550,27 @@ export class Cursor {
|
|
|
966
1550
|
* @throws This property can throw when used.
|
|
967
1551
|
*/
|
|
968
1552
|
readonly isVisible: boolean;
|
|
1553
|
+
/**
|
|
1554
|
+
* @remarks
|
|
1555
|
+
* This function can't be called in read-only mode.
|
|
1556
|
+
*
|
|
1557
|
+
* @throws This function can throw errors.
|
|
1558
|
+
*/
|
|
1559
|
+
attachClipboardItem(item: ClipboardItem): void;
|
|
1560
|
+
/**
|
|
1561
|
+
* @remarks
|
|
1562
|
+
* This function can't be called in read-only mode.
|
|
1563
|
+
*
|
|
1564
|
+
* @throws This function can throw errors.
|
|
1565
|
+
*/
|
|
1566
|
+
clearAttachment(): void;
|
|
1567
|
+
/**
|
|
1568
|
+
* @remarks
|
|
1569
|
+
* This function can't be called in read-only mode.
|
|
1570
|
+
*
|
|
1571
|
+
* @throws This function can throw errors.
|
|
1572
|
+
*/
|
|
1573
|
+
getAttachmentProperties(): CursorAttachmentProperties;
|
|
969
1574
|
/**
|
|
970
1575
|
* @remarks
|
|
971
1576
|
* Get the world position of the 3D block cursor
|
|
@@ -988,8 +1593,7 @@ export class Cursor {
|
|
|
988
1593
|
/**
|
|
989
1594
|
* @remarks
|
|
990
1595
|
* Hide the 3D block cursor from view until the corresponding
|
|
991
|
-
* {@link
|
|
992
|
-
* called
|
|
1596
|
+
* {@link Cursor.show} function is called
|
|
993
1597
|
*
|
|
994
1598
|
* This function can't be called in read-only mode.
|
|
995
1599
|
*
|
|
@@ -999,9 +1603,8 @@ export class Cursor {
|
|
|
999
1603
|
/**
|
|
1000
1604
|
* @remarks
|
|
1001
1605
|
* Manually offset the 3D block cursor by given amount.
|
|
1002
|
-
* Depending on the {@link
|
|
1003
|
-
*
|
|
1004
|
-
* - this function may have no effect
|
|
1606
|
+
* Depending on the {@link CursorProperties.controlMode} - this
|
|
1607
|
+
* function may have no effect
|
|
1005
1608
|
*
|
|
1006
1609
|
* This function can't be called in read-only mode.
|
|
1007
1610
|
*
|
|
@@ -1022,6 +1625,13 @@ export class Cursor {
|
|
|
1022
1625
|
* @throws This function can throw errors.
|
|
1023
1626
|
*/
|
|
1024
1627
|
resetToDefaultState(): void;
|
|
1628
|
+
/**
|
|
1629
|
+
* @remarks
|
|
1630
|
+
* This function can't be called in read-only mode.
|
|
1631
|
+
*
|
|
1632
|
+
* @throws This function can throw errors.
|
|
1633
|
+
*/
|
|
1634
|
+
setAttachmentProperties(properties: CursorAttachmentProperties): void;
|
|
1025
1635
|
/**
|
|
1026
1636
|
* @remarks
|
|
1027
1637
|
* Set the 3D block cursor properties to a given state
|
|
@@ -1045,6 +1655,29 @@ export class Cursor {
|
|
|
1045
1655
|
show(): void;
|
|
1046
1656
|
}
|
|
1047
1657
|
|
|
1658
|
+
export class CursorAttachmentPropertiesChangeAfterEvent {
|
|
1659
|
+
private constructor();
|
|
1660
|
+
readonly properties: CursorAttachmentProperties;
|
|
1661
|
+
}
|
|
1662
|
+
|
|
1663
|
+
export class CursorAttachmentPropertyChangeAfterEventSignal {
|
|
1664
|
+
private constructor();
|
|
1665
|
+
/**
|
|
1666
|
+
* @remarks
|
|
1667
|
+
* This function can't be called in read-only mode.
|
|
1668
|
+
*
|
|
1669
|
+
*/
|
|
1670
|
+
subscribe(
|
|
1671
|
+
callback: (arg: CursorAttachmentPropertiesChangeAfterEvent) => void,
|
|
1672
|
+
): (arg: CursorAttachmentPropertiesChangeAfterEvent) => void;
|
|
1673
|
+
/**
|
|
1674
|
+
* @remarks
|
|
1675
|
+
* This function can't be called in read-only mode.
|
|
1676
|
+
*
|
|
1677
|
+
*/
|
|
1678
|
+
unsubscribe(callback: (arg: CursorAttachmentPropertiesChangeAfterEvent) => void): void;
|
|
1679
|
+
}
|
|
1680
|
+
|
|
1048
1681
|
export class CursorPropertiesChangeAfterEvent {
|
|
1049
1682
|
private constructor();
|
|
1050
1683
|
readonly properties: CursorProperties;
|
|
@@ -1105,7 +1738,7 @@ export class ExportManager {
|
|
|
1105
1738
|
*
|
|
1106
1739
|
* @throws This function can throw errors.
|
|
1107
1740
|
*/
|
|
1108
|
-
beginExportProject(options:
|
|
1741
|
+
beginExportProject(options: GameOptions): Promise<ExportResult>;
|
|
1109
1742
|
/**
|
|
1110
1743
|
* @remarks
|
|
1111
1744
|
* This function can't be called in read-only mode.
|
|
@@ -1113,6 +1746,21 @@ export class ExportManager {
|
|
|
1113
1746
|
* @throws This function can throw errors.
|
|
1114
1747
|
*/
|
|
1115
1748
|
canExportProject(): boolean;
|
|
1749
|
+
/**
|
|
1750
|
+
* @remarks
|
|
1751
|
+
* This function can't be called in read-only mode.
|
|
1752
|
+
*
|
|
1753
|
+
*/
|
|
1754
|
+
getGameOptions(useDefault?: boolean): GameOptions;
|
|
1755
|
+
/**
|
|
1756
|
+
* @remarks
|
|
1757
|
+
* This function can't be called in read-only mode.
|
|
1758
|
+
*
|
|
1759
|
+
* @throws This function can throw errors.
|
|
1760
|
+
*
|
|
1761
|
+
* {@link Error}
|
|
1762
|
+
*/
|
|
1763
|
+
getGameVersion(): string;
|
|
1116
1764
|
}
|
|
1117
1765
|
|
|
1118
1766
|
/**
|
|
@@ -1249,6 +1897,8 @@ export class ExtensionContext {
|
|
|
1249
1897
|
*/
|
|
1250
1898
|
export class ExtensionContextAfterEvents {
|
|
1251
1899
|
private constructor();
|
|
1900
|
+
readonly clipboardChange: ClipboardChangeAfterEventSignal;
|
|
1901
|
+
readonly cursorAttachmentPropertyChange: CursorAttachmentPropertyChangeAfterEventSignal;
|
|
1252
1902
|
readonly cursorPropertyChange: CursorPropertyChangeAfterEventSignal;
|
|
1253
1903
|
/**
|
|
1254
1904
|
* @remarks
|
|
@@ -1474,7 +2124,7 @@ export class PlaytestManager {
|
|
|
1474
2124
|
*
|
|
1475
2125
|
* @throws This function can throw errors.
|
|
1476
2126
|
*/
|
|
1477
|
-
beginPlaytest(options:
|
|
2127
|
+
beginPlaytest(options: GameOptions): Promise<PlaytestSessionResult>;
|
|
1478
2128
|
/**
|
|
1479
2129
|
* @remarks
|
|
1480
2130
|
* This function can't be called in read-only mode.
|
|
@@ -1670,7 +2320,7 @@ export class Selection {
|
|
|
1670
2320
|
*
|
|
1671
2321
|
* @param forceRelativity
|
|
1672
2322
|
* See the description for {@link
|
|
1673
|
-
* @minecraft
|
|
2323
|
+
* @minecraft/server.CompoundBlockVolume.peekLastVolume}
|
|
1674
2324
|
* @returns
|
|
1675
2325
|
* Returns undefined if the stack is empty
|
|
1676
2326
|
*/
|
|
@@ -1710,12 +2360,12 @@ export class Selection {
|
|
|
1710
2360
|
* This function can't be called in read-only mode.
|
|
1711
2361
|
*
|
|
1712
2362
|
* @param other
|
|
1713
|
-
* {@link @minecraft
|
|
2363
|
+
* {@link @minecraft/server.CompoundBlockVolume} - set the
|
|
1714
2364
|
* block component part of this selection to the specified
|
|
1715
2365
|
* compound block volume. This will completely replace all
|
|
1716
2366
|
* block volume definitions in the selection.
|
|
1717
|
-
* {@link
|
|
1718
|
-
*
|
|
2367
|
+
* {@link Selection} - replace the selection with the specified
|
|
2368
|
+
* selection
|
|
1719
2369
|
* @throws This function can throw errors.
|
|
1720
2370
|
*/
|
|
1721
2371
|
set(other: minecraftserver.CompoundBlockVolume | Selection): void;
|
|
@@ -1794,18 +2444,14 @@ export class SettingsManager {
|
|
|
1794
2444
|
|
|
1795
2445
|
export class SettingsUIElement {
|
|
1796
2446
|
readonly initialValue: boolean | number | string | minecraftserver.Vector3;
|
|
1797
|
-
readonly max?: number;
|
|
1798
|
-
readonly min?: number;
|
|
1799
2447
|
readonly name: string;
|
|
1800
|
-
readonly onChange: (arg: boolean | number | string | minecraftserver.Vector3) =>
|
|
1801
|
-
readonly options
|
|
2448
|
+
readonly onChange: (arg: boolean | number | string | minecraftserver.Vector3) => void;
|
|
2449
|
+
readonly options: SettingsUIElementOptions;
|
|
1802
2450
|
constructor(
|
|
1803
2451
|
name: string,
|
|
1804
2452
|
initialValue: boolean | number | string | minecraftserver.Vector3,
|
|
1805
|
-
onChange: (arg: boolean | number | string | minecraftserver.Vector3) =>
|
|
1806
|
-
|
|
1807
|
-
max?: number,
|
|
1808
|
-
options?: string[],
|
|
2453
|
+
onChange: (arg: boolean | number | string | minecraftserver.Vector3) => void,
|
|
2454
|
+
options?: SettingsUIElementOptions,
|
|
1809
2455
|
);
|
|
1810
2456
|
}
|
|
1811
2457
|
|
|
@@ -1821,9 +2467,37 @@ export class SimpleBlockPaletteItem extends IBlockPaletteItem {
|
|
|
1821
2467
|
* how to use this class and the wrapper framework
|
|
1822
2468
|
*/
|
|
1823
2469
|
export declare class SimpleToolWrapper implements IDisposable {
|
|
2470
|
+
/**
|
|
2471
|
+
* @remarks
|
|
2472
|
+
* The player UI session that the tool is running in Use this
|
|
2473
|
+
* to access the player UI session, or any of the session's
|
|
2474
|
+
* components
|
|
2475
|
+
*
|
|
2476
|
+
*/
|
|
1824
2477
|
get session(): IPlayerUISession;
|
|
2478
|
+
/**
|
|
2479
|
+
* @remarks
|
|
2480
|
+
* The simple tool instance that is created and managed by the
|
|
2481
|
+
* wrapper Use this to access any of the tools components, or
|
|
2482
|
+
* mess with the tools window visibility
|
|
2483
|
+
*
|
|
2484
|
+
*/
|
|
1825
2485
|
get simpleTool(): ISimpleTool;
|
|
2486
|
+
/**
|
|
2487
|
+
* @remarks
|
|
2488
|
+
* Setup the simple tool instance with the given options This
|
|
2489
|
+
* will create and initialize the simple tool instance
|
|
2490
|
+
*
|
|
2491
|
+
*/
|
|
1826
2492
|
setupSimpleTool(session: IPlayerUISession, options: ISimpleToolOptions): void;
|
|
2493
|
+
/**
|
|
2494
|
+
* @remarks
|
|
2495
|
+
* Teardown the simple tool instance This will call the
|
|
2496
|
+
* teardown function on the simple tool instance This function
|
|
2497
|
+
* is automatically invoked by the Editor Extension system when
|
|
2498
|
+
* the editor is shutting down
|
|
2499
|
+
*
|
|
2500
|
+
*/
|
|
1827
2501
|
teardown(): void;
|
|
1828
2502
|
}
|
|
1829
2503
|
|
|
@@ -1865,6 +2539,15 @@ export class SimulationState {
|
|
|
1865
2539
|
*/
|
|
1866
2540
|
export class TransactionManager {
|
|
1867
2541
|
private constructor();
|
|
2542
|
+
/**
|
|
2543
|
+
* @remarks
|
|
2544
|
+
* This function can't be called in read-only mode.
|
|
2545
|
+
*
|
|
2546
|
+
* @throws This function can throw errors.
|
|
2547
|
+
*
|
|
2548
|
+
* {@link Error}
|
|
2549
|
+
*/
|
|
2550
|
+
addEntityOperation(entity: minecraftserver.Entity, type: EntityOperationType): boolean;
|
|
1868
2551
|
/**
|
|
1869
2552
|
* @remarks
|
|
1870
2553
|
* This function can't be called in read-only mode.
|
|
@@ -2000,7 +2683,7 @@ export class TransactionManager {
|
|
|
2000
2683
|
/**
|
|
2001
2684
|
* @remarks
|
|
2002
2685
|
* Begin tracking block changes in an area defined by a {@link
|
|
2003
|
-
* @minecraft
|
|
2686
|
+
* @minecraft/server.CompoundBlockVolume}. These will be added
|
|
2004
2687
|
* to a pending changes list.
|
|
2005
2688
|
* The pending list will be added to the open transaction
|
|
2006
2689
|
* record when a commit has been issued.
|
|
@@ -2008,7 +2691,7 @@ export class TransactionManager {
|
|
|
2008
2691
|
* This function can't be called in read-only mode.
|
|
2009
2692
|
*
|
|
2010
2693
|
* @param compoundBlockVolume
|
|
2011
|
-
* {@link @minecraft
|
|
2694
|
+
* {@link @minecraft/server.CompoundBlockVolume} to track.
|
|
2012
2695
|
* Only non-void block locations will be tracked -- any changes
|
|
2013
2696
|
* falling into a void/negative space will not be tracked
|
|
2014
2697
|
* @throws This function can throw errors.
|
|
@@ -2036,7 +2719,7 @@ export class TransactionManager {
|
|
|
2036
2719
|
* Selection Volumes can also represent irregular shapes with
|
|
2037
2720
|
* non-contiguous blocks and this tracking call will honor the
|
|
2038
2721
|
* actual selected areas in the volume (and not the negative
|
|
2039
|
-
* space) (see {@link @minecraft
|
|
2722
|
+
* space) (see {@link @minecraft/server.CompoundBlockVolume}
|
|
2040
2723
|
* for more details
|
|
2041
2724
|
*
|
|
2042
2725
|
* This function can't be called in read-only mode.
|
|
@@ -2238,6 +2921,11 @@ export class WidgetStateChangeEventData {
|
|
|
2238
2921
|
readonly widget: Widget;
|
|
2239
2922
|
}
|
|
2240
2923
|
|
|
2924
|
+
export interface BrushPipelineOperation {
|
|
2925
|
+
blockTypes: minecraftserver.BlockType[];
|
|
2926
|
+
operation: BrushPipelineOperationType;
|
|
2927
|
+
}
|
|
2928
|
+
|
|
2241
2929
|
export interface BrushShape {
|
|
2242
2930
|
icon: string;
|
|
2243
2931
|
name: string;
|
|
@@ -2289,6 +2977,18 @@ export interface ClipboardWriteOptions {
|
|
|
2289
2977
|
rotation?: minecraftserver.StructureRotation;
|
|
2290
2978
|
}
|
|
2291
2979
|
|
|
2980
|
+
export interface CursorAttachmentProperties {
|
|
2981
|
+
boundsFillColor?: minecraftserver.RGBA;
|
|
2982
|
+
boundsVisible?: boolean;
|
|
2983
|
+
boundsWireframeColor?: minecraftserver.RGBA;
|
|
2984
|
+
contentsFillColor?: minecraftserver.RGBA;
|
|
2985
|
+
contentsWireframeColor?: minecraftserver.RGBA;
|
|
2986
|
+
mirror?: minecraftserver.StructureMirrorAxis;
|
|
2987
|
+
offset?: minecraftserver.Vector3;
|
|
2988
|
+
origin?: minecraftserver.Vector3;
|
|
2989
|
+
rotation?: minecraftserver.StructureRotation;
|
|
2990
|
+
}
|
|
2991
|
+
|
|
2292
2992
|
/**
|
|
2293
2993
|
* The CursorProperties interface is used to describe the
|
|
2294
2994
|
* properties of the Editor 3D block cursor construct.
|
|
@@ -2322,6 +3022,7 @@ export interface CursorProperties {
|
|
|
2322
3022
|
*
|
|
2323
3023
|
*/
|
|
2324
3024
|
controlMode?: CursorControlMode;
|
|
3025
|
+
fillColor?: minecraftserver.RGBA;
|
|
2325
3026
|
/**
|
|
2326
3027
|
* @remarks
|
|
2327
3028
|
* The fixed distance from the players feet at which the cursor
|
|
@@ -2407,6 +3108,46 @@ export interface ExtensionOptionalParameters {
|
|
|
2407
3108
|
toolGroupId?: string;
|
|
2408
3109
|
}
|
|
2409
3110
|
|
|
3111
|
+
export interface GameOptions {
|
|
3112
|
+
bonusChest?: boolean;
|
|
3113
|
+
cheats?: boolean;
|
|
3114
|
+
commandBlockEnabled?: boolean;
|
|
3115
|
+
daylightCycle?: DaylightCycle;
|
|
3116
|
+
difficulty?: minecraftserver.Difficulty;
|
|
3117
|
+
dimensionId?: string;
|
|
3118
|
+
disableWeather?: boolean;
|
|
3119
|
+
educationEdition?: boolean;
|
|
3120
|
+
entitiesDropLoot?: boolean;
|
|
3121
|
+
exportType?: ProjectExportType;
|
|
3122
|
+
fireSpreads?: boolean;
|
|
3123
|
+
friendlyFire?: boolean;
|
|
3124
|
+
gameMode?: minecraftserver.GameMode;
|
|
3125
|
+
immediateRespawn?: boolean;
|
|
3126
|
+
keepInventory?: boolean;
|
|
3127
|
+
lanVisibility?: boolean;
|
|
3128
|
+
mobGriefing?: boolean;
|
|
3129
|
+
mobLoot?: boolean;
|
|
3130
|
+
mobSpawning?: boolean;
|
|
3131
|
+
multiplayerGame?: boolean;
|
|
3132
|
+
naturalRegeneration?: boolean;
|
|
3133
|
+
playerAccess?: GamePublishSetting;
|
|
3134
|
+
playerPermissions?: PlayerPermissionLevel;
|
|
3135
|
+
randomTickSpeed?: number;
|
|
3136
|
+
recipeUnlocking?: boolean;
|
|
3137
|
+
respawnBlocksExplode?: boolean;
|
|
3138
|
+
respawnRadius?: number;
|
|
3139
|
+
showCoordinates?: boolean;
|
|
3140
|
+
showDaysPlayed?: boolean;
|
|
3141
|
+
simulationDistance?: number;
|
|
3142
|
+
spawnPosition?: minecraftserver.Vector3;
|
|
3143
|
+
startingMap?: boolean;
|
|
3144
|
+
tileDrops?: boolean;
|
|
3145
|
+
timeOfDay?: number;
|
|
3146
|
+
tntExplodes?: boolean;
|
|
3147
|
+
weather?: number;
|
|
3148
|
+
worldName?: string;
|
|
3149
|
+
}
|
|
3150
|
+
|
|
2410
3151
|
/**
|
|
2411
3152
|
* A properties class for the global instance of the logger
|
|
2412
3153
|
* object.
|
|
@@ -2432,18 +3173,6 @@ export interface LogProperties {
|
|
|
2432
3173
|
tags?: string[];
|
|
2433
3174
|
}
|
|
2434
3175
|
|
|
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
3176
|
export interface ProjectExportOptions {
|
|
2448
3177
|
alwaysDay?: boolean;
|
|
2449
3178
|
difficulty?: minecraftserver.Difficulty;
|
|
@@ -2454,6 +3183,13 @@ export interface ProjectExportOptions {
|
|
|
2454
3183
|
initialTimOfDay?: number;
|
|
2455
3184
|
}
|
|
2456
3185
|
|
|
3186
|
+
export interface SettingsUIElementOptions {
|
|
3187
|
+
dropdownItems?: string[];
|
|
3188
|
+
max?: number;
|
|
3189
|
+
min?: number;
|
|
3190
|
+
refreshOnChange?: boolean;
|
|
3191
|
+
}
|
|
3192
|
+
|
|
2457
3193
|
export interface WidgetCreateOptions {
|
|
2458
3194
|
initialVisibility?: boolean;
|
|
2459
3195
|
isSelectable?: boolean;
|
|
@@ -2493,58 +3229,155 @@ export interface ActionManager {
|
|
|
2493
3229
|
export interface BuiltInUIManager {
|
|
2494
3230
|
/**
|
|
2495
3231
|
* @remarks
|
|
2496
|
-
* Navigates to the documentation site.
|
|
3232
|
+
* Navigates to the documentation site.
|
|
3233
|
+
*
|
|
3234
|
+
*/
|
|
3235
|
+
navigateToDocumentation(): void;
|
|
3236
|
+
/**
|
|
3237
|
+
* @remarks
|
|
3238
|
+
* Navigates to the feedback site
|
|
3239
|
+
*
|
|
3240
|
+
*/
|
|
3241
|
+
navigateToFeedback(): void;
|
|
3242
|
+
/**
|
|
3243
|
+
* @remarks
|
|
3244
|
+
* Navigates to the pause screen
|
|
3245
|
+
*
|
|
3246
|
+
*/
|
|
3247
|
+
navigateToPauseScreen(): void;
|
|
3248
|
+
/**
|
|
3249
|
+
* @remarks
|
|
3250
|
+
* Updates the visibility of the log panel
|
|
3251
|
+
*
|
|
3252
|
+
*/
|
|
3253
|
+
updateLogPanelVisibility(visibility: boolean): void;
|
|
3254
|
+
/**
|
|
3255
|
+
* @remarks
|
|
3256
|
+
* Updates the visibility of the control demo
|
|
3257
|
+
*
|
|
3258
|
+
*/
|
|
3259
|
+
updateUISettingsPanelVisibility(visibility: boolean): void;
|
|
3260
|
+
/**
|
|
3261
|
+
* @remarks
|
|
3262
|
+
* Updates the visibility of the welcome panel
|
|
3263
|
+
*
|
|
3264
|
+
*/
|
|
3265
|
+
updateWelcomePanelVisibility(visibility: boolean): void;
|
|
3266
|
+
}
|
|
3267
|
+
|
|
3268
|
+
/**
|
|
3269
|
+
* An event that can be subscribed to. You can use the token,
|
|
3270
|
+
* returned from the subscribe method, to clean up handlers.
|
|
3271
|
+
*/
|
|
3272
|
+
export declare interface EventSink<T> {
|
|
3273
|
+
/**
|
|
3274
|
+
* @remarks
|
|
3275
|
+
* Subscribes an event handler to a particular subscription.
|
|
3276
|
+
*
|
|
3277
|
+
* @param handler
|
|
3278
|
+
* Handler function to subscribe with.
|
|
3279
|
+
* @returns
|
|
3280
|
+
* An event handler subscription token that can be used to
|
|
3281
|
+
* unsubscribe and clean-up handlers.
|
|
3282
|
+
*/
|
|
3283
|
+
subscribe(handler: EventHandler<T>): IEventToken;
|
|
3284
|
+
}
|
|
3285
|
+
|
|
3286
|
+
/**
|
|
3287
|
+
* Manager for IActionBarItem objects.
|
|
3288
|
+
*/
|
|
3289
|
+
export interface IActionBar {
|
|
3290
|
+
/**
|
|
3291
|
+
* @remarks
|
|
3292
|
+
* Add a new action bar item to the collection.
|
|
3293
|
+
*
|
|
3294
|
+
* @param id
|
|
3295
|
+
* Unique item identifier.
|
|
3296
|
+
* @param action
|
|
3297
|
+
* Action to be invoked.
|
|
3298
|
+
* @param props
|
|
3299
|
+
* Configuration for the item to create.
|
|
3300
|
+
*/
|
|
3301
|
+
registerItem(
|
|
3302
|
+
id: string,
|
|
3303
|
+
action: RegisteredAction<NoArgsAction>,
|
|
3304
|
+
props: IActionBarItemCreationParams,
|
|
3305
|
+
): IActionBarItem;
|
|
3306
|
+
/**
|
|
3307
|
+
* @remarks
|
|
3308
|
+
* Remove an action item from the collection.
|
|
3309
|
+
*
|
|
3310
|
+
* @param id
|
|
3311
|
+
* Unique item identifier.
|
|
3312
|
+
*/
|
|
3313
|
+
unregisterItem(id: string): void;
|
|
3314
|
+
}
|
|
3315
|
+
|
|
3316
|
+
/**
|
|
3317
|
+
* Registered item handle in the Action Bar collection.
|
|
3318
|
+
*/
|
|
3319
|
+
export interface IActionBarItem {
|
|
3320
|
+
/**
|
|
3321
|
+
* @remarks
|
|
3322
|
+
* Returns the current enabled state of the item.
|
|
3323
|
+
*
|
|
3324
|
+
*/
|
|
3325
|
+
getEnabled: () => boolean;
|
|
3326
|
+
/**
|
|
3327
|
+
* @remarks
|
|
3328
|
+
* Unique identifier of the item.
|
|
3329
|
+
*
|
|
3330
|
+
*/
|
|
3331
|
+
readonly id: string;
|
|
3332
|
+
/**
|
|
3333
|
+
* @remarks
|
|
3334
|
+
* Text label of the item.
|
|
2497
3335
|
*
|
|
2498
3336
|
*/
|
|
2499
|
-
|
|
3337
|
+
readonly label: string;
|
|
2500
3338
|
/**
|
|
2501
3339
|
* @remarks
|
|
2502
|
-
*
|
|
3340
|
+
* Modify enabled state of the item.
|
|
2503
3341
|
*
|
|
2504
3342
|
*/
|
|
2505
|
-
|
|
3343
|
+
setEnabled: (enabled: boolean) => void;
|
|
3344
|
+
}
|
|
3345
|
+
|
|
3346
|
+
/**
|
|
3347
|
+
* Properties required to create an Action Bar item.
|
|
3348
|
+
*/
|
|
3349
|
+
export interface IActionBarItemCreationParams {
|
|
2506
3350
|
/**
|
|
2507
3351
|
* @remarks
|
|
2508
|
-
*
|
|
3352
|
+
* Initial enabled state of the item. If not defined, default
|
|
3353
|
+
* is true.
|
|
2509
3354
|
*
|
|
2510
3355
|
*/
|
|
2511
|
-
|
|
3356
|
+
enabled?: boolean;
|
|
2512
3357
|
/**
|
|
2513
3358
|
* @remarks
|
|
2514
|
-
*
|
|
3359
|
+
* Icon resource for the item.
|
|
2515
3360
|
*
|
|
2516
3361
|
*/
|
|
2517
|
-
|
|
3362
|
+
icon: string;
|
|
2518
3363
|
/**
|
|
2519
3364
|
* @remarks
|
|
2520
|
-
*
|
|
3365
|
+
* Text label for item.
|
|
2521
3366
|
*
|
|
2522
3367
|
*/
|
|
2523
|
-
|
|
3368
|
+
label: string;
|
|
2524
3369
|
/**
|
|
2525
3370
|
* @remarks
|
|
2526
|
-
*
|
|
3371
|
+
* Tooltip description for the item.
|
|
2527
3372
|
*
|
|
2528
3373
|
*/
|
|
2529
|
-
|
|
2530
|
-
}
|
|
2531
|
-
|
|
2532
|
-
/**
|
|
2533
|
-
* An event that can be subscribed to. You can use the token,
|
|
2534
|
-
* returned from the subscribe method, to clean up handlers.
|
|
2535
|
-
*/
|
|
2536
|
-
export declare interface EventSink<T> {
|
|
3374
|
+
tooltipDescription?: string;
|
|
2537
3375
|
/**
|
|
2538
3376
|
* @remarks
|
|
2539
|
-
*
|
|
3377
|
+
* Tooltip title for the item.
|
|
2540
3378
|
*
|
|
2541
|
-
* @param handler
|
|
2542
|
-
* Handler function to subscribe with.
|
|
2543
|
-
* @returns
|
|
2544
|
-
* An event handler subscription token that can be used to
|
|
2545
|
-
* unsubscribe and clean-up handlers.
|
|
2546
3379
|
*/
|
|
2547
|
-
|
|
3380
|
+
tooltipTitle?: string;
|
|
2548
3381
|
}
|
|
2549
3382
|
|
|
2550
3383
|
/**
|
|
@@ -2559,22 +3392,19 @@ export interface IDisposable {
|
|
|
2559
3392
|
teardown(): void;
|
|
2560
3393
|
}
|
|
2561
3394
|
|
|
3395
|
+
/**
|
|
3396
|
+
* Properties of dropdown property item children
|
|
3397
|
+
*/
|
|
2562
3398
|
export interface IDropdownItem {
|
|
2563
3399
|
/**
|
|
2564
3400
|
* @remarks
|
|
2565
|
-
*
|
|
2566
|
-
*
|
|
2567
|
-
*/
|
|
2568
|
-
readonly displayAltText: string;
|
|
2569
|
-
/**
|
|
2570
|
-
* @remarks
|
|
2571
|
-
* Loc ID (resolved on client)
|
|
3401
|
+
* Localized display text of the dropdown item.
|
|
2572
3402
|
*
|
|
2573
3403
|
*/
|
|
2574
|
-
readonly
|
|
3404
|
+
readonly label: string;
|
|
2575
3405
|
/**
|
|
2576
3406
|
* @remarks
|
|
2577
|
-
* The selectable value of the
|
|
3407
|
+
* The selectable value of the dropdown item.
|
|
2578
3408
|
*
|
|
2579
3409
|
*/
|
|
2580
3410
|
readonly value: number;
|
|
@@ -2611,8 +3441,8 @@ export interface IGlobalInputManager {
|
|
|
2611
3441
|
registerKeyBinding(
|
|
2612
3442
|
inputContextId: EditorInputContext,
|
|
2613
3443
|
action: SupportedKeyboardActionTypes,
|
|
2614
|
-
|
|
2615
|
-
|
|
3444
|
+
binding: KeyBinding,
|
|
3445
|
+
info?: KeyBindingInfo,
|
|
2616
3446
|
): void;
|
|
2617
3447
|
}
|
|
2618
3448
|
|
|
@@ -2624,6 +3454,12 @@ export interface IMenu {
|
|
|
2624
3454
|
*
|
|
2625
3455
|
*/
|
|
2626
3456
|
checked?: boolean;
|
|
3457
|
+
/**
|
|
3458
|
+
* @remarks
|
|
3459
|
+
* The menu will be in either an enabled or disabled state
|
|
3460
|
+
*
|
|
3461
|
+
*/
|
|
3462
|
+
enabled: boolean;
|
|
2627
3463
|
/**
|
|
2628
3464
|
* @remarks
|
|
2629
3465
|
* Unique ID for the menu
|
|
@@ -2678,16 +3514,16 @@ export interface IMenuCreationParams {
|
|
|
2678
3514
|
checked?: boolean;
|
|
2679
3515
|
/**
|
|
2680
3516
|
* @remarks
|
|
2681
|
-
*
|
|
3517
|
+
* Whether the menu should be enabled or disabled
|
|
2682
3518
|
*
|
|
2683
3519
|
*/
|
|
2684
|
-
|
|
3520
|
+
enabled?: boolean;
|
|
2685
3521
|
/**
|
|
2686
3522
|
* @remarks
|
|
2687
|
-
*
|
|
3523
|
+
* Localized display text of the menu
|
|
2688
3524
|
*
|
|
2689
3525
|
*/
|
|
2690
|
-
|
|
3526
|
+
label: string;
|
|
2691
3527
|
/**
|
|
2692
3528
|
* @remarks
|
|
2693
3529
|
* Custom unique identifier that will replace random id
|
|
@@ -2712,7 +3548,7 @@ export interface IModalTool {
|
|
|
2712
3548
|
bindPropertyPane(pane: IPropertyPane): void;
|
|
2713
3549
|
dispose(): void;
|
|
2714
3550
|
hide(): void;
|
|
2715
|
-
registerKeyBinding(action: SupportedKeyboardActionTypes,
|
|
3551
|
+
registerKeyBinding(action: SupportedKeyboardActionTypes, binding: KeyBinding, info?: KeyBindingInfo): void;
|
|
2716
3552
|
registerMouseButtonBinding(action: SupportedMouseActionTypes): void;
|
|
2717
3553
|
registerMouseDragBinding(action: SupportedMouseActionTypes): void;
|
|
2718
3554
|
registerMouseWheelBinding(action: SupportedMouseActionTypes): void;
|
|
@@ -2846,16 +3682,10 @@ export interface IPropertyItemOptions {
|
|
|
2846
3682
|
onChange?: OnChangeCallback<PropertyBag, string>;
|
|
2847
3683
|
/**
|
|
2848
3684
|
* @remarks
|
|
2849
|
-
*
|
|
2850
|
-
*
|
|
2851
|
-
*/
|
|
2852
|
-
titleAltText?: string;
|
|
2853
|
-
/**
|
|
2854
|
-
* @remarks
|
|
2855
|
-
* Loc ID (resolved on client)
|
|
3685
|
+
* Localized title of the property item
|
|
2856
3686
|
*
|
|
2857
3687
|
*/
|
|
2858
|
-
|
|
3688
|
+
title?: string;
|
|
2859
3689
|
/**
|
|
2860
3690
|
* @remarks
|
|
2861
3691
|
* If the item should be visible in the UI.
|
|
@@ -2864,6 +3694,11 @@ export interface IPropertyItemOptions {
|
|
|
2864
3694
|
visible?: boolean;
|
|
2865
3695
|
}
|
|
2866
3696
|
|
|
3697
|
+
// @ts-ignore Class inheritance allowed for native defined classes
|
|
3698
|
+
export interface IPropertyItemOptionsBlockList extends IPropertyItemOptions {
|
|
3699
|
+
blockList: string[];
|
|
3700
|
+
}
|
|
3701
|
+
|
|
2867
3702
|
// @ts-ignore Class inheritance allowed for native defined classes
|
|
2868
3703
|
export interface IPropertyItemOptionsBool extends IPropertyItemOptions {
|
|
2869
3704
|
/**
|
|
@@ -2885,6 +3720,12 @@ export interface IPropertyItemOptionsButton extends IPropertyItemOptions {
|
|
|
2885
3720
|
variant?: ButtonVariant;
|
|
2886
3721
|
}
|
|
2887
3722
|
|
|
3723
|
+
// @ts-ignore Class inheritance allowed for native defined classes
|
|
3724
|
+
export interface IPropertyItemOptionsColorPicker extends IPropertyItemOptions {
|
|
3725
|
+
showAlpha?: boolean;
|
|
3726
|
+
variant?: ColorPickerVariant;
|
|
3727
|
+
}
|
|
3728
|
+
|
|
2888
3729
|
// @ts-ignore Class inheritance allowed for native defined classes
|
|
2889
3730
|
export interface IPropertyItemOptionsDataPicker extends IPropertyItemOptions {
|
|
2890
3731
|
/**
|
|
@@ -2913,6 +3754,13 @@ export interface IPropertyItemOptionsImage extends IPropertyItemOptions {
|
|
|
2913
3754
|
|
|
2914
3755
|
// @ts-ignore Class inheritance allowed for native defined classes
|
|
2915
3756
|
export interface IPropertyItemOptionsNumber extends IPropertyItemOptions {
|
|
3757
|
+
/**
|
|
3758
|
+
* @remarks
|
|
3759
|
+
* If we should treat the number as floating point. By default
|
|
3760
|
+
* is false
|
|
3761
|
+
*
|
|
3762
|
+
*/
|
|
3763
|
+
isFloat?: boolean;
|
|
2916
3764
|
/**
|
|
2917
3765
|
* @remarks
|
|
2918
3766
|
* The min possible value for the number.
|
|
@@ -2955,8 +3803,8 @@ export interface IPropertyItemOptionsTable extends IPropertyItemOptions {
|
|
|
2955
3803
|
*/
|
|
2956
3804
|
// @ts-ignore Class inheritance allowed for native defined classes
|
|
2957
3805
|
export interface IPropertyItemOptionsText extends IPropertyItemOptions {
|
|
2958
|
-
border
|
|
2959
|
-
valueStringId
|
|
3806
|
+
border?: boolean;
|
|
3807
|
+
valueStringId?: string;
|
|
2960
3808
|
}
|
|
2961
3809
|
|
|
2962
3810
|
// @ts-ignore Class inheritance allowed for native defined classes
|
|
@@ -3037,16 +3885,10 @@ export interface IPropertyPane {
|
|
|
3037
3885
|
readonly parentPaneId?: string;
|
|
3038
3886
|
/**
|
|
3039
3887
|
* @remarks
|
|
3040
|
-
*
|
|
3041
|
-
*
|
|
3042
|
-
*/
|
|
3043
|
-
titleAltText: string;
|
|
3044
|
-
/**
|
|
3045
|
-
* @remarks
|
|
3046
|
-
* Loc ID (resolved on client)
|
|
3888
|
+
* Localized title of the property pane
|
|
3047
3889
|
*
|
|
3048
3890
|
*/
|
|
3049
|
-
|
|
3891
|
+
title: string;
|
|
3050
3892
|
/**
|
|
3051
3893
|
* @remarks
|
|
3052
3894
|
* Check visibility of the pane
|
|
@@ -3059,6 +3901,17 @@ export interface IPropertyPane {
|
|
|
3059
3901
|
*
|
|
3060
3902
|
*/
|
|
3061
3903
|
width?: number;
|
|
3904
|
+
/**
|
|
3905
|
+
* @remarks
|
|
3906
|
+
* Adds a block list to the pane.
|
|
3907
|
+
*
|
|
3908
|
+
*/
|
|
3909
|
+
addBlockList(options?: IPropertyItemOptionsBlockList): IBlockListPropertyItem<
|
|
3910
|
+
{
|
|
3911
|
+
EMPTY: undefined;
|
|
3912
|
+
},
|
|
3913
|
+
'EMPTY'
|
|
3914
|
+
>;
|
|
3062
3915
|
/**
|
|
3063
3916
|
* @remarks
|
|
3064
3917
|
* Adds a BlockPicker item to the pane.
|
|
@@ -3094,6 +3947,16 @@ export interface IPropertyPane {
|
|
|
3094
3947
|
},
|
|
3095
3948
|
'EMPTY'
|
|
3096
3949
|
>;
|
|
3950
|
+
/**
|
|
3951
|
+
* @remarks
|
|
3952
|
+
* Adds a color picker item to the pane.
|
|
3953
|
+
*
|
|
3954
|
+
*/
|
|
3955
|
+
addColorPicker<T extends PropertyBag, Prop extends keyof T & string>(
|
|
3956
|
+
obj: T,
|
|
3957
|
+
property: Prop,
|
|
3958
|
+
options?: IPropertyItemOptionsColorPicker,
|
|
3959
|
+
): IPropertyItem<T, Prop>;
|
|
3097
3960
|
/**
|
|
3098
3961
|
* @remarks
|
|
3099
3962
|
* Adds an divider item to the pane.
|
|
@@ -3127,6 +3990,8 @@ export interface IPropertyPane {
|
|
|
3127
3990
|
): IPropertyItem<T, Prop>;
|
|
3128
3991
|
/**
|
|
3129
3992
|
* @remarks
|
|
3993
|
+
* Adds an image item to the pane.
|
|
3994
|
+
*
|
|
3130
3995
|
*/
|
|
3131
3996
|
addImage<T extends PropertyBag, Prop extends keyof T & string>(
|
|
3132
3997
|
obj: T,
|
|
@@ -3235,23 +4100,10 @@ export interface IPropertyPaneOptions {
|
|
|
3235
4100
|
direction?: LayoutDirection;
|
|
3236
4101
|
/**
|
|
3237
4102
|
* @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
|
|
4103
|
+
* Localized title of the property pane
|
|
3252
4104
|
*
|
|
3253
4105
|
*/
|
|
3254
|
-
|
|
4106
|
+
title: string;
|
|
3255
4107
|
}
|
|
3256
4108
|
|
|
3257
4109
|
export interface IPropertyTableCellItem {
|
|
@@ -3303,57 +4155,137 @@ export interface IRegisterExtensionOptionalParameters {
|
|
|
3303
4155
|
* the editor evolves.
|
|
3304
4156
|
*/
|
|
3305
4157
|
export interface ISimpleTool {
|
|
4158
|
+
/**
|
|
4159
|
+
* @remarks
|
|
4160
|
+
* Get a reference to the menu component that was automatically
|
|
4161
|
+
* created for the tool This generally only happens if the tool
|
|
4162
|
+
* is a global tool (i.e. has a pane and does not have a tool
|
|
4163
|
+
* rail component) In this case a menu item is automatically
|
|
4164
|
+
* created and some visibility controls are inserted. If you
|
|
4165
|
+
* have additional menu options you want to add, this is the
|
|
4166
|
+
* ideal control to add children to
|
|
4167
|
+
*
|
|
4168
|
+
*/
|
|
3306
4169
|
get menu(): IMenu | undefined;
|
|
4170
|
+
/**
|
|
4171
|
+
* @remarks
|
|
4172
|
+
* Get the tool name
|
|
4173
|
+
*
|
|
4174
|
+
*/
|
|
3307
4175
|
get name(): string;
|
|
4176
|
+
/**
|
|
4177
|
+
* @remarks
|
|
4178
|
+
* Get a reference to the root (primary) property pane
|
|
4179
|
+
* component - if no component was requested, this function
|
|
4180
|
+
* will throw an error
|
|
4181
|
+
*
|
|
4182
|
+
*/
|
|
3308
4183
|
get pane(): ISimpleToolPaneComponent;
|
|
4184
|
+
/**
|
|
4185
|
+
* @remarks
|
|
4186
|
+
* Get a reference to the IPlayerUISession. This is the primary
|
|
4187
|
+
* interface to the editor UI and all of the editor extension
|
|
4188
|
+
* controls
|
|
4189
|
+
*
|
|
4190
|
+
*/
|
|
3309
4191
|
get session(): IPlayerUISession;
|
|
4192
|
+
/**
|
|
4193
|
+
* @remarks
|
|
4194
|
+
* Get a reference to the status bar component - if no
|
|
4195
|
+
* component was requested, this function will throw an error
|
|
4196
|
+
*
|
|
4197
|
+
*/
|
|
3310
4198
|
get statusBar(): ISimpleToolStatusBarComponent;
|
|
4199
|
+
/**
|
|
4200
|
+
* @remarks
|
|
4201
|
+
* Get a reference to the tool rail component - if no component
|
|
4202
|
+
* was requested, this function will throw an error
|
|
4203
|
+
*
|
|
4204
|
+
*/
|
|
3311
4205
|
get toolRail(): ISimpleToolRailComponent;
|
|
3312
4206
|
/**
|
|
3313
4207
|
* @remarks
|
|
4208
|
+
* Find a pane or subpane by it's unique ID.
|
|
4209
|
+
*
|
|
3314
4210
|
*/
|
|
3315
4211
|
findPane(idString: string): ISimpleToolPaneComponent | undefined;
|
|
3316
4212
|
/**
|
|
3317
4213
|
* @remarks
|
|
4214
|
+
* Hide a particular pane or subpane by it's unique ID. If no
|
|
4215
|
+
* ID is provided (or cannot be found) the function will throw
|
|
4216
|
+
* an error Although the parent pane is used to execute the
|
|
4217
|
+
* visibility request, the hidePane function will NOT affect
|
|
4218
|
+
* the visibility of any sibling panes -- so it is possible to
|
|
4219
|
+
* hide all of the child panes of a parent using this function
|
|
4220
|
+
*
|
|
3318
4221
|
*/
|
|
3319
4222
|
hidePane(idString?: string): void;
|
|
3320
4223
|
/**
|
|
3321
4224
|
* @remarks
|
|
4225
|
+
* Send a tagged Debug log message to the console. The tag will
|
|
4226
|
+
* contain the tool name
|
|
4227
|
+
*
|
|
3322
4228
|
*/
|
|
3323
4229
|
logDebug(message: string): void;
|
|
3324
4230
|
/**
|
|
3325
4231
|
* @remarks
|
|
4232
|
+
* Send a tagged Error log message to the console. The tag will
|
|
4233
|
+
* contain the tool name
|
|
4234
|
+
*
|
|
3326
4235
|
*/
|
|
3327
4236
|
logError(message: string): void;
|
|
3328
4237
|
/**
|
|
3329
4238
|
* @remarks
|
|
4239
|
+
* Send a tagged Informational log message to the console. The
|
|
4240
|
+
* tag will contain the tool name
|
|
4241
|
+
*
|
|
3330
4242
|
*/
|
|
3331
4243
|
logInfo(message: string): void;
|
|
3332
4244
|
/**
|
|
3333
4245
|
* @remarks
|
|
4246
|
+
* Send a tagged Warning log message to the console. The tag
|
|
4247
|
+
* will contain the tool name
|
|
4248
|
+
*
|
|
3334
4249
|
*/
|
|
3335
4250
|
logWarn(message: string): void;
|
|
3336
4251
|
/**
|
|
3337
4252
|
* @remarks
|
|
4253
|
+
* Show a particular pane or subpane by it's unique ID. If no
|
|
4254
|
+
* ID is provided (or cannot be found) the function will throw
|
|
4255
|
+
* an error Note that the showPane function (when used with a
|
|
4256
|
+
* child pane) will use the parent pane to execute the
|
|
4257
|
+
* visibility request. In this case, if the child panes are
|
|
4258
|
+
* marked as mututally exclusive, then the siblings of the
|
|
4259
|
+
* requested pane will be hidden
|
|
4260
|
+
*
|
|
3338
4261
|
*/
|
|
3339
4262
|
showPane(idString?: string): void;
|
|
3340
4263
|
/**
|
|
3341
4264
|
* @remarks
|
|
4265
|
+
* Much like the showPane function, but will hide all other
|
|
4266
|
+
* panes that are not the requested pane irrespective of the
|
|
4267
|
+
* exclusivity setting
|
|
4268
|
+
*
|
|
3342
4269
|
*/
|
|
3343
4270
|
showPaneExclusively(idString: string): void;
|
|
3344
4271
|
/**
|
|
3345
4272
|
* @remarks
|
|
4273
|
+
* A teardown function implemented by the ISimpleTool
|
|
4274
|
+
* implementation, and is called by the system during editor
|
|
4275
|
+
* extension shutdown. Don't override this function - instead,
|
|
4276
|
+
* implement the onTeardown event in the ISimpleToolOptions
|
|
4277
|
+
* structure
|
|
4278
|
+
*
|
|
3346
4279
|
*/
|
|
3347
4280
|
teardown(): void;
|
|
3348
4281
|
}
|
|
3349
4282
|
|
|
3350
4283
|
/**
|
|
3351
|
-
* Define a
|
|
3352
|
-
* activation key binding
|
|
4284
|
+
* Define a key binding for the simple tool activation
|
|
3353
4285
|
*/
|
|
3354
|
-
export interface
|
|
3355
|
-
|
|
3356
|
-
|
|
4286
|
+
export interface ISimpleToolKeyBinding {
|
|
4287
|
+
binding: KeyBinding;
|
|
4288
|
+
info?: KeyBindingInfo;
|
|
3357
4289
|
}
|
|
3358
4290
|
|
|
3359
4291
|
/**
|
|
@@ -3361,12 +4293,61 @@ export interface ISimpleToolKeyPair {
|
|
|
3361
4293
|
* simple tool, and the optional components that are desired.
|
|
3362
4294
|
*/
|
|
3363
4295
|
export interface ISimpleToolOptions {
|
|
3364
|
-
|
|
4296
|
+
/**
|
|
4297
|
+
* @remarks
|
|
4298
|
+
* A key binding that will activate the tool. Note that if the
|
|
4299
|
+
* tool is a modal tool, then the key binding will be tied to
|
|
4300
|
+
* the tool rail activation, and appear as a tooltip on the
|
|
4301
|
+
* tool rail button. If the tool is a global tool, then the key
|
|
4302
|
+
* binding will be tied to a menu item in the View menu, and
|
|
4303
|
+
* appear as a stateful menu item which will control the pane
|
|
4304
|
+
* visibility. If there's no pane required, then the key
|
|
4305
|
+
* binding is ignored
|
|
4306
|
+
*
|
|
4307
|
+
*/
|
|
4308
|
+
activationKeyBinding?: ISimpleToolKeyBinding;
|
|
4309
|
+
/**
|
|
4310
|
+
* @remarks
|
|
4311
|
+
* The name of the tool. This will be used to identify the tool
|
|
4312
|
+
* in the UI and logs and will be used in the View \> [Tool
|
|
4313
|
+
* Name] menu item (if it's a global tool)
|
|
4314
|
+
*
|
|
4315
|
+
*/
|
|
3365
4316
|
name: string;
|
|
4317
|
+
/**
|
|
4318
|
+
* @remarks
|
|
4319
|
+
* The finalize function is executed after each of the
|
|
4320
|
+
* components have been created and finalized during
|
|
4321
|
+
* construction
|
|
4322
|
+
*
|
|
4323
|
+
*/
|
|
3366
4324
|
onFinalize?: (tool: ISimpleTool) => void;
|
|
4325
|
+
/**
|
|
4326
|
+
* @remarks
|
|
4327
|
+
* The teardown function is executed when the tool is being
|
|
4328
|
+
* torn down and only after the individual components have
|
|
4329
|
+
* executed their own teardown functions
|
|
4330
|
+
*
|
|
4331
|
+
*/
|
|
3367
4332
|
onTeardown?: (tool: ISimpleTool) => void;
|
|
4333
|
+
/**
|
|
4334
|
+
* @remarks
|
|
4335
|
+
* The options structure for an optional property pane
|
|
4336
|
+
* component
|
|
4337
|
+
*
|
|
4338
|
+
*/
|
|
3368
4339
|
propertyPaneOptions?: ISimpleToolPaneOptions;
|
|
4340
|
+
/**
|
|
4341
|
+
* @remarks
|
|
4342
|
+
* The options structure for an optional status bar component
|
|
4343
|
+
*
|
|
4344
|
+
*/
|
|
3369
4345
|
statusBarOptions?: ISimpleToolStatusBarOptions;
|
|
4346
|
+
/**
|
|
4347
|
+
* @remarks
|
|
4348
|
+
* The options structure for an optional tool rail component
|
|
4349
|
+
*
|
|
4350
|
+
*/
|
|
3370
4351
|
toolRailOptions?: ISimpleToolRailOptions;
|
|
3371
4352
|
}
|
|
3372
4353
|
|
|
@@ -3385,26 +4366,83 @@ export interface ISimpleToolOptions {
|
|
|
3385
4366
|
* to the creator/user)
|
|
3386
4367
|
*/
|
|
3387
4368
|
export interface ISimpleToolPaneComponent {
|
|
4369
|
+
/**
|
|
4370
|
+
* @remarks
|
|
4371
|
+
* Get a list of the unique ID's of all of the child panes
|
|
4372
|
+
*
|
|
4373
|
+
*/
|
|
3388
4374
|
get childPaneList(): string[];
|
|
4375
|
+
/**
|
|
4376
|
+
* @remarks
|
|
4377
|
+
* Get the unique ID of the pane
|
|
4378
|
+
*
|
|
4379
|
+
*/
|
|
3389
4380
|
get id(): string;
|
|
4381
|
+
/**
|
|
4382
|
+
* @remarks
|
|
4383
|
+
* Check the visibility of the pane
|
|
4384
|
+
*
|
|
4385
|
+
*/
|
|
3390
4386
|
get isVisible(): boolean;
|
|
4387
|
+
/**
|
|
4388
|
+
* @remarks
|
|
4389
|
+
* Get a reference to actual property pane implementation that
|
|
4390
|
+
* was constructed by the tool. This reference is used to
|
|
4391
|
+
* construct the UI components that are displayed in the pane.
|
|
4392
|
+
*
|
|
4393
|
+
*/
|
|
3391
4394
|
get pane(): IPropertyPane;
|
|
4395
|
+
/**
|
|
4396
|
+
* @remarks
|
|
4397
|
+
* Get a reference to the IPlayerUISession. This is the primary
|
|
4398
|
+
* interface to the editor UI and all of the editor extension
|
|
4399
|
+
* controls
|
|
4400
|
+
*
|
|
4401
|
+
*/
|
|
3392
4402
|
get session(): IPlayerUISession;
|
|
4403
|
+
/**
|
|
4404
|
+
* @remarks
|
|
4405
|
+
* Get a reference to the parent tool.
|
|
4406
|
+
*
|
|
4407
|
+
*/
|
|
3393
4408
|
get simpleTool(): ISimpleTool;
|
|
3394
4409
|
/**
|
|
3395
4410
|
* @remarks
|
|
4411
|
+
* Find a pane reference by unique ID
|
|
4412
|
+
*
|
|
3396
4413
|
*/
|
|
3397
4414
|
findPane(idString: string): ISimpleToolPaneComponent | undefined;
|
|
3398
4415
|
/**
|
|
3399
4416
|
* @remarks
|
|
4417
|
+
* Hide the pane. Although the parent pane is used to execute
|
|
4418
|
+
* the visibility request, the hidePane function will NOT
|
|
4419
|
+
* affect the visibility of any sibling panes -- so it is
|
|
4420
|
+
* possible to hide all of the child panes of a parent using
|
|
4421
|
+
* this function
|
|
4422
|
+
*
|
|
3400
4423
|
*/
|
|
3401
4424
|
hidePane(): void;
|
|
3402
4425
|
/**
|
|
3403
4426
|
* @remarks
|
|
4427
|
+
* This causes the reconstruction of the pane (and the child
|
|
4428
|
+
* panes) as if the tool was being constructed for the first
|
|
4429
|
+
* time. This is unfortunately necessary until such time that
|
|
4430
|
+
* all of our UI components are able to communicate dynamically
|
|
4431
|
+
* with their client counterparts. Certain controls require a
|
|
4432
|
+
* full teardown and reconstruction to properly update their
|
|
4433
|
+
* state. This is undergoing code changes and should become
|
|
4434
|
+
* unnecessary in the future.
|
|
4435
|
+
*
|
|
3404
4436
|
*/
|
|
3405
4437
|
reconstructPane(): void;
|
|
3406
4438
|
/**
|
|
3407
4439
|
* @remarks
|
|
4440
|
+
* Show the pane. Note, if this is a sub-pane, then this
|
|
4441
|
+
* function will ask the parent for permission to show, and may
|
|
4442
|
+
* result in the visibility of any sibling panes to change as a
|
|
4443
|
+
* result (depending on the `mutually exclusive visibility`
|
|
4444
|
+
* flag)
|
|
4445
|
+
*
|
|
3408
4446
|
*/
|
|
3409
4447
|
showPane(): void;
|
|
3410
4448
|
}
|
|
@@ -3426,22 +4464,77 @@ export interface ISimpleToolPaneComponent {
|
|
|
3426
4464
|
* pane to finalize itself.
|
|
3427
4465
|
*/
|
|
3428
4466
|
export interface ISimpleToolPaneOptions {
|
|
4467
|
+
/**
|
|
4468
|
+
* @remarks
|
|
4469
|
+
* The id of the child pane that should be visible when the
|
|
4470
|
+
* parent pane is first shown, or the editor tool is
|
|
4471
|
+
* constructed and finalized
|
|
4472
|
+
*
|
|
4473
|
+
*/
|
|
3429
4474
|
childPaneInitiallyVisible?: string;
|
|
4475
|
+
/**
|
|
4476
|
+
* @remarks
|
|
4477
|
+
* An optional array of child panes. These panes are set up
|
|
4478
|
+
* exactly the same as the top level pane, but are displayed as
|
|
4479
|
+
* children inside the parent pane.
|
|
4480
|
+
*
|
|
4481
|
+
*/
|
|
3430
4482
|
childPanes?: ISimpleToolPaneOptions[];
|
|
4483
|
+
/**
|
|
4484
|
+
* @remarks
|
|
4485
|
+
* An optional flag to indicate whether the child panes are
|
|
4486
|
+
* mutually exclusive. If this is true, then only one child
|
|
4487
|
+
* pane can be visible at a time. If this is false, then
|
|
4488
|
+
* multiple child panes can be visible at the same time.
|
|
4489
|
+
* Visibility is controlled either through `showPane` or
|
|
4490
|
+
* `hidePane` functions of the `ISimpleToolPaneComponent` or
|
|
4491
|
+
* through the visibility methods in the top level tool
|
|
4492
|
+
* (`ISimpleTool`)
|
|
4493
|
+
*
|
|
4494
|
+
*/
|
|
3431
4495
|
childPanesMutuallyExclusive?: boolean;
|
|
4496
|
+
/**
|
|
4497
|
+
* @remarks
|
|
4498
|
+
* The unique identifier for this pane. This is used to
|
|
4499
|
+
* identify the pane in the tool's pane hierarchy.
|
|
4500
|
+
*
|
|
4501
|
+
*/
|
|
3432
4502
|
id: string;
|
|
3433
4503
|
onBeginFinalize?: (pane: ISimpleToolPaneComponent) => void;
|
|
3434
4504
|
onEndFinalize?: (pane: ISimpleToolPaneComponent) => void;
|
|
3435
4505
|
onHide?: (pane: ISimpleToolPaneComponent) => void;
|
|
3436
4506
|
onShow?: (pane: ISimpleToolPaneComponent) => void;
|
|
3437
4507
|
onTeardown?: (pane: ISimpleToolPaneComponent) => void;
|
|
3438
|
-
|
|
3439
|
-
|
|
4508
|
+
/**
|
|
4509
|
+
* @remarks
|
|
4510
|
+
* The title of the pane. This will be displayed in the title
|
|
4511
|
+
* bar of the pane.
|
|
4512
|
+
*
|
|
4513
|
+
*/
|
|
4514
|
+
title: string;
|
|
3440
4515
|
}
|
|
3441
4516
|
|
|
3442
4517
|
export interface ISimpleToolRailComponent {
|
|
4518
|
+
/**
|
|
4519
|
+
* @remarks
|
|
4520
|
+
* Get a reference to the IPlayerUISession. This is the primary
|
|
4521
|
+
* interface to the editor UI and all of the editor extension
|
|
4522
|
+
* controls
|
|
4523
|
+
*
|
|
4524
|
+
*/
|
|
3443
4525
|
get session(): IPlayerUISession;
|
|
4526
|
+
/**
|
|
4527
|
+
* @remarks
|
|
4528
|
+
* Get a reference to the parent tool.
|
|
4529
|
+
*
|
|
4530
|
+
*/
|
|
3444
4531
|
get simpleTool(): ISimpleTool;
|
|
4532
|
+
/**
|
|
4533
|
+
* @remarks
|
|
4534
|
+
* Get the implementation interface of the underlying tool rail
|
|
4535
|
+
* component
|
|
4536
|
+
*
|
|
4537
|
+
*/
|
|
3445
4538
|
get toolRail(): IModalTool;
|
|
3446
4539
|
}
|
|
3447
4540
|
|
|
@@ -3459,15 +4552,32 @@ export interface ISimpleToolRailComponent {
|
|
|
3459
4552
|
* gameplay interaction
|
|
3460
4553
|
*/
|
|
3461
4554
|
export interface ISimpleToolRailOptions {
|
|
3462
|
-
|
|
3463
|
-
|
|
4555
|
+
/**
|
|
4556
|
+
* @remarks
|
|
4557
|
+
* The icon for the tool rail button. This is generally a URL
|
|
4558
|
+
* to an image file in the editor extension resource pack e.g.
|
|
4559
|
+
* `pack://textures/my-tool-icon.png`
|
|
4560
|
+
*
|
|
4561
|
+
*/
|
|
3464
4562
|
icon: string;
|
|
3465
4563
|
onActivate?: (component: ISimpleToolRailComponent) => void;
|
|
3466
4564
|
onDeactivate?: (component: ISimpleToolRailComponent) => void;
|
|
3467
4565
|
onFinalize?: (component: ISimpleToolRailComponent) => void;
|
|
3468
4566
|
onTeardown?: (component: ISimpleToolRailComponent) => void;
|
|
3469
|
-
|
|
3470
|
-
|
|
4567
|
+
/**
|
|
4568
|
+
* @remarks
|
|
4569
|
+
* The text for the tool title
|
|
4570
|
+
*
|
|
4571
|
+
*/
|
|
4572
|
+
title: string;
|
|
4573
|
+
/**
|
|
4574
|
+
* @remarks
|
|
4575
|
+
* The tooltip description for the tool. Note: if an activation
|
|
4576
|
+
* key binding was added to `ISimpleToolOptions`, then the key
|
|
4577
|
+
* binding will be appended to the tooltip string.
|
|
4578
|
+
*
|
|
4579
|
+
*/
|
|
4580
|
+
tooltip: string;
|
|
3471
4581
|
}
|
|
3472
4582
|
|
|
3473
4583
|
export interface ISimpleToolStatusBarComponent {
|
|
@@ -3483,13 +4593,36 @@ export interface ISimpleToolStatusBarComponent {
|
|
|
3483
4593
|
* status bar item for a simple tool.
|
|
3484
4594
|
*/
|
|
3485
4595
|
export interface ISimpleToolStatusBarOptions {
|
|
4596
|
+
/**
|
|
4597
|
+
* @remarks
|
|
4598
|
+
* The alignment of the status bar item within the parent
|
|
4599
|
+
* status bar container
|
|
4600
|
+
*
|
|
4601
|
+
*/
|
|
3486
4602
|
alignment: EditorStatusBarAlignment;
|
|
4603
|
+
/**
|
|
4604
|
+
* @remarks
|
|
4605
|
+
* The text for the status bar item
|
|
4606
|
+
*
|
|
4607
|
+
*/
|
|
3487
4608
|
displayAltText: string;
|
|
3488
4609
|
onFinalize?: (statusBar: ISimpleToolStatusBarComponent) => void;
|
|
3489
4610
|
onHide?: (statusBar: ISimpleToolStatusBarComponent) => void;
|
|
3490
4611
|
onShow?: (statusBar: ISimpleToolStatusBarComponent) => void;
|
|
3491
4612
|
onTeardown?: (statusBar: ISimpleToolStatusBarComponent) => void;
|
|
4613
|
+
/**
|
|
4614
|
+
* @remarks
|
|
4615
|
+
* The size of the status bar item within the parent status bar
|
|
4616
|
+
* container
|
|
4617
|
+
*
|
|
4618
|
+
*/
|
|
3492
4619
|
size: number;
|
|
4620
|
+
/**
|
|
4621
|
+
* @remarks
|
|
4622
|
+
* Determine the status bar visibility based on the existence
|
|
4623
|
+
* and visibility of the tool's root property pane
|
|
4624
|
+
*
|
|
4625
|
+
*/
|
|
3493
4626
|
visibility?: SimpleToolStatusBarVisibility;
|
|
3494
4627
|
}
|
|
3495
4628
|
|
|
@@ -3516,34 +4649,34 @@ export interface IStatusBarItem {
|
|
|
3516
4649
|
export interface ModalToolCreationParameters {
|
|
3517
4650
|
/**
|
|
3518
4651
|
* @remarks
|
|
3519
|
-
*
|
|
4652
|
+
* Icon, if any (from resource pack on client)
|
|
3520
4653
|
*
|
|
3521
4654
|
*/
|
|
3522
|
-
|
|
4655
|
+
icon?: string;
|
|
3523
4656
|
/**
|
|
3524
4657
|
* @remarks
|
|
3525
|
-
*
|
|
4658
|
+
* Modal input context identifier
|
|
3526
4659
|
*
|
|
3527
4660
|
*/
|
|
3528
|
-
|
|
4661
|
+
inputContextId?: string;
|
|
3529
4662
|
/**
|
|
3530
4663
|
* @remarks
|
|
3531
|
-
*
|
|
4664
|
+
* Localized text label for modal input context
|
|
3532
4665
|
*
|
|
3533
4666
|
*/
|
|
3534
|
-
|
|
4667
|
+
inputContextLabel?: string;
|
|
3535
4668
|
/**
|
|
3536
4669
|
* @remarks
|
|
3537
|
-
*
|
|
4670
|
+
* Title of the tool
|
|
3538
4671
|
*
|
|
3539
4672
|
*/
|
|
3540
|
-
|
|
4673
|
+
title: string;
|
|
3541
4674
|
/**
|
|
3542
4675
|
* @remarks
|
|
3543
|
-
* Tooltip
|
|
4676
|
+
* Tooltip description of the toll
|
|
3544
4677
|
*
|
|
3545
4678
|
*/
|
|
3546
|
-
|
|
4679
|
+
tooltip?: string;
|
|
3547
4680
|
}
|
|
3548
4681
|
|
|
3549
4682
|
/**
|
|
@@ -3576,6 +4709,20 @@ export declare function executeLargeOperation(
|
|
|
3576
4709
|
selection: Selection,
|
|
3577
4710
|
operation: (blockLocation: minecraftserver.Vector3) => void,
|
|
3578
4711
|
): Promise<void>;
|
|
4712
|
+
/**
|
|
4713
|
+
* @remarks
|
|
4714
|
+
* Executes an operation over a BlockLocationIterator via
|
|
4715
|
+
* chunks to allow splitting operation over multiple game ticks
|
|
4716
|
+
*
|
|
4717
|
+
* @param blockLocationIterator
|
|
4718
|
+
* the selection to iterator over
|
|
4719
|
+
* @param operation
|
|
4720
|
+
* the operation to apply over each block location
|
|
4721
|
+
*/
|
|
4722
|
+
export declare function executeLargeOperationFromIterator(
|
|
4723
|
+
blockLocationIterator: minecraftserver.BlockLocationIterator,
|
|
4724
|
+
operation: (blockLocation: minecraftserver.Vector3) => void,
|
|
4725
|
+
): Promise<void>;
|
|
3579
4726
|
/**
|
|
3580
4727
|
* @remarks
|
|
3581
4728
|
* Returns a string array of the default block types for the
|
|
@@ -3586,13 +4733,6 @@ export declare function executeLargeOperation(
|
|
|
3586
4733
|
* Default allowed block list
|
|
3587
4734
|
*/
|
|
3588
4735
|
export declare function getBlockPickerDefaultAllowBlockList(): string[];
|
|
3589
|
-
/**
|
|
3590
|
-
* @remarks
|
|
3591
|
-
* Adds the resource pack editor prefix and returns the full
|
|
3592
|
-
* localization ID
|
|
3593
|
-
*
|
|
3594
|
-
*/
|
|
3595
|
-
export declare function getLocalizationId(locId: string): string;
|
|
3596
4736
|
/**
|
|
3597
4737
|
* @remarks
|
|
3598
4738
|
* Registers an editor extension into Minecraft. This function
|