@minecraft/server-editor 0.1.0-beta.1.20.60-preview.26 → 0.1.0-beta.1.20.70-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 +57 -6
- 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.20.
|
|
17
|
+
* "version": "0.1.0-beta.1.20.70-preview.20"
|
|
18
18
|
* }
|
|
19
19
|
* ```
|
|
20
20
|
*
|
|
@@ -173,6 +173,7 @@ export declare enum EDITOR_PANE_PROPERTY_ITEM_TYPE {
|
|
|
173
173
|
Number = 'editorUI:Number',
|
|
174
174
|
String = 'editorUI:String',
|
|
175
175
|
SubPane = 'editorUI:SubPane',
|
|
176
|
+
Text = 'editorUI:Text',
|
|
176
177
|
Vec3 = 'editorUI:Vec3',
|
|
177
178
|
}
|
|
178
179
|
|
|
@@ -461,6 +462,16 @@ export type IActionPropertyItem<T extends PropertyBag, Prop extends keyof T & st
|
|
|
461
462
|
replaceBoundAction(action: RegisteredAction<NoArgsAction> | undefined): void;
|
|
462
463
|
};
|
|
463
464
|
|
|
465
|
+
/**
|
|
466
|
+
* A property item which supports Dropdown properties
|
|
467
|
+
*/
|
|
468
|
+
export type IDropdownPropertyItem<
|
|
469
|
+
T extends Omit<PropertyBag, Prop> & {
|
|
470
|
+
[key in Prop]: number;
|
|
471
|
+
},
|
|
472
|
+
Prop extends keyof T & string,
|
|
473
|
+
> = IPropertyItem<T, Prop> & IDropdownPropertyItemMixIn;
|
|
474
|
+
|
|
464
475
|
/**
|
|
465
476
|
* The IPlayerUISession represents the editor user interface
|
|
466
477
|
* for a given player and given extension. Extensions
|
|
@@ -2206,6 +2217,20 @@ export interface IDropdownItem {
|
|
|
2206
2217
|
readonly value: number;
|
|
2207
2218
|
}
|
|
2208
2219
|
|
|
2220
|
+
/**
|
|
2221
|
+
* Dropdown property item specific functionality
|
|
2222
|
+
*/
|
|
2223
|
+
export interface IDropdownPropertyItemMixIn {
|
|
2224
|
+
/**
|
|
2225
|
+
* @remarks
|
|
2226
|
+
* Used to update the Dropdown options in the control. Will
|
|
2227
|
+
* trigger onChange with -1 as the old value due to the list
|
|
2228
|
+
* changing entries.
|
|
2229
|
+
*
|
|
2230
|
+
*/
|
|
2231
|
+
updateDropdownItems(dropdownItems: IDropdownItem[], newValue: number): void;
|
|
2232
|
+
}
|
|
2233
|
+
|
|
2209
2234
|
/**
|
|
2210
2235
|
* Returned from an event subscription. Provides functionality
|
|
2211
2236
|
* for cleaning up listeners
|
|
@@ -2509,6 +2534,14 @@ export interface IPropertyItemOptionsSubPane extends IPropertyItemOptions {
|
|
|
2509
2534
|
pane: IPropertyPane;
|
|
2510
2535
|
}
|
|
2511
2536
|
|
|
2537
|
+
/**
|
|
2538
|
+
* Localization string id for multiline text component.
|
|
2539
|
+
*/
|
|
2540
|
+
// @ts-ignore Class inheritance allowed for native defined classes
|
|
2541
|
+
export interface IPropertyItemOptionsText extends IPropertyItemOptions {
|
|
2542
|
+
valueStringId: string;
|
|
2543
|
+
}
|
|
2544
|
+
|
|
2512
2545
|
// @ts-ignore Class inheritance allowed for native defined classes
|
|
2513
2546
|
export interface IPropertyItemOptionsVector3 extends IPropertyItemOptions {
|
|
2514
2547
|
/**
|
|
@@ -2534,19 +2567,22 @@ export interface IPropertyItemOptionsVector3 extends IPropertyItemOptions {
|
|
|
2534
2567
|
maxZ?: number;
|
|
2535
2568
|
/**
|
|
2536
2569
|
* @remarks
|
|
2537
|
-
* The min possible value for the X axis. By default
|
|
2570
|
+
* The min possible value for the X axis. By default
|
|
2571
|
+
* Number.MIN_SAFE_INTEGER
|
|
2538
2572
|
*
|
|
2539
2573
|
*/
|
|
2540
2574
|
minX?: number;
|
|
2541
2575
|
/**
|
|
2542
2576
|
* @remarks
|
|
2543
|
-
* The min possible value for the Y axis. By default
|
|
2577
|
+
* The min possible value for the Y axis. By default
|
|
2578
|
+
* Number.MIN_SAFE_INTEGER
|
|
2544
2579
|
*
|
|
2545
2580
|
*/
|
|
2546
2581
|
minY?: number;
|
|
2547
2582
|
/**
|
|
2548
2583
|
* @remarks
|
|
2549
|
-
* The min possible value for the Z axis. By default
|
|
2584
|
+
* The min possible value for the Z axis. By default
|
|
2585
|
+
* Number.MIN_SAFE_INTEGER
|
|
2550
2586
|
*
|
|
2551
2587
|
*/
|
|
2552
2588
|
minZ?: number;
|
|
@@ -2646,11 +2682,16 @@ export interface IPropertyPane {
|
|
|
2646
2682
|
* Adds an DropDown item to the pane.
|
|
2647
2683
|
*
|
|
2648
2684
|
*/
|
|
2649
|
-
addDropdown<
|
|
2685
|
+
addDropdown<
|
|
2686
|
+
T extends Omit<PropertyBag, Prop> & {
|
|
2687
|
+
[key in Prop]: number;
|
|
2688
|
+
},
|
|
2689
|
+
Prop extends keyof T & string,
|
|
2690
|
+
>(
|
|
2650
2691
|
obj: T,
|
|
2651
2692
|
property: Prop,
|
|
2652
2693
|
options?: IPropertyItemOptionsDropdown,
|
|
2653
|
-
):
|
|
2694
|
+
): IDropdownPropertyItem<T, Prop>;
|
|
2654
2695
|
/**
|
|
2655
2696
|
* @remarks
|
|
2656
2697
|
* Adds an EntityPicker item to the pane.
|
|
@@ -2681,6 +2722,16 @@ export interface IPropertyPane {
|
|
|
2681
2722
|
property: Prop,
|
|
2682
2723
|
options?: IPropertyItemOptions,
|
|
2683
2724
|
): IPropertyItem<T, Prop>;
|
|
2725
|
+
/**
|
|
2726
|
+
* @remarks
|
|
2727
|
+
* Adds a multiline Text item to the pane.
|
|
2728
|
+
*
|
|
2729
|
+
*/
|
|
2730
|
+
addText<T extends PropertyBag, Prop extends keyof T & string>(
|
|
2731
|
+
obj: T,
|
|
2732
|
+
property: Prop,
|
|
2733
|
+
options?: IPropertyItemOptionsText,
|
|
2734
|
+
): IPropertyItem<T, Prop>;
|
|
2684
2735
|
/**
|
|
2685
2736
|
* @remarks
|
|
2686
2737
|
* Adds a Vec3 item to the pane.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@minecraft/server-editor",
|
|
3
|
-
"version": "0.1.0-beta.1.20.
|
|
3
|
+
"version": "0.1.0-beta.1.20.70-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.10.0-beta.1.20.70-preview.20"
|
|
18
18
|
},
|
|
19
19
|
"license": "MIT"
|
|
20
20
|
}
|