@minecraft/server-editor 0.1.0-beta.1.26.0-preview.26 → 0.1.0-beta.1.26.0-preview.28
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 +175 -21
- 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
|
}
|
|
@@ -2730,6 +2786,8 @@ export declare class CylinderBrushShape extends BrushShape {
|
|
|
2730
2786
|
|
|
2731
2787
|
export class EditorConstants {
|
|
2732
2788
|
private constructor();
|
|
2789
|
+
readonly maxBlockVolume: number;
|
|
2790
|
+
readonly maxDynamicSelectionSize: minecraftserver.Vector3;
|
|
2733
2791
|
readonly maxSelectionSize: minecraftserver.Vector3;
|
|
2734
2792
|
readonly maxStructureOffset: minecraftserver.Vector3;
|
|
2735
2793
|
readonly minStructureOffset: minecraftserver.Vector3;
|
|
@@ -4339,12 +4397,19 @@ export class Widget {
|
|
|
4339
4397
|
*
|
|
4340
4398
|
*/
|
|
4341
4399
|
collisionType: WidgetCollisionType;
|
|
4400
|
+
dimensionId?: string;
|
|
4342
4401
|
/**
|
|
4343
4402
|
* @throws This property can throw when used.
|
|
4344
4403
|
*
|
|
4345
4404
|
* {@link InvalidWidgetError}
|
|
4346
4405
|
*/
|
|
4347
4406
|
readonly group: WidgetGroup;
|
|
4407
|
+
/**
|
|
4408
|
+
* @remarks
|
|
4409
|
+
* This property can't be edited in restricted-execution mode.
|
|
4410
|
+
*
|
|
4411
|
+
*/
|
|
4412
|
+
ignoreEditorModeVisibilityOverride: boolean;
|
|
4348
4413
|
/**
|
|
4349
4414
|
* @remarks
|
|
4350
4415
|
* This property can't be edited in restricted-execution mode.
|
|
@@ -6466,6 +6531,12 @@ export interface IDropdownPropertyItemOptions extends IPropertyItemOptionsBase {
|
|
|
6466
6531
|
*
|
|
6467
6532
|
*/
|
|
6468
6533
|
hiddenLabel?: boolean;
|
|
6534
|
+
/**
|
|
6535
|
+
* @remarks
|
|
6536
|
+
* Displays label inline. If undefined, it will be true.
|
|
6537
|
+
*
|
|
6538
|
+
*/
|
|
6539
|
+
inlineLabel?: boolean;
|
|
6469
6540
|
/**
|
|
6470
6541
|
* @remarks
|
|
6471
6542
|
* Determines how many entries can be displayed before
|
|
@@ -6572,7 +6643,7 @@ export interface IImagePropertyItemOptions extends IPropertyItemOptionsBase {
|
|
|
6572
6643
|
/**
|
|
6573
6644
|
* @remarks
|
|
6574
6645
|
* Alignment of the image in the container. If not defined,
|
|
6575
|
-
* LayoutAlignment.
|
|
6646
|
+
* LayoutAlignment.Start is used.
|
|
6576
6647
|
*
|
|
6577
6648
|
*/
|
|
6578
6649
|
alignment?: LayoutAlignment;
|
|
@@ -6892,6 +6963,13 @@ export interface IListPanePropertyItemOptions extends IPropertyItemOptionsBase {
|
|
|
6892
6963
|
*
|
|
6893
6964
|
*/
|
|
6894
6965
|
defaultSlots?: ListPaneSlotCreationProps[];
|
|
6966
|
+
/**
|
|
6967
|
+
* @remarks
|
|
6968
|
+
* If true, pane height will not change based on slot count. If
|
|
6969
|
+
* undefined, it will default to false
|
|
6970
|
+
*
|
|
6971
|
+
*/
|
|
6972
|
+
fixedHeight?: boolean;
|
|
6895
6973
|
/**
|
|
6896
6974
|
* @remarks
|
|
6897
6975
|
* This will be the height of the list withing the pane
|
|
@@ -7456,6 +7534,12 @@ export interface IModalDialog {
|
|
|
7456
7534
|
*
|
|
7457
7535
|
*/
|
|
7458
7536
|
readonly id: string;
|
|
7537
|
+
/**
|
|
7538
|
+
* @remarks
|
|
7539
|
+
* Title of the dialog
|
|
7540
|
+
*
|
|
7541
|
+
*/
|
|
7542
|
+
readonly title: LocalizedString | undefined;
|
|
7459
7543
|
/**
|
|
7460
7544
|
* @remarks
|
|
7461
7545
|
* Dispatches a dismiss message to the active request if it is
|
|
@@ -7472,6 +7556,14 @@ export interface IModalDialog {
|
|
|
7472
7556
|
* Response message to be handled by the active request
|
|
7473
7557
|
*/
|
|
7474
7558
|
sendResponse(response: ModalDialogCustomResponse): void;
|
|
7559
|
+
/**
|
|
7560
|
+
* @remarks
|
|
7561
|
+
* Updates the title of the modal dialog
|
|
7562
|
+
*
|
|
7563
|
+
* @param title
|
|
7564
|
+
* New title
|
|
7565
|
+
*/
|
|
7566
|
+
setTitle(title: LocalizedString | undefined): void;
|
|
7475
7567
|
}
|
|
7476
7568
|
|
|
7477
7569
|
/**
|
|
@@ -8202,6 +8294,12 @@ export interface IPropertyItemOptionsBase {
|
|
|
8202
8294
|
*
|
|
8203
8295
|
*/
|
|
8204
8296
|
enable?: boolean;
|
|
8297
|
+
/**
|
|
8298
|
+
* @remarks
|
|
8299
|
+
* Optional styling overrides for the item.
|
|
8300
|
+
*
|
|
8301
|
+
*/
|
|
8302
|
+
style?: PaneItemStyle;
|
|
8205
8303
|
/**
|
|
8206
8304
|
* @remarks
|
|
8207
8305
|
* Initial visibility state of property item. If undefined, it
|
|
@@ -8556,6 +8654,12 @@ export interface IRegisterExtensionOptionalParameters {
|
|
|
8556
8654
|
*/
|
|
8557
8655
|
// @ts-ignore Class inheritance allowed for native defined classes
|
|
8558
8656
|
export interface IRootPropertyPane extends IPropertyPane {
|
|
8657
|
+
/**
|
|
8658
|
+
* @remarks
|
|
8659
|
+
* Property pane that is displayed over the root pane content
|
|
8660
|
+
*
|
|
8661
|
+
*/
|
|
8662
|
+
readonly drawerPane: IPropertyPane;
|
|
8559
8663
|
/**
|
|
8560
8664
|
* @remarks
|
|
8561
8665
|
* Register a modal overlay to the root pane. It will be hidden
|
|
@@ -8758,6 +8862,12 @@ export interface IStringPropertyItemOptions extends IPropertyItemOptionsBase {
|
|
|
8758
8862
|
*
|
|
8759
8863
|
*/
|
|
8760
8864
|
hiddenLabel?: boolean;
|
|
8865
|
+
/**
|
|
8866
|
+
* @remarks
|
|
8867
|
+
* Displays label inline. If undefined, it will be true.
|
|
8868
|
+
*
|
|
8869
|
+
*/
|
|
8870
|
+
inlineLabel?: boolean;
|
|
8761
8871
|
/**
|
|
8762
8872
|
* @remarks
|
|
8763
8873
|
* This callback is called when UI control value is changed.
|
|
@@ -8801,10 +8911,8 @@ export interface ISubPanePropertyItem extends IPropertyItemBase, IPropertyPane {
|
|
|
8801
8911
|
* @remarks
|
|
8802
8912
|
* Updates layout direction of the sub pane.
|
|
8803
8913
|
*
|
|
8804
|
-
* @param direction
|
|
8805
|
-
* New layout direction.
|
|
8806
8914
|
*/
|
|
8807
|
-
setDirection(
|
|
8915
|
+
setDirection(layout: PaneLayoutType): void;
|
|
8808
8916
|
}
|
|
8809
8917
|
|
|
8810
8918
|
/**
|
|
@@ -8826,13 +8934,6 @@ export interface ISubPanePropertyItemOptions extends IPropertyPaneOptions {
|
|
|
8826
8934
|
*
|
|
8827
8935
|
*/
|
|
8828
8936
|
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
8937
|
/**
|
|
8837
8938
|
* @remarks
|
|
8838
8939
|
* Determines if sub pane should have an expander. If
|
|
@@ -8847,6 +8948,32 @@ export interface ISubPanePropertyItemOptions extends IPropertyPaneOptions {
|
|
|
8847
8948
|
*
|
|
8848
8949
|
*/
|
|
8849
8950
|
hasMargins?: boolean;
|
|
8951
|
+
/**
|
|
8952
|
+
* @remarks
|
|
8953
|
+
* Determines layout of sub pane property items. If undefined,
|
|
8954
|
+
* it will default to Vertical.
|
|
8955
|
+
*
|
|
8956
|
+
*/
|
|
8957
|
+
layout?: PaneLayoutType;
|
|
8958
|
+
/**
|
|
8959
|
+
* @remarks
|
|
8960
|
+
* Maximum height of the property item.
|
|
8961
|
+
*
|
|
8962
|
+
*/
|
|
8963
|
+
maxHeight?: number;
|
|
8964
|
+
/**
|
|
8965
|
+
* @remarks
|
|
8966
|
+
* Enables scrolling for the pane if it has a max height
|
|
8967
|
+
* defined.
|
|
8968
|
+
*
|
|
8969
|
+
*/
|
|
8970
|
+
scrollable?: boolean;
|
|
8971
|
+
/**
|
|
8972
|
+
* @remarks
|
|
8973
|
+
* Custom width of the property item.
|
|
8974
|
+
*
|
|
8975
|
+
*/
|
|
8976
|
+
width?: number | LayoutSize;
|
|
8850
8977
|
}
|
|
8851
8978
|
|
|
8852
8979
|
/**
|
|
@@ -9094,6 +9221,13 @@ export interface IVector2PropertyItem extends IPropertyItemBase {
|
|
|
9094
9221
|
*/
|
|
9095
9222
|
// @ts-ignore Class inheritance allowed for native defined classes
|
|
9096
9223
|
export interface IVector2PropertyItemOptions extends IPropertyItemOptionsBase {
|
|
9224
|
+
/**
|
|
9225
|
+
* @remarks
|
|
9226
|
+
* Shows clear button for the item. If undefined, it will be
|
|
9227
|
+
* true.
|
|
9228
|
+
*
|
|
9229
|
+
*/
|
|
9230
|
+
hasClearButton?: boolean;
|
|
9097
9231
|
/**
|
|
9098
9232
|
* @remarks
|
|
9099
9233
|
* If true label text will be hidden. It will be visible by
|
|
@@ -9182,6 +9316,13 @@ export interface IVector3PropertyItem extends IPropertyItemBase {
|
|
|
9182
9316
|
*/
|
|
9183
9317
|
// @ts-ignore Class inheritance allowed for native defined classes
|
|
9184
9318
|
export interface IVector3PropertyItemOptions extends IPropertyItemOptionsBase {
|
|
9319
|
+
/**
|
|
9320
|
+
* @remarks
|
|
9321
|
+
* Shows clear button for the item. If undefined, it will be
|
|
9322
|
+
* true.
|
|
9323
|
+
*
|
|
9324
|
+
*/
|
|
9325
|
+
hasClearButton?: boolean;
|
|
9185
9326
|
/**
|
|
9186
9327
|
* @remarks
|
|
9187
9328
|
* If true label text will be hidden. It will be visible by
|
|
@@ -9189,6 +9330,12 @@ export interface IVector3PropertyItemOptions extends IPropertyItemOptionsBase {
|
|
|
9189
9330
|
*
|
|
9190
9331
|
*/
|
|
9191
9332
|
hiddenLabel?: boolean;
|
|
9333
|
+
/**
|
|
9334
|
+
* @remarks
|
|
9335
|
+
* Hides Y axis input field. If undefined, it will be false.
|
|
9336
|
+
*
|
|
9337
|
+
*/
|
|
9338
|
+
hideYAxis?: boolean;
|
|
9192
9339
|
/**
|
|
9193
9340
|
* @remarks
|
|
9194
9341
|
* If we should treat the Vector3 properties as integer values.
|
|
@@ -9406,13 +9553,18 @@ export interface WidgetComponentBaseOptions {
|
|
|
9406
9553
|
visible?: boolean;
|
|
9407
9554
|
}
|
|
9408
9555
|
|
|
9556
|
+
export interface WidgetComponentBoundingBoxLimit {
|
|
9557
|
+
max: minecraftserver.Vector3;
|
|
9558
|
+
maxBlockVolume?: number;
|
|
9559
|
+
min: minecraftserver.Vector3;
|
|
9560
|
+
}
|
|
9561
|
+
|
|
9409
9562
|
// @ts-ignore Class inheritance allowed for native defined classes
|
|
9410
9563
|
export interface WidgetComponentBoundingBoxOptions extends WidgetComponentBaseOptions {
|
|
9411
9564
|
boundsOffset?: minecraftserver.Vector3;
|
|
9412
9565
|
enableResizeHandles?: Axis;
|
|
9413
9566
|
hullColor?: minecraftserver.RGBA;
|
|
9414
|
-
|
|
9415
|
-
minSize?: minecraftserver.Vector3;
|
|
9567
|
+
limit?: WidgetComponentBoundingBoxLimit;
|
|
9416
9568
|
mirror?: minecraftserver.StructureMirrorAxis;
|
|
9417
9569
|
normalizedOrigin?: minecraftserver.Vector3;
|
|
9418
9570
|
outlineColor?: minecraftserver.RGBA;
|
|
@@ -9494,6 +9646,8 @@ export interface WidgetCreateOptions {
|
|
|
9494
9646
|
collisionOffset?: minecraftserver.Vector3;
|
|
9495
9647
|
collisionRadius?: number;
|
|
9496
9648
|
collisionType?: WidgetCollisionType;
|
|
9649
|
+
dimensionId?: string;
|
|
9650
|
+
ignoreEditorModeVisibilityOverride?: boolean;
|
|
9497
9651
|
lockToSurface?: boolean;
|
|
9498
9652
|
selectable?: boolean;
|
|
9499
9653
|
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.28",
|
|
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.28",
|
|
18
|
+
"@minecraft/vanilla-data": ">=1.20.70 || 1.26.0-preview.28"
|
|
19
19
|
},
|
|
20
20
|
"license": "MIT"
|
|
21
21
|
}
|