@minecraft/server-editor 0.1.0-beta.1.21.50-stable → 0.1.0-beta.1.21.60-preview.23

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.
Files changed (2) hide show
  1. package/index.d.ts +219 -203
  2. package/package.json +2 -2
package/index.d.ts CHANGED
@@ -907,6 +907,8 @@ export enum PaintMode {
907
907
  BlockPaint = 0,
908
908
  FreehandSelect = 1,
909
909
  Smooth = 2,
910
+ Roughen = 3,
911
+ Flatten = 4,
910
912
  }
911
913
 
912
914
  export enum Plane {
@@ -1086,19 +1088,6 @@ export enum WidgetMouseButtonActionType {
1086
1088
  Drag = 2,
1087
1089
  }
1088
1090
 
1089
- /**
1090
- * Defines type information for graphics settings properties.
1091
- */
1092
- export type GraphicsSettingsPropertyTypeMap = {
1093
- [GraphicsSettingsProperty.ShowInvisibleBlocks]?: boolean;
1094
- [GraphicsSettingsProperty.ShowChunkBoundaries]?: boolean;
1095
- [GraphicsSettingsProperty.ShowCompass]?: boolean;
1096
- };
1097
-
1098
- export type SpeedSettingsPropertyTypeMap = {
1099
- [SpeedSettingsProperty.FlySpeedMultiplier]?: number;
1100
- };
1101
-
1102
1091
  /**
1103
1092
  * Full set of all possible raw actions
1104
1093
  */
@@ -1127,6 +1116,15 @@ export type ActivationFunctionType<PerPlayerStorageType> = (
1127
1116
  */
1128
1117
  export declare type EventHandler<T> = (eventArg: T) => void;
1129
1118
 
1119
+ /**
1120
+ * Defines type information for graphics settings properties.
1121
+ */
1122
+ export type GraphicsSettingsPropertyTypeMap = {
1123
+ [GraphicsSettingsProperty.ShowInvisibleBlocks]?: boolean;
1124
+ [GraphicsSettingsProperty.ShowChunkBoundaries]?: boolean;
1125
+ [GraphicsSettingsProperty.ShowCompass]?: boolean;
1126
+ };
1127
+
1130
1128
  /**
1131
1129
  * A property item which supports BlockList properties
1132
1130
  */
@@ -1328,6 +1326,10 @@ export type RegisteredAction<T extends Action> = T & ActionID;
1328
1326
  */
1329
1327
  export type ShutdownFunctionType<PerPlayerStorageType> = (uiSession: IPlayerUISession<PerPlayerStorageType>) => void;
1330
1328
 
1329
+ export type SpeedSettingsPropertyTypeMap = {
1330
+ [SpeedSettingsProperty.FlySpeedMultiplier]?: number;
1331
+ };
1332
+
1331
1333
  /**
1332
1334
  * Full set of all possible keyboard actions
1333
1335
  */
@@ -1617,7 +1619,19 @@ export class BrushShapeManager {
1617
1619
  * This function can't be called in read-only mode.
1618
1620
  *
1619
1621
  */
1620
- setSmoothStrength(smoothStrength: number): void;
1622
+ setFlattenHeight(flattenHeight: number): void;
1623
+ /**
1624
+ * @remarks
1625
+ * This function can't be called in read-only mode.
1626
+ *
1627
+ */
1628
+ setFlattenRadius(flattenRadius: number): void;
1629
+ /**
1630
+ * @remarks
1631
+ * This function can't be called in read-only mode.
1632
+ *
1633
+ */
1634
+ setTerrainStrength(terrainStrength: number): void;
1621
1635
  /**
1622
1636
  * @remarks
1623
1637
  * This function can't be called in read-only mode.
@@ -3978,6 +3992,23 @@ export class WidgetStateChangeEventData {
3978
3992
  readonly widget: Widget;
3979
3993
  }
3980
3994
 
3995
+ /**
3996
+ * Binds actions to the client and manages their lifetime.
3997
+ * Action managers are managed on a per player basis since
3998
+ * client side UI is per player.
3999
+ */
4000
+ export interface ActionManager {
4001
+ /**
4002
+ * @remarks
4003
+ * Creates an action and registers it on the client
4004
+ *
4005
+ * @param rawAction
4006
+ * The raw action to create. See ActionTypes for supported
4007
+ * parameters
4008
+ */
4009
+ createAction<T extends Action>(rawAction: T): RegisteredAction<T>;
4010
+ }
4011
+
3981
4012
  export interface BlockMaskList {
3982
4013
  blockList: (minecraftserver.BlockPermutation | minecraftserver.BlockType | string)[];
3983
4014
  maskType: BlockMaskListType;
@@ -3988,6 +4019,48 @@ export interface BrushShape {
3988
4019
  name: string;
3989
4020
  }
3990
4021
 
4022
+ /**
4023
+ * Represents a UI session for a given player
4024
+ */
4025
+ export interface BuiltInUIManager {
4026
+ /**
4027
+ * @remarks
4028
+ * Navigates to the documentation site.
4029
+ *
4030
+ */
4031
+ navigateToDocumentation(): void;
4032
+ /**
4033
+ * @remarks
4034
+ * Navigates to the feedback site
4035
+ *
4036
+ */
4037
+ navigateToFeedback(): void;
4038
+ /**
4039
+ * @remarks
4040
+ * Navigates to the pause screen
4041
+ *
4042
+ */
4043
+ navigateToPauseScreen(): void;
4044
+ /**
4045
+ * @remarks
4046
+ * Updates the visibility of the log panel
4047
+ *
4048
+ */
4049
+ updateLogPanelVisibility(visibility: boolean): void;
4050
+ /**
4051
+ * @remarks
4052
+ * Updates the visibility of the control demo
4053
+ *
4054
+ */
4055
+ updateUISettingsPanelVisibility(visibility: boolean): void;
4056
+ /**
4057
+ * @remarks
4058
+ * Updates the visibility of the welcome panel
4059
+ *
4060
+ */
4061
+ updateWelcomePanelVisibility(visibility: boolean): void;
4062
+ }
4063
+
3991
4064
  /**
3992
4065
  * Interface used to specify the options when a clipboard item
3993
4066
  * is being written to the world
@@ -4109,6 +4182,24 @@ export interface EditorStructureSearchOptions {
4109
4182
  includeTags?: string[];
4110
4183
  }
4111
4184
 
4185
+ /**
4186
+ * An event that can be subscribed to. You can use the token,
4187
+ * returned from the subscribe method, to clean up handlers.
4188
+ */
4189
+ export declare interface EventSink<T> {
4190
+ /**
4191
+ * @remarks
4192
+ * Subscribes an event handler to a particular subscription.
4193
+ *
4194
+ * @param handler
4195
+ * Handler function to subscribe with.
4196
+ * @returns
4197
+ * An event handler subscription token that can be used to
4198
+ * unsubscribe and clean-up handlers.
4199
+ */
4200
+ subscribe(handler: EventHandler<T>): IEventToken;
4201
+ }
4202
+
4112
4203
  /**
4113
4204
  * An interface which defines the set of optional parameters
4114
4205
  * which can be used when calling the `registerEditorExtension`
@@ -4151,6 +4242,7 @@ export interface ExtensionOptionalParameters {
4151
4242
  }
4152
4243
 
4153
4244
  export interface GameOptions {
4245
+ bedsWork?: boolean;
4154
4246
  bonusChest?: boolean;
4155
4247
  cheats?: boolean;
4156
4248
  commandBlockEnabled?: boolean;
@@ -4182,6 +4274,7 @@ export interface GameOptions {
4182
4274
  showCoordinates?: boolean;
4183
4275
  showDaysPlayed?: boolean;
4184
4276
  simulationDistance?: number;
4277
+ sleepSkipPercent?: number;
4185
4278
  spawnPosition?: minecraftserver.Vector3;
4186
4279
  startingMap?: boolean;
4187
4280
  tileDrops?: boolean;
@@ -4191,195 +4284,6 @@ export interface GameOptions {
4191
4284
  worldName?: string;
4192
4285
  }
4193
4286
 
4194
- /**
4195
- * A properties class for the global instance of the logger
4196
- * object.
4197
- * While the logger object is available through the {@link
4198
- * ExtensionContext} - using the global instance allows the
4199
- * creator to use this properties class to perform direct
4200
- * server->client messaging and broadcasts.
4201
- */
4202
- export interface LogProperties {
4203
- /**
4204
- * @remarks
4205
- * Direct a log message to a specific player. If no player is
4206
- * specified, then all players will receive the message
4207
- *
4208
- */
4209
- player?: minecraftserver.Player;
4210
- /**
4211
- * @remarks
4212
- * Add additional tags to the log message which can be used by
4213
- * the client session to filter/search in the log window
4214
- *
4215
- */
4216
- tags?: string[];
4217
- }
4218
-
4219
- export interface ProjectExportOptions {
4220
- alwaysDay?: boolean;
4221
- difficulty?: minecraftserver.Difficulty;
4222
- disableWeather?: boolean;
4223
- exportName?: string;
4224
- exportType: ProjectExportType;
4225
- gameMode?: minecraftserver.GameMode;
4226
- initialTimOfDay?: number;
4227
- }
4228
-
4229
- export interface SettingsUIElementOptions {
4230
- dropdownItems?: string[];
4231
- max?: number;
4232
- min?: number;
4233
- refreshOnChange?: boolean;
4234
- }
4235
-
4236
- export interface WeightedBlock {
4237
- block: minecraftserver.BlockType;
4238
- weight: number;
4239
- }
4240
-
4241
- export interface WidgetComponentBaseOptions {
4242
- lockToSurface?: boolean;
4243
- offset?: minecraftserver.Vector3;
4244
- stateChangeEvent?: (arg: WidgetComponentStateChangeEventData) => void;
4245
- visible?: boolean;
4246
- }
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
-
4259
- // @ts-ignore Class inheritance allowed for native defined classes
4260
- export interface WidgetComponentEntityOptions extends WidgetComponentBaseOptions {
4261
- deselectedAnimation?: string;
4262
- isClickable?: boolean;
4263
- selectedAnimation?: string;
4264
- }
4265
-
4266
- // @ts-ignore Class inheritance allowed for native defined classes
4267
- export interface WidgetComponentGizmoOptions extends WidgetComponentBaseOptions {
4268
- axes?: Axis;
4269
- enablePlanes?: boolean;
4270
- }
4271
-
4272
- // @ts-ignore Class inheritance allowed for native defined classes
4273
- export interface WidgetComponentGuideOptions extends WidgetComponentBaseOptions {}
4274
-
4275
- // @ts-ignore Class inheritance allowed for native defined classes
4276
- export interface WidgetComponentRenderPrimitiveOptions extends WidgetComponentBaseOptions {}
4277
-
4278
- // @ts-ignore Class inheritance allowed for native defined classes
4279
- export interface WidgetComponentSplineOptions extends WidgetComponentBaseOptions {
4280
- controlPoints: Widget[];
4281
- splineType?: SplineType;
4282
- }
4283
-
4284
- // @ts-ignore Class inheritance allowed for native defined classes
4285
- export interface WidgetComponentTextOptions extends WidgetComponentBaseOptions {
4286
- color?: minecraftserver.RGBA;
4287
- }
4288
-
4289
- export interface WidgetCreateOptions {
4290
- bindPositionToBlockCursor?: boolean;
4291
- collisionOffset?: minecraftserver.Vector3;
4292
- collisionRadius?: number;
4293
- lockToSurface?: boolean;
4294
- selectable?: boolean;
4295
- snapToBlockLocation?: boolean;
4296
- stateChangeEvent?: (arg: WidgetStateChangeEventData) => void;
4297
- visible?: boolean;
4298
- }
4299
-
4300
- export interface WidgetGroupCreateOptions {
4301
- groupSelectionMode?: WidgetGroupSelectionMode;
4302
- showBounds?: boolean;
4303
- visible?: boolean;
4304
- }
4305
-
4306
- /**
4307
- * Binds actions to the client and manages their lifetime.
4308
- * Action managers are managed on a per player basis since
4309
- * client side UI is per player.
4310
- */
4311
- export interface ActionManager {
4312
- /**
4313
- * @remarks
4314
- * Creates an action and registers it on the client
4315
- *
4316
- * @param rawAction
4317
- * The raw action to create. See ActionTypes for supported
4318
- * parameters
4319
- */
4320
- createAction<T extends Action>(rawAction: T): RegisteredAction<T>;
4321
- }
4322
-
4323
- /**
4324
- * Represents a UI session for a given player
4325
- */
4326
- export interface BuiltInUIManager {
4327
- /**
4328
- * @remarks
4329
- * Navigates to the documentation site.
4330
- *
4331
- */
4332
- navigateToDocumentation(): void;
4333
- /**
4334
- * @remarks
4335
- * Navigates to the feedback site
4336
- *
4337
- */
4338
- navigateToFeedback(): void;
4339
- /**
4340
- * @remarks
4341
- * Navigates to the pause screen
4342
- *
4343
- */
4344
- navigateToPauseScreen(): void;
4345
- /**
4346
- * @remarks
4347
- * Updates the visibility of the log panel
4348
- *
4349
- */
4350
- updateLogPanelVisibility(visibility: boolean): void;
4351
- /**
4352
- * @remarks
4353
- * Updates the visibility of the control demo
4354
- *
4355
- */
4356
- updateUISettingsPanelVisibility(visibility: boolean): void;
4357
- /**
4358
- * @remarks
4359
- * Updates the visibility of the welcome panel
4360
- *
4361
- */
4362
- updateWelcomePanelVisibility(visibility: boolean): void;
4363
- }
4364
-
4365
- /**
4366
- * An event that can be subscribed to. You can use the token,
4367
- * returned from the subscribe method, to clean up handlers.
4368
- */
4369
- export declare interface EventSink<T> {
4370
- /**
4371
- * @remarks
4372
- * Subscribes an event handler to a particular subscription.
4373
- *
4374
- * @param handler
4375
- * Handler function to subscribe with.
4376
- * @returns
4377
- * An event handler subscription token that can be used to
4378
- * unsubscribe and clean-up handlers.
4379
- */
4380
- subscribe(handler: EventHandler<T>): IEventToken;
4381
- }
4382
-
4383
4287
  /**
4384
4288
  * Manager for IActionBarItem objects.
4385
4289
  */
@@ -6876,6 +6780,31 @@ export interface IVector3PropertyItemOptions extends IPropertyItemOptionsBase {
6876
6780
  tooltip?: LocalizedString;
6877
6781
  }
6878
6782
 
6783
+ /**
6784
+ * A properties class for the global instance of the logger
6785
+ * object.
6786
+ * While the logger object is available through the {@link
6787
+ * ExtensionContext} - using the global instance allows the
6788
+ * creator to use this properties class to perform direct
6789
+ * server->client messaging and broadcasts.
6790
+ */
6791
+ export interface LogProperties {
6792
+ /**
6793
+ * @remarks
6794
+ * Direct a log message to a specific player. If no player is
6795
+ * specified, then all players will receive the message
6796
+ *
6797
+ */
6798
+ player?: minecraftserver.Player;
6799
+ /**
6800
+ * @remarks
6801
+ * Add additional tags to the log message which can be used by
6802
+ * the client session to filter/search in the log window
6803
+ *
6804
+ */
6805
+ tags?: string[];
6806
+ }
6807
+
6879
6808
  /**
6880
6809
  * Parameters for creating a modal tool in the tool container
6881
6810
  */
@@ -6906,6 +6835,93 @@ export interface ModalToolCreationParameters {
6906
6835
  tooltip?: string;
6907
6836
  }
6908
6837
 
6838
+ export interface ProjectExportOptions {
6839
+ alwaysDay?: boolean;
6840
+ difficulty?: minecraftserver.Difficulty;
6841
+ disableWeather?: boolean;
6842
+ exportName?: string;
6843
+ exportType: ProjectExportType;
6844
+ gameMode?: minecraftserver.GameMode;
6845
+ initialTimOfDay?: number;
6846
+ }
6847
+
6848
+ export interface SettingsUIElementOptions {
6849
+ dropdownItems?: string[];
6850
+ max?: number;
6851
+ min?: number;
6852
+ refreshOnChange?: boolean;
6853
+ }
6854
+
6855
+ export interface WeightedBlock {
6856
+ block: minecraftserver.BlockType;
6857
+ weight: number;
6858
+ }
6859
+
6860
+ export interface WidgetComponentBaseOptions {
6861
+ lockToSurface?: boolean;
6862
+ offset?: minecraftserver.Vector3;
6863
+ stateChangeEvent?: (arg: WidgetComponentStateChangeEventData) => void;
6864
+ visible?: boolean;
6865
+ }
6866
+
6867
+ // @ts-ignore Class inheritance allowed for native defined classes
6868
+ export interface WidgetComponentClipboardOptions extends WidgetComponentBaseOptions {
6869
+ boundsFillColor?: minecraftserver.RGBA;
6870
+ boundsOutlineColor?: minecraftserver.RGBA;
6871
+ clipboardMirror?: minecraftserver.StructureMirrorAxis;
6872
+ clipboardNormalizedOrigin?: minecraftserver.Vector3;
6873
+ clipboardOffset?: minecraftserver.Vector3;
6874
+ clipboardRotation?: minecraftserver.StructureRotation;
6875
+ showBounds?: boolean;
6876
+ }
6877
+
6878
+ // @ts-ignore Class inheritance allowed for native defined classes
6879
+ export interface WidgetComponentEntityOptions extends WidgetComponentBaseOptions {
6880
+ deselectedAnimation?: string;
6881
+ isClickable?: boolean;
6882
+ selectedAnimation?: string;
6883
+ }
6884
+
6885
+ // @ts-ignore Class inheritance allowed for native defined classes
6886
+ export interface WidgetComponentGizmoOptions extends WidgetComponentBaseOptions {
6887
+ axes?: Axis;
6888
+ enablePlanes?: boolean;
6889
+ }
6890
+
6891
+ // @ts-ignore Class inheritance allowed for native defined classes
6892
+ export interface WidgetComponentGuideOptions extends WidgetComponentBaseOptions {}
6893
+
6894
+ // @ts-ignore Class inheritance allowed for native defined classes
6895
+ export interface WidgetComponentRenderPrimitiveOptions extends WidgetComponentBaseOptions {}
6896
+
6897
+ // @ts-ignore Class inheritance allowed for native defined classes
6898
+ export interface WidgetComponentSplineOptions extends WidgetComponentBaseOptions {
6899
+ controlPoints: Widget[];
6900
+ splineType?: SplineType;
6901
+ }
6902
+
6903
+ // @ts-ignore Class inheritance allowed for native defined classes
6904
+ export interface WidgetComponentTextOptions extends WidgetComponentBaseOptions {
6905
+ color?: minecraftserver.RGBA;
6906
+ }
6907
+
6908
+ export interface WidgetCreateOptions {
6909
+ bindPositionToBlockCursor?: boolean;
6910
+ collisionOffset?: minecraftserver.Vector3;
6911
+ collisionRadius?: number;
6912
+ lockToSurface?: boolean;
6913
+ selectable?: boolean;
6914
+ snapToBlockLocation?: boolean;
6915
+ stateChangeEvent?: (arg: WidgetStateChangeEventData) => void;
6916
+ visible?: boolean;
6917
+ }
6918
+
6919
+ export interface WidgetGroupCreateOptions {
6920
+ groupSelectionMode?: WidgetGroupSelectionMode;
6921
+ showBounds?: boolean;
6922
+ visible?: boolean;
6923
+ }
6924
+
6909
6925
  // @ts-ignore Class inheritance allowed for native defined classes
6910
6926
  export class InvalidWidgetComponentError extends Error {
6911
6927
  private constructor();
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-stable",
3
+ "version": "0.1.0-beta.1.21.60-preview.23",
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-stable"
17
+ "@minecraft/server": "^1.18.0-beta.1.21.60-preview.23"
18
18
  },
19
19
  "license": "MIT"
20
20
  }