@minecraft/server-editor 0.1.0-beta.1.21.10-preview.24 → 0.1.0-beta.1.21.20-preview.21

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 +154 -54
  2. package/package.json +2 -2
package/index.d.ts CHANGED
@@ -14,7 +14,7 @@
14
14
  * ```json
15
15
  * {
16
16
  * "module_name": "@minecraft/server-editor",
17
- * "version": "0.1.0-beta.1.21.10-preview.24"
17
+ * "version": "0.1.0-beta"
18
18
  * }
19
19
  * ```
20
20
  *
@@ -41,6 +41,15 @@ export enum BrushPipelineOperationType {
41
41
  Exclude = 1,
42
42
  }
43
43
 
44
+ /**
45
+ * The possible variants of a color picker.
46
+ */
47
+ export declare enum ColorPickerVariant {
48
+ Default = 0,
49
+ Inline = 1,
50
+ Expanded = 2,
51
+ }
52
+
44
53
  /**
45
54
  * Predefined action bar items
46
55
  */
@@ -128,11 +137,18 @@ export enum CursorTargetMode {
128
137
  Face = 1,
129
138
  }
130
139
 
140
+ export enum DaylightCycle {
141
+ Normal = 0,
142
+ AlwaysDay = 1,
143
+ LockTime = 2,
144
+ }
145
+
131
146
  /**
132
147
  * Type of item that can be added to the property pane
133
148
  */
134
149
  export declare enum EDITOR_PANE_PROPERTY_ITEM_TYPE {
135
150
  Action = 'editorUI:Action',
151
+ BlockList = 'editorUI:BlockList',
136
152
  BlockPicker = 'editorUI:BlockPicker',
137
153
  Boolean = 'editorUI:Boolean',
138
154
  ColorPicker = 'editorUI:ColorPicker',
@@ -191,6 +207,14 @@ export enum ExportResult {
191
207
  EditorSystemFailure = 7,
192
208
  }
193
209
 
210
+ export enum GamePublishSetting {
211
+ NoMultiPlay = 0,
212
+ InviteOnly = 1,
213
+ FriendsOnly = 2,
214
+ FriendsOfFriends = 3,
215
+ Public = 4,
216
+ }
217
+
194
218
  /**
195
219
  * Enumeration representing identifiers for graphics settings
196
220
  * properties.
@@ -221,6 +245,7 @@ export declare enum InputModifier {
221
245
  * Keyboard key
222
246
  */
223
247
  export declare enum KeyboardKey {
248
+ UNDEFINED = 0,
224
249
  BACKSPACE = 8,
225
250
  TAB = 9,
226
251
  ENTER = 13,
@@ -315,24 +340,6 @@ export declare enum KeyboardKey {
315
340
  QUOTE = 222,
316
341
  }
317
342
 
318
- /**
319
- * Keyboard Key Actions
320
- */
321
- export declare enum KeyInputType {
322
- /**
323
- * @remarks
324
- * Button was pressed.
325
- *
326
- */
327
- Press = 1,
328
- /**
329
- * @remarks
330
- * Button was released.
331
- *
332
- */
333
- Release = 2,
334
- }
335
-
336
343
  /**
337
344
  * Layout directions for property panes.
338
345
  */
@@ -388,6 +395,13 @@ export declare enum MouseInputType {
388
395
  DragEnd = 7,
389
396
  }
390
397
 
398
+ export enum PlayerPermissionLevel {
399
+ Visitor = 0,
400
+ Member = 1,
401
+ Operator = 2,
402
+ Custom = 3,
403
+ }
404
+
391
405
  export enum PlaytestSessionResult {
392
406
  OK = 0,
393
407
  InvalidSessionHandle = 1,
@@ -473,6 +487,13 @@ export type IActionPropertyItem<T extends PropertyBag, Prop extends keyof T & st
473
487
  replaceBoundAction(action: RegisteredAction<NoArgsAction> | undefined): void;
474
488
  };
475
489
 
490
+ /**
491
+ * A property item which supports BlockList properties
492
+ */
493
+ export type IBlockListPropertyItem<T extends PropertyBag, Prop extends keyof T & string> = IPropertyItem<T, Prop> & {
494
+ updateBlockList(newBlockList: string[]): void;
495
+ };
496
+
476
497
  /**
477
498
  * A property item which supports Dropdown properties
478
499
  */
@@ -534,6 +555,23 @@ export type IVector3PropertyItem<T extends PropertyBag, Prop extends keyof T & s
534
555
  }): void;
535
556
  };
536
557
 
