@minecraft/server-editor 0.1.0-beta.1.21.50-preview.25 → 0.1.0-beta.1.21.50-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 +239 -139
- package/package.json +2 -2
package/index.d.ts
CHANGED
|
@@ -31,7 +31,14 @@ export declare enum ActionTypes {
|
|
|
31
31
|
NoArgsAction = 'NoArgsAction',
|
|
32
32
|
}
|
|
33
33
|
|
|
34
|
+
export enum Axis {
|
|
35
|
+
X = 1,
|
|
36
|
+
Y = 2,
|
|
37
|
+
Z = 4,
|
|
38
|
+
}
|
|
39
|
+
|
|
34
40
|
export enum BlockMaskListType {
|
|
41
|
+
Disabled = 'Disabled',
|
|
35
42
|
Mask = 'Mask',
|
|
36
43
|
Replace = 'Replace',
|
|
37
44
|
}
|
|
@@ -228,6 +235,7 @@ export enum GamePublishSetting {
|
|
|
228
235
|
*/
|
|
229
236
|
export enum GraphicsSettingsProperty {
|
|
230
237
|
ShowChunkBoundaries = 'ShowChunkBoundaries',
|
|
238
|
+
ShowCompass = 'ShowCompass',
|
|
231
239
|
/**
|
|
232
240
|
* @remarks
|
|
233
241
|
* Manages rendering of invisible blocks (e.g., barrier, light,
|
|
@@ -898,12 +906,13 @@ export enum PaintCompletionState {
|
|
|
898
906
|
export enum PaintMode {
|
|
899
907
|
BlockPaint = 0,
|
|
900
908
|
FreehandSelect = 1,
|
|
909
|
+
Smooth = 2,
|
|
901
910
|
}
|
|
902
911
|
|
|
903
912
|
export enum Plane {
|
|
904
|
-
XY =
|
|
905
|
-
XZ =
|
|
906
|
-
YZ =
|
|
913
|
+
XY = 1,
|
|
914
|
+
XZ = 2,
|
|
915
|
+
YZ = 4,
|
|
907
916
|
}
|
|
908
917
|
|
|
909
918
|
export enum PlayerPermissionLevel {
|
|
@@ -929,11 +938,11 @@ export enum PlaytestSessionResult {
|
|
|
929
938
|
}
|
|
930
939
|
|
|
931
940
|
export enum PrimitiveType {
|
|
932
|
-
|
|
933
|
-
Box =
|
|
934
|
-
|
|
935
|
-
|
|
936
|
-
|
|
941
|
+
Text = 0,
|
|
942
|
+
Box = 1,
|
|
943
|
+
Line = 2,
|
|
944
|
+
Disc = 4,
|
|
945
|
+
AxialSphere = 5,
|
|
937
946
|
}
|
|
938
947
|
|
|
939
948
|
export enum ProjectExportType {
|
|
@@ -973,9 +982,13 @@ export declare enum SimpleToolStatusBarVisibility {
|
|
|
973
982
|
VisibleWhenActive = 1,
|
|
974
983
|
}
|
|
975
984
|
|
|
985
|
+
export enum SpeedSettingsProperty {
|
|
986
|
+
FlySpeedMultiplier = 'FlySpeedMultiplier',
|
|
987
|
+
}
|
|
988
|
+
|
|
976
989
|
export enum SplineType {
|
|
977
|
-
|
|
978
|
-
|
|
990
|
+
Line = 0,
|
|
991
|
+
Hermite = 1,
|
|
979
992
|
}
|
|
980
993
|
|
|
981
994
|
/**
|
|
@@ -1052,6 +1065,7 @@ export enum ThemeSettingsColorKey {
|
|
|
1052
1065
|
}
|
|
1053
1066
|
|
|
1054
1067
|
export enum WidgetComponentType {
|
|
1068
|
+
Clipboard = 'Clipboard',
|
|
1055
1069
|
Entity = 'Entity',
|
|
1056
1070
|
Gizmo = 'Gizmo',
|
|
1057
1071
|
Guide = 'Guide',
|
|
@@ -1078,6 +1092,11 @@ export enum WidgetMouseButtonActionType {
|
|
|
1078
1092
|
export type GraphicsSettingsPropertyTypeMap = {
|
|
1079
1093
|
[GraphicsSettingsProperty.ShowInvisibleBlocks]?: boolean;
|
|
1080
1094
|
[GraphicsSettingsProperty.ShowChunkBoundaries]?: boolean;
|
|
1095
|
+
[GraphicsSettingsProperty.ShowCompass]?: boolean;
|
|
1096
|
+
};
|
|
1097
|
+
|
|
1098
|
+
export type SpeedSettingsPropertyTypeMap = {
|
|
1099
|
+
[SpeedSettingsProperty.FlySpeedMultiplier]?: number;
|
|
1081
1100
|
};
|
|
1082
1101
|
|
|
1083
1102
|
/**
|
|
@@ -1488,6 +1507,20 @@ export class BlockPaletteManager {
|
|
|
1488
1507
|
setSelectedItem(item: IBlockPaletteItem): void;
|
|
1489
1508
|
}
|
|
1490
1509
|
|
|
1510
|
+
export class BlockUtilities {
|
|
1511
|
+
private constructor();
|
|
1512
|
+
/**
|
|
1513
|
+
* @remarks
|
|
1514
|
+
* This function can't be called in read-only mode.
|
|
1515
|
+
*
|
|
1516
|
+
* @throws This function can throw errors.
|
|
1517
|
+
*/
|
|
1518
|
+
fillVolume(
|
|
1519
|
+
volume: minecraftserver.BlockVolumeBase | minecraftserver.CompoundBlockVolume | Selection,
|
|
1520
|
+
block?: minecraftserver.BlockPermutation | minecraftserver.BlockType | string,
|
|
1521
|
+
): void;
|
|
1522
|
+
}
|
|
1523
|
+
|
|
1491
1524
|
export class BrushShapeManager {
|
|
1492
1525
|
private constructor();
|
|
1493
1526
|
readonly activeBrushShape?: BrushShape;
|
|
@@ -1573,6 +1606,18 @@ export class BrushShapeManager {
|
|
|
1573
1606
|
*
|
|
1574
1607
|
*/
|
|
1575
1608
|
setBrushShapeOffset(offset: minecraftserver.Vector3): void;
|
|
1609
|
+
/**
|
|
1610
|
+
* @remarks
|
|
1611
|
+
* This function can't be called in read-only mode.
|
|
1612
|
+
*
|
|
1613
|
+
*/
|
|
1614
|
+
setBrushShapeVisible(visible: boolean): void;
|
|
1615
|
+
/**
|
|
1616
|
+
* @remarks
|
|
1617
|
+
* This function can't be called in read-only mode.
|
|
1618
|
+
*
|
|
1619
|
+
*/
|
|
1620
|
+
setSmoothStrength(smoothStrength: number): void;
|
|
1576
1621
|
/**
|
|
1577
1622
|
* @remarks
|
|
1578
1623
|
* This function can't be called in read-only mode.
|
|
@@ -1641,6 +1686,7 @@ export class ClipboardChangeAfterEventSignal {
|
|
|
1641
1686
|
*/
|
|
1642
1687
|
export class ClipboardItem {
|
|
1643
1688
|
private constructor();
|
|
1689
|
+
readonly id: string;
|
|
1644
1690
|
/**
|
|
1645
1691
|
* @remarks
|
|
1646
1692
|
* Return whether there is any block content in the item
|
|
@@ -1659,7 +1705,7 @@ export class ClipboardItem {
|
|
|
1659
1705
|
clear(): void;
|
|
1660
1706
|
/**
|
|
1661
1707
|
* @remarks
|
|
1662
|
-
* Create a {@link
|
|
1708
|
+
* Create a {@link minecraftserver.CompoundBlockVolume}
|
|
1663
1709
|
* container which represents the occupied block volumes within
|
|
1664
1710
|
* the ClipboardItem.
|
|
1665
1711
|
* This function does not perform any write operations, and
|
|
@@ -1677,7 +1723,7 @@ export class ClipboardItem {
|
|
|
1677
1723
|
* An optional set of write parameters which govern how the
|
|
1678
1724
|
* ClipboardItem should be potentially applied to the world
|
|
1679
1725
|
* @returns
|
|
1680
|
-
* A {@link
|
|
1726
|
+
* A {@link minecraftserver.CompoundBlockVolume} which
|
|
1681
1727
|
* represents the occupied block volumes within the
|
|
1682
1728
|
* ClipboardItem as they would be written to the world with the
|
|
1683
1729
|
* specified {@link ClipboardWriteOptions}
|
|
@@ -1912,44 +1958,32 @@ export class Cursor {
|
|
|
1912
1958
|
readonly isVisible: boolean;
|
|
1913
1959
|
/**
|
|
1914
1960
|
* @remarks
|
|
1915
|
-
*
|
|
1916
|
-
*
|
|
1917
|
-
* @throws This function can throw errors.
|
|
1918
|
-
*/
|
|
1919
|
-
attachClipboardItem(item: ClipboardItem): void;
|
|
1920
|
-
/**
|
|
1921
|
-
* @remarks
|
|
1922
|
-
* This function can't be called in read-only mode.
|
|
1961
|
+
* Get the world position of the 3D block cursor
|
|
1923
1962
|
*
|
|
1924
|
-
* @throws This function can throw errors.
|
|
1925
|
-
*/
|
|
1926
|
-
clearAttachment(): void;
|
|
1927
|
-
/**
|
|
1928
|
-
* @remarks
|
|
1929
1963
|
* This function can't be called in read-only mode.
|
|
1930
1964
|
*
|
|
1931
1965
|
* @throws This function can throw errors.
|
|
1932
1966
|
*/
|
|
1933
|
-
|
|
1967
|
+
getPosition(): minecraftserver.Vector3;
|
|
1934
1968
|
/**
|
|
1935
1969
|
* @remarks
|
|
1936
|
-
* Get
|
|
1970
|
+
* Get a property object which represents the current
|
|
1971
|
+
* properties of the 3D block cursor.
|
|
1937
1972
|
*
|
|
1938
1973
|
* This function can't be called in read-only mode.
|
|
1939
1974
|
*
|
|
1940
1975
|
* @throws This function can throw errors.
|
|
1941
1976
|
*/
|
|
1942
|
-
|
|
1977
|
+
getProperties(): CursorProperties;
|
|
1943
1978
|
/**
|
|
1944
1979
|
* @remarks
|
|
1945
|
-
* Get a property object which represents the current
|
|
1946
|
-
* properties of the 3D block cursor.
|
|
1947
|
-
*
|
|
1948
1980
|
* This function can't be called in read-only mode.
|
|
1949
1981
|
*
|
|
1950
1982
|
* @throws This function can throw errors.
|
|
1983
|
+
*
|
|
1984
|
+
* {@link Error}
|
|
1951
1985
|
*/
|
|
1952
|
-
|
|
1986
|
+
getRay(): CursorRay;
|
|
1953
1987
|
/**
|
|
1954
1988
|
* @remarks
|
|
1955
1989
|
* Hide the 3D block cursor from view until the corresponding
|
|
@@ -1985,13 +2019,6 @@ export class Cursor {
|
|
|
1985
2019
|
* @throws This function can throw errors.
|
|
1986
2020
|
*/
|
|
1987
2021
|
resetToDefaultState(): void;
|
|
1988
|
-
/**
|
|
1989
|
-
* @remarks
|
|
1990
|
-
* This function can't be called in read-only mode.
|
|
1991
|
-
*
|
|
1992
|
-
* @throws This function can throw errors.
|
|
1993
|
-
*/
|
|
1994
|
-
setAttachmentProperties(properties: CursorAttachmentProperties): void;
|
|
1995
2022
|
/**
|
|
1996
2023
|
* @remarks
|
|
1997
2024
|
* Set the 3D block cursor properties to a given state
|
|
@@ -2015,33 +2042,6 @@ export class Cursor {
|
|
|
2015
2042
|
show(): void;
|
|
2016
2043
|
}
|
|
2017
2044
|
|
|
2018
|
-
export class CursorAttachmentPropertiesChangeAfterEvent {
|
|
2019
|
-
private constructor();
|
|
2020
|
-
readonly properties: CursorAttachmentProperties;
|
|
2021
|
-
}
|
|
2022
|
-
|
|
2023
|
-
export class CursorAttachmentPropertyChangeAfterEventSignal {
|
|
2024
|
-
private constructor();
|
|
2025
|
-
/**
|
|
2026
|
-
* @remarks
|
|
2027
|
-
* This function can't be called in read-only mode.
|
|
2028
|
-
*
|
|
2029
|
-
* This function can be called in early-execution mode.
|
|
2030
|
-
*
|
|
2031
|
-
*/
|
|
2032
|
-
subscribe(
|
|
2033
|
-
callback: (arg: CursorAttachmentPropertiesChangeAfterEvent) => void,
|
|
2034
|
-
): (arg: CursorAttachmentPropertiesChangeAfterEvent) => void;
|
|
2035
|
-
/**
|
|
2036
|
-
* @remarks
|
|
2037
|
-
* This function can't be called in read-only mode.
|
|
2038
|
-
*
|
|
2039
|
-
* This function can be called in early-execution mode.
|
|
2040
|
-
*
|
|
2041
|
-
*/
|
|
2042
|
-
unsubscribe(callback: (arg: CursorAttachmentPropertiesChangeAfterEvent) => void): void;
|
|
2043
|
-
}
|
|
2044
|
-
|
|
2045
2045
|
export class CursorPropertiesChangeAfterEvent {
|
|
2046
2046
|
private constructor();
|
|
2047
2047
|
readonly properties: CursorProperties;
|
|
@@ -2232,6 +2232,7 @@ export class ExtensionContext {
|
|
|
2232
2232
|
*/
|
|
2233
2233
|
readonly afterEvents: ExtensionContextAfterEvents;
|
|
2234
2234
|
readonly blockPalette: BlockPaletteManager;
|
|
2235
|
+
readonly blockUtilities: BlockUtilities;
|
|
2235
2236
|
readonly brushShapeManager: BrushShapeManager;
|
|
2236
2237
|
/**
|
|
2237
2238
|
* @remarks
|
|
@@ -2301,7 +2302,6 @@ export class ExtensionContextAfterEvents {
|
|
|
2301
2302
|
readonly clipboardChange: ClipboardChangeAfterEventSignal;
|
|
2302
2303
|
readonly currentThemeChange: CurrentThemeChangeAfterEventSignal;
|
|
2303
2304
|
readonly currentThemeColorChange: CurrentThemeColorChangeAfterEventSignal;
|
|
2304
|
-
readonly cursorAttachmentPropertyChange: CursorAttachmentPropertyChangeAfterEventSignal;
|
|
2305
2305
|
readonly cursorPropertyChange: CursorPropertyChangeAfterEventSignal;
|
|
2306
2306
|
/**
|
|
2307
2307
|
* @remarks
|
|
@@ -2364,7 +2364,7 @@ export class GraphicsSettings {
|
|
|
2364
2364
|
export class IBlockPaletteItem {
|
|
2365
2365
|
private constructor();
|
|
2366
2366
|
getBlock(): minecraftserver.BlockType | undefined;
|
|
2367
|
-
getDisplayName(): string;
|
|
2367
|
+
getDisplayName(): string | undefined;
|
|
2368
2368
|
getType(): BlockPaletteItemType;
|
|
2369
2369
|
/**
|
|
2370
2370
|
* @remarks
|
|
@@ -2768,7 +2768,7 @@ export class Selection {
|
|
|
2768
2768
|
*
|
|
2769
2769
|
* @param forceRelativity
|
|
2770
2770
|
* See the description for {@link
|
|
2771
|
-
*
|
|
2771
|
+
* minecraftserver.CompoundBlockVolume.peekLastVolume}
|
|
2772
2772
|
* @returns
|
|
2773
2773
|
* Returns undefined if the stack is empty
|
|
2774
2774
|
*/
|
|
@@ -2808,10 +2808,10 @@ export class Selection {
|
|
|
2808
2808
|
* This function can't be called in read-only mode.
|
|
2809
2809
|
*
|
|
2810
2810
|
* @param other
|
|
2811
|
-
* {@link
|
|
2812
|
-
*
|
|
2813
|
-
*
|
|
2814
|
-
*
|
|
2811
|
+
* {@link minecraftserver.CompoundBlockVolume} - set the block
|
|
2812
|
+
* component part of this selection to the specified compound
|
|
2813
|
+
* block volume. This will completely replace all block volume
|
|
2814
|
+
* definitions in the selection.
|
|
2815
2815
|
* {@link Selection} - replace the selection with the specified
|
|
2816
2816
|
* selection
|
|
2817
2817
|
* @throws This function can throw errors.
|
|
@@ -2888,6 +2888,7 @@ export class SettingsManager {
|
|
|
2888
2888
|
*
|
|
2889
2889
|
*/
|
|
2890
2890
|
readonly graphics: GraphicsSettings;
|
|
2891
|
+
readonly speed: SpeedSettings;
|
|
2891
2892
|
readonly theme: ThemeSettings;
|
|
2892
2893
|
}
|
|
2893
2894
|
|
|
@@ -2974,6 +2975,20 @@ export class SimulationState {
|
|
|
2974
2975
|
setPaused(isPaused: boolean): void;
|
|
2975
2976
|
}
|
|
2976
2977
|
|
|
2978
|
+
export class SpeedSettings {
|
|
2979
|
+
private constructor();
|
|
2980
|
+
get<T extends keyof SpeedSettingsPropertyTypeMap>(property: T): SpeedSettingsPropertyTypeMap[T] | undefined;
|
|
2981
|
+
getAll(): SpeedSettingsPropertyTypeMap;
|
|
2982
|
+
/**
|
|
2983
|
+
* @throws This function can throw errors.
|
|
2984
|
+
*/
|
|
2985
|
+
set<T extends keyof SpeedSettingsPropertyTypeMap>(property: T, value: SpeedSettingsPropertyTypeMap[T]): void;
|
|
2986
|
+
/**
|
|
2987
|
+
* @throws This function can throw errors.
|
|
2988
|
+
*/
|
|
2989
|
+
setAll(properties: SpeedSettingsPropertyTypeMap): void;
|
|
2990
|
+
}
|
|
2991
|
+
|
|
2977
2992
|
export class ThemeSettings {
|
|
2978
2993
|
private constructor();
|
|
2979
2994
|
/**
|
|
@@ -3192,7 +3207,7 @@ export class TransactionManager {
|
|
|
3192
3207
|
/**
|
|
3193
3208
|
* @remarks
|
|
3194
3209
|
* Begin tracking block changes in an area defined by a {@link
|
|
3195
|
-
*
|
|
3210
|
+
* minecraftserver.CompoundBlockVolume}. These will be added
|
|
3196
3211
|
* to a pending changes list.
|
|
3197
3212
|
* The pending list will be added to the open transaction
|
|
3198
3213
|
* record when a commit has been issued.
|
|
@@ -3200,8 +3215,8 @@ export class TransactionManager {
|
|
|
3200
3215
|
* This function can't be called in read-only mode.
|
|
3201
3216
|
*
|
|
3202
3217
|
* @param compoundBlockVolume
|
|
3203
|
-
* {@link
|
|
3204
|
-
*
|
|
3218
|
+
* {@link minecraftserver.CompoundBlockVolume} to track. Only
|
|
3219
|
+
* non-void block locations will be tracked -- any changes
|
|
3205
3220
|
* falling into a void/negative space will not be tracked
|
|
3206
3221
|
* @throws This function can throw errors.
|
|
3207
3222
|
*/
|
|
@@ -3228,8 +3243,8 @@ export class TransactionManager {
|
|
|
3228
3243
|
* Selection Volumes can also represent irregular shapes with
|
|
3229
3244
|
* non-contiguous blocks and this tracking call will honor the
|
|
3230
3245
|
* actual selected areas in the volume (and not the negative
|
|
3231
|
-
* space) (see {@link
|
|
3232
|
-
*
|
|
3246
|
+
* space) (see {@link minecraftserver.CompoundBlockVolume} for
|
|
3247
|
+
* more details
|
|
3233
3248
|
*
|
|
3234
3249
|
* This function can't be called in read-only mode.
|
|
3235
3250
|
*
|
|
@@ -3354,6 +3369,12 @@ export declare class Vector3LimitObservableValidator implements ObservableValida
|
|
|
3354
3369
|
|
|
3355
3370
|
export class Widget {
|
|
3356
3371
|
private constructor();
|
|
3372
|
+
/**
|
|
3373
|
+
* @remarks
|
|
3374
|
+
* This property can't be edited in read-only mode.
|
|
3375
|
+
*
|
|
3376
|
+
*/
|
|
3377
|
+
bindPositionToBlockCursor: boolean;
|
|
3357
3378
|
/**
|
|
3358
3379
|
* @remarks
|
|
3359
3380
|
* This property can't be edited in read-only mode.
|
|
@@ -3372,6 +3393,12 @@ export class Widget {
|
|
|
3372
3393
|
*
|
|
3373
3394
|
*/
|
|
3374
3395
|
location: minecraftserver.Vector3;
|
|
3396
|
+
/**
|
|
3397
|
+
* @remarks
|
|
3398
|
+
* This property can't be edited in read-only mode.
|
|
3399
|
+
*
|
|
3400
|
+
*/
|
|
3401
|
+
lockPositionToSurface: boolean;
|
|
3375
3402
|
/**
|
|
3376
3403
|
* @throws This property can throw when used.
|
|
3377
3404
|
*
|
|
@@ -3388,6 +3415,21 @@ export class Widget {
|
|
|
3388
3415
|
*/
|
|
3389
3416
|
snapToBlockLocation: boolean;
|
|
3390
3417
|
visible: boolean;
|
|
3418
|
+
/**
|
|
3419
|
+
* @remarks
|
|
3420
|
+
* This function can't be called in read-only mode.
|
|
3421
|
+
*
|
|
3422
|
+
* @throws This function can throw errors.
|
|
3423
|
+
*
|
|
3424
|
+
* {@link Error}
|
|
3425
|
+
*
|
|
3426
|
+
* {@link InvalidWidgetError}
|
|
3427
|
+
*/
|
|
3428
|
+
addClipboardComponent(
|
|
3429
|
+
componentName: string,
|
|
3430
|
+
clipboardItem?: ClipboardItem,
|
|
3431
|
+
options?: WidgetComponentClipboardOptions,
|
|
3432
|
+
): WidgetComponentClipboard;
|
|
3391
3433
|
/**
|
|
3392
3434
|
* @remarks
|
|
3393
3435
|
* This function can't be called in read-only mode.
|
|
@@ -3438,10 +3480,10 @@ export class Widget {
|
|
|
3438
3480
|
addRenderPrimitiveComponent(
|
|
3439
3481
|
componentName: string,
|
|
3440
3482
|
primitiveType:
|
|
3441
|
-
|
|
|
3442
|
-
|
|
|
3443
|
-
|
|
|
3444
|
-
|
|
|
3483
|
+
| WidgetComponentRenderPrimitiveTypeAxialSphere
|
|
3484
|
+
| WidgetComponentRenderPrimitiveTypeBox
|
|
3485
|
+
| WidgetComponentRenderPrimitiveTypeDisc
|
|
3486
|
+
| WidgetComponentRenderPrimitiveTypeLine,
|
|
3445
3487
|
options?: WidgetComponentRenderPrimitiveOptions,
|
|
3446
3488
|
): WidgetComponentRenderPrimitive;
|
|
3447
3489
|
/**
|
|
@@ -3519,8 +3561,6 @@ export class Widget {
|
|
|
3519
3561
|
* @throws This function can throw errors.
|
|
3520
3562
|
*
|
|
3521
3563
|
* {@link InvalidWidgetError}
|
|
3522
|
-
*
|
|
3523
|
-
* {@link InvalidWidgetError}
|
|
3524
3564
|
*/
|
|
3525
3565
|
setStateChangeEvent(eventFunction?: (arg: WidgetStateChangeEventData) => void): void;
|
|
3526
3566
|
}
|
|
@@ -3539,6 +3579,12 @@ export class WidgetComponentBase {
|
|
|
3539
3579
|
* {@link minecraftserver.InvalidWidgetComponentError}
|
|
3540
3580
|
*/
|
|
3541
3581
|
readonly location: minecraftserver.Vector3;
|
|
3582
|
+
/**
|
|
3583
|
+
* @remarks
|
|
3584
|
+
* This property can't be edited in read-only mode.
|
|
3585
|
+
*
|
|
3586
|
+
*/
|
|
3587
|
+
lockToSurface: boolean;
|
|
3542
3588
|
/**
|
|
3543
3589
|
* @throws This property can throw when used.
|
|
3544
3590
|
*
|
|
@@ -3568,6 +3614,27 @@ export class WidgetComponentBase {
|
|
|
3568
3614
|
* {@link InvalidWidgetComponentError}
|
|
3569
3615
|
*/
|
|
3570
3616
|
delete(): void;
|
|
3617
|
+
/**
|
|
3618
|
+
* @remarks
|
|
3619
|
+
* This function can't be called in read-only mode.
|
|
3620
|
+
*
|
|
3621
|
+
* @throws This function can throw errors.
|
|
3622
|
+
*
|
|
3623
|
+
* {@link InvalidWidgetComponentError}
|
|
3624
|
+
*/
|
|
3625
|
+
setStateChangeEvent(eventFunction?: (arg: WidgetComponentStateChangeEventData) => void): void;
|
|
3626
|
+
}
|
|
3627
|
+
|
|
3628
|
+
// @ts-ignore Class inheritance allowed for native defined classes
|
|
3629
|
+
export class WidgetComponentClipboard extends WidgetComponentBase {
|
|
3630
|
+
private constructor();
|
|
3631
|
+
clipboardMirror: minecraftserver.StructureMirrorAxis;
|
|
3632
|
+
clipboardNormalizedOrigin: minecraftserver.Vector3;
|
|
3633
|
+
clipboardOffset: minecraftserver.Vector3;
|
|
3634
|
+
clipboardRotation: minecraftserver.StructureRotation;
|
|
3635
|
+
fillColor: minecraftserver.RGBA;
|
|
3636
|
+
outlineColor: minecraftserver.RGBA;
|
|
3637
|
+
showBounds: boolean;
|
|
3571
3638
|
}
|
|
3572
3639
|
|
|
3573
3640
|
// @ts-ignore Class inheritance allowed for native defined classes
|
|
@@ -3593,6 +3660,7 @@ export class WidgetComponentEntity extends WidgetComponentBase {
|
|
|
3593
3660
|
// @ts-ignore Class inheritance allowed for native defined classes
|
|
3594
3661
|
export class WidgetComponentGizmo extends WidgetComponentBase {
|
|
3595
3662
|
private constructor();
|
|
3663
|
+
activated: boolean;
|
|
3596
3664
|
}
|
|
3597
3665
|
|
|
3598
3666
|
// @ts-ignore Class inheritance allowed for native defined classes
|
|
@@ -3603,6 +3671,14 @@ export class WidgetComponentGuide extends WidgetComponentBase {
|
|
|
3603
3671
|
// @ts-ignore Class inheritance allowed for native defined classes
|
|
3604
3672
|
export class WidgetComponentRenderPrimitive extends WidgetComponentBase {
|
|
3605
3673
|
private constructor();
|
|
3674
|
+
/**
|
|
3675
|
+
* @throws This property can throw when used.
|
|
3676
|
+
*
|
|
3677
|
+
* {@link InvalidWidgetComponentError}
|
|
3678
|
+
*
|
|
3679
|
+
* {@link InvalidWidgetError}
|
|
3680
|
+
*/
|
|
3681
|
+
readonly primitiveType: PrimitiveType;
|
|
3606
3682
|
/**
|
|
3607
3683
|
* @remarks
|
|
3608
3684
|
* This function can't be called in read-only mode.
|
|
@@ -3615,14 +3691,15 @@ export class WidgetComponentRenderPrimitive extends WidgetComponentBase {
|
|
|
3615
3691
|
*/
|
|
3616
3692
|
setPrimitive(
|
|
3617
3693
|
primitive:
|
|
3618
|
-
|
|
|
3619
|
-
|
|
|
3620
|
-
|
|
|
3621
|
-
|
|
|
3694
|
+
| WidgetComponentRenderPrimitiveTypeAxialSphere
|
|
3695
|
+
| WidgetComponentRenderPrimitiveTypeBox
|
|
3696
|
+
| WidgetComponentRenderPrimitiveTypeDisc
|
|
3697
|
+
| WidgetComponentRenderPrimitiveTypeLine,
|
|
3622
3698
|
): void;
|
|
3623
3699
|
}
|
|
3624
3700
|
|
|
3625
|
-
|
|
3701
|
+
// @ts-ignore Class inheritance allowed for native defined classes
|
|
3702
|
+
export class WidgetComponentRenderPrimitiveTypeAxialSphere extends WidgetComponentRenderPrimitiveTypeBase {
|
|
3626
3703
|
/**
|
|
3627
3704
|
* @remarks
|
|
3628
3705
|
* This property can't be edited in read-only mode.
|
|
@@ -3644,7 +3721,13 @@ export class WidgetComponentRenderPrimitiveAxialSphere {
|
|
|
3644
3721
|
constructor(center: minecraftserver.Vector3, radius: number, color?: minecraftserver.RGBA);
|
|
3645
3722
|
}
|
|
3646
3723
|
|
|
3647
|
-
export class
|
|
3724
|
+
export class WidgetComponentRenderPrimitiveTypeBase {
|
|
3725
|
+
private constructor();
|
|
3726
|
+
readonly primitiveType: PrimitiveType;
|
|
3727
|
+
}
|
|
3728
|
+
|
|
3729
|
+
// @ts-ignore Class inheritance allowed for native defined classes
|
|
3730
|
+
export class WidgetComponentRenderPrimitiveTypeBox extends WidgetComponentRenderPrimitiveTypeBase {
|
|
3648
3731
|
/**
|
|
3649
3732
|
* @remarks
|
|
3650
3733
|
* This property can't be edited in read-only mode.
|
|
@@ -3666,7 +3749,8 @@ export class WidgetComponentRenderPrimitiveBox {
|
|
|
3666
3749
|
constructor(center: minecraftserver.Vector3, color: minecraftserver.RGBA, size?: minecraftserver.Vector3);
|
|
3667
3750
|
}
|
|
3668
3751
|
|
|
3669
|
-
|
|
3752
|
+
// @ts-ignore Class inheritance allowed for native defined classes
|
|
3753
|
+
export class WidgetComponentRenderPrimitiveTypeDisc extends WidgetComponentRenderPrimitiveTypeBase {
|
|
3670
3754
|
/**
|
|
3671
3755
|
* @remarks
|
|
3672
3756
|
* This property can't be edited in read-only mode.
|
|
@@ -3688,7 +3772,8 @@ export class WidgetComponentRenderPrimitiveDisc {
|
|
|
3688
3772
|
constructor(center: minecraftserver.Vector3, radius: number, color: minecraftserver.RGBA);
|
|
3689
3773
|
}
|
|
3690
3774
|
|
|
3691
|
-
|
|
3775
|
+
// @ts-ignore Class inheritance allowed for native defined classes
|
|
3776
|
+
export class WidgetComponentRenderPrimitiveTypeLine extends WidgetComponentRenderPrimitiveTypeBase {
|
|
3692
3777
|
/**
|
|
3693
3778
|
* @remarks
|
|
3694
3779
|
* This property can't be edited in read-only mode.
|
|
@@ -3758,6 +3843,14 @@ export class WidgetComponentSpline extends WidgetComponentBase {
|
|
|
3758
3843
|
setControlPoints(widgetList: Widget[]): void;
|
|
3759
3844
|
}
|
|
3760
3845
|
|
|
3846
|
+
export class WidgetComponentStateChangeEventData {
|
|
3847
|
+
private constructor();
|
|
3848
|
+
readonly component: WidgetComponentBase;
|
|
3849
|
+
readonly gizmoActivated?: boolean;
|
|
3850
|
+
readonly group: WidgetGroup;
|
|
3851
|
+
readonly widget: Widget;
|
|
3852
|
+
}
|
|
3853
|
+
|
|
3761
3854
|
// @ts-ignore Class inheritance allowed for native defined classes
|
|
3762
3855
|
export class WidgetComponentText extends WidgetComponentBase {
|
|
3763
3856
|
private constructor();
|
|
@@ -3900,21 +3993,6 @@ export interface BrushShape {
|
|
|
3900
3993
|
* is being written to the world
|
|
3901
3994
|
*/
|
|
3902
3995
|
export interface ClipboardWriteOptions {
|
|
3903
|
-
/**
|
|
3904
|
-
* @remarks
|
|
3905
|
-
* The anchor is a unit vector representation of the side or
|
|
3906
|
-
* corner of the Clipboard Item to be written to the world.
|
|
3907
|
-
* `{0, 0, 0}` represents the center of the Clipboard item,
|
|
3908
|
-
* `{0, 1, 0}` represents the top, `{-1, -1, -1}` represents
|
|
3909
|
-
* the bottom/back/left corner, etc
|
|
3910
|
-
* The anchor is used in conjunction with the item size to
|
|
3911
|
-
* determine the object relative anchor point where the object
|
|
3912
|
-
* will be applied in the world.
|
|
3913
|
-
* Values for the X/Y/Z components should be within the range
|
|
3914
|
-
* `(-1 <= X/Y/Z <=1)`
|
|
3915
|
-
*
|
|
3916
|
-
*/
|
|
3917
|
-
anchor?: minecraftserver.Vector3;
|
|
3918
3996
|
/**
|
|
3919
3997
|
* @remarks
|
|
3920
3998
|
* An enum which represents the axis (or combination of axis')
|
|
@@ -3925,6 +4003,7 @@ export interface ClipboardWriteOptions {
|
|
|
3925
4003
|
*
|
|
3926
4004
|
*/
|
|
3927
4005
|
mirror?: minecraftserver.StructureMirrorAxis;
|
|
4006
|
+
normalizedOrigin?: minecraftserver.Vector3;
|
|
3928
4007
|
/**
|
|
3929
4008
|
* @remarks
|
|
3930
4009
|
* A position offset which should be applied to the paste
|
|
@@ -3941,18 +4020,6 @@ export interface ClipboardWriteOptions {
|
|
|
3941
4020
|
rotation?: minecraftserver.StructureRotation;
|
|
3942
4021
|
}
|
|
3943
4022
|
|
|
3944
|
-
export interface CursorAttachmentProperties {
|
|
3945
|
-
boundsFillColor?: minecraftserver.RGBA;
|
|
3946
|
-
boundsVisible?: boolean;
|
|
3947
|
-
boundsWireframeColor?: minecraftserver.RGBA;
|
|
3948
|
-
contentsFillColor?: minecraftserver.RGBA;
|
|
3949
|
-
contentsWireframeColor?: minecraftserver.RGBA;
|
|
3950
|
-
mirror?: minecraftserver.StructureMirrorAxis;
|
|
3951
|
-
offset?: minecraftserver.Vector3;
|
|
3952
|
-
origin?: minecraftserver.Vector3;
|
|
3953
|
-
rotation?: minecraftserver.StructureRotation;
|
|
3954
|
-
}
|
|
3955
|
-
|
|
3956
4023
|
/**
|
|
3957
4024
|
* The CursorProperties interface is used to describe the
|
|
3958
4025
|
* properties of the Editor 3D block cursor construct.
|
|
@@ -4023,6 +4090,12 @@ export interface CursorProperties {
|
|
|
4023
4090
|
visible?: boolean;
|
|
4024
4091
|
}
|
|
4025
4092
|
|
|
4093
|
+
export interface CursorRay {
|
|
4094
|
+
end: minecraftserver.Vector3;
|
|
4095
|
+
hit: boolean;
|
|
4096
|
+
start: minecraftserver.Vector3;
|
|
4097
|
+
}
|
|
4098
|
+
|
|
4026
4099
|
export interface EditorStructure {
|
|
4027
4100
|
storageLocation: string;
|
|
4028
4101
|
structure: minecraftserver.Structure;
|
|
@@ -4166,10 +4239,23 @@ export interface WeightedBlock {
|
|
|
4166
4239
|
}
|
|
4167
4240
|
|
|
4168
4241
|
export interface WidgetComponentBaseOptions {
|
|
4242
|
+
lockToSurface?: boolean;
|
|
4169
4243
|
offset?: minecraftserver.Vector3;
|
|
4244
|
+
stateChangeEvent?: (arg: WidgetComponentStateChangeEventData) => void;
|
|
4170
4245
|
visible?: boolean;
|
|
4171
4246
|
}
|
|
4172
4247
|
|
|
4248
|
+
// @ts-ignore Class inheritance allowed for native defined classes
|
|
4249
|
+
export interface WidgetComponentClipboardOptions extends WidgetComponentBaseOptions {
|
|
4250
|
+
boundsFillColor?: minecraftserver.RGBA;
|
|
4251
|
+
boundsOutlineColor?: minecraftserver.RGBA;
|
|
4252
|
+
clipboardMirror?: minecraftserver.StructureMirrorAxis;
|
|
4253
|
+
clipboardNormalizedOrigin?: minecraftserver.Vector3;
|
|
4254
|
+
clipboardOffset?: minecraftserver.Vector3;
|
|
4255
|
+
clipboardRotation?: minecraftserver.StructureRotation;
|
|
4256
|
+
showBounds?: boolean;
|
|
4257
|
+
}
|
|
4258
|
+
|
|
4173
4259
|
// @ts-ignore Class inheritance allowed for native defined classes
|
|
4174
4260
|
export interface WidgetComponentEntityOptions extends WidgetComponentBaseOptions {
|
|
4175
4261
|
deselectedAnimation?: string;
|
|
@@ -4178,7 +4264,10 @@ export interface WidgetComponentEntityOptions extends WidgetComponentBaseOptions
|
|
|
4178
4264
|
}
|
|
4179
4265
|
|
|
4180
4266
|
// @ts-ignore Class inheritance allowed for native defined classes
|
|
4181
|
-
export interface WidgetComponentGizmoOptions extends WidgetComponentBaseOptions {
|
|
4267
|
+
export interface WidgetComponentGizmoOptions extends WidgetComponentBaseOptions {
|
|
4268
|
+
axes?: Axis;
|
|
4269
|
+
enablePlanes?: boolean;
|
|
4270
|
+
}
|
|
4182
4271
|
|
|
4183
4272
|
// @ts-ignore Class inheritance allowed for native defined classes
|
|
4184
4273
|
export interface WidgetComponentGuideOptions extends WidgetComponentBaseOptions {}
|
|
@@ -4198,8 +4287,10 @@ export interface WidgetComponentTextOptions extends WidgetComponentBaseOptions {
|
|
|
4198
4287
|
}
|
|
4199
4288
|
|
|
4200
4289
|
export interface WidgetCreateOptions {
|
|
4290
|
+
bindPositionToBlockCursor?: boolean;
|
|
4201
4291
|
collisionOffset?: minecraftserver.Vector3;
|
|
4202
4292
|
collisionRadius?: number;
|
|
4293
|
+
lockToSurface?: boolean;
|
|
4203
4294
|
selectable?: boolean;
|
|
4204
4295
|
snapToBlockLocation?: boolean;
|
|
4205
4296
|
stateChangeEvent?: (arg: WidgetStateChangeEventData) => void;
|
|
@@ -5033,7 +5124,7 @@ export interface IMenuCreationParams {
|
|
|
5033
5124
|
export interface IModalTool {
|
|
5034
5125
|
/**
|
|
5035
5126
|
* @remarks
|
|
5036
|
-
* Unique
|
|
5127
|
+
* Unique identifier for the tool
|
|
5037
5128
|
*
|
|
5038
5129
|
*/
|
|
5039
5130
|
readonly id: string;
|
|
@@ -5043,14 +5134,11 @@ export interface IModalTool {
|
|
|
5043
5134
|
*
|
|
5044
5135
|
*/
|
|
5045
5136
|
onModalToolActivation: EventSink<ModalToolLifecycleEventPayload>;
|
|
5046
|
-
bindPropertyPane(pane:
|
|
5047
|
-
dispose(): void;
|
|
5048
|
-
hide(): void;
|
|
5137
|
+
bindPropertyPane(pane: IRootPropertyPane): void;
|
|
5049
5138
|
registerKeyBinding(action: SupportedKeyboardActionTypes, binding: KeyBinding, info?: KeyBindingInfo): void;
|
|
5050
5139
|
registerMouseButtonBinding(action: SupportedMouseActionTypes): void;
|
|
5051
5140
|
registerMouseDragBinding(action: SupportedMouseActionTypes): void;
|
|
5052
5141
|
registerMouseWheelBinding(action: SupportedMouseActionTypes): void;
|
|
5053
|
-
show(): void;
|
|
5054
5142
|
unregisterInputBindings(): void;
|
|
5055
5143
|
}
|
|
5056
5144
|
|
|
@@ -5061,7 +5149,7 @@ export interface IModalToolContainer {
|
|
|
5061
5149
|
*
|
|
5062
5150
|
*/
|
|
5063
5151
|
readonly currentTools: IModalTool[];
|
|
5064
|
-
addTool(
|
|
5152
|
+
addTool(id: string, params: ModalToolCreationParameters): IModalTool;
|
|
5065
5153
|
focusToolInputContext(): void;
|
|
5066
5154
|
getSelectedToolId(): string | undefined;
|
|
5067
5155
|
removeTool(id: string): void;
|
|
@@ -5820,6 +5908,12 @@ export interface IRootPropertyPaneOptions extends IPropertyPaneOptions {
|
|
|
5820
5908
|
* the editor evolves.
|
|
5821
5909
|
*/
|
|
5822
5910
|
export interface ISimpleTool {
|
|
5911
|
+
/**
|
|
5912
|
+
* @remarks
|
|
5913
|
+
* Get the tool unique id
|
|
5914
|
+
*
|
|
5915
|
+
*/
|
|
5916
|
+
get id(): string;
|
|
5823
5917
|
/**
|
|
5824
5918
|
* @remarks
|
|
5825
5919
|
* Get a reference to the menu component that was automatically
|
|
@@ -5971,6 +6065,12 @@ export interface ISimpleToolOptions {
|
|
|
5971
6065
|
*
|
|
5972
6066
|
*/
|
|
5973
6067
|
activationKeyBinding?: ISimpleToolKeyBinding;
|
|
6068
|
+
/**
|
|
6069
|
+
* @remarks
|
|
6070
|
+
* The unique identifier of the tool.
|
|
6071
|
+
*
|
|
6072
|
+
*/
|
|
6073
|
+
id: string;
|
|
5974
6074
|
/**
|
|
5975
6075
|
* @remarks
|
|
5976
6076
|
* The name of the tool. This will be used to identify the tool
|
|
@@ -6165,6 +6265,12 @@ export interface ISimpleToolPaneOptions {
|
|
|
6165
6265
|
*
|
|
6166
6266
|
*/
|
|
6167
6267
|
id: string;
|
|
6268
|
+
/**
|
|
6269
|
+
* @remarks
|
|
6270
|
+
* Information tooltip displayed on the root pane header.
|
|
6271
|
+
*
|
|
6272
|
+
*/
|
|
6273
|
+
infoTooltip?: TooltipInteractiveContent;
|
|
6168
6274
|
onBeginFinalize?: (pane: ISimpleToolPaneComponent) => void;
|
|
6169
6275
|
onEndFinalize?: (pane: ISimpleToolPaneComponent) => void;
|
|
6170
6276
|
onHide?: (pane: ISimpleToolPaneComponent) => void;
|
|
@@ -6776,31 +6882,25 @@ export interface IVector3PropertyItemOptions extends IPropertyItemOptionsBase {
|
|
|
6776
6882
|
export interface ModalToolCreationParameters {
|
|
6777
6883
|
/**
|
|
6778
6884
|
* @remarks
|
|
6779
|
-
*
|
|
6780
|
-
*
|
|
6781
|
-
*/
|
|
6782
|
-
icon?: string;
|
|
6783
|
-
/**
|
|
6784
|
-
* @remarks
|
|
6785
|
-
* Modal input context identifier
|
|
6885
|
+
* Action associated with tool activation
|
|
6786
6886
|
*
|
|
6787
6887
|
*/
|
|
6788
|
-
|
|
6888
|
+
action?: RegisteredAction<NoArgsAction>;
|
|
6789
6889
|
/**
|
|
6790
6890
|
* @remarks
|
|
6791
|
-
*
|
|
6891
|
+
* Icon resource
|
|
6792
6892
|
*
|
|
6793
6893
|
*/
|
|
6794
|
-
|
|
6894
|
+
icon?: string;
|
|
6795
6895
|
/**
|
|
6796
6896
|
* @remarks
|
|
6797
|
-
*
|
|
6897
|
+
* Localized title of the tool
|
|
6798
6898
|
*
|
|
6799
6899
|
*/
|
|
6800
|
-
title
|
|
6900
|
+
title?: string;
|
|
6801
6901
|
/**
|
|
6802
6902
|
* @remarks
|
|
6803
|
-
* Tooltip description of the
|
|
6903
|
+
* Tooltip description of the tool
|
|
6804
6904
|
*
|
|
6805
6905
|
*/
|
|
6806
6906
|
tooltip?: string;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@minecraft/server-editor",
|
|
3
|
-
"version": "0.1.0-beta.1.21.50-preview.
|
|
3
|
+
"version": "0.1.0-beta.1.21.50-preview.28",
|
|
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.0-beta.1.21.50-preview.
|
|
17
|
+
"@minecraft/server": "^1.17.0-beta.1.21.50-preview.28"
|
|
18
18
|
},
|
|
19
19
|
"license": "MIT"
|
|
20
20
|
}
|