@minecraft/server-editor 0.1.0-beta.1.21.60-preview.24 → 0.1.0-beta.1.21.60-preview.25
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 +159 -26
- package/package.json +2 -2
package/index.d.ts
CHANGED
|
@@ -29,6 +29,7 @@ import * as minecraftserver from '@minecraft/server';
|
|
|
29
29
|
export declare enum ActionTypes {
|
|
30
30
|
MouseRayCastAction = 'MouseRayCastAction',
|
|
31
31
|
NoArgsAction = 'NoArgsAction',
|
|
32
|
+
StatefulAction = 'StatefulAction',
|
|
32
33
|
}
|
|
33
34
|
|
|
34
35
|
export enum Axis {
|
|
@@ -48,6 +49,15 @@ export enum BlockPaletteItemType {
|
|
|
48
49
|
Probability = 1,
|
|
49
50
|
}
|
|
50
51
|
|
|
52
|
+
/**
|
|
53
|
+
* The possible operation types supported by BlockTable
|
|
54
|
+
* property item.
|
|
55
|
+
*/
|
|
56
|
+
export declare enum BlockTableOperationType {
|
|
57
|
+
Deselect = 'deselect',
|
|
58
|
+
Replace = 'replace',
|
|
59
|
+
}
|
|
60
|
+
|
|
51
61
|
/**
|
|
52
62
|
* The possible variants of a bool.
|
|
53
63
|
*/
|
|
@@ -234,6 +244,7 @@ export enum GamePublishSetting {
|
|
|
234
244
|
* properties.
|
|
235
245
|
*/
|
|
236
246
|
export enum GraphicsSettingsProperty {
|
|
247
|
+
NightVision = 'NightVision',
|
|
237
248
|
ShowChunkBoundaries = 'ShowChunkBoundaries',
|
|
238
249
|
ShowCompass = 'ShowCompass',
|
|
239
250
|
/**
|
|
@@ -958,6 +969,7 @@ export enum ProjectExportType {
|
|
|
958
969
|
*/
|
|
959
970
|
export declare enum PropertyItemType {
|
|
960
971
|
BlockList = 'editorUI:BlockList',
|
|
972
|
+
BlockTable = 'editorUI:BlockTable',
|
|
961
973
|
Boolean = 'editorUI:Boolean',
|
|
962
974
|
Button = 'editorUI:Button',
|
|
963
975
|
ColorPicker = 'editorUI:ColorPicker',
|
|
@@ -1091,7 +1103,7 @@ export enum WidgetMouseButtonActionType {
|
|
|
1091
1103
|
/**
|
|
1092
1104
|
* Full set of all possible raw actions
|
|
1093
1105
|
*/
|
|
1094
|
-
export type Action = NoArgsAction | MouseRayCastAction;
|
|
1106
|
+
export type Action = NoArgsAction | MouseRayCastAction | StatefulAction;
|
|
1095
1107
|
|
|
1096
1108
|
/**
|
|
1097
1109
|
* All actions have a unique identifier. Identifiers are
|
|
@@ -1123,6 +1135,7 @@ export type GraphicsSettingsPropertyTypeMap = {
|
|
|
1123
1135
|
[GraphicsSettingsProperty.ShowInvisibleBlocks]?: boolean;
|
|
1124
1136
|
[GraphicsSettingsProperty.ShowChunkBoundaries]?: boolean;
|
|
1125
1137
|
[GraphicsSettingsProperty.ShowCompass]?: boolean;
|
|
1138
|
+
[GraphicsSettingsProperty.NightVision]?: boolean;
|
|
1126
1139
|
};
|
|
1127
1140
|
|
|
1128
1141
|
/**
|
|
@@ -1330,10 +1343,18 @@ export type SpeedSettingsPropertyTypeMap = {
|
|
|
1330
1343
|
[SpeedSettingsProperty.FlySpeedMultiplier]?: number;
|
|
1331
1344
|
};
|
|
1332
1345
|
|
|
1346
|
+
/**
|
|
1347
|
+
* An action which returns the activation state.
|
|
1348
|
+
*/
|
|
1349
|
+
export type StatefulAction = {
|
|
1350
|
+
actionType: ActionTypes.StatefulAction;
|
|
1351
|
+
readonly onExecute: (active: boolean) => void;
|
|
1352
|
+
};
|
|
1353
|
+
|
|
1333
1354
|
/**
|
|
1334
1355
|
* Full set of all possible keyboard actions
|
|
1335
1356
|
*/
|
|
1336
|
-
export type SupportedKeyboardActionTypes = RegisteredAction<NoArgsAction>;
|
|
1357
|
+
export type SupportedKeyboardActionTypes = RegisteredAction<NoArgsAction> | RegisteredAction<StatefulAction>;
|
|
1337
1358
|
|
|
1338
1359
|
/**
|
|
1339
1360
|
* Full set of all possible mouse actions
|
|
@@ -1542,7 +1563,7 @@ export class BrushShapeManager {
|
|
|
1542
1563
|
*
|
|
1543
1564
|
* {@link Error}
|
|
1544
1565
|
*/
|
|
1545
|
-
beginPainting(onComplete: (
|
|
1566
|
+
beginPainting(onComplete: (arg0: PaintCompletionState) => void): void;
|
|
1546
1567
|
/**
|
|
1547
1568
|
* @remarks
|
|
1548
1569
|
* This function can't be called in read-only mode.
|
|
@@ -1640,7 +1661,7 @@ export class BrushShapeManager {
|
|
|
1640
1661
|
*
|
|
1641
1662
|
* {@link Error}
|
|
1642
1663
|
*/
|
|
1643
|
-
singlePaint(onComplete: (
|
|
1664
|
+
singlePaint(onComplete: (arg0: PaintCompletionState) => void): void;
|
|
1644
1665
|
/**
|
|
1645
1666
|
* @remarks
|
|
1646
1667
|
* This function can't be called in read-only mode.
|
|
@@ -1682,7 +1703,7 @@ export class ClipboardChangeAfterEventSignal {
|
|
|
1682
1703
|
* This function can be called in early-execution mode.
|
|
1683
1704
|
*
|
|
1684
1705
|
*/
|
|
1685
|
-
subscribe(callback: (
|
|
1706
|
+
subscribe(callback: (arg0: ClipboardChangeAfterEvent) => void): (arg0: ClipboardChangeAfterEvent) => void;
|
|
1686
1707
|
/**
|
|
1687
1708
|
* @remarks
|
|
1688
1709
|
* This function can't be called in read-only mode.
|
|
@@ -1690,7 +1711,7 @@ export class ClipboardChangeAfterEventSignal {
|
|
|
1690
1711
|
* This function can be called in early-execution mode.
|
|
1691
1712
|
*
|
|
1692
1713
|
*/
|
|
1693
|
-
unsubscribe(callback: (
|
|
1714
|
+
unsubscribe(callback: (arg0: ClipboardChangeAfterEvent) => void): void;
|
|
1694
1715
|
}
|
|
1695
1716
|
|
|
1696
1717
|
/**
|
|
@@ -1885,7 +1906,7 @@ export class CurrentThemeChangeAfterEventSignal {
|
|
|
1885
1906
|
* This function can be called in early-execution mode.
|
|
1886
1907
|
*
|
|
1887
1908
|
*/
|
|
1888
|
-
subscribe(callback: (
|
|
1909
|
+
subscribe(callback: (arg0: CurrentThemeChangeAfterEvent) => void): (arg0: CurrentThemeChangeAfterEvent) => void;
|
|
1889
1910
|
/**
|
|
1890
1911
|
* @remarks
|
|
1891
1912
|
* This function can't be called in read-only mode.
|
|
@@ -1893,7 +1914,7 @@ export class CurrentThemeChangeAfterEventSignal {
|
|
|
1893
1914
|
* This function can be called in early-execution mode.
|
|
1894
1915
|
*
|
|
1895
1916
|
*/
|
|
1896
|
-
unsubscribe(callback: (
|
|
1917
|
+
unsubscribe(callback: (arg0: CurrentThemeChangeAfterEvent) => void): void;
|
|
1897
1918
|
}
|
|
1898
1919
|
|
|
1899
1920
|
export class CurrentThemeColorChangeAfterEvent {
|
|
@@ -1912,8 +1933,8 @@ export class CurrentThemeColorChangeAfterEventSignal {
|
|
|
1912
1933
|
*
|
|
1913
1934
|
*/
|
|
1914
1935
|
subscribe(
|
|
1915
|
-
callback: (
|
|
1916
|
-
): (
|
|
1936
|
+
callback: (arg0: CurrentThemeColorChangeAfterEvent) => void,
|
|
1937
|
+
): (arg0: CurrentThemeColorChangeAfterEvent) => void;
|
|
1917
1938
|
/**
|
|
1918
1939
|
* @remarks
|
|
1919
1940
|
* This function can't be called in read-only mode.
|
|
@@ -1921,7 +1942,7 @@ export class CurrentThemeColorChangeAfterEventSignal {
|
|
|
1921
1942
|
* This function can be called in early-execution mode.
|
|
1922
1943
|
*
|
|
1923
1944
|
*/
|
|
1924
|
-
unsubscribe(callback: (
|
|
1945
|
+
unsubscribe(callback: (arg0: CurrentThemeColorChangeAfterEvent) => void): void;
|
|
1925
1946
|
}
|
|
1926
1947
|
|
|
1927
1948
|
/**
|
|
@@ -2058,6 +2079,7 @@ export class Cursor {
|
|
|
2058
2079
|
|
|
2059
2080
|
export class CursorPropertiesChangeAfterEvent {
|
|
2060
2081
|
private constructor();
|
|
2082
|
+
readonly position?: CursorPosition;
|
|
2061
2083
|
readonly properties: CursorProperties;
|
|
2062
2084
|
}
|
|
2063
2085
|
|
|
@@ -2071,8 +2093,8 @@ export class CursorPropertyChangeAfterEventSignal {
|
|
|
2071
2093
|
*
|
|
2072
2094
|
*/
|
|
2073
2095
|
subscribe(
|
|
2074
|
-
callback: (
|
|
2075
|
-
): (
|
|
2096
|
+
callback: (arg0: CursorPropertiesChangeAfterEvent) => void,
|
|
2097
|
+
): (arg0: CursorPropertiesChangeAfterEvent) => void;
|
|
2076
2098
|
/**
|
|
2077
2099
|
* @remarks
|
|
2078
2100
|
* This function can't be called in read-only mode.
|
|
@@ -2080,7 +2102,7 @@ export class CursorPropertyChangeAfterEventSignal {
|
|
|
2080
2102
|
* This function can be called in early-execution mode.
|
|
2081
2103
|
*
|
|
2082
2104
|
*/
|
|
2083
|
-
unsubscribe(callback: (
|
|
2105
|
+
unsubscribe(callback: (arg0: CursorPropertiesChangeAfterEvent) => void): void;
|
|
2084
2106
|
}
|
|
2085
2107
|
|
|
2086
2108
|
export class EditorStructureManager {
|
|
@@ -2518,7 +2540,7 @@ export class ModeChangeAfterEventSignal {
|
|
|
2518
2540
|
* This function can be called in early-execution mode.
|
|
2519
2541
|
*
|
|
2520
2542
|
*/
|
|
2521
|
-
subscribe(callback: (
|
|
2543
|
+
subscribe(callback: (arg0: ModeChangeAfterEvent) => void): (arg0: ModeChangeAfterEvent) => void;
|
|
2522
2544
|
/**
|
|
2523
2545
|
* @remarks
|
|
2524
2546
|
* Removes the specified callback from an editor mode change
|
|
@@ -2529,7 +2551,7 @@ export class ModeChangeAfterEventSignal {
|
|
|
2529
2551
|
* This function can be called in early-execution mode.
|
|
2530
2552
|
*
|
|
2531
2553
|
*/
|
|
2532
|
-
unsubscribe(callback: (
|
|
2554
|
+
unsubscribe(callback: (arg0: ModeChangeAfterEvent) => void): void;
|
|
2533
2555
|
}
|
|
2534
2556
|
|
|
2535
2557
|
/**
|
|
@@ -2600,7 +2622,7 @@ export class PrimarySelectionChangeAfterEventSignal {
|
|
|
2600
2622
|
* This function can be called in early-execution mode.
|
|
2601
2623
|
*
|
|
2602
2624
|
*/
|
|
2603
|
-
subscribe(callback: (
|
|
2625
|
+
subscribe(callback: (arg0: SelectionEventAfterEvent) => void): (arg0: SelectionEventAfterEvent) => void;
|
|
2604
2626
|
/**
|
|
2605
2627
|
* @remarks
|
|
2606
2628
|
* This function can't be called in read-only mode.
|
|
@@ -2608,7 +2630,7 @@ export class PrimarySelectionChangeAfterEventSignal {
|
|
|
2608
2630
|
* This function can be called in early-execution mode.
|
|
2609
2631
|
*
|
|
2610
2632
|
*/
|
|
2611
|
-
unsubscribe(callback: (
|
|
2633
|
+
unsubscribe(callback: (arg0: SelectionEventAfterEvent) => void): void;
|
|
2612
2634
|
}
|
|
2613
2635
|
|
|
2614
2636
|
export class PrimarySelectionChangedEvent {
|
|
@@ -2909,12 +2931,12 @@ export class SettingsManager {
|
|
|
2909
2931
|
export class SettingsUIElement {
|
|
2910
2932
|
readonly initialValue: boolean | number | string | minecraftserver.Vector3;
|
|
2911
2933
|
readonly name: string;
|
|
2912
|
-
readonly onChange: (
|
|
2934
|
+
readonly onChange: (arg0: boolean | number | string | minecraftserver.Vector3) => void;
|
|
2913
2935
|
readonly options: SettingsUIElementOptions;
|
|
2914
2936
|
constructor(
|
|
2915
2937
|
name: string,
|
|
2916
2938
|
initialValue: boolean | number | string | minecraftserver.Vector3,
|
|
2917
|
-
onChange: (
|
|
2939
|
+
onChange: (arg0: boolean | number | string | minecraftserver.Vector3) => void,
|
|
2918
2940
|
options?: SettingsUIElementOptions,
|
|
2919
2941
|
);
|
|
2920
2942
|
}
|
|
@@ -3135,8 +3157,8 @@ export class TransactionManager {
|
|
|
3135
3157
|
* @throws This function can throw errors.
|
|
3136
3158
|
*/
|
|
3137
3159
|
createUserDefinedTransactionHandler(
|
|
3138
|
-
undoClosure: (
|
|
3139
|
-
redoClosure: (
|
|
3160
|
+
undoClosure: (arg0: string) => void,
|
|
3161
|
+
redoClosure: (arg0: string) => void,
|
|
3140
3162
|
): UserDefinedTransactionHandlerId;
|
|
3141
3163
|
/**
|
|
3142
3164
|
* @remarks
|
|
@@ -3576,7 +3598,7 @@ export class Widget {
|
|
|
3576
3598
|
*
|
|
3577
3599
|
* {@link InvalidWidgetError}
|
|
3578
3600
|
*/
|
|
3579
|
-
setStateChangeEvent(eventFunction?: (
|
|
3601
|
+
setStateChangeEvent(eventFunction?: (arg0: WidgetStateChangeEventData) => void): void;
|
|
3580
3602
|
}
|
|
3581
3603
|
|
|
3582
3604
|
export class WidgetComponentBase {
|
|
@@ -3636,7 +3658,7 @@ export class WidgetComponentBase {
|
|
|
3636
3658
|
*
|
|
3637
3659
|
* {@link InvalidWidgetComponentError}
|
|
3638
3660
|
*/
|
|
3639
|
-
setStateChangeEvent(eventFunction?: (
|
|
3661
|
+
setStateChangeEvent(eventFunction?: (arg0: WidgetComponentStateChangeEventData) => void): void;
|
|
3640
3662
|
}
|
|
3641
3663
|
|
|
3642
3664
|
// @ts-ignore Class inheritance allowed for native defined classes
|
|
@@ -4093,6 +4115,11 @@ export interface ClipboardWriteOptions {
|
|
|
4093
4115
|
rotation?: minecraftserver.StructureRotation;
|
|
4094
4116
|
}
|
|
4095
4117
|
|
|
4118
|
+
export interface CursorPosition {
|
|
4119
|
+
FaceDirection: number;
|
|
4120
|
+
Position: minecraftserver.Vector3;
|
|
4121
|
+
}
|
|
4122
|
+
|
|
4096
4123
|
/**
|
|
4097
4124
|
* The CursorProperties interface is used to describe the
|
|
4098
4125
|
* properties of the Editor 3D block cursor construct.
|
|
@@ -4381,6 +4408,106 @@ export interface IActionBarItemCreationParams {
|
|
|
4381
4408
|
tooltipTitle?: string;
|
|
4382
4409
|
}
|
|
4383
4410
|
|
|
4411
|
+
/**
|
|
4412
|
+
* Block Table Entry info for block table property item
|
|
4413
|
+
*/
|
|
4414
|
+
export interface IBlockTableEntryInfo {
|
|
4415
|
+
/**
|
|
4416
|
+
* @remarks
|
|
4417
|
+
* The quantity number of the same block in the selection.
|
|
4418
|
+
*
|
|
4419
|
+
*/
|
|
4420
|
+
count?: number;
|
|
4421
|
+
}
|
|
4422
|
+
|
|
4423
|
+
/**
|
|
4424
|
+
* A property item which supports Block Table properties
|
|
4425
|
+
*/
|
|
4426
|
+
// @ts-ignore Class inheritance allowed for native defined classes
|
|
4427
|
+
export interface IBlockTablePropertyItem extends IPropertyItemBase {
|
|
4428
|
+
/**
|
|
4429
|
+
* @remarks
|
|
4430
|
+
* Create new or update an existing entry in the block table
|
|
4431
|
+
*
|
|
4432
|
+
* @param block
|
|
4433
|
+
* a new entry in the block table.
|
|
4434
|
+
* @param blockInfo
|
|
4435
|
+
* block info for the entry in the block table.
|
|
4436
|
+
*/
|
|
4437
|
+
addOrUpdateEntry(block: string | minecraftserver.BlockType, blockInfo: IBlockTableEntryInfo): void;
|
|
4438
|
+
/**
|
|
4439
|
+
* @remarks
|
|
4440
|
+
* Delete entry in the block table, by block name
|
|
4441
|
+
*
|
|
4442
|
+
* @param block
|
|
4443
|
+
* an entry in the block table.
|
|
4444
|
+
*/
|
|
4445
|
+
deleteEntry(block: string): void;
|
|
4446
|
+
/**
|
|
4447
|
+
* @remarks
|
|
4448
|
+
* Read entry from the block table, by block name
|
|
4449
|
+
*
|
|
4450
|
+
* @param block
|
|
4451
|
+
* an entry in the block table.
|
|
4452
|
+
*/
|
|
4453
|
+
getEntry(block: string | minecraftserver.BlockType): IBlockTableEntryInfo | undefined;
|
|
4454
|
+
/**
|
|
4455
|
+
* @remarks
|
|
4456
|
+
* Updates title of the property item.
|
|
4457
|
+
*
|
|
4458
|
+
* @param title
|
|
4459
|
+
* New title.
|
|
4460
|
+
*/
|
|
4461
|
+
setTitle(title: LocalizedString): void;
|
|
4462
|
+
/**
|
|
4463
|
+
* @remarks
|
|
4464
|
+
* Update the block table entries
|
|
4465
|
+
*
|
|
4466
|
+
* @param entries
|
|
4467
|
+
* The new value for the block table.
|
|
4468
|
+
*/
|
|
4469
|
+
updateEntries(entries: Map<string, IBlockTableEntryInfo>): void;
|
|
4470
|
+
}
|
|
4471
|
+
|
|
4472
|
+
/**
|
|
4473
|
+
* Properties of block table item
|
|
4474
|
+
*/
|
|
4475
|
+
// @ts-ignore Class inheritance allowed for native defined classes
|
|
4476
|
+
export interface IBlockTablePropertyItemOptions extends IPropertyItemOptionsBase {
|
|
4477
|
+
/**
|
|
4478
|
+
* @remarks
|
|
4479
|
+
* Map of block entries in the block table.
|
|
4480
|
+
*
|
|
4481
|
+
*/
|
|
4482
|
+
entries?: Map<string, IBlockTableEntryInfo>;
|
|
4483
|
+
/**
|
|
4484
|
+
* @remarks
|
|
4485
|
+
* If true label text will be hidden. It will be visible by
|
|
4486
|
+
* default.
|
|
4487
|
+
*
|
|
4488
|
+
*/
|
|
4489
|
+
hiddenLabel?: boolean;
|
|
4490
|
+
/**
|
|
4491
|
+
* @remarks
|
|
4492
|
+
* This callback is called when UI control operation is
|
|
4493
|
+
* selected from the UI.
|
|
4494
|
+
*
|
|
4495
|
+
*/
|
|
4496
|
+
onOperationClick?: (block: string, operation: BlockTableOperationType) => void;
|
|
4497
|
+
/**
|
|
4498
|
+
* @remarks
|
|
4499
|
+
* Localized title of the property item.
|
|
4500
|
+
*
|
|
4501
|
+
*/
|
|
4502
|
+
title?: LocalizedString;
|
|
4503
|
+
/**
|
|
4504
|
+
* @remarks
|
|
4505
|
+
* Tooltip description of the property item.
|
|
4506
|
+
*
|
|
4507
|
+
*/
|
|
4508
|
+
tooltip?: LocalizedString;
|
|
4509
|
+
}
|
|
4510
|
+
|
|
4384
4511
|
/**
|
|
4385
4512
|
* A property item which supports Vector3 properties
|
|
4386
4513
|
*/
|
|
@@ -5490,6 +5617,12 @@ export interface IPropertyPane {
|
|
|
5490
5617
|
},
|
|
5491
5618
|
'EMPTY'
|
|
5492
5619
|
>;
|
|
5620
|
+
/**
|
|
5621
|
+
* @remarks
|
|
5622
|
+
* Adds a block table to the pane.
|
|
5623
|
+
*
|
|
5624
|
+
*/
|
|
5625
|
+
addBlockTable(options?: IBlockTablePropertyItemOptions): IBlockTablePropertyItem;
|
|
5493
5626
|
/**
|
|
5494
5627
|
* @remarks
|
|
5495
5628
|
*/
|
|
@@ -6860,7 +6993,7 @@ export interface WeightedBlock {
|
|
|
6860
6993
|
export interface WidgetComponentBaseOptions {
|
|
6861
6994
|
lockToSurface?: boolean;
|
|
6862
6995
|
offset?: minecraftserver.Vector3;
|
|
6863
|
-
stateChangeEvent?: (
|
|
6996
|
+
stateChangeEvent?: (arg0: WidgetComponentStateChangeEventData) => void;
|
|
6864
6997
|
visible?: boolean;
|
|
6865
6998
|
}
|
|
6866
6999
|
|
|
@@ -6912,7 +7045,7 @@ export interface WidgetCreateOptions {
|
|
|
6912
7045
|
lockToSurface?: boolean;
|
|
6913
7046
|
selectable?: boolean;
|
|
6914
7047
|
snapToBlockLocation?: boolean;
|
|
6915
|
-
stateChangeEvent?: (
|
|
7048
|
+
stateChangeEvent?: (arg0: WidgetStateChangeEventData) => void;
|
|
6916
7049
|
visible?: boolean;
|
|
6917
7050
|
}
|
|
6918
7051
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@minecraft/server-editor",
|
|
3
|
-
"version": "0.1.0-beta.1.21.60-preview.
|
|
3
|
+
"version": "0.1.0-beta.1.21.60-preview.25",
|
|
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.18.0-beta.1.21.60-preview.
|
|
17
|
+
"@minecraft/server": "^1.18.0-beta.1.21.60-preview.25"
|
|
18
18
|
},
|
|
19
19
|
"license": "MIT"
|
|
20
20
|
}
|