@minecraft/server-editor 0.1.0-beta.1.20.60-preview.26 → 0.1.0-beta.1.20.70-preview.21
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/index.d.ts +85 -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.21"
|
|
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
|
|
@@ -1102,6 +1113,7 @@ export class ExtensionContextAfterEvents {
|
|
|
1102
1113
|
*
|
|
1103
1114
|
*/
|
|
1104
1115
|
readonly modeChange: ModeChangeAfterEventSignal;
|
|
1116
|
+
readonly primarySelectionChange: PrimarySelectionChangeAfterEventSignal;
|
|
1105
1117
|
}
|
|
1106
1118
|
|
|
1107
1119
|
/**
|
|
@@ -1341,6 +1353,28 @@ export class PlaytestManager {
|
|
|
1341
1353
|
getPlaytestSessionAvailability(): PlaytestSessionResult;
|
|
1342
1354
|
}
|
|
1343
1355
|
|
|
1356
|
+
export class PrimarySelectionChangeAfterEventSignal {
|
|
1357
|
+
private constructor();
|
|
1358
|
+
/**
|
|
1359
|
+
* @remarks
|
|
1360
|
+
* This function can't be called in read-only mode.
|
|
1361
|
+
*
|
|
1362
|
+
*/
|
|
1363
|
+
subscribe(callback: (arg: SelectionEventAfterEvent) => void): (arg: SelectionEventAfterEvent) => void;
|
|
1364
|
+
/**
|
|
1365
|
+
* @remarks
|
|
1366
|
+
* This function can't be called in read-only mode.
|
|
1367
|
+
*
|
|
1368
|
+
* @throws This function can throw errors.
|
|
1369
|
+
*/
|
|
1370
|
+
unsubscribe(callback: (arg: SelectionEventAfterEvent) => void): void;
|
|
1371
|
+
}
|
|
1372
|
+
|
|
1373
|
+
export class PrimarySelectionChangedEvent {
|
|
1374
|
+
private constructor();
|
|
1375
|
+
readonly volume?: minecraftserver.CompoundBlockVolume;
|
|
1376
|
+
}
|
|
1377
|
+
|
|
1344
1378
|
/**
|
|
1345
1379
|
* The Selection represents a volume in space, which may
|
|
1346
1380
|
* potentially be made up of one or more block locations.
|
|
@@ -1552,6 +1586,11 @@ export class Selection {
|
|
|
1552
1586
|
setOutlineColor(color: minecraftserver.RGBA): void;
|
|
1553
1587
|
}
|
|
1554
1588
|
|
|
1589
|
+
export class SelectionEventAfterEvent {
|
|
1590
|
+
private constructor();
|
|
1591
|
+
readonly selectionEvent: PrimarySelectionChangedEvent;
|
|
1592
|
+
}
|
|
1593
|
+
|
|
1555
1594
|
/**
|
|
1556
1595
|
* The SelectionManager (accessible from the {@link
|
|
1557
1596
|
* ExtensionContext}) is responsible for the management of all
|
|
@@ -2206,6 +2245,20 @@ export interface IDropdownItem {
|
|
|
2206
2245
|
readonly value: number;
|
|
2207
2246
|
}
|
|
2208
2247
|
|
|
2248
|
+
/**
|
|
2249
|
+
* Dropdown property item specific functionality
|
|
2250
|
+
*/
|
|
2251
|
+
export interface IDropdownPropertyItemMixIn {
|
|
2252
|
+
/**
|
|
2253
|
+
* @remarks
|
|
2254
|
+
* Used to update the Dropdown options in the control. Will
|
|
2255
|
+
* trigger onChange with -1 as the old value due to the list
|
|
2256
|
+
* changing entries.
|
|
2257
|
+
*
|
|
2258
|
+
*/
|
|
2259
|
+
updateDropdownItems(dropdownItems: IDropdownItem[], newValue: number): void;
|
|
2260
|
+
}
|
|
2261
|
+
|
|
2209
2262
|
/**
|
|
2210
2263
|
* Returned from an event subscription. Provides functionality
|
|
2211
2264
|
* for cleaning up listeners
|
|
@@ -2509,6 +2562,14 @@ export interface IPropertyItemOptionsSubPane extends IPropertyItemOptions {
|
|
|
2509
2562
|
pane: IPropertyPane;
|
|
2510
2563
|
}
|
|
2511
2564
|
|
|
2565
|
+
/**
|
|
2566
|
+
* Localization string id for multiline text component.
|
|
2567
|
+
*/
|
|
2568
|
+
// @ts-ignore Class inheritance allowed for native defined classes
|
|
2569
|
+
export interface IPropertyItemOptionsText extends IPropertyItemOptions {
|
|
2570
|
+
valueStringId: string;
|
|
2571
|
+
}
|
|
2572
|
+
|
|
2512
2573
|
// @ts-ignore Class inheritance allowed for native defined classes
|
|
2513
2574
|
export interface IPropertyItemOptionsVector3 extends IPropertyItemOptions {
|
|
2514
2575
|
/**
|
|
@@ -2534,19 +2595,22 @@ export interface IPropertyItemOptionsVector3 extends IPropertyItemOptions {
|
|
|
2534
2595
|
maxZ?: number;
|
|
2535
2596
|
/**
|
|
2536
2597
|
* @remarks
|
|
2537
|
-
* The min possible value for the X axis. By default
|
|
2598
|
+
* The min possible value for the X axis. By default
|
|
2599
|
+
* Number.MIN_SAFE_INTEGER
|
|
2538
2600
|
*
|
|
2539
2601
|
*/
|
|
2540
2602
|
minX?: number;
|
|
2541
2603
|
/**
|
|
2542
2604
|
* @remarks
|
|
2543
|
-
* The min possible value for the Y axis. By default
|
|
2605
|
+
* The min possible value for the Y axis. By default
|
|
2606
|
+
* Number.MIN_SAFE_INTEGER
|
|
2544
2607
|
*
|
|
2545
2608
|
*/
|
|
2546
2609
|
minY?: number;
|
|
2547
2610
|
/**
|
|
2548
2611
|
* @remarks
|
|
2549
|
-
* The min possible value for the Z axis. By default
|
|
2612
|
+
* The min possible value for the Z axis. By default
|
|
2613
|
+
* Number.MIN_SAFE_INTEGER
|
|
2550
2614
|
*
|
|
2551
2615
|
*/
|
|
2552
2616
|
minZ?: number;
|
|
@@ -2646,11 +2710,16 @@ export interface IPropertyPane {
|
|
|
2646
2710
|
* Adds an DropDown item to the pane.
|
|
2647
2711
|
*
|
|
2648
2712
|
*/
|
|
2649
|
-
addDropdown<
|
|
2713
|
+
addDropdown<
|
|
2714
|
+
T extends Omit<PropertyBag, Prop> & {
|
|
2715
|
+
[key in Prop]: number;
|
|
2716
|
+
},
|
|
2717
|
+
Prop extends keyof T & string,
|
|
2718
|
+
>(
|
|
2650
2719
|
obj: T,
|
|
2651
2720
|
property: Prop,
|
|
2652
2721
|
options?: IPropertyItemOptionsDropdown,
|
|
2653
|
-
):
|
|
2722
|
+
): IDropdownPropertyItem<T, Prop>;
|
|
2654
2723
|
/**
|
|
2655
2724
|
* @remarks
|
|
2656
2725
|
* Adds an EntityPicker item to the pane.
|
|
@@ -2681,6 +2750,16 @@ export interface IPropertyPane {
|
|
|
2681
2750
|
property: Prop,
|
|
2682
2751
|
options?: IPropertyItemOptions,
|
|
2683
2752
|
): IPropertyItem<T, Prop>;
|
|
2753
|
+
/**
|
|
2754
|
+
* @remarks
|
|
2755
|
+
* Adds a multiline Text item to the pane.
|
|
2756
|
+
*
|
|
2757
|
+
*/
|
|
2758
|
+
addText<T extends PropertyBag, Prop extends keyof T & string>(
|
|
2759
|
+
obj: T,
|
|
2760
|
+
property: Prop,
|
|
2761
|
+
options?: IPropertyItemOptionsText,
|
|
2762
|
+
): IPropertyItem<T, Prop>;
|
|
2684
2763
|
/**
|
|
2685
2764
|
* @remarks
|
|
2686
2765
|
* 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.21",
|
|
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.21"
|
|
18
18
|
},
|
|
19
19
|
"license": "MIT"
|
|
20
20
|
}
|