@minecraft/server-editor 0.1.0-beta.1.26.0-preview.25 → 0.1.0-beta.1.26.0-preview.27
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 +160 -19
- package/package.json +3 -3
package/index.d.ts
CHANGED
|
@@ -955,17 +955,25 @@ export declare enum KeyProcessingState {
|
|
|
955
955
|
* Alignment options for UI elements
|
|
956
956
|
*/
|
|
957
957
|
export declare enum LayoutAlignment {
|
|
958
|
-
|
|
958
|
+
Start = 0,
|
|
959
959
|
Center = 1,
|
|
960
|
-
|
|
960
|
+
End = 2,
|
|
961
961
|
}
|
|
962
962
|
|
|
963
963
|
/**
|
|
964
|
-
*
|
|
964
|
+
* Flexible layout types
|
|
965
965
|
*/
|
|
966
|
-
export declare enum
|
|
967
|
-
|
|
968
|
-
|
|
966
|
+
export declare enum LayoutFlex {
|
|
967
|
+
Grow = 'Grow',
|
|
968
|
+
Shrink = 'Shrink',
|
|
969
|
+
}
|
|
970
|
+
|
|
971
|
+
/**
|
|
972
|
+
* Layout size types
|
|
973
|
+
*/
|
|
974
|
+
export declare enum LayoutSizeType {
|
|
975
|
+
Default = 0,
|
|
976
|
+
Percentage = 1,
|
|
969
977
|
}
|
|
970
978
|
|
|
971
979
|
export declare enum ListPaneEntryType {
|
|
@@ -1108,6 +1116,15 @@ export enum PaintMode {
|
|
|
1108
1116
|
Elevation = 5,
|
|
1109
1117
|
}
|
|
1110
1118
|
|
|
1119
|
+
/**
|
|
1120
|
+
* Layout directions for property panes.
|
|
1121
|
+
*/
|
|
1122
|
+
export declare enum PaneLayoutType {
|
|
1123
|
+
Vertical = 0,
|
|
1124
|
+
Horizontal = 1,
|
|
1125
|
+
Wrapping = 2,
|
|
1126
|
+
}
|
|
1127
|
+
|
|
1111
1128
|
export enum Plane {
|
|
1112
1129
|
None = 0,
|
|
1113
1130
|
XY = 1,
|
|
@@ -1487,7 +1504,7 @@ export type KeyBindingInfo = {
|
|
|
1487
1504
|
*/
|
|
1488
1505
|
export declare type LayoutSize = {
|
|
1489
1506
|
value: number;
|
|
1490
|
-
type?:
|
|
1507
|
+
type?: LayoutSizeType;
|
|
1491
1508
|
};
|
|
1492
1509
|
|
|
1493
1510
|
/**
|
|
@@ -1563,7 +1580,7 @@ export declare type ListPaneSlotLayout = {
|
|
|
1563
1580
|
|
|
1564
1581
|
export declare type ListPaneSlotLayoutEntry = {
|
|
1565
1582
|
type: ListPaneEntryType;
|
|
1566
|
-
size?: number | LayoutSize |
|
|
1583
|
+
size?: number | LayoutSize | LayoutFlex;
|
|
1567
1584
|
alignment?: LayoutAlignment;
|
|
1568
1585
|
};
|
|
1569
1586
|
|
|
@@ -1694,6 +1711,16 @@ export type NoArgsAction = {
|
|
|
1694
1711
|
readonly onExecute: () => void;
|
|
1695
1712
|
};
|
|
1696
1713
|
|
|
1714
|
+
/**
|
|
1715
|
+
* Optional style arguments for pane items
|
|
1716
|
+
*/
|
|
1717
|
+
export declare type PaneItemStyle = {
|
|
1718
|
+
width?: number | LayoutSize | LayoutFlex;
|
|
1719
|
+
minWidth?: number | LayoutSize;
|
|
1720
|
+
maxWidth?: number | LayoutSize;
|
|
1721
|
+
verticalAlignment?: LayoutAlignment;
|
|
1722
|
+
};
|
|
1723
|
+
|
|
1697
1724
|
export type PropertyBag = Record<string, unknown>;
|
|
1698
1725
|
|
|
1699
1726
|
/**
|
|
@@ -2586,6 +2613,13 @@ export class Cursor {
|
|
|
2586
2613
|
* @throws This property can throw when used.
|
|
2587
2614
|
*/
|
|
2588
2615
|
readonly maxViewBlockDistance: number;
|
|
2616
|
+
/**
|
|
2617
|
+
* @remarks
|
|
2618
|
+
* This function can't be called in restricted-execution mode.
|
|
2619
|
+
*
|
|
2620
|
+
* @throws This function can throw errors.
|
|
2621
|
+
*/
|
|
2622
|
+
getDefaultProperties(): CursorProperties;
|
|
2589
2623
|
/**
|
|
2590
2624
|
* @remarks
|
|
2591
2625
|
* Get the world position of the 3D block cursor
|
|
@@ -2638,6 +2672,20 @@ export class Cursor {
|
|
|
2638
2672
|
* @throws This function can throw errors.
|
|
2639
2673
|
*/
|
|
2640
2674
|
moveBy(offset: minecraftserver.Vector3): minecraftserver.Vector3;
|
|
2675
|
+
/**
|
|
2676
|
+
* @remarks
|
|
2677
|
+
* This function can't be called in restricted-execution mode.
|
|
2678
|
+
*
|
|
2679
|
+
* @throws This function can throw errors.
|
|
2680
|
+
*/
|
|
2681
|
+
popPropertiesById(identifier: string): void;
|
|
2682
|
+
/**
|
|
2683
|
+
* @remarks
|
|
2684
|
+
* This function can't be called in restricted-execution mode.
|
|
2685
|
+
*
|
|
2686
|
+
* @throws This function can throw errors.
|
|
2687
|
+
*/
|
|
2688
|
+
pushPropertiesById(properties: CursorProperties, identifier: string): void;
|
|
2641
2689
|
/**
|
|
2642
2690
|
* @remarks
|
|
2643
2691
|
* Reset the 3D block cursor to the system default state
|
|
@@ -2668,10 +2716,18 @@ export class Cursor {
|
|
|
2668
2716
|
* @throws This function can throw errors.
|
|
2669
2717
|
*/
|
|
2670
2718
|
show(): void;
|
|
2719
|
+
/**
|
|
2720
|
+
* @remarks
|
|
2721
|
+
* This function can't be called in restricted-execution mode.
|
|
2722
|
+
*
|
|
2723
|
+
* @throws This function can throw errors.
|
|
2724
|
+
*/
|
|
2725
|
+
updatePropertiesById(properties: CursorProperties, identifier?: string): void;
|
|
2671
2726
|
}
|
|
2672
2727
|
|
|
2673
2728
|
export class CursorPropertiesChangeAfterEvent {
|
|
2674
2729
|
private constructor();
|
|
2730
|
+
readonly identifier?: string;
|
|
2675
2731
|
readonly position?: CursorPosition;
|
|
2676
2732
|
readonly properties: CursorProperties;
|
|
2677
2733
|
}
|
|
@@ -4339,12 +4395,19 @@ export class Widget {
|
|
|
4339
4395
|
*
|
|
4340
4396
|
*/
|
|
4341
4397
|
collisionType: WidgetCollisionType;
|
|
4398
|
+
dimensionId?: string;
|
|
4342
4399
|
/**
|
|
4343
4400
|
* @throws This property can throw when used.
|
|
4344
4401
|
*
|
|
4345
4402
|
* {@link InvalidWidgetError}
|
|
4346
4403
|
*/
|
|
4347
4404
|
readonly group: WidgetGroup;
|
|
4405
|
+
/**
|
|
4406
|
+
* @remarks
|
|
4407
|
+
* This property can't be edited in restricted-execution mode.
|
|
4408
|
+
*
|
|
4409
|
+
*/
|
|
4410
|
+
ignoreEditorModeVisibilityOverride: boolean;
|
|
4348
4411
|
/**
|
|
4349
4412
|
* @remarks
|
|
4350
4413
|
* This property can't be edited in restricted-execution mode.
|
|
@@ -6466,6 +6529,12 @@ export interface IDropdownPropertyItemOptions extends IPropertyItemOptionsBase {
|
|
|
6466
6529
|
*
|
|
6467
6530
|
*/
|
|
6468
6531
|
hiddenLabel?: boolean;
|
|
6532
|
+
/**
|
|
6533
|
+
* @remarks
|
|
6534
|
+
* Displays label inline. If undefined, it will be true.
|
|
6535
|
+
*
|
|
6536
|
+
*/
|
|
6537
|
+
inlineLabel?: boolean;
|
|
6469
6538
|
/**
|
|
6470
6539
|
* @remarks
|
|
6471
6540
|
* Determines how many entries can be displayed before
|
|
@@ -6572,7 +6641,7 @@ export interface IImagePropertyItemOptions extends IPropertyItemOptionsBase {
|
|
|
6572
6641
|
/**
|
|
6573
6642
|
* @remarks
|
|
6574
6643
|
* Alignment of the image in the container. If not defined,
|
|
6575
|
-
* LayoutAlignment.
|
|
6644
|
+
* LayoutAlignment.Start is used.
|
|
6576
6645
|
*
|
|
6577
6646
|
*/
|
|
6578
6647
|
alignment?: LayoutAlignment;
|
|
@@ -6892,6 +6961,13 @@ export interface IListPanePropertyItemOptions extends IPropertyItemOptionsBase {
|
|
|
6892
6961
|
*
|
|
6893
6962
|
*/
|
|
6894
6963
|
defaultSlots?: ListPaneSlotCreationProps[];
|
|
6964
|
+
/**
|
|
6965
|
+
* @remarks
|
|
6966
|
+
* If true, pane height will not change based on slot count. If
|
|
6967
|
+
* undefined, it will default to false
|
|
6968
|
+
*
|
|
6969
|
+
*/
|
|
6970
|
+
fixedHeight?: boolean;
|
|
6895
6971
|
/**
|
|
6896
6972
|
* @remarks
|
|
6897
6973
|
* This will be the height of the list withing the pane
|
|
@@ -7456,6 +7532,12 @@ export interface IModalDialog {
|
|
|
7456
7532
|
*
|
|
7457
7533
|
*/
|
|
7458
7534
|
readonly id: string;
|
|
7535
|
+
/**
|
|
7536
|
+
* @remarks
|
|
7537
|
+
* Title of the dialog
|
|
7538
|
+
*
|
|
7539
|
+
*/
|
|
7540
|
+
readonly title: LocalizedString | undefined;
|
|
7459
7541
|
/**
|
|
7460
7542
|
* @remarks
|
|
7461
7543
|
* Dispatches a dismiss message to the active request if it is
|
|
@@ -7472,6 +7554,14 @@ export interface IModalDialog {
|
|
|
7472
7554
|
* Response message to be handled by the active request
|
|
7473
7555
|
*/
|
|
7474
7556
|
sendResponse(response: ModalDialogCustomResponse): void;
|
|
7557
|
+
/**
|
|
7558
|
+
* @remarks
|
|
7559
|
+
* Updates the title of the modal dialog
|
|
7560
|
+
*
|
|
7561
|
+
* @param title
|
|
7562
|
+
* New title
|
|
7563
|
+
*/
|
|
7564
|
+
setTitle(title: LocalizedString | undefined): void;
|
|
7475
7565
|
}
|
|
7476
7566
|
|
|
7477
7567
|
/**
|
|
@@ -8202,6 +8292,12 @@ export interface IPropertyItemOptionsBase {
|
|
|
8202
8292
|
*
|
|
8203
8293
|
*/
|
|
8204
8294
|
enable?: boolean;
|
|
8295
|
+
/**
|
|
8296
|
+
* @remarks
|
|
8297
|
+
* Optional styling overrides for the item.
|
|
8298
|
+
*
|
|
8299
|
+
*/
|
|
8300
|
+
style?: PaneItemStyle;
|
|
8205
8301
|
/**
|
|
8206
8302
|
* @remarks
|
|
8207
8303
|
* Initial visibility state of property item. If undefined, it
|
|
@@ -8556,6 +8652,12 @@ export interface IRegisterExtensionOptionalParameters {
|
|
|
8556
8652
|
*/
|
|
8557
8653
|
// @ts-ignore Class inheritance allowed for native defined classes
|
|
8558
8654
|
export interface IRootPropertyPane extends IPropertyPane {
|
|
8655
|
+
/**
|
|
8656
|
+
* @remarks
|
|
8657
|
+
* Property pane that is displayed over the root pane content
|
|
8658
|
+
*
|
|
8659
|
+
*/
|
|
8660
|
+
readonly drawerPane: IPropertyPane;
|
|
8559
8661
|
/**
|
|
8560
8662
|
* @remarks
|
|
8561
8663
|
* Register a modal overlay to the root pane. It will be hidden
|
|
@@ -8758,6 +8860,12 @@ export interface IStringPropertyItemOptions extends IPropertyItemOptionsBase {
|
|
|
8758
8860
|
*
|
|
8759
8861
|
*/
|
|
8760
8862
|
hiddenLabel?: boolean;
|
|
8863
|
+
/**
|
|
8864
|
+
* @remarks
|
|
8865
|
+
* Displays label inline. If undefined, it will be true.
|
|
8866
|
+
*
|
|
8867
|
+
*/
|
|
8868
|
+
inlineLabel?: boolean;
|
|
8761
8869
|
/**
|
|
8762
8870
|
* @remarks
|
|
8763
8871
|
* This callback is called when UI control value is changed.
|
|
@@ -8801,10 +8909,8 @@ export interface ISubPanePropertyItem extends IPropertyItemBase, IPropertyPane {
|
|
|
8801
8909
|
* @remarks
|
|
8802
8910
|
* Updates layout direction of the sub pane.
|
|
8803
8911
|
*
|
|
8804
|
-
* @param direction
|
|
8805
|
-
* New layout direction.
|
|
8806
8912
|
*/
|
|
8807
|
-
setDirection(
|
|
8913
|
+
setDirection(layout: PaneLayoutType): void;
|
|
8808
8914
|
}
|
|
8809
8915
|
|
|
8810
8916
|
/**
|
|
@@ -8826,13 +8932,6 @@ export interface ISubPanePropertyItemOptions extends IPropertyPaneOptions {
|
|
|
8826
8932
|
*
|
|
8827
8933
|
*/
|
|
8828
8934
|
collapsed?: boolean;
|
|
8829
|
-
/**
|
|
8830
|
-
* @remarks
|
|
8831
|
-
* Determines layout direction of sub pane property items. If
|
|
8832
|
-
* undefined, it will default to Vertical.
|
|
8833
|
-
*
|
|
8834
|
-
*/
|
|
8835
|
-
direction?: LayoutDirection;
|
|
8836
8935
|
/**
|
|
8837
8936
|
* @remarks
|
|
8838
8937
|
* Determines if sub pane should have an expander. If
|
|
@@ -8847,6 +8946,32 @@ export interface ISubPanePropertyItemOptions extends IPropertyPaneOptions {
|
|
|
8847
8946
|
*
|
|
8848
8947
|
*/
|
|
8849
8948
|
hasMargins?: boolean;
|
|
8949
|
+
/**
|
|
8950
|
+
* @remarks
|
|
8951
|
+
* Determines layout of sub pane property items. If undefined,
|
|
8952
|
+
* it will default to Vertical.
|
|
8953
|
+
*
|
|
8954
|
+
*/
|
|
8955
|
+
layout?: PaneLayoutType;
|
|
8956
|
+
/**
|
|
8957
|
+
* @remarks
|
|
8958
|
+
* Maximum height of the property item.
|
|
8959
|
+
*
|
|
8960
|
+
*/
|
|
8961
|
+
maxHeight?: number;
|
|
8962
|
+
/**
|
|
8963
|
+
* @remarks
|
|
8964
|
+
* Enables scrolling for the pane if it has a max height
|
|
8965
|
+
* defined.
|
|
8966
|
+
*
|
|
8967
|
+
*/
|
|
8968
|
+
scrollable?: boolean;
|
|
8969
|
+
/**
|
|
8970
|
+
* @remarks
|
|
8971
|
+
* Custom width of the property item.
|
|
8972
|
+
*
|
|
8973
|
+
*/
|
|
8974
|
+
width?: number | LayoutSize;
|
|
8850
8975
|
}
|
|
8851
8976
|
|
|
8852
8977
|
/**
|
|
@@ -9094,6 +9219,13 @@ export interface IVector2PropertyItem extends IPropertyItemBase {
|
|
|
9094
9219
|
*/
|
|
9095
9220
|
// @ts-ignore Class inheritance allowed for native defined classes
|
|
9096
9221
|
export interface IVector2PropertyItemOptions extends IPropertyItemOptionsBase {
|
|
9222
|
+
/**
|
|
9223
|
+
* @remarks
|
|
9224
|
+
* Shows clear button for the item. If undefined, it will be
|
|
9225
|
+
* true.
|
|
9226
|
+
*
|
|
9227
|
+
*/
|
|
9228
|
+
hasClearButton?: boolean;
|
|
9097
9229
|
/**
|
|
9098
9230
|
* @remarks
|
|
9099
9231
|
* If true label text will be hidden. It will be visible by
|
|
@@ -9182,6 +9314,13 @@ export interface IVector3PropertyItem extends IPropertyItemBase {
|
|
|
9182
9314
|
*/
|
|
9183
9315
|
// @ts-ignore Class inheritance allowed for native defined classes
|
|
9184
9316
|
export interface IVector3PropertyItemOptions extends IPropertyItemOptionsBase {
|
|
9317
|
+
/**
|
|
9318
|
+
* @remarks
|
|
9319
|
+
* Shows clear button for the item. If undefined, it will be
|
|
9320
|
+
* true.
|
|
9321
|
+
*
|
|
9322
|
+
*/
|
|
9323
|
+
hasClearButton?: boolean;
|
|
9185
9324
|
/**
|
|
9186
9325
|
* @remarks
|
|
9187
9326
|
* If true label text will be hidden. It will be visible by
|
|
@@ -9494,6 +9633,8 @@ export interface WidgetCreateOptions {
|
|
|
9494
9633
|
collisionOffset?: minecraftserver.Vector3;
|
|
9495
9634
|
collisionRadius?: number;
|
|
9496
9635
|
collisionType?: WidgetCollisionType;
|
|
9636
|
+
dimensionId?: string;
|
|
9637
|
+
ignoreEditorModeVisibilityOverride?: boolean;
|
|
9497
9638
|
lockToSurface?: boolean;
|
|
9498
9639
|
selectable?: boolean;
|
|
9499
9640
|
snapToBlockLocation?: boolean;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@minecraft/server-editor",
|
|
3
|
-
"version": "0.1.0-beta.1.26.0-preview.
|
|
3
|
+
"version": "0.1.0-beta.1.26.0-preview.27",
|
|
4
4
|
"description": "",
|
|
5
5
|
"contributors": [
|
|
6
6
|
{
|
|
@@ -14,8 +14,8 @@
|
|
|
14
14
|
],
|
|
15
15
|
"peerDependencies": {
|
|
16
16
|
"@minecraft/common": "^1.0.0",
|
|
17
|
-
"@minecraft/server": "^2.6.0-beta.1.26.0-preview.
|
|
18
|
-
"@minecraft/vanilla-data": ">=1.20.70 || 1.26.0-preview.
|
|
17
|
+
"@minecraft/server": "^2.6.0-beta.1.26.0-preview.27",
|
|
18
|
+
"@minecraft/vanilla-data": ">=1.20.70 || 1.26.0-preview.27"
|
|
19
19
|
},
|
|
20
20
|
"license": "MIT"
|
|
21
21
|
}
|