@minecraft/server-editor 0.1.0-beta.1.21.0-preview.25 → 0.1.0-beta.1.21.10-preview.20
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 +460 -9
- 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.1.21.
|
|
17
|
+
* "version": "0.1.0-beta.1.21.10-preview.20"
|
|
18
18
|
* }
|
|
19
19
|
* ```
|
|
20
20
|
*
|
|
@@ -752,6 +752,28 @@ export class BrushShapeManager {
|
|
|
752
752
|
uiSettingValueChanged(elementName: string, newValue: boolean | number | string | minecraftserver.Vector3): boolean;
|
|
753
753
|
}
|
|
754
754
|
|
|
755
|
+
export class ClipboardChangeAfterEvent {
|
|
756
|
+
private constructor();
|
|
757
|
+
readonly isPrimary: boolean;
|
|
758
|
+
readonly itemId: string;
|
|
759
|
+
}
|
|
760
|
+
|
|
761
|
+
export class ClipboardChangeAfterEventSignal {
|
|
762
|
+
private constructor();
|
|
763
|
+
/**
|
|
764
|
+
* @remarks
|
|
765
|
+
* This function can't be called in read-only mode.
|
|
766
|
+
*
|
|
767
|
+
*/
|
|
768
|
+
subscribe(callback: (arg: ClipboardChangeAfterEvent) => void): (arg: ClipboardChangeAfterEvent) => void;
|
|
769
|
+
/**
|
|
770
|
+
* @remarks
|
|
771
|
+
* This function can't be called in read-only mode.
|
|
772
|
+
*
|
|
773
|
+
*/
|
|
774
|
+
unsubscribe(callback: (arg: ClipboardChangeAfterEvent) => void): void;
|
|
775
|
+
}
|
|
776
|
+
|
|
755
777
|
/**
|
|
756
778
|
* A ClipboardItem is a handle to an object which represents a
|
|
757
779
|
* set of blocks in a contained bounding area (most likely
|
|
@@ -966,6 +988,27 @@ export class Cursor {
|
|
|
966
988
|
* @throws This property can throw when used.
|
|
967
989
|
*/
|
|
968
990
|
readonly isVisible: boolean;
|
|
991
|
+
/**
|
|
992
|
+
* @remarks
|
|
993
|
+
* This function can't be called in read-only mode.
|
|
994
|
+
*
|
|
995
|
+
* @throws This function can throw errors.
|
|
996
|
+
*/
|
|
997
|
+
attachClipboardItem(item: ClipboardItem): void;
|
|
998
|
+
/**
|
|
999
|
+
* @remarks
|
|
1000
|
+
* This function can't be called in read-only mode.
|
|
1001
|
+
*
|
|
1002
|
+
* @throws This function can throw errors.
|
|
1003
|
+
*/
|
|
1004
|
+
clearAttachment(): void;
|
|
1005
|
+
/**
|
|
1006
|
+
* @remarks
|
|
1007
|
+
* This function can't be called in read-only mode.
|
|
1008
|
+
*
|
|
1009
|
+
* @throws This function can throw errors.
|
|
1010
|
+
*/
|
|
1011
|
+
getAttachmentProperties(): CursorAttachmentProperties;
|
|
969
1012
|
/**
|
|
970
1013
|
* @remarks
|
|
971
1014
|
* Get the world position of the 3D block cursor
|
|
@@ -1022,6 +1065,13 @@ export class Cursor {
|
|
|
1022
1065
|
* @throws This function can throw errors.
|
|
1023
1066
|
*/
|
|
1024
1067
|
resetToDefaultState(): void;
|
|
1068
|
+
/**
|
|
1069
|
+
* @remarks
|
|
1070
|
+
* This function can't be called in read-only mode.
|
|
1071
|
+
*
|
|
1072
|
+
* @throws This function can throw errors.
|
|
1073
|
+
*/
|
|
1074
|
+
setAttachmentProperties(properties: CursorAttachmentProperties): void;
|
|
1025
1075
|
/**
|
|
1026
1076
|
* @remarks
|
|
1027
1077
|
* Set the 3D block cursor properties to a given state
|
|
@@ -1045,6 +1095,29 @@ export class Cursor {
|
|
|
1045
1095
|
show(): void;
|
|
1046
1096
|
}
|
|
1047
1097
|
|
|
1098
|
+
export class CursorAttachmentPropertiesChangeAfterEvent {
|
|
1099
|
+
private constructor();
|
|
1100
|
+
readonly properties: CursorAttachmentProperties;
|
|
1101
|
+
}
|
|
1102
|
+
|
|
1103
|
+
export class CursorAttachmentPropertyChangeAfterEventSignal {
|
|
1104
|
+
private constructor();
|
|
1105
|
+
/**
|
|
1106
|
+
* @remarks
|
|
1107
|
+
* This function can't be called in read-only mode.
|
|
1108
|
+
*
|
|
1109
|
+
*/
|
|
1110
|
+
subscribe(
|
|
1111
|
+
callback: (arg: CursorAttachmentPropertiesChangeAfterEvent) => void,
|
|
1112
|
+
): (arg: CursorAttachmentPropertiesChangeAfterEvent) => void;
|
|
1113
|
+
/**
|
|
1114
|
+
* @remarks
|
|
1115
|
+
* This function can't be called in read-only mode.
|
|
1116
|
+
*
|
|
1117
|
+
*/
|
|
1118
|
+
unsubscribe(callback: (arg: CursorAttachmentPropertiesChangeAfterEvent) => void): void;
|
|
1119
|
+
}
|
|
1120
|
+
|
|
1048
1121
|
export class CursorPropertiesChangeAfterEvent {
|
|
1049
1122
|
private constructor();
|
|
1050
1123
|
readonly properties: CursorProperties;
|
|
@@ -1249,6 +1322,8 @@ export class ExtensionContext {
|
|
|
1249
1322
|
*/
|
|
1250
1323
|
export class ExtensionContextAfterEvents {
|
|
1251
1324
|
private constructor();
|
|
1325
|
+
readonly clipboardChange: ClipboardChangeAfterEventSignal;
|
|
1326
|
+
readonly cursorAttachmentPropertyChange: CursorAttachmentPropertyChangeAfterEventSignal;
|
|
1252
1327
|
readonly cursorPropertyChange: CursorPropertyChangeAfterEventSignal;
|
|
1253
1328
|
/**
|
|
1254
1329
|
* @remarks
|
|
@@ -1794,18 +1869,14 @@ export class SettingsManager {
|
|
|
1794
1869
|
|
|
1795
1870
|
export class SettingsUIElement {
|
|
1796
1871
|
readonly initialValue: boolean | number | string | minecraftserver.Vector3;
|
|
1797
|
-
readonly max?: number;
|
|
1798
|
-
readonly min?: number;
|
|
1799
1872
|
readonly name: string;
|
|
1800
|
-
readonly onChange: (arg: boolean | number | string | minecraftserver.Vector3) =>
|
|
1801
|
-
readonly options
|
|
1873
|
+
readonly onChange: (arg: boolean | number | string | minecraftserver.Vector3) => void;
|
|
1874
|
+
readonly options: SettingsUIElementOptions;
|
|
1802
1875
|
constructor(
|
|
1803
1876
|
name: string,
|
|
1804
1877
|
initialValue: boolean | number | string | minecraftserver.Vector3,
|
|
1805
|
-
onChange: (arg: boolean | number | string | minecraftserver.Vector3) =>
|
|
1806
|
-
|
|
1807
|
-
max?: number,
|
|
1808
|
-
options?: string[],
|
|
1878
|
+
onChange: (arg: boolean | number | string | minecraftserver.Vector3) => void,
|
|
1879
|
+
options?: SettingsUIElementOptions,
|
|
1809
1880
|
);
|
|
1810
1881
|
}
|
|
1811
1882
|
|
|
@@ -1821,9 +1892,37 @@ export class SimpleBlockPaletteItem extends IBlockPaletteItem {
|
|
|
1821
1892
|
* how to use this class and the wrapper framework
|
|
1822
1893
|
*/
|
|
1823
1894
|
export declare class SimpleToolWrapper implements IDisposable {
|
|
1895
|
+
/**
|
|
1896
|
+
* @remarks
|
|
1897
|
+
* The player UI session that the tool is running in Use this
|
|
1898
|
+
* to access the player UI session, or any of the session's
|
|
1899
|
+
* components
|
|
1900
|
+
*
|
|
1901
|
+
*/
|
|
1824
1902
|
get session(): IPlayerUISession;
|
|
1903
|
+
/**
|
|
1904
|
+
* @remarks
|
|
1905
|
+
* The simple tool instance that is created and managed by the
|
|
1906
|
+
* wrapper Use this to access any of the tools components, or
|
|
1907
|
+
* mess with the tools window visibility
|
|
1908
|
+
*
|
|
1909
|
+
*/
|
|
1825
1910
|
get simpleTool(): ISimpleTool;
|
|
1911
|
+
/**
|
|
1912
|
+
* @remarks
|
|
1913
|
+
* Setup the simple tool instance with the given options This
|
|
1914
|
+
* will create and initialize the simple tool instance
|
|
1915
|
+
*
|
|
1916
|
+
*/
|
|
1826
1917
|
setupSimpleTool(session: IPlayerUISession, options: ISimpleToolOptions): void;
|
|
1918
|
+
/**
|
|
1919
|
+
* @remarks
|
|
1920
|
+
* Teardown the simple tool instance This will call the
|
|
1921
|
+
* teardown function on the simple tool instance This function
|
|
1922
|
+
* is automatically invoked by the Editor Extension system when
|
|
1923
|
+
* the editor is shutting down
|
|
1924
|
+
*
|
|
1925
|
+
*/
|
|
1827
1926
|
teardown(): void;
|
|
1828
1927
|
}
|
|
1829
1928
|
|
|
@@ -2289,6 +2388,18 @@ export interface ClipboardWriteOptions {
|
|
|
2289
2388
|
rotation?: minecraftserver.StructureRotation;
|
|
2290
2389
|
}
|
|
2291
2390
|
|
|
2391
|
+
export interface CursorAttachmentProperties {
|
|
2392
|
+
boundsFillColor?: minecraftserver.RGBA;
|
|
2393
|
+
boundsVisible?: boolean;
|
|
2394
|
+
boundsWireframeColor?: minecraftserver.RGBA;
|
|
2395
|
+
contentsFillColor?: minecraftserver.RGBA;
|
|
2396
|
+
contentsWireframeColor?: minecraftserver.RGBA;
|
|
2397
|
+
mirror?: minecraftserver.StructureMirrorAxis;
|
|
2398
|
+
offset?: minecraftserver.Vector3;
|
|
2399
|
+
origin?: minecraftserver.Vector3;
|
|
2400
|
+
rotation?: minecraftserver.StructureRotation;
|
|
2401
|
+
}
|
|
2402
|
+
|
|
2292
2403
|
/**
|
|
2293
2404
|
* The CursorProperties interface is used to describe the
|
|
2294
2405
|
* properties of the Editor 3D block cursor construct.
|
|
@@ -2322,6 +2433,7 @@ export interface CursorProperties {
|
|
|
2322
2433
|
*
|
|
2323
2434
|
*/
|
|
2324
2435
|
controlMode?: CursorControlMode;
|
|
2436
|
+
fillColor?: minecraftserver.RGBA;
|
|
2325
2437
|
/**
|
|
2326
2438
|
* @remarks
|
|
2327
2439
|
* The fixed distance from the players feet at which the cursor
|
|
@@ -2454,6 +2566,13 @@ export interface ProjectExportOptions {
|
|
|
2454
2566
|
initialTimOfDay?: number;
|
|
2455
2567
|
}
|
|
2456
2568
|
|
|
2569
|
+
export interface SettingsUIElementOptions {
|
|
2570
|
+
dropdownItems?: string[];
|
|
2571
|
+
max?: number;
|
|
2572
|
+
min?: number;
|
|
2573
|
+
refreshOnChange?: boolean;
|
|
2574
|
+
}
|
|
2575
|
+
|
|
2457
2576
|
export interface WidgetCreateOptions {
|
|
2458
2577
|
initialVisibility?: boolean;
|
|
2459
2578
|
isSelectable?: boolean;
|
|
@@ -2624,6 +2743,12 @@ export interface IMenu {
|
|
|
2624
2743
|
*
|
|
2625
2744
|
*/
|
|
2626
2745
|
checked?: boolean;
|
|
2746
|
+
/**
|
|
2747
|
+
* @remarks
|
|
2748
|
+
* The menu will be in either an enabled or disabled state
|
|
2749
|
+
*
|
|
2750
|
+
*/
|
|
2751
|
+
enabled: boolean;
|
|
2627
2752
|
/**
|
|
2628
2753
|
* @remarks
|
|
2629
2754
|
* Unique ID for the menu
|
|
@@ -2682,6 +2807,12 @@ export interface IMenuCreationParams {
|
|
|
2682
2807
|
*
|
|
2683
2808
|
*/
|
|
2684
2809
|
displayStringId?: string;
|
|
2810
|
+
/**
|
|
2811
|
+
* @remarks
|
|
2812
|
+
* Whether the menu should be enabled or disabled
|
|
2813
|
+
*
|
|
2814
|
+
*/
|
|
2815
|
+
enabled?: boolean;
|
|
2685
2816
|
/**
|
|
2686
2817
|
* @remarks
|
|
2687
2818
|
* The name of the menu
|
|
@@ -3303,46 +3434,127 @@ export interface IRegisterExtensionOptionalParameters {
|
|
|
3303
3434
|
* the editor evolves.
|
|
3304
3435
|
*/
|
|
3305
3436
|
export interface ISimpleTool {
|
|
3437
|
+
/**
|
|
3438
|
+
* @remarks
|
|
3439
|
+
* Get a reference to the menu component that was automatically
|
|
3440
|
+
* created for the tool This generally only happens if the tool
|
|
3441
|
+
* is a global tool (i.e. has a pane and does not have a tool
|
|
3442
|
+
* rail component) In this case a menu item is automatically
|
|
3443
|
+
* created and some visibility controls are inserted. If you
|
|
3444
|
+
* have additional menu options you want to add, this is the
|
|
3445
|
+
* ideal control to add children to
|
|
3446
|
+
*
|
|
3447
|
+
*/
|
|
3306
3448
|
get menu(): IMenu | undefined;
|
|
3449
|
+
/**
|
|
3450
|
+
* @remarks
|
|
3451
|
+
* Get the tool name
|
|
3452
|
+
*
|
|
3453
|
+
*/
|
|
3307
3454
|
get name(): string;
|
|
3455
|
+
/**
|
|
3456
|
+
* @remarks
|
|
3457
|
+
* Get a reference to the root (primary) property pane
|
|
3458
|
+
* component - if no component was requested, this function
|
|
3459
|
+
* will throw an error
|
|
3460
|
+
*
|
|
3461
|
+
*/
|
|
3308
3462
|
get pane(): ISimpleToolPaneComponent;
|
|
3463
|
+
/**
|
|
3464
|
+
* @remarks
|
|
3465
|
+
* Get a reference to the IPlayerUISession. This is the primary
|
|
3466
|
+
* interface to the editor UI and all of the editor extension
|
|
3467
|
+
* controls
|
|
3468
|
+
*
|
|
3469
|
+
*/
|
|
3309
3470
|
get session(): IPlayerUISession;
|
|
3471
|
+
/**
|
|
3472
|
+
* @remarks
|
|
3473
|
+
* Get a reference to the status bar component - if no
|
|
3474
|
+
* component was requested, this function will throw an error
|
|
3475
|
+
*
|
|
3476
|
+
*/
|
|
3310
3477
|
get statusBar(): ISimpleToolStatusBarComponent;
|
|
3478
|
+
/**
|
|
3479
|
+
* @remarks
|
|
3480
|
+
* Get a reference to the tool rail component - if no component
|
|
3481
|
+
* was requested, this function will throw an error
|
|
3482
|
+
*
|
|
3483
|
+
*/
|
|
3311
3484
|
get toolRail(): ISimpleToolRailComponent;
|
|
3312
3485
|
/**
|
|
3313
3486
|
* @remarks
|
|
3487
|
+
* Find a pane or subpane by it's unique ID.
|
|
3488
|
+
*
|
|
3314
3489
|
*/
|
|
3315
3490
|
findPane(idString: string): ISimpleToolPaneComponent | undefined;
|
|
3316
3491
|
/**
|
|
3317
3492
|
* @remarks
|
|
3493
|
+
* Hide a particular pane or subpane by it's unique ID. If no
|
|
3494
|
+
* ID is provided (or cannot be found) the function will throw
|
|
3495
|
+
* an error Although the parent pane is used to execute the
|
|
3496
|
+
* visibility request, the hidePane function will NOT affect
|
|
3497
|
+
* the visibility of any sibling panes -- so it is possible to
|
|
3498
|
+
* hide all of the child panes of a parent using this function
|
|
3499
|
+
*
|
|
3318
3500
|
*/
|
|
3319
3501
|
hidePane(idString?: string): void;
|
|
3320
3502
|
/**
|
|
3321
3503
|
* @remarks
|
|
3504
|
+
* Send a tagged Debug log message to the console. The tag will
|
|
3505
|
+
* contain the tool name
|
|
3506
|
+
*
|
|
3322
3507
|
*/
|
|
3323
3508
|
logDebug(message: string): void;
|
|
3324
3509
|
/**
|
|
3325
3510
|
* @remarks
|
|
3511
|
+
* Send a tagged Error log message to the console. The tag will
|
|
3512
|
+
* contain the tool name
|
|
3513
|
+
*
|
|
3326
3514
|
*/
|
|
3327
3515
|
logError(message: string): void;
|
|
3328
3516
|
/**
|
|
3329
3517
|
* @remarks
|
|
3518
|
+
* Send a tagged Informational log message to the console. The
|
|
3519
|
+
* tag will contain the tool name
|
|
3520
|
+
*
|
|
3330
3521
|
*/
|
|
3331
3522
|
logInfo(message: string): void;
|
|
3332
3523
|
/**
|
|
3333
3524
|
* @remarks
|
|
3525
|
+
* Send a tagged Warning log message to the console. The tag
|
|
3526
|
+
* will contain the tool name
|
|
3527
|
+
*
|
|
3334
3528
|
*/
|
|
3335
3529
|
logWarn(message: string): void;
|
|
3336
3530
|
/**
|
|
3337
3531
|
* @remarks
|
|
3532
|
+
* Show a particular pane or subpane by it's unique ID. If no
|
|
3533
|
+
* ID is provided (or cannot be found) the function will throw
|
|
3534
|
+
* an error Note that the showPane function (when used with a
|
|
3535
|
+
* child pane) will use the parent pane to execute the
|
|
3536
|
+
* visibility request. In this case, if the child panes are
|
|
3537
|
+
* marked as mututally exclusive, then the siblings of the
|
|
3538
|
+
* requested pane will be hidden
|
|
3539
|
+
*
|
|
3338
3540
|
*/
|
|
3339
3541
|
showPane(idString?: string): void;
|
|
3340
3542
|
/**
|
|
3341
3543
|
* @remarks
|
|
3544
|
+
* Much like the showPane function, but will hide all other
|
|
3545
|
+
* panes that are not the requested pane irrespective of the
|
|
3546
|
+
* exclusivity setting
|
|
3547
|
+
*
|
|
3342
3548
|
*/
|
|
3343
3549
|
showPaneExclusively(idString: string): void;
|
|
3344
3550
|
/**
|
|
3345
3551
|
* @remarks
|
|
3552
|
+
* A teardown function implemented by the ISimpleTool
|
|
3553
|
+
* implementation, and is called by the system during editor
|
|
3554
|
+
* extension shutdown. Don't override this function - instead,
|
|
3555
|
+
* implement the onTeardown event in the ISimpleToolOptions
|
|
3556
|
+
* structure
|
|
3557
|
+
*
|
|
3346
3558
|
*/
|
|
3347
3559
|
teardown(): void;
|
|
3348
3560
|
}
|
|
@@ -3361,12 +3573,61 @@ export interface ISimpleToolKeyPair {
|
|
|
3361
3573
|
* simple tool, and the optional components that are desired.
|
|
3362
3574
|
*/
|
|
3363
3575
|
export interface ISimpleToolOptions {
|
|
3576
|
+
/**
|
|
3577
|
+
* @remarks
|
|
3578
|
+
* A key binding that will activate the tool. Note that if the
|
|
3579
|
+
* tool is a modal tool, then the key binding will be tied to
|
|
3580
|
+
* the tool rail activation, and appear as a tooltip on the
|
|
3581
|
+
* tool rail button. If the tool is a global tool, then the key
|
|
3582
|
+
* binding will be tied to a menu item in the View menu, and
|
|
3583
|
+
* appear as a stateful menu item which will control the pane
|
|
3584
|
+
* visibility. If there's no pane required, then the key
|
|
3585
|
+
* binding is ignored
|
|
3586
|
+
*
|
|
3587
|
+
*/
|
|
3364
3588
|
activationKeyBinding?: ISimpleToolKeyPair;
|
|
3589
|
+
/**
|
|
3590
|
+
* @remarks
|
|
3591
|
+
* The name of the tool. This will be used to identify the tool
|
|
3592
|
+
* in the UI and logs and will be used in the View \> [Tool
|
|
3593
|
+
* Name] menu item (if it's a global tool)
|
|
3594
|
+
*
|
|
3595
|
+
*/
|
|
3365
3596
|
name: string;
|
|
3597
|
+
/**
|
|
3598
|
+
* @remarks
|
|
3599
|
+
* The finalize function is executed after each of the
|
|
3600
|
+
* components have been created and finalized during
|
|
3601
|
+
* construction
|
|
3602
|
+
*
|
|
3603
|
+
*/
|
|
3366
3604
|
onFinalize?: (tool: ISimpleTool) => void;
|
|
3605
|
+
/**
|
|
3606
|
+
* @remarks
|
|
3607
|
+
* The teardown function is executed when the tool is being
|
|
3608
|
+
* torn down and only after the individual components have
|
|
3609
|
+
* executed their own teardown functions
|
|
3610
|
+
*
|
|
3611
|
+
*/
|
|
3367
3612
|
onTeardown?: (tool: ISimpleTool) => void;
|
|
3613
|
+
/**
|
|
3614
|
+
* @remarks
|
|
3615
|
+
* The options structure for an optional property pane
|
|
3616
|
+
* component
|
|
3617
|
+
*
|
|
3618
|
+
*/
|
|
3368
3619
|
propertyPaneOptions?: ISimpleToolPaneOptions;
|
|
3620
|
+
/**
|
|
3621
|
+
* @remarks
|
|
3622
|
+
* The options structure for an optional status bar component
|
|
3623
|
+
*
|
|
3624
|
+
*/
|
|
3369
3625
|
statusBarOptions?: ISimpleToolStatusBarOptions;
|
|
3626
|
+
/**
|
|
3627
|
+
* @remarks
|
|
3628
|
+
* The options structure for an optional tool rail component
|
|
3629
|
+
*
|
|
3630
|
+
*/
|
|
3370
3631
|
toolRailOptions?: ISimpleToolRailOptions;
|
|
3371
3632
|
}
|
|
3372
3633
|
|
|
@@ -3385,26 +3646,83 @@ export interface ISimpleToolOptions {
|
|
|
3385
3646
|
* to the creator/user)
|
|
3386
3647
|
*/
|
|
3387
3648
|
export interface ISimpleToolPaneComponent {
|
|
3649
|
+
/**
|
|
3650
|
+
* @remarks
|
|
3651
|
+
* Get a list of the unique ID's of all of the child panes
|
|
3652
|
+
*
|
|
3653
|
+
*/
|
|
3388
3654
|
get childPaneList(): string[];
|
|
3655
|
+
/**
|
|
3656
|
+
* @remarks
|
|
3657
|
+
* Get the unique ID of the pane
|
|
3658
|
+
*
|
|
3659
|
+
*/
|
|
3389
3660
|
get id(): string;
|
|
3661
|
+
/**
|
|
3662
|
+
* @remarks
|
|
3663
|
+
* Check the visibility of the pane
|
|
3664
|
+
*
|
|
3665
|
+
*/
|
|
3390
3666
|
get isVisible(): boolean;
|
|
3667
|
+
/**
|
|
3668
|
+
* @remarks
|
|
3669
|
+
* Get a reference to actual property pane implementation that
|
|
3670
|
+
* was constructed by the tool. This reference is used to
|
|
3671
|
+
* construct the UI components that are displayed in the pane.
|
|
3672
|
+
*
|
|
3673
|
+
*/
|
|
3391
3674
|
get pane(): IPropertyPane;
|
|
3675
|
+
/**
|
|
3676
|
+
* @remarks
|
|
3677
|
+
* Get a reference to the IPlayerUISession. This is the primary
|
|
3678
|
+
* interface to the editor UI and all of the editor extension
|
|
3679
|
+
* controls
|
|
3680
|
+
*
|
|
3681
|
+
*/
|
|
3392
3682
|
get session(): IPlayerUISession;
|
|
3683
|
+
/**
|
|
3684
|
+
* @remarks
|
|
3685
|
+
* Get a reference to the parent tool.
|
|
3686
|
+
*
|
|
3687
|
+
*/
|
|
3393
3688
|
get simpleTool(): ISimpleTool;
|
|
3394
3689
|
/**
|
|
3395
3690
|
* @remarks
|
|
3691
|
+
* Find a pane reference by unique ID
|
|
3692
|
+
*
|
|
3396
3693
|
*/
|
|
3397
3694
|
findPane(idString: string): ISimpleToolPaneComponent | undefined;
|
|
3398
3695
|
/**
|
|
3399
3696
|
* @remarks
|
|
3697
|
+
* Hide the pane. Although the parent pane is used to execute
|
|
3698
|
+
* the visibility request, the hidePane function will NOT
|
|
3699
|
+
* affect the visibility of any sibling panes -- so it is
|
|
3700
|
+
* possible to hide all of the child panes of a parent using
|
|
3701
|
+
* this function
|
|
3702
|
+
*
|
|
3400
3703
|
*/
|
|
3401
3704
|
hidePane(): void;
|
|
3402
3705
|
/**
|
|
3403
3706
|
* @remarks
|
|
3707
|
+
* This causes the reconstruction of the pane (and the child
|
|
3708
|
+
* panes) as if the tool was being constructed for the first
|
|
3709
|
+
* time. This is unfortunately necessary until such time that
|
|
3710
|
+
* all of our UI components are able to communicate dynamically
|
|
3711
|
+
* with their client counterparts. Certain controls require a
|
|
3712
|
+
* full teardown and reconstruction to properly update their
|
|
3713
|
+
* state. This is undergoing code changes and should become
|
|
3714
|
+
* unnecessary in the future.
|
|
3715
|
+
*
|
|
3404
3716
|
*/
|
|
3405
3717
|
reconstructPane(): void;
|
|
3406
3718
|
/**
|
|
3407
3719
|
* @remarks
|
|
3720
|
+
* Show the pane. Note, if this is a sub-pane, then this
|
|
3721
|
+
* function will ask the parent for permission to show, and may
|
|
3722
|
+
* result in the visibility of any sibling panes to change as a
|
|
3723
|
+
* result (depending on the `mutually exclusive visibility`
|
|
3724
|
+
* flag)
|
|
3725
|
+
*
|
|
3408
3726
|
*/
|
|
3409
3727
|
showPane(): void;
|
|
3410
3728
|
}
|
|
@@ -3426,22 +3744,85 @@ export interface ISimpleToolPaneComponent {
|
|
|
3426
3744
|
* pane to finalize itself.
|
|
3427
3745
|
*/
|
|
3428
3746
|
export interface ISimpleToolPaneOptions {
|
|
3747
|
+
/**
|
|
3748
|
+
* @remarks
|
|
3749
|
+
* The id of the child pane that should be visible when the
|
|
3750
|
+
* parent pane is first shown, or the editor tool is
|
|
3751
|
+
* constructed and finalized
|
|
3752
|
+
*
|
|
3753
|
+
*/
|
|
3429
3754
|
childPaneInitiallyVisible?: string;
|
|
3755
|
+
/**
|
|
3756
|
+
* @remarks
|
|
3757
|
+
* An optional array of child panes. These panes are set up
|
|
3758
|
+
* exactly the same as the top level pane, but are displayed as
|
|
3759
|
+
* children inside the parent pane.
|
|
3760
|
+
*
|
|
3761
|
+
*/
|
|
3430
3762
|
childPanes?: ISimpleToolPaneOptions[];
|
|
3763
|
+
/**
|
|
3764
|
+
* @remarks
|
|
3765
|
+
* An optional flag to indicate whether the child panes are
|
|
3766
|
+
* mutually exclusive. If this is true, then only one child
|
|
3767
|
+
* pane can be visible at a time. If this is false, then
|
|
3768
|
+
* multiple child panes can be visible at the same time.
|
|
3769
|
+
* Visibility is controlled either through `showPane` or
|
|
3770
|
+
* `hidePane` functions of the `ISimpleToolPaneComponent` or
|
|
3771
|
+
* through the visibility methods in the top level tool
|
|
3772
|
+
* (`ISimpleTool`)
|
|
3773
|
+
*
|
|
3774
|
+
*/
|
|
3431
3775
|
childPanesMutuallyExclusive?: boolean;
|
|
3776
|
+
/**
|
|
3777
|
+
* @remarks
|
|
3778
|
+
* The unique identifier for this pane. This is used to
|
|
3779
|
+
* identify the pane in the tool's pane hierarchy.
|
|
3780
|
+
*
|
|
3781
|
+
*/
|
|
3432
3782
|
id: string;
|
|
3433
3783
|
onBeginFinalize?: (pane: ISimpleToolPaneComponent) => void;
|
|
3434
3784
|
onEndFinalize?: (pane: ISimpleToolPaneComponent) => void;
|
|
3435
3785
|
onHide?: (pane: ISimpleToolPaneComponent) => void;
|
|
3436
3786
|
onShow?: (pane: ISimpleToolPaneComponent) => void;
|
|
3437
3787
|
onTeardown?: (pane: ISimpleToolPaneComponent) => void;
|
|
3788
|
+
/**
|
|
3789
|
+
* @remarks
|
|
3790
|
+
* The title of the pane. This will be displayed in the title
|
|
3791
|
+
* bar of the pane.
|
|
3792
|
+
*
|
|
3793
|
+
*/
|
|
3438
3794
|
titleAltText: string;
|
|
3795
|
+
/**
|
|
3796
|
+
* @remarks
|
|
3797
|
+
* The string id of the title of the pane. This will be
|
|
3798
|
+
* displayed in the title bar of the pane if it exists in the
|
|
3799
|
+
* language file, otherwise the titleAltText will be used.
|
|
3800
|
+
*
|
|
3801
|
+
*/
|
|
3439
3802
|
titleStringId?: string;
|
|
3440
3803
|
}
|
|
3441
3804
|
|
|
3442
3805
|
export interface ISimpleToolRailComponent {
|
|
3806
|
+
/**
|
|
3807
|
+
* @remarks
|
|
3808
|
+
* Get a reference to the IPlayerUISession. This is the primary
|
|
3809
|
+
* interface to the editor UI and all of the editor extension
|
|
3810
|
+
* controls
|
|
3811
|
+
*
|
|
3812
|
+
*/
|
|
3443
3813
|
get session(): IPlayerUISession;
|
|
3814
|
+
/**
|
|
3815
|
+
* @remarks
|
|
3816
|
+
* Get a reference to the parent tool.
|
|
3817
|
+
*
|
|
3818
|
+
*/
|
|
3444
3819
|
get simpleTool(): ISimpleTool;
|
|
3820
|
+
/**
|
|
3821
|
+
* @remarks
|
|
3822
|
+
* Get the implementation interface of the underlying tool rail
|
|
3823
|
+
* component
|
|
3824
|
+
*
|
|
3825
|
+
*/
|
|
3445
3826
|
get toolRail(): IModalTool;
|
|
3446
3827
|
}
|
|
3447
3828
|
|
|
@@ -3459,14 +3840,47 @@ export interface ISimpleToolRailComponent {
|
|
|
3459
3840
|
* gameplay interaction
|
|
3460
3841
|
*/
|
|
3461
3842
|
export interface ISimpleToolRailOptions {
|
|
3843
|
+
/**
|
|
3844
|
+
* @remarks
|
|
3845
|
+
* The text for the tool description
|
|
3846
|
+
*
|
|
3847
|
+
*/
|
|
3462
3848
|
displayAltText: string;
|
|
3849
|
+
/**
|
|
3850
|
+
* @remarks
|
|
3851
|
+
* The string ID for the tool description if it is in the
|
|
3852
|
+
* localization language file.
|
|
3853
|
+
*
|
|
3854
|
+
*/
|
|
3463
3855
|
displayStringId?: string;
|
|
3856
|
+
/**
|
|
3857
|
+
* @remarks
|
|
3858
|
+
* The icon for the tool rail button. This is generally a URL
|
|
3859
|
+
* to an image file in the editor extension resource pack e.g.
|
|
3860
|
+
* `pack://textures/my-tool-icon.png`
|
|
3861
|
+
*
|
|
3862
|
+
*/
|
|
3464
3863
|
icon: string;
|
|
3465
3864
|
onActivate?: (component: ISimpleToolRailComponent) => void;
|
|
3466
3865
|
onDeactivate?: (component: ISimpleToolRailComponent) => void;
|
|
3467
3866
|
onFinalize?: (component: ISimpleToolRailComponent) => void;
|
|
3468
3867
|
onTeardown?: (component: ISimpleToolRailComponent) => void;
|
|
3868
|
+
/**
|
|
3869
|
+
* @remarks
|
|
3870
|
+
* The tooltip string for the tool rail button. Note: if an
|
|
3871
|
+
* activation key binding was added to `ISimpleToolOptions`,
|
|
3872
|
+
* then the key binding will be appended to the tooltip string.
|
|
3873
|
+
*
|
|
3874
|
+
*/
|
|
3469
3875
|
tooltipAltText: string;
|
|
3876
|
+
/**
|
|
3877
|
+
* @remarks
|
|
3878
|
+
* The string ID for the tooltip string if it is in the
|
|
3879
|
+
* localization language file. Note: if an activation key
|
|
3880
|
+
* binding was added to `ISimpleToolOptions`, then the key
|
|
3881
|
+
* binding will be appended to the tooltip string.
|
|
3882
|
+
*
|
|
3883
|
+
*/
|
|
3470
3884
|
tooltipStringId?: string;
|
|
3471
3885
|
}
|
|
3472
3886
|
|
|
@@ -3483,13 +3897,36 @@ export interface ISimpleToolStatusBarComponent {
|
|
|
3483
3897
|
* status bar item for a simple tool.
|
|
3484
3898
|
*/
|
|
3485
3899
|
export interface ISimpleToolStatusBarOptions {
|
|
3900
|
+
/**
|
|
3901
|
+
* @remarks
|
|
3902
|
+
* The alignment of the status bar item within the parent
|
|
3903
|
+
* status bar container
|
|
3904
|
+
*
|
|
3905
|
+
*/
|
|
3486
3906
|
alignment: EditorStatusBarAlignment;
|
|
3907
|
+
/**
|
|
3908
|
+
* @remarks
|
|
3909
|
+
* The text for the status bar item
|
|
3910
|
+
*
|
|
3911
|
+
*/
|
|
3487
3912
|
displayAltText: string;
|
|
3488
3913
|
onFinalize?: (statusBar: ISimpleToolStatusBarComponent) => void;
|
|
3489
3914
|
onHide?: (statusBar: ISimpleToolStatusBarComponent) => void;
|
|
3490
3915
|
onShow?: (statusBar: ISimpleToolStatusBarComponent) => void;
|
|
3491
3916
|
onTeardown?: (statusBar: ISimpleToolStatusBarComponent) => void;
|
|
3917
|
+
/**
|
|
3918
|
+
* @remarks
|
|
3919
|
+
* The size of the status bar item within the parent status bar
|
|
3920
|
+
* container
|
|
3921
|
+
*
|
|
3922
|
+
*/
|
|
3492
3923
|
size: number;
|
|
3924
|
+
/**
|
|
3925
|
+
* @remarks
|
|
3926
|
+
* Determine the status bar visibility based on the existence
|
|
3927
|
+
* and visibility of the tool's root property pane
|
|
3928
|
+
*
|
|
3929
|
+
*/
|
|
3493
3930
|
visibility?: SimpleToolStatusBarVisibility;
|
|
3494
3931
|
}
|
|
3495
3932
|
|
|
@@ -3576,6 +4013,20 @@ export declare function executeLargeOperation(
|
|
|
3576
4013
|
selection: Selection,
|
|
3577
4014
|
operation: (blockLocation: minecraftserver.Vector3) => void,
|
|
3578
4015
|
): Promise<void>;
|
|
4016
|
+
/**
|
|
4017
|
+
* @remarks
|
|
4018
|
+
* Executes an operation over a BlockLocationIterator via
|
|
4019
|
+
* chunks to allow splitting operation over multiple game ticks
|
|
4020
|
+
*
|
|
4021
|
+
* @param blockLocationIterator
|
|
4022
|
+
* the selection to iterator over
|
|
4023
|
+
* @param operation
|
|
4024
|
+
* the operation to apply over each block location
|
|
4025
|
+
*/
|
|
4026
|
+
export declare function executeLargeOperationFromIterator(
|
|
4027
|
+
blockLocationIterator: minecraftserver.BlockLocationIterator,
|
|
4028
|
+
operation: (blockLocation: minecraftserver.Vector3) => void,
|
|
4029
|
+
): Promise<void>;
|
|
3579
4030
|
/**
|
|
3580
4031
|
* @remarks
|
|
3581
4032
|
* Returns a string array of the default block types for the
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@minecraft/server-editor",
|
|
3
|
-
"version": "0.1.0-beta.1.21.
|
|
3
|
+
"version": "0.1.0-beta.1.21.10-preview.20",
|
|
4
4
|
"description": "",
|
|
5
5
|
"contributors": [
|
|
6
6
|
{
|
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
],
|
|
15
15
|
"dependencies": {
|
|
16
16
|
"@minecraft/common": "^1.0.0",
|
|
17
|
-
"@minecraft/server": "^1.
|
|
17
|
+
"@minecraft/server": "^1.13.0-beta.1.21.10-preview.20"
|
|
18
18
|
},
|
|
19
19
|
"license": "MIT"
|
|
20
20
|
}
|