558
+ /**
559
+ * Keyboard binding properties.
560
+ */
561
+ export type KeyBinding = {
562
+ key: KeyboardKey;
563
+ modifier?: InputModifier;
564
+ };
565
+
566
+ /**
567
+ * Additional information about key binding.
568
+ */
569
+ export type KeyBindingInfo = {
570
+ uniqueId: string;
571
+ label?: string;
572
+ tooltip?: string;
573
+ };
574
+
537
575
  /**
538
576
  * Modal tool lifecycle event payload
539
577
  */
@@ -1090,8 +1128,7 @@ export class Cursor {
1090
1128
  /**
1091
1129
  * @remarks
1092
1130
  * Hide the 3D block cursor from view until the corresponding
1093
- * {@link @minecraft-server-editor.Cursor.show} function is
1094
- * called
1131
+ * {@link Cursor.show} function is called
1095
1132
  *
1096
1133
  * This function can't be called in read-only mode.
1097
1134
  *
@@ -1101,9 +1138,8 @@ export class Cursor {
1101
1138
  /**
1102
1139
  * @remarks
1103
1140
  * Manually offset the 3D block cursor by given amount.
1104
- * Depending on the {@link
1105
- * @minecraft-server-editor.CursorProperties.CursorControlMode}
1106
- * - this function may have no effect
1141
+ * Depending on the {@link CursorProperties.controlMode} - this
1142
+ * function may have no effect
1107
1143
  *
1108
1144
  * This function can't be called in read-only mode.
1109
1145
  *
@@ -1237,7 +1273,7 @@ export class ExportManager {
1237
1273
  *
1238
1274
  * @throws This function can throw errors.
1239
1275
  */
1240
- beginExportProject(options: ProjectExportOptions): Promise<ExportResult>;
1276
+ beginExportProject(options: GameOptions): Promise<ExportResult>;
1241
1277
  /**
1242
1278
  * @remarks
1243
1279
  * This function can't be called in read-only mode.
@@ -1245,6 +1281,12 @@ export class ExportManager {
1245
1281
  * @throws This function can throw errors.
1246
1282
  */
1247
1283
  canExportProject(): boolean;
1284
+ /**
1285
+ * @remarks
1286
+ * This function can't be called in read-only mode.
1287
+ *
1288
+ */
1289
+ getGameOptions(useDefault?: boolean): GameOptions;
1248
1290
  }
1249
1291
 
1250
1292
  /**
@@ -1608,7 +1650,7 @@ export class PlaytestManager {
1608
1650
  *
1609
1651
  * @throws This function can throw errors.
1610
1652
  */
1611
- beginPlaytest(options: PlaytestGameOptions): Promise<PlaytestSessionResult>;
1653
+ beginPlaytest(options: GameOptions): Promise<PlaytestSessionResult>;
1612
1654
  /**
1613
1655
  * @remarks
1614
1656
  * This function can't be called in read-only mode.
@@ -1804,7 +1846,7 @@ export class Selection {
1804
1846
  *
1805
1847
  * @param forceRelativity
1806
1848
  * See the description for {@link
1807
- * @minecraft-server/CompoundBlockVolume.peekLastVolume}
1849
+ * @minecraft/server.CompoundBlockVolume.peekLastVolume}
1808
1850
  * @returns
1809
1851
  * Returns undefined if the stack is empty
1810
1852
  */
@@ -1844,12 +1886,12 @@ export class Selection {
1844
1886
  * This function can't be called in read-only mode.
1845
1887
  *
1846
1888
  * @param other
1847
- * {@link @minecraft-server/CompoundBlockVolume} - set the
1889
+ * {@link @minecraft/server.CompoundBlockVolume} - set the
1848
1890
  * block component part of this selection to the specified
1849
1891
  * compound block volume. This will completely replace all
1850
1892
  * block volume definitions in the selection.
1851
- * {@link @Selection} - replace the selection with the
1852
- * specified selection
1893
+ * {@link Selection} - replace the selection with the specified
1894
+ * selection
1853
1895
  * @throws This function can throw errors.
1854
1896
  */
1855
1897
  set(other: minecraftserver.CompoundBlockVolume | Selection): void;
@@ -2158,7 +2200,7 @@ export class TransactionManager {
2158
2200
  /**
2159
2201
  * @remarks
2160
2202
  * Begin tracking block changes in an area defined by a {@link
2161
- * @minecraft-server/CompoundBlockVolume}. These will be added
2203
+ * @minecraft/server.CompoundBlockVolume}. These will be added
2162
2204
  * to a pending changes list.
2163
2205
  * The pending list will be added to the open transaction
2164
2206
  * record when a commit has been issued.
@@ -2166,7 +2208,7 @@ export class TransactionManager {
2166
2208
  * This function can't be called in read-only mode.
2167
2209
  *
2168
2210
  * @param compoundBlockVolume
2169
- * {@link @minecraft-server/CompoundBlockVolume} to track.
2211
+ * {@link @minecraft/server.CompoundBlockVolume} to track.
2170
2212
  * Only non-void block locations will be tracked -- any changes
2171
2213
  * falling into a void/negative space will not be tracked
2172
2214
  * @throws This function can throw errors.
@@ -2194,7 +2236,7 @@ export class TransactionManager {
2194
2236
  * Selection Volumes can also represent irregular shapes with
2195
2237
  * non-contiguous blocks and this tracking call will honor the
2196
2238
  * actual selected areas in the volume (and not the negative
2197
- * space) (see {@link @minecraft-server/CompoundBlockVolume}
2239
+ * space) (see {@link @minecraft/server.CompoundBlockVolume}
2198
2240
  * for more details
2199
2241
  *
2200
2242
  * This function can't be called in read-only mode.
@@ -2583,6 +2625,46 @@ export interface ExtensionOptionalParameters {
2583
2625
  toolGroupId?: string;
2584
2626
  }
2585
2627
 
2628
+ export interface GameOptions {
2629
+ bonusChest?: boolean;
2630
+ cheats?: boolean;
2631
+ commandBlockEnabled?: boolean;
2632
+ daylightCycle?: DaylightCycle;
2633
+ difficulty?: minecraftserver.Difficulty;
2634
+ dimensionId?: string;
2635
+ disableWeather?: boolean;
2636
+ educationEdition?: boolean;
2637
+ entitiesDropLoot?: boolean;
2638
+ exportType?: ProjectExportType;
2639
+ fireSpreads?: boolean;
2640
+ friendlyFire?: boolean;
2641
+ gameMode?: minecraftserver.GameMode;
2642
+ immediateRespawn?: boolean;
2643
+ keepInventory?: boolean;
2644
+ lanVisibility?: boolean;
2645
+ mobGriefing?: boolean;
2646
+ mobLoot?: boolean;
2647
+ mobSpawning?: boolean;
2648
+ multiplayerGame?: boolean;
2649
+ naturalRegeneration?: boolean;
2650
+ playerAccess?: GamePublishSetting;
2651
+ playerPermissions?: PlayerPermissionLevel;
2652
+ randomTickSpeed?: number;
2653
+ recipeUnlocking?: boolean;
2654
+ respawnBlocksExplode?: boolean;
2655
+ respawnRadius?: number;
2656
+ showCoordinates?: boolean;
2657
+ showDaysPlayed?: boolean;
2658
+ simulationDistance?: number;
2659
+ spawnPosition?: minecraftserver.Vector3;
2660
+ startingMap?: boolean;
2661
+ tileDrops?: boolean;
2662
+ timeOfDay?: number;
2663
+ tntExplodes?: boolean;
2664
+ weather?: number;
2665
+ worldName?: string;
2666
+ }
2667
+
2586
2668
  /**
2587
2669
  * A properties class for the global instance of the logger
2588
2670
  * object.
@@ -2608,18 +2690,6 @@ export interface LogProperties {
2608
2690
  tags?: string[];
2609
2691
  }
2610
2692
 
2611
- export interface PlaytestGameOptions {
2612
- alwaysDay?: boolean;
2613
- difficulty?: minecraftserver.Difficulty;
2614
- dimensionId?: string;
2615
- disableWeather?: boolean;
2616
- gameMode?: minecraftserver.GameMode;
2617
- showCoordinates?: boolean;
2618
- spawnPosition?: minecraftserver.Vector3;
2619
- timeOfDay?: number;
2620
- weather?: number;
2621
- }
2622
-
2623
2693
  export interface ProjectExportOptions {
2624
2694
  alwaysDay?: boolean;
2625
2695
  difficulty?: minecraftserver.Difficulty;
@@ -2891,8 +2961,8 @@ export interface IGlobalInputManager {
2891
2961
  registerKeyBinding(
2892
2962
  inputContextId: EditorInputContext,
2893
2963
  action: SupportedKeyboardActionTypes,
2894
- button: KeyboardKey,
2895
- modifier?: InputModifier,
2964
+ binding: KeyBinding,
2965
+ info?: KeyBindingInfo,
2896
2966
  ): void;
2897
2967
  }
2898
2968
 
@@ -3004,7 +3074,7 @@ export interface IModalTool {
3004
3074
  bindPropertyPane(pane: IPropertyPane): void;
3005
3075
  dispose(): void;
3006
3076
  hide(): void;
3007
- registerKeyBinding(action: SupportedKeyboardActionTypes, button: KeyboardKey, modifier?: InputModifier): void;
3077
+ registerKeyBinding(action: SupportedKeyboardActionTypes, binding: KeyBinding, info?: KeyBindingInfo): void;
3008
3078
  registerMouseButtonBinding(action: SupportedMouseActionTypes): void;
3009
3079
  registerMouseDragBinding(action: SupportedMouseActionTypes): void;
3010
3080
  registerMouseWheelBinding(action: SupportedMouseActionTypes): void;
@@ -3156,6 +3226,11 @@ export interface IPropertyItemOptions {
3156
3226
  visible?: boolean;
3157
3227
  }
3158
3228
 
3229
+ // @ts-ignore Class inheritance allowed for native defined classes
3230
+ export interface IPropertyItemOptionsBlockList extends IPropertyItemOptions {
3231
+ blockList: string[];
3232
+ }
3233
+
3159
3234
  // @ts-ignore Class inheritance allowed for native defined classes
3160
3235
  export interface IPropertyItemOptionsBool extends IPropertyItemOptions {
3161
3236
  /**
@@ -3180,6 +3255,7 @@ export interface IPropertyItemOptionsButton extends IPropertyItemOptions {
3180
3255
  // @ts-ignore Class inheritance allowed for native defined classes
3181
3256
  export interface IPropertyItemOptionsColorPicker extends IPropertyItemOptions {
3182
3257
  showAlpha?: boolean;
3258
+ variant?: ColorPickerVariant;
3183
3259
  }
3184
3260
 
3185
3261
  // @ts-ignore Class inheritance allowed for native defined classes
@@ -3356,6 +3432,17 @@ export interface IPropertyPane {
3356
3432
  *
3357
3433
  */
3358
3434
  width?: number;
3435
+ /**
3436
+ * @remarks
3437
+ * Adds a block list to the pane.
3438
+ *
3439
+ */
3440
+ addBlockList(options?: IPropertyItemOptionsBlockList): IBlockListPropertyItem<
3441
+ {
3442
+ EMPTY: undefined;
3443
+ },
3444
+ 'EMPTY'
3445
+ >;
3359
3446
  /**
3360
3447
  * @remarks
3361
3448
  * Adds a BlockPicker item to the pane.
@@ -3434,6 +3521,8 @@ export interface IPropertyPane {
3434
3521
  ): IPropertyItem<T, Prop>;
3435
3522
  /**
3436
3523
  * @remarks
3524
+ * Adds an image item to the pane.
3525
+ *
3437
3526
  */
3438
3527
  addImage<T extends PropertyBag, Prop extends keyof T & string>(
3439
3528
  obj: T,
@@ -3736,12 +3825,11 @@ export interface ISimpleTool {
3736
3825
  }
3737
3826
 
3738
3827
  /**
3739
- * Define a (key & modifier) pair for the simple tool
3740
- * activation key binding
3828
+ * Define a key binding for the simple tool activation
3741
3829
  */
3742
- export interface ISimpleToolKeyPair {
3743
- button: KeyboardKey;
3744
- buttonModifier: InputModifier;
3830
+ export interface ISimpleToolKeyBinding {
3831
+ binding: KeyBinding;
3832
+ info?: KeyBindingInfo;
3745
3833
  }
3746
3834
 
3747
3835
  /**
@@ -3761,7 +3849,7 @@ export interface ISimpleToolOptions {
3761
3849
  * binding is ignored
3762
3850
  *
3763
3851
  */
3764
- activationKeyBinding?: ISimpleToolKeyPair;
3852
+ activationKeyBinding?: ISimpleToolKeyBinding;
3765
3853
  /**
3766
3854
  * @remarks
3767
3855
  * The name of the tool. This will be used to identify the tool
@@ -4145,6 +4233,18 @@ export interface ModalToolCreationParameters {
4145
4233
  *
4146
4234
  */
4147
4235
  icon?: string;
4236
+ /**
4237
+ * @remarks
4238
+ * Modal input context identifier
4239
+ *
4240
+ */
4241
+ inputContextId?: string;
4242
+ /**
4243
+ * @remarks
4244
+ * Localized text label for modal input context
4245
+ *
4246
+ */
4247
+ inputContextLabel?: string;
4148
4248
  /**
4149
4249
  * @remarks
4150
4250
  * tooltipAltText alt text, if any
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@minecraft/server-editor",
3
- "version": "0.1.0-beta.1.21.10-preview.24",
3
+ "version": "0.1.0-beta.1.21.20-preview.21",
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.13.0-beta.1.21.10-preview.24"
17
+ "@minecraft/server": "^1.14.0-beta.1.21.20-preview.21"
18
18
  },
19
19
  "license": "MIT"
20
20
  }