@minecraft/server-editor 0.1.0-beta.1.21.110-preview.26 → 0.1.0-beta.1.21.120-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 +377 -8
  2. package/package.json +3 -3
package/index.d.ts CHANGED
@@ -313,6 +313,11 @@ export enum GamePublishSetting {
313
313
  * properties.
314
314
  */
315
315
  export enum GraphicsSettingsProperty {
316
+ DisableBlockEntityRendering = 'DisableBlockEntityRendering',
317
+ DisableEntityRendering = 'DisableEntityRendering',
318
+ DisableParticleRendering = 'DisableParticleRendering',
319
+ DisableTerrainRendering = 'DisableTerrainRendering',
320
+ DisableWeatherRendering = 'DisableWeatherRendering',
316
321
  GraphicsMode = 'GraphicsMode',
317
322
  NightVision = 'NightVision',
318
323
  ShowChunkBoundaries = 'ShowChunkBoundaries',
@@ -1100,6 +1105,7 @@ export declare enum PropertyItemType {
1100
1105
  Dropdown = 'editorUI:Dropdown',
1101
1106
  Image = 'editorUI:Image',
1102
1107
  Link = 'editorUI:Link',
1108
+ Menu = 'editorUI:Menu',
1103
1109
  Number = 'editorUI:Number',
1104
1110
  NumberTimeline = 'editorUI:NumberTimeline',
1105
1111
  ProgressIndicator = 'editorUI:ProgressIndicator',
@@ -1108,6 +1114,7 @@ export declare enum PropertyItemType {
1108
1114
  SubPane = 'editorUI:SubPane',
1109
1115
  Text = 'editorUI:Text',
1110
1116
  ToggleGroup = 'editorUI:ToggleGroup',
1117
+ Vector2 = 'editorUI:Vector2',
1111
1118
  Vector3 = 'editorUI:Vector3',
1112
1119
  }
1113
1120
 
@@ -1212,11 +1219,18 @@ export enum ThemeSettingsColorKey {
1212
1219
  Warning = 'Warning',
1213
1220
  }
1214
1221
 
1222
+ export enum WidgetCollisionType {
1223
+ None = 0,
1224
+ Radius = 1,
1225
+ Bounds = 2,
1226
+ }
1227
+
1215
1228
  export enum WidgetComponentType {
1216
1229
  BoundingBox = 'BoundingBox',
1217
1230
  Clipboard = 'Clipboard',
1218
1231
  Entity = 'Entity',
1219
1232
  Gizmo = 'Gizmo',
1233
+ Grid = 'Grid',
1220
1234
  Guide = 'Guide',
1221
1235
  RenderPrim = 'RenderPrim',
1222
1236
  Spline = 'Spline',
@@ -1318,6 +1332,11 @@ export type GraphicsSettingsPropertyTypeMap = {
1318
1332
  [GraphicsSettingsProperty.ShowCompass]?: boolean;
1319
1333
  [GraphicsSettingsProperty.NightVision]?: boolean;
1320
1334
  [GraphicsSettingsProperty.ShowToastNotifications]?: boolean;
1335
+ [GraphicsSettingsProperty.DisableEntityRendering]?: boolean;
1336
+ [GraphicsSettingsProperty.DisableTerrainRendering]?: boolean;
1337
+ [GraphicsSettingsProperty.DisableWeatherRendering]?: boolean;
1338
+ [GraphicsSettingsProperty.DisableParticleRendering]?: boolean;
1339
+ [GraphicsSettingsProperty.DisableBlockEntityRendering]?: boolean;
1321
1340
  };
1322
1341
 
1323
1342
  /**
@@ -2435,6 +2454,12 @@ export class EditorConstants {
2435
2454
 
2436
2455
  export class EditorStructure {
2437
2456
  private constructor();
2457
+ /**
2458
+ * @throws This property can throw when used.
2459
+ *
2460
+ * {@link minecraftserver.InvalidStructureError}
2461
+ */
2462
+ readonly description: string;
2438
2463
  /**
2439
2464
  * @throws This property can throw when used.
2440
2465
  *
@@ -2443,12 +2468,54 @@ export class EditorStructure {
2443
2468
  readonly displayName: string;
2444
2469
  readonly id: string;
2445
2470
  readonly isValid: boolean;
2471
+ /**
2472
+ * @throws This property can throw when used.
2473
+ *
2474
+ * {@link minecraftserver.InvalidStructureError}
2475
+ */
2476
+ readonly normalizedOrigin: minecraftserver.Vector3;
2477
+ /**
2478
+ * @throws This property can throw when used.
2479
+ *
2480
+ * {@link minecraftserver.InvalidStructureError}
2481
+ */
2482
+ readonly notes: string;
2483
+ /**
2484
+ * @throws This property can throw when used.
2485
+ *
2486
+ * {@link minecraftserver.InvalidStructureError}
2487
+ */
2488
+ readonly offset: minecraftserver.Vector3;
2489
+ /**
2490
+ * @throws This property can throw when used.
2491
+ *
2492
+ * {@link minecraftserver.InvalidStructureError}
2493
+ */
2494
+ readonly originalWorldLocation: minecraftserver.Vector3;
2446
2495
  /**
2447
2496
  * @throws This property can throw when used.
2448
2497
  *
2449
2498
  * {@link minecraftserver.InvalidStructureError}
2450
2499
  */
2451
2500
  readonly size: minecraftserver.Vector3;
2501
+ /**
2502
+ * @throws This property can throw when used.
2503
+ *
2504
+ * {@link minecraftserver.InvalidStructureError}
2505
+ */
2506
+ readonly structureFullName: string;
2507
+ /**
2508
+ * @throws This property can throw when used.
2509
+ *
2510
+ * {@link minecraftserver.InvalidStructureError}
2511
+ */
2512
+ readonly structureName: string;
2513
+ /**
2514
+ * @throws This property can throw when used.
2515
+ *
2516
+ * {@link minecraftserver.InvalidStructureError}
2517
+ */
2518
+ readonly structureNamespace: string;
2452
2519
  /**
2453
2520
  * @throws This function can throw errors.
2454
2521
  *
@@ -2507,14 +2574,14 @@ export class EditorStructureManager {
2507
2574
  *
2508
2575
  * @throws This function can throw errors.
2509
2576
  */
2510
- createEmpty(id: string, size: minecraftserver.Vector3): EditorStructure;
2577
+ createEmpty(fullName: string, size: minecraftserver.Vector3): EditorStructure;
2511
2578
  /**
2512
2579
  * @remarks
2513
2580
  * This function can't be called in read-only mode.
2514
2581
  *
2515
2582
  * @throws This function can throw errors.
2516
2583
  */
2517
- createFromClipboardItem(item: ClipboardItem, structureName: string): EditorStructure;
2584
+ createFromClipboardItem(item: ClipboardItem, fullName: string): EditorStructure;
2518
2585
  /**
2519
2586
  * @remarks
2520
2587
  * This function can't be called in read-only mode.
@@ -2535,7 +2602,7 @@ export class EditorStructureManager {
2535
2602
  *
2536
2603
  * @throws This function can throw errors.
2537
2604
  */
2538
- getOrCreateStructure(id: string): EditorStructure;
2605
+ getStructure(id: string): EditorStructure;
2539
2606
  /**
2540
2607
  * @remarks
2541
2608
  * This function can't be called in read-only mode.
@@ -3734,6 +3801,40 @@ export class UserDefinedTransactionHandlerId {
3734
3801
  private constructor();
3735
3802
  }
3736
3803
 
3804
+ /**
3805
+ * Validates min/max limits of observable objects that support
3806
+ * Vector2
3807
+ */
3808
+ export declare class Vector2LimitObservableValidator implements ObservableValidator<minecraftserver.Vector2> {
3809
+ /**
3810
+ * @remarks
3811
+ * This property can't be used in read-only mode.
3812
+ *
3813
+ */
3814
+ protected _isInteger?: boolean;
3815
+ /**
3816
+ * @remarks
3817
+ * This property can't be used in read-only mode.
3818
+ *
3819
+ */
3820
+ protected _max: Partial<minecraftserver.Vector2>;
3821
+ /**
3822
+ * @remarks
3823
+ * This property can't be used in read-only mode.
3824
+ *
3825
+ */
3826
+ protected _min: Partial<minecraftserver.Vector2>;
3827
+ /**
3828
+ * @remarks
3829
+ * Constructs a new instance of the
3830
+ * `Vector2LimitObservableValidator` class
3831
+ *
3832
+ */
3833
+ constructor(min: Partial<minecraftserver.Vector2>, max: Partial<minecraftserver.Vector2>, isInteger?: boolean);
3834
+ updateLimits(min: Partial<minecraftserver.Vector2>, max: Partial<minecraftserver.Vector2>): void;
3835
+ validate(newValue: minecraftserver.Vector2): minecraftserver.Vector2;
3836
+ }
3837
+
3737
3838
  /**
3738
3839
  * Validates min/max limits of observable objects that support
3739
3840
  * Vector3
@@ -3788,6 +3889,12 @@ export class Widget {
3788
3889
  *
3789
3890
  */
3790
3891
  collisionRadius: number;
3892
+ /**
3893
+ * @remarks
3894
+ * This property can't be edited in read-only mode.
3895
+ *
3896
+ */
3897
+ collisionType: WidgetCollisionType;
3791
3898
  /**
3792
3899
  * @throws This property can throw when used.
3793
3900
  *
@@ -3863,6 +3970,13 @@ export class Widget {
3863
3970
  * @throws This function can throw errors.
3864
3971
  */
3865
3972
  addGizmoComponent(componentName: string, options?: WidgetComponentGizmoOptions): WidgetComponentGizmo;
3973
+ /**
3974
+ * @remarks
3975
+ * This function can't be called in read-only mode.
3976
+ *
3977
+ * @throws This function can throw errors.
3978
+ */
3979
+ addGridComponent(componentName: string, options?: WidgetComponentGridOptions): WidgetComponentGrid;
3866
3980
  /**
3867
3981
  * @remarks
3868
3982
  * This function can't be called in read-only mode.
@@ -4173,6 +4287,35 @@ export class WidgetComponentGizmoStateChangeEventParameters {
4173
4287
  readonly widget: Widget;
4174
4288
  }
4175
4289
 
4290
+ // @ts-ignore Class inheritance allowed for native defined classes
4291
+ export class WidgetComponentGrid extends WidgetComponentBase {
4292
+ private constructor();
4293
+ /**
4294
+ * @remarks
4295
+ * This property can't be edited in read-only mode.
4296
+ *
4297
+ */
4298
+ gridColor: minecraftserver.RGBA;
4299
+ /**
4300
+ * @remarks
4301
+ * This property can't be edited in read-only mode.
4302
+ *
4303
+ */
4304
+ gridCount: minecraftserver.Vector2;
4305
+ /**
4306
+ * @remarks
4307
+ * This property can't be edited in read-only mode.
4308
+ *
4309
+ */
4310
+ gridSize: minecraftserver.Vector2;
4311
+ /**
4312
+ * @remarks
4313
+ * This property can't be edited in read-only mode.
4314
+ *
4315
+ */
4316
+ plane: Plane;
4317
+ }
4318
+
4176
4319
  // @ts-ignore Class inheritance allowed for native defined classes
4177
4320
  export class WidgetComponentGuide extends WidgetComponentBase {
4178
4321
  private constructor();
@@ -4234,6 +4377,12 @@ export class WidgetComponentRenderPrimitiveTypeAxialSphere extends WidgetCompone
4234
4377
  export class WidgetComponentRenderPrimitiveTypeBase {
4235
4378
  private constructor();
4236
4379
  readonly primitiveType: PrimitiveType;
4380
+ /**
4381
+ * @remarks
4382
+ * This property can't be edited in read-only mode.
4383
+ *
4384
+ */
4385
+ renderPriority: number;
4237
4386
  }
4238
4387
 
4239
4388
  // @ts-ignore Class inheritance allowed for native defined classes
@@ -4764,9 +4913,11 @@ export interface CursorRay {
4764
4913
 
4765
4914
  export interface EditorStructureSearchOptions {
4766
4915
  displayName?: string;
4767
- idPattern?: string;
4768
- includeSources?: StructureSource[];
4769
- includeTags?: string[];
4916
+ id?: string;
4917
+ sources?: StructureSource[];
4918
+ structureName?: string;
4919
+ structureNamespace?: string;
4920
+ tags?: string[];
4770
4921
  }
4771
4922
 
4772
4923
  /**
@@ -5496,6 +5647,20 @@ export interface IColorTimelinePropertyItemOptions extends IPropertyItemOptionsB
5496
5647
  *
5497
5648
  */
5498
5649
  onTimeChanged?: (current: number, prev: number) => void;
5650
+ /**
5651
+ * @remarks
5652
+ * Flag that enables gradient background color on the timeline
5653
+ * to be rendered, default is true
5654
+ *
5655
+ */
5656
+ renderGradientBackground?: boolean;
5657
+ /**
5658
+ * @remarks
5659
+ * False means the alpha elements will not be shown in the
5660
+ * color picker
5661
+ *
5662
+ */
5663
+ showAlpha?: boolean;
5499
5664
  /**
5500
5665
  * @remarks
5501
5666
  * Localized title of the property item
@@ -6093,6 +6258,86 @@ export interface IMenuCreationParams {
6093
6258
  uniqueId?: string;
6094
6259
  }
6095
6260
 
6261
+ /**
6262
+ * A property item which supports Menu properties
6263
+ */
6264
+ // @ts-ignore Class inheritance allowed for native defined classes
6265
+ export interface IMenuPropertyItem extends IPropertyItemBase {
6266
+ /**
6267
+ * @remarks
6268
+ * Adds a new menu item entry to property item
6269
+ *
6270
+ * @param props
6271
+ * Menu creation parameters
6272
+ * @param action
6273
+ * Optional action to trigger on menu click
6274
+ */
6275
+ addEntry(props: IMenuCreationParams, action?: RegisteredAction<NoArgsAction>): IMenu;
6276
+ /**
6277
+ * @remarks
6278
+ * @returns
6279
+ * All first level menu entries
6280
+ */
6281
+ getEntries(): IMenu[];
6282
+ /**
6283
+ * @remarks
6284
+ * Find the menu item recursively if it exists
6285
+ *
6286
+ * @param menuId
6287
+ * Identifier of the menu.
6288
+ */
6289
+ getMenu(menuId: string): IMenu | undefined;
6290
+ /**
6291
+ * @remarks
6292
+ * Removed the menu item entry if the id is found
6293
+ *
6294
+ * @param menuId
6295
+ * Menu id to remove
6296
+ */
6297
+ removeEntry(menuId: string): void;
6298
+ /**
6299
+ * @remarks
6300
+ * Updates title of the property item.
6301
+ *
6302
+ * @param title
6303
+ * New title.
6304
+ */
6305
+ setTitle(title: LocalizedString | undefined): void;
6306
+ /**
6307
+ * @remarks
6308
+ * Updates tooltip description of property item.
6309
+ *
6310
+ * @param tooltip
6311
+ * New tooltip.
6312
+ */
6313
+ setTooltip(tooltip: BasicTooltipContent | undefined): void;
6314
+ }
6315
+
6316
+ /**
6317
+ * Optional properties for Menu property item
6318
+ */
6319
+ // @ts-ignore Class inheritance allowed for native defined classes
6320
+ export interface IMenuPropertyItemOptions extends IPropertyItemOptionsBase {
6321
+ /**
6322
+ * @remarks
6323
+ * Called when a menu item is clicked.
6324
+ *
6325
+ */
6326
+ onMenuItemClick?: (menuId: string) => void;
6327
+ /**
6328
+ * @remarks
6329
+ * Localized title of the property item.
6330
+ *
6331
+ */
6332
+ title?: LocalizedString;
6333
+ /**
6334
+ * @remarks
6335
+ * Tooltip description of the property item.
6336
+ *
6337
+ */
6338
+ tooltip?: BasicTooltipContent;
6339
+ }
6340
+
6096
6341
  /**
6097
6342
  * A sub pane for modal control elements.
6098
6343
  */
@@ -6812,7 +7057,7 @@ export interface IPropertyPane extends IPane {
6812
7057
  * Pane state for being expanded or collapsed.
6813
7058
  *
6814
7059
  */
6815
- collapsed: boolean;
7060
+ readonly collapsed: boolean;
6816
7061
  /**
6817
7062
  * @remarks
6818
7063
  * Provides visibility change events
@@ -6910,6 +7155,18 @@ export interface IPropertyPane extends IPane {
6910
7155
  *
6911
7156
  */
6912
7157
  addLink(value: IObservableProp<string>, options?: ILinkPropertyItemOptions): ILinkPropertyItem;
7158
+ /**
7159
+ * @remarks
7160
+ * Adds a menu button property item to the pane.
7161
+ *
7162
+ */
7163
+ addMenu(
7164
+ defaultEntries: {
7165
+ params: IMenuCreationParams;
7166
+ action?: RegisteredAction<NoArgsAction>;
7167
+ }[],
7168
+ options?: IMenuPropertyItemOptions,
7169
+ ): IMenuPropertyItem;
6913
7170
  /**
6914
7171
  * @remarks
6915
7172
  * Adds a number item to the pane.
@@ -6957,7 +7214,16 @@ export interface IPropertyPane extends IPane {
6957
7214
  addToggleGroup(value: IObservableProp<number>, options?: IToggleGroupPropertyItemOptions): IToggleGroupPropertyItem;
6958
7215
  /**
6959
7216
  * @remarks
6960
- * Adds a Vec3 item to the pane.
7217
+ * Adds a Vector2 item to the pane.
7218
+ *
7219
+ */
7220
+ addVector2(
7221
+ value: IObservableProp<minecraftserver.Vector2>,
7222
+ options?: IVector2PropertyItemOptions,
7223
+ ): IVector2PropertyItem;
7224
+ /**
7225
+ * @remarks
7226
+ * Adds a Vector3 item to the pane.
6961
7227
  *
6962
7228
  */
6963
7229
  addVector3(
@@ -6989,6 +7255,12 @@ export interface IPropertyPane extends IPane {
6989
7255
  *
6990
7256
  */
6991
7257
  endConstruct(): void;
7258
+ /**
7259
+ * @remarks
7260
+ * Expand the pane.
7261
+ *
7262
+ */
7263
+ expand(): void;
6992
7264
  /**
6993
7265
  * @remarks
6994
7266
  * Returns pane title.
@@ -7582,6 +7854,94 @@ export interface IToggleGroupPropertyItemOptions extends IPropertyItemOptionsBas
7582
7854
  tooltip?: BasicTooltipContent;
7583
7855
  }
7584
7856
 
7857
+ /**
7858
+ * A property item which supports Vector2 properties
7859
+ */
7860
+ // @ts-ignore Class inheritance allowed for native defined classes
7861
+ export interface IVector2PropertyItem extends IPropertyItemBase {
7862
+ /**
7863
+ * @remarks
7864
+ * Current value of the property item.
7865
+ *
7866
+ */
7867
+ readonly value: Readonly<minecraftserver.Vector2>;
7868
+ /**
7869
+ * @remarks
7870
+ * Updates title of the button.
7871
+ *
7872
+ * @param title
7873
+ * New button title.
7874
+ */
7875
+ setTitle(title: LocalizedString | undefined): void;
7876
+ /**
7877
+ * @remarks
7878
+ * Updates tooltip description of the button.
7879
+ *
7880
+ * @param tooltip
7881
+ * New button tooltip.
7882
+ */
7883
+ setTooltip(tooltip: BasicTooltipContent | undefined): void;
7884
+ /**
7885
+ * @remarks
7886
+ * Updates Vector2 limits and clamps the current value.
7887
+ *
7888
+ */
7889
+ updateAxisLimits(limits: { min?: Partial<minecraftserver.Vector2>; max?: Partial<minecraftserver.Vector2> }): void;
7890
+ }
7891
+
7892
+ /**
7893
+ * Optional properties for Vector2 property item
7894
+ */
7895
+ // @ts-ignore Class inheritance allowed for native defined classes
7896
+ export interface IVector2PropertyItemOptions extends IPropertyItemOptionsBase {
7897
+ /**
7898
+ * @remarks
7899
+ * If true label text will be hidden. It will be visible by
7900
+ * default.
7901
+ *
7902
+ */
7903
+ hiddenLabel?: boolean;
7904
+ /**
7905
+ * @remarks
7906
+ * If we should treat the Vector2 properties as integer values.
7907
+ * By default is false.
7908
+ *
7909
+ */
7910
+ isInteger?: boolean;
7911
+ /**
7912
+ * @remarks
7913
+ * The min possible limits. If undefined,
7914
+ * Number.MAX_SAFE_INTEGER will be used.
7915
+ *
7916
+ */
7917
+ max?: Partial<minecraftserver.Vector2>;
7918
+ /**
7919
+ * @remarks
7920
+ * The min possible limits. If undefined,
7921
+ * Number.MIN_SAFE_INTEGER will be used.
7922
+ *
7923
+ */
7924
+ min?: Partial<minecraftserver.Vector2>;
7925
+ /**
7926
+ * @remarks
7927
+ * This callback is called when UI control is changed.
7928
+ *
7929
+ */
7930
+ onChange?: (newValue: minecraftserver.Vector2, oldValue: minecraftserver.Vector2) => void;
7931
+ /**
7932
+ * @remarks
7933
+ * Localized title of the property item
7934
+ *
7935
+ */
7936
+ title?: LocalizedString;
7937
+ /**
7938
+ * @remarks
7939
+ * Tooltip description of the property item
7940
+ *
7941
+ */
7942
+ tooltip?: BasicTooltipContent;
7943
+ }
7944
+
7585
7945
  /**
7586
7946
  * A property item which supports Vector3 properties
7587
7947
  */
@@ -7815,6 +8175,14 @@ export interface WidgetComponentGizmoOptions extends WidgetComponentBaseOptions
7815
8175
  stateChangeEvent?: (arg0: WidgetComponentGizmoStateChangeEventParameters) => void;
7816
8176
  }
7817
8177
 
8178
+ // @ts-ignore Class inheritance allowed for native defined classes
8179
+ export interface WidgetComponentGridOptions extends WidgetComponentBaseOptions {
8180
+ color?: minecraftserver.RGBA;
8181
+ gridCount?: minecraftserver.Vector2;
8182
+ gridSize?: minecraftserver.Vector2;
8183
+ plane?: Plane;
8184
+ }
8185
+
7818
8186
  // @ts-ignore Class inheritance allowed for native defined classes
7819
8187
  export interface WidgetComponentGuideOptions extends WidgetComponentBaseOptions {}
7820
8188
 
@@ -7850,6 +8218,7 @@ export interface WidgetCreateOptions {
7850
8218
  bindPositionToBlockCursor?: boolean;
7851
8219
  collisionOffset?: minecraftserver.Vector3;
7852
8220
  collisionRadius?: number;
8221
+ collisionType?: WidgetCollisionType;
7853
8222
  lockToSurface?: boolean;
7854
8223
  selectable?: boolean;
7855
8224
  snapToBlockLocation?: boolean;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@minecraft/server-editor",
3
- "version": "0.1.0-beta.1.21.110-preview.26",
3
+ "version": "0.1.0-beta.1.21.120-preview.21",
4
4
  "description": "",
5
5
  "contributors": [
6
6
  {
@@ -14,8 +14,8 @@
14
14
  ],
15
15
  "peerDependencies": {
16
16
  "@minecraft/common": "^1.0.0",
17
- "@minecraft/server": "^2.3.0-beta.1.21.110-preview.26",
18
- "@minecraft/vanilla-data": ">=1.20.70 || 1.21.110-preview.26"
17
+ "@minecraft/server": "^2.4.0-beta.1.21.120-preview.21",
18
+ "@minecraft/vanilla-data": ">=1.20.70 || 1.21.120-preview.21"
19
19
  },
20
20
  "license": "MIT"
21
21
  }