@minecraft/server-editor 0.1.0-beta.1.21.70-preview.22 → 0.1.0-beta.1.21.70-preview.24

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 +200 -11
  2. package/package.json +2 -2
package/index.d.ts CHANGED
@@ -95,6 +95,14 @@ export declare enum ComboBoxPropertyItemDataType {
95
95
  Entity = 2,
96
96
  }
97
97
 
98
+ export enum ContiguousSelectionType {
99
+ SameBlock = 0,
100
+ SameBlockAndStates = 1,
101
+ SolidBlocks = 2,
102
+ AllBlocks = 3,
103
+ Custom = 4,
104
+ }
105
+
98
106
  /**
99
107
  * Execution state of the continuous action
100
108
  */
@@ -1019,6 +1027,7 @@ export declare enum PropertyItemType {
1019
1027
  BlockTable = 'editorUI:BlockTable',
1020
1028
  Boolean = 'editorUI:Boolean',
1021
1029
  Button = 'editorUI:Button',
1030
+ ButtonPane = 'editorUI:ButtonPane',
1022
1031
  ColorPicker = 'editorUI:ColorPicker',
1023
1032
  ComboBox = 'editorUI:ComboBox',
1024
1033
  Divider = 'editorUI:Divider',
@@ -1172,6 +1181,11 @@ export type ActivationFunctionType<PerPlayerStorageType> = (
1172
1181
  uiSession: IPlayerUISession<PerPlayerStorageType>,
1173
1182
  ) => IDisposable[];
1174
1183
 
1184
+ /**
1185
+ * All possible button item action types
1186
+ */
1187
+ export type ButtonPropertyItemSupportedActionTypes = (() => void) | RegisteredAction<NoArgsAction>;
1188
+
1175
1189
  /**
1176
1190
  * An action that continues to execute after activation
1177
1191
  */
@@ -1504,7 +1518,7 @@ export declare class BedrockEventSubscriptionCache {
1504
1518
  export declare class BlockIdentifierObservableValidator implements ObservableValidator<string> {
1505
1519
  /**
1506
1520
  * @remarks
1507
- * This property can't be edited in read-only mode.
1521
+ * This property can't be used in read-only mode.
1508
1522
  *
1509
1523
  */
1510
1524
  protected _defaultValue: string;
@@ -1614,6 +1628,31 @@ export class BlockUtilities {
1614
1628
  volume: minecraftserver.BlockVolumeBase | minecraftserver.CompoundBlockVolume | Selection,
1615
1629
  block?: minecraftserver.BlockPermutation | minecraftserver.BlockType | string,
1616
1630
  ): void;
1631
+ /**
1632
+ * @remarks
1633
+ * This function can't be called in read-only mode.
1634
+ *
1635
+ * @throws This function can throw errors.
1636
+ *
1637
+ * {@link minecraftserver.Error}
1638
+ */
1639
+ getContiguousSelection(properties?: ContiguousSelectionProperties): minecraftserver.CompoundBlockVolume;
1640
+ /**
1641
+ * @remarks
1642
+ * This function can't be called in read-only mode.
1643
+ *
1644
+ * @throws This function can throw errors.
1645
+ *
1646
+ * {@link minecraftserver.Error}
1647
+ */
1648
+ getFacePreviewSelection(properties?: QuickExtrudeProperties): minecraftserver.ListBlockVolume;
1649
+ /**
1650
+ * @remarks
1651
+ * This function can't be called in read-only mode.
1652
+ *
1653
+ * @throws This function can throw errors.
1654
+ */
1655
+ quickExtrude(properties?: QuickExtrudeProperties): void;
1617
1656
  }
1618
1657
 
1619
1658
  export class BrushShapeManager {
@@ -2223,7 +2262,7 @@ export class EditorStructureManager {
2223
2262
  export declare class EntityIdentifierObservableValidator implements ObservableValidator<string> {
2224
2263
  /**
2225
2264
  * @remarks
2226
- * This property can't be edited in read-only mode.
2265
+ * This property can't be used in read-only mode.
2227
2266
  *
2228
2267
  */
2229
2268
  protected _defaultValue: string;
@@ -2407,17 +2446,44 @@ export class ExtensionContext {
2407
2446
  */
2408
2447
  export class ExtensionContextAfterEvents {
2409
2448
  private constructor();
2449
+ /**
2450
+ * @remarks
2451
+ * This property can be read in early-execution mode.
2452
+ *
2453
+ */
2410
2454
  readonly clipboardChange: ClipboardChangeAfterEventSignal;
2455
+ /**
2456
+ * @remarks
2457
+ * This property can be read in early-execution mode.
2458
+ *
2459
+ */
2411
2460
  readonly currentThemeChange: CurrentThemeChangeAfterEventSignal;
2461
+ /**
2462
+ * @remarks
2463
+ * This property can be read in early-execution mode.
2464
+ *
2465
+ */
2412
2466
  readonly currentThemeColorChange: CurrentThemeColorChangeAfterEventSignal;
2467
+ /**
2468
+ * @remarks
2469
+ * This property can be read in early-execution mode.
2470
+ *
2471
+ */
2413
2472
  readonly cursorPropertyChange: CursorPropertyChangeAfterEventSignal;
2414
2473
  /**
2415
2474
  * @remarks
2416
2475
  * This event triggers when the editor mode changes for the
2417
2476
  * player.
2418
2477
  *
2478
+ * This property can be read in early-execution mode.
2479
+ *
2419
2480
  */
2420
2481
  readonly modeChange: ModeChangeAfterEventSignal;
2482
+ /**
2483
+ * @remarks
2484
+ * This property can be read in early-execution mode.
2485
+ *
2486
+ */
2421
2487
  readonly primarySelectionChange: PrimarySelectionChangeAfterEventSignal;
2422
2488
  }
2423
2489
 
@@ -2431,6 +2497,8 @@ export class GraphicsSettings {
2431
2497
  * @remarks
2432
2498
  * Retrieves a graphics settings property value.
2433
2499
  *
2500
+ * This function can't be called in read-only mode.
2501
+ *
2434
2502
  * @param property
2435
2503
  * Property identifier.
2436
2504
  * @returns
@@ -2442,6 +2510,8 @@ export class GraphicsSettings {
2442
2510
  * @remarks
2443
2511
  * Retrieves all graphics settings properties and their values.
2444
2512
  *
2513
+ * This function can't be called in read-only mode.
2514
+ *
2445
2515
  * @returns
2446
2516
  * Returns a property value map for all available properties.
2447
2517
  */
@@ -2450,6 +2520,8 @@ export class GraphicsSettings {
2450
2520
  * @remarks
2451
2521
  * Modifies a graphics settings property value.
2452
2522
  *
2523
+ * This function can't be called in read-only mode.
2524
+ *
2453
2525
  * @param property
2454
2526
  * Property identifier.
2455
2527
  * @param value
@@ -2461,6 +2533,8 @@ export class GraphicsSettings {
2461
2533
  * @remarks
2462
2534
  * Modify multiple graphics settings properties.
2463
2535
  *
2536
+ * This function can't be called in read-only mode.
2537
+ *
2464
2538
  * @param properties
2465
2539
  * Property map to set available property values. If the
2466
2540
  * property is not defined in the map, it will not be modified.
@@ -2633,19 +2707,19 @@ export class ModeChangeAfterEventSignal {
2633
2707
  export declare class NumberLimitObservableValidator implements ObservableValidator<number> {
2634
2708
  /**
2635
2709
  * @remarks
2636
- * This property can't be edited in read-only mode.
2710
+ * This property can't be used in read-only mode.
2637
2711
  *
2638
2712
  */
2639
2713
  protected _isInteger?: boolean;
2640
2714
  /**
2641
2715
  * @remarks
2642
- * This property can't be edited in read-only mode.
2716
+ * This property can't be used in read-only mode.
2643
2717
  *
2644
2718
  */
2645
2719
  protected _max?: number;
2646
2720
  /**
2647
2721
  * @remarks
2648
- * This property can't be edited in read-only mode.
2722
+ * This property can't be used in read-only mode.
2649
2723
  *
2650
2724
  */
2651
2725
  protected _min?: number;
@@ -2712,6 +2786,11 @@ export class PrimarySelectionChangedEvent {
2712
2786
 
2713
2787
  // @ts-ignore Class inheritance allowed for native defined classes
2714
2788
  export class ProbabilityBlockPaletteItem extends IBlockPaletteItem {
2789
+ /**
2790
+ * @remarks
2791
+ * This function can't be called in read-only mode.
2792
+ *
2793
+ */
2715
2794
  constructor(displayName?: string);
2716
2795
  /**
2717
2796
  * @remarks
@@ -3005,6 +3084,11 @@ export class SettingsUIElement {
3005
3084
  readonly name: string;
3006
3085
  readonly onChange: (arg0: boolean | number | string | minecraftserver.Vector3) => void;
3007
3086
  readonly options: SettingsUIElementOptions;
3087
+ /**
3088
+ * @remarks
3089
+ * This function can't be called in read-only mode.
3090
+ *
3091
+ */
3008
3092
  constructor(
3009
3093
  name: string,
3010
3094
  initialValue: boolean | number | string | minecraftserver.Vector3,
@@ -3015,6 +3099,11 @@ export class SettingsUIElement {
3015
3099
 
3016
3100
  // @ts-ignore Class inheritance allowed for native defined classes
3017
3101
  export class SimpleBlockPaletteItem extends IBlockPaletteItem {
3102
+ /**
3103
+ * @remarks
3104
+ * This function can't be called in read-only mode.
3105
+ *
3106
+ */
3018
3107
  constructor(displayName?: string);
3019
3108
  }
3020
3109
 
@@ -3085,13 +3174,29 @@ export class SimulationState {
3085
3174
 
3086
3175
  export class SpeedSettings {
3087
3176
  private constructor();
3177
+ /**
3178
+ * @remarks
3179
+ * This function can't be called in read-only mode.
3180
+ *
3181
+ */
3088
3182
  get<T extends keyof SpeedSettingsPropertyTypeMap>(property: T): SpeedSettingsPropertyTypeMap[T] | undefined;
3183
+ /**
3184
+ * @remarks
3185
+ * This function can't be called in read-only mode.
3186
+ *
3187
+ */
3089
3188
  getAll(): SpeedSettingsPropertyTypeMap;
3090
3189
  /**
3190
+ * @remarks
3191
+ * This function can't be called in read-only mode.
3192
+ *
3091
3193
  * @throws This function can throw errors.
3092
3194
  */
3093
3195
  set<T extends keyof SpeedSettingsPropertyTypeMap>(property: T, value: SpeedSettingsPropertyTypeMap[T]): void;
3094
3196
  /**
3197
+ * @remarks
3198
+ * This function can't be called in read-only mode.
3199
+ *
3095
3200
  * @throws This function can throw errors.
3096
3201
  */
3097
3202
  setAll(properties: SpeedSettingsPropertyTypeMap): void;
@@ -3448,19 +3553,19 @@ export class UserDefinedTransactionHandlerId {
3448
3553
  export declare class Vector3LimitObservableValidator implements ObservableValidator<minecraftserver.Vector3> {
3449
3554
  /**
3450
3555
  * @remarks
3451
- * This property can't be edited in read-only mode.
3556
+ * This property can't be used in read-only mode.
3452
3557
  *
3453
3558
  */
3454
3559
  protected _isInteger?: boolean;
3455
3560
  /**
3456
3561
  * @remarks
3457
- * This property can't be edited in read-only mode.
3562
+ * This property can't be used in read-only mode.
3458
3563
  *
3459
3564
  */
3460
3565
  protected _max: Partial<minecraftserver.Vector3>;
3461
3566
  /**
3462
3567
  * @remarks
3463
- * This property can't be edited in read-only mode.
3568
+ * This property can't be used in read-only mode.
3464
3569
  *
3465
3570
  */
3466
3571
  protected _min: Partial<minecraftserver.Vector3>;
@@ -3826,6 +3931,11 @@ export class WidgetComponentRenderPrimitiveTypeAxialSphere extends WidgetCompone
3826
3931
  *
3827
3932
  */
3828
3933
  radius: number;
3934
+ /**
3935
+ * @remarks
3936
+ * This function can't be called in read-only mode.
3937
+ *
3938
+ */
3829
3939
  constructor(center: minecraftserver.Vector3, radius: number, color?: minecraftserver.RGBA);
3830
3940
  }
3831
3941
 
@@ -3854,6 +3964,11 @@ export class WidgetComponentRenderPrimitiveTypeBox extends WidgetComponentRender
3854
3964
  *
3855
3965
  */
3856
3966
  size?: minecraftserver.Vector3;
3967
+ /**
3968
+ * @remarks
3969
+ * This function can't be called in read-only mode.
3970
+ *
3971
+ */
3857
3972
  constructor(center: minecraftserver.Vector3, color: minecraftserver.RGBA, size?: minecraftserver.Vector3);
3858
3973
  }
3859
3974
 
@@ -3877,6 +3992,11 @@ export class WidgetComponentRenderPrimitiveTypeDisc extends WidgetComponentRende
3877
3992
  *
3878
3993
  */
3879
3994
  radius: number;
3995
+ /**
3996
+ * @remarks
3997
+ * This function can't be called in read-only mode.
3998
+ *
3999
+ */
3880
4000
  constructor(center: minecraftserver.Vector3, radius: number, color: minecraftserver.RGBA);
3881
4001
  }
3882
4002
 
@@ -3900,6 +4020,11 @@ export class WidgetComponentRenderPrimitiveTypeLine extends WidgetComponentRende
3900
4020
  *
3901
4021
  */
3902
4022
  start: minecraftserver.Vector3;
4023
+ /**
4024
+ * @remarks
4025
+ * This function can't be called in read-only mode.
4026
+ *
4027
+ */
3903
4028
  constructor(start: minecraftserver.Vector3, end: minecraftserver.Vector3, color: minecraftserver.RGBA);
3904
4029
  }
3905
4030
 
@@ -4187,6 +4312,17 @@ export interface ClipboardWriteOptions {
4187
4312
  rotation?: minecraftserver.StructureRotation;
4188
4313
  }
4189
4314
 
4315
+ export interface ContiguousSelectionProperties {
4316
+ checkForAdjacentFace?: boolean;
4317
+ contiguousSelectionBlockList?: string[];
4318
+ contiguousSelectionType?: ContiguousSelectionType;
4319
+ fullSelectionToleranceLevel?: number;
4320
+ isFace?: boolean;
4321
+ selectionDirection?: number;
4322
+ size?: number;
4323
+ startingLocation?: minecraftserver.Vector3;
4324
+ }
4325
+
4190
4326
  export interface CursorPosition {
4191
4327
  FaceDirection: number;
4192
4328
  Position: minecraftserver.Vector3;
@@ -4650,6 +4786,36 @@ export interface IBoolPropertyItemOptions extends IPropertyItemOptionsBase {
4650
4786
  variant?: BoolPropertyItemVariant;
4651
4787
  }
4652
4788
 
4789
+ /**
4790
+ * A property item pane which supports multiple buttons
4791
+ */
4792
+ // @ts-ignore Class inheritance allowed for native defined classes
4793
+ export interface IButtonPanePropertyItem extends IPropertyItemBase, IPane {
4794
+ /**
4795
+ * @remarks
4796
+ * Adds a button to the pane and binds the specified action to
4797
+ * the button interaction.
4798
+ *
4799
+ */
4800
+ addButton(
4801
+ action: ButtonPropertyItemSupportedActionTypes,
4802
+ options?: IButtonPropertyItemOptions,
4803
+ ): IButtonPropertyItem;
4804
+ }
4805
+
4806
+ /**
4807
+ * Optional properties for Button Pane property item
4808
+ */
4809
+ export interface IButtonPanePropertyItemOptions {
4810
+ /**
4811
+ * @remarks
4812
+ * Minimum width for each item within the layout. If undefined,
4813
+ * it will default to 6.
4814
+ *
4815
+ */
4816
+ itemMinWidth?: number;
4817
+ }
4818
+
4653
4819
  /**
4654
4820
  * A property item which supports Button properties
4655
4821
  */
@@ -5298,9 +5464,15 @@ export interface IModalControlPane extends IPane {
5298
5464
  *
5299
5465
  */
5300
5466
  addButton(
5301
- action: (() => void) | RegisteredAction<NoArgsAction>,
5467
+ action: ButtonPropertyItemSupportedActionTypes,
5302
5468
  options?: IButtonPropertyItemOptions,
5303
5469
  ): IButtonPropertyItem;
5470
+ /**
5471
+ * @remarks
5472
+ * Adds a pane for grouped button layout.
5473
+ *
5474
+ */
5475
+ addButtonPane(options?: IButtonPanePropertyItemOptions): IButtonPanePropertyItem;
5304
5476
  /**
5305
5477
  * @remarks
5306
5478
  * Adds an divider item to the pane.
@@ -5921,13 +6093,19 @@ export interface IPropertyPane extends IPane {
5921
6093
  /**
5922
6094
  * @remarks
5923
6095
  * Adds a button to the pane and binds the specified action to
5924
- * the button activate.
6096
+ * the button interaction.
5925
6097
  *
5926
6098
  */
5927
6099
  addButton(
5928
- action: (() => void) | RegisteredAction<NoArgsAction>,
6100
+ action: ButtonPropertyItemSupportedActionTypes,
5929
6101
  options?: IButtonPropertyItemOptions,
5930
6102
  ): IButtonPropertyItem;
6103
+ /**
6104
+ * @remarks
6105
+ * Adds a pane for grouped button layout.
6106
+ *
6107
+ */
6108
+ addButtonPane(options?: IButtonPanePropertyItemOptions): IButtonPanePropertyItem;
5931
6109
  /**
5932
6110
  * @remarks
5933
6111
  * Adds a color picker item to the pane.
@@ -7307,6 +7485,17 @@ export interface ProjectExportOptions {
7307
7485
  initialTimOfDay?: number;
7308
7486
  }
7309
7487
 
7488
+ export interface QuickExtrudeProperties {
7489
+ checkForAdjacentFace?: boolean;
7490
+ contiguousSelectionBlockList?: string[];
7491
+ contiguousSelectionType?: ContiguousSelectionType;
7492
+ isShrink?: boolean;
7493
+ layerCount?: number;
7494
+ selectionDirection?: number;
7495
+ size?: number;
7496
+ startingLocation?: minecraftserver.Vector3;
7497
+ }
7498
+
7310
7499
  export interface SettingsUIElementOptions {
7311
7500
  dropdownItems?: string[];
7312
7501
  max?: number;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@minecraft/server-editor",
3
- "version": "0.1.0-beta.1.21.70-preview.22",
3
+ "version": "0.1.0-beta.1.21.70-preview.24",
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": "^2.0.0-beta.1.21.70-preview.22"
17
+ "@minecraft/server": "^2.0.0-beta.1.21.70-preview.24"
18
18
  },
19
19
  "license": "MIT"
20
20
  }