@minecraft/server-editor 0.1.0-beta.1.26.40-preview.26 → 0.1.0-beta.1.26.40-preview.30

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 +614 -132
  2. package/package.json +3 -3
package/index.d.ts CHANGED
@@ -1285,6 +1285,7 @@ export declare enum PropertyItemType {
1285
1285
  SubPane = 'editorUI:SubPane',
1286
1286
  TagContainer = 'editorUI:TagContainer',
1287
1287
  Text = 'editorUI:Text',
1288
+ TimelinePlayer = 'editorUI:TimelinePlayer',
1288
1289
  ToggleGroup = 'editorUI:ToggleGroup',
1289
1290
  Vector2 = 'editorUI:Vector2',
1290
1291
  Vector3 = 'editorUI:Vector3',
@@ -1419,6 +1420,14 @@ export enum ThemeSettingsColorKey {
1419
1420
  Warning = 'Warning',
1420
1421
  }
1421
1422
 
1423
+ /**
1424
+ * Playback state for Timeline Player property item.
1425
+ */
1426
+ export declare enum TimelinePlayerPlaybackState {
1427
+ Playing = 'playing',
1428
+ Stopped = 'stopped',
1429
+ }
1430
+
1422
1431
  export enum WidgetCollisionType {
1423
1432
  None = 0,
1424
1433
  Radius = 1,
@@ -1450,6 +1459,11 @@ export enum WidgetGizmoEventType {
1450
1459
  OriginReleased = 'OriginReleased',
1451
1460
  }
1452
1461
 
1462
+ export enum WidgetGizmoScaleMode {
1463
+ World = 0,
1464
+ Screen = 1,
1465
+ }
1466
+
1453
1467
  export enum WidgetGroupSelectionMode {
1454
1468
  Multiple = 'Multiple',
1455
1469
  None = 'None',
@@ -2284,7 +2298,7 @@ export class BlockUtilities {
2284
2298
  * @throws This function can throw errors.
2285
2299
  */
2286
2300
  fillVolume(
2287
- volume: minecraftserver.BlockVolumeBase | minecraftserver.CompoundBlockVolume | RelativeVolumeListBlockVolume,
2301
+ volume: minecraftserver.BlockVolumeBase | RelativeVolumeListBlockVolume,
2288
2302
  block?: minecraftserver.BlockPermutation | minecraftserver.BlockType | string,
2289
2303
  ): void;
2290
2304
  /**
@@ -2301,7 +2315,7 @@ export class BlockUtilities {
2301
2315
  *
2302
2316
  * @throws This function can throw errors.
2303
2317
  */
2304
- getContiguousSelection(properties?: ContiguousSelectionProperties): minecraftserver.CompoundBlockVolume;
2318
+ getContiguousSelection(properties?: ContiguousSelectionProperties): RelativeVolumeListBlockVolume;
2305
2319
  /**
2306
2320
  * @remarks
2307
2321
  * This function can't be called in restricted-execution mode.
@@ -2369,6 +2383,77 @@ export class BlockUtilities {
2369
2383
  ): RelativeVolumeListBlockVolume;
2370
2384
  }
2371
2385
 
2386
+ export class BlockUtilityTasks {
2387
+ private constructor();
2388
+ /**
2389
+ * @remarks
2390
+ * This function can't be called in restricted-execution mode.
2391
+ *
2392
+ * @throws This function can throw errors.
2393
+ */
2394
+ fillVolume(
2395
+ volume: minecraftserver.BlockVolumeBase | RelativeVolumeListBlockVolume,
2396
+ block?: minecraftserver.BlockPermutation | minecraftserver.BlockType | string,
2397
+ maxBlocksPerTick?: number,
2398
+ ): Promise<number>;
2399
+ /**
2400
+ * @remarks
2401
+ * This function can't be called in restricted-execution mode.
2402
+ *
2403
+ * @throws This function can throw errors.
2404
+ */
2405
+ findObscuredBlocksWithinVolume(
2406
+ volume: minecraftserver.BlockVolumeBase | RelativeVolumeListBlockVolume,
2407
+ maxBlocksPerTick?: number,
2408
+ ): Promise<RelativeVolumeListBlockVolume>;
2409
+ /**
2410
+ * @remarks
2411
+ * This function can't be called in restricted-execution mode.
2412
+ *
2413
+ * @throws This function can throw errors.
2414
+ */
2415
+ generateManifest(
2416
+ volume: minecraftserver.BlockVolumeBase | RelativeVolumeListBlockVolume,
2417
+ maxBlocksPerTick?: number,
2418
+ ): Promise<BlockUtilityManifest>;
2419
+ /**
2420
+ * @remarks
2421
+ * This function can't be called in restricted-execution mode.
2422
+ *
2423
+ * @throws This function can throw errors.
2424
+ */
2425
+ replaceBlocksInSelection(
2426
+ volume: minecraftserver.BlockVolumeBase | RelativeVolumeListBlockVolume,
2427
+ fromBlockIdentifier: string,
2428
+ toBlock?: minecraftserver.BlockPermutation | minecraftserver.BlockType | string,
2429
+ maxBlocksPerTick?: number,
2430
+ ): Promise<number>;
2431
+ /**
2432
+ * @remarks
2433
+ * This function can't be called in restricted-execution mode.
2434
+ *
2435
+ * @throws This function can throw errors.
2436
+ */
2437
+ shrinkWrapVolume(
2438
+ volume: minecraftserver.BlockVolumeBase | RelativeVolumeListBlockVolume,
2439
+ maxBlocksPerTick?: number,
2440
+ ): Promise<RelativeVolumeListBlockVolume>;
2441
+ /**
2442
+ * @remarks
2443
+ * This function can't be called in restricted-execution mode.
2444
+ *
2445
+ * @throws This function can throw errors.
2446
+ */
2447
+ trimVolumeToFitContents(
2448
+ volume: minecraftserver.BlockVolumeBase | RelativeVolumeListBlockVolume,
2449
+ retainMarqueeAfterTrimming: boolean,
2450
+ ignoreLiquid: boolean,
2451
+ ignoreNoCollision: boolean,
2452
+ blockMask?: BlockMaskList,
2453
+ maxBlocksPerTick?: number,
2454
+ ): Promise<RelativeVolumeListBlockVolume>;
2455
+ }
2456
+
2372
2457
  /**
2373
2458
  * Base for creating new brush shapes
2374
2459
  */
@@ -2599,6 +2684,12 @@ export class BrushShapeManager {
2599
2684
  *
2600
2685
  */
2601
2686
  setInverseEraseMode(inverseEraseMode: boolean): void;
2687
+ /**
2688
+ * @remarks
2689
+ * This function can't be called in restricted-execution mode.
2690
+ *
2691
+ */
2692
+ setPendingTransaction(pendingTransaction?: PendingTransaction): void;
2602
2693
  /**
2603
2694
  * @remarks
2604
2695
  * This function can't be called in restricted-execution mode.
@@ -2719,7 +2810,11 @@ export class ClipboardItem {
2719
2810
  * Success or Failure
2720
2811
  * @throws This function can throw errors.
2721
2812
  */
2722
- writeToWorld(location: minecraftserver.Vector3, options?: ClipboardWriteOptions): boolean;
2813
+ writeToWorld(
2814
+ location: minecraftserver.Vector3,
2815
+ options?: ClipboardWriteOptions,
2816
+ transaction?: PendingTransaction,
2817
+ ): boolean;
2723
2818
  }
2724
2819
 
2725
2820
  /**
@@ -3457,6 +3552,7 @@ export class ExtensionContext {
3457
3552
  readonly afterEvents: ExtensionContextAfterEvents;
3458
3553
  readonly blockPalette: BlockPaletteManager;
3459
3554
  readonly blockUtilities: BlockUtilities;
3555
+ readonly blockUtilityTasks: BlockUtilityTasks;
3460
3556
  readonly brushShapeManager: BrushShapeManager;
3461
3557
  /**
3462
3558
  * @remarks
@@ -4104,6 +4200,83 @@ export declare abstract class ObservableValidator<T> {
4104
4200
  abstract validate(newValue: T): T | undefined;
4105
4201
  }
4106
4202
 
4203
+ export class PendingTransaction {
4204
+ private constructor();
4205
+ /**
4206
+ * @remarks
4207
+ * This function can't be called in restricted-execution mode.
4208
+ *
4209
+ * @throws This function can throw errors.
4210
+ */
4211
+ addEntityOperation(entity: minecraftserver.Entity, type: EntityOperationType): boolean;
4212
+ /**
4213
+ * @remarks
4214
+ * This function can't be called in restricted-execution mode.
4215
+ *
4216
+ * @throws This function can throw errors.
4217
+ */
4218
+ addUserDefinedOperation(
4219
+ transactionHandlerId: UserDefinedTransactionHandlerId,
4220
+ operationData: string,
4221
+ operationName?: string,
4222
+ ): void;
4223
+ /**
4224
+ * @remarks
4225
+ * This function can't be called in restricted-execution mode.
4226
+ *
4227
+ * @throws This function can throw errors.
4228
+ */
4229
+ commitTrackedChanges(): number;
4230
+ /**
4231
+ * @remarks
4232
+ * This function can't be called in restricted-execution mode.
4233
+ *
4234
+ * @throws This function can throw errors.
4235
+ */
4236
+ discard(): void;
4237
+ /**
4238
+ * @remarks
4239
+ * This function can't be called in restricted-execution mode.
4240
+ *
4241
+ * @throws This function can throw errors.
4242
+ */
4243
+ discardTrackedChanges(): number;
4244
+ /**
4245
+ * @remarks
4246
+ * This function can't be called in restricted-execution mode.
4247
+ *
4248
+ */
4249
+ isValid(): boolean;
4250
+ /**
4251
+ * @remarks
4252
+ * This function can't be called in restricted-execution mode.
4253
+ *
4254
+ * @throws This function can throw errors.
4255
+ */
4256
+ submit(): void;
4257
+ /**
4258
+ * @remarks
4259
+ * This function can't be called in restricted-execution mode.
4260
+ *
4261
+ * @throws This function can throw errors.
4262
+ */
4263
+ trackBlockChangeArea(from: minecraftserver.Vector3, to: minecraftserver.Vector3): boolean;
4264
+ /**
4265
+ * @remarks
4266
+ * This function can't be called in restricted-execution mode.
4267
+ *
4268
+ * @throws This function can throw errors.
4269
+ */
4270
+ trackBlockChangeList(locations: minecraftserver.Vector3[]): boolean;
4271
+ /**
4272
+ * @remarks
4273
+ * This function can't be called in restricted-execution mode.
4274
+ *
4275
+ * @throws This function can throw errors.
4276
+ */
4277
+ trackBlockChangeVolume(blockVolume: minecraftserver.BlockVolumeBase): boolean;
4278
+ }
4279
+
4107
4280
  export class PlaytestManager {
4108
4281
  private constructor();
4109
4282
  /**
@@ -4599,49 +4772,7 @@ export class TransactionManager {
4599
4772
  *
4600
4773
  * @throws This function can throw errors.
4601
4774
  */
4602
- addEntityOperation(entity: minecraftserver.Entity, type: EntityOperationType): boolean;
4603
- /**
4604
- * @remarks
4605
- * This function can't be called in restricted-execution mode.
4606
- *
4607
- * @throws This function can throw errors.
4608
- */
4609
- addUserDefinedOperation(
4610
- transactionHandlerId: UserDefinedTransactionHandlerId,
4611
- operationData: string,
4612
- operationName?: string,
4613
- ): void;
4614
- /**
4615
- * @remarks
4616
- * Commit all of the transaction operations currently attached
4617
- * to the open transaction record to the manager. These will
4618
- * be added as a single transaction manager entry.
4619
- * The open record will be closed and all tracking operations
4620
- * will cease.
4621
- *
4622
- * This function can't be called in restricted-execution mode.
4623
- *
4624
- * @throws This function can throw errors.
4625
- */
4626
- commitOpenTransaction(): boolean;
4627
- /**
4628
- * @remarks
4629
- * This function will commit the pending changes caused by any
4630
- * of the track changes variants. The changes will be
4631
- * committed to the currently open transaction, but the
4632
- * transaction will remain open for further records.
4633
- * Pending block changes from tracking operations will be added
4634
- * to the transaction record before submission to the
4635
- * transaction manager
4636
- *
4637
- * This function can't be called in restricted-execution mode.
4638
- *
4639
- * @returns
4640
- * Returns the number of change requests that were being
4641
- * tracked
4642
- * @throws This function can throw errors.
4643
- */
4644
- commitTrackedChanges(): number;
4775
+ createPendingTransaction(name: string): PendingTransaction;
4645
4776
  /**
4646
4777
  * @remarks
4647
4778
  * This function can't be called in restricted-execution mode.
@@ -4652,52 +4783,6 @@ export class TransactionManager {
4652
4783
  undoClosure: (arg0: string) => void,
4653
4784
  redoClosure: (arg0: string) => void,
4654
4785
  ): UserDefinedTransactionHandlerId;
4655
- /**
4656
- * @remarks
4657
- * Discard the currently open transaction without committing it
4658
- * to the transaction manager stack.
4659
- * All records within the transaction will be discarded, and
4660
- * any tracking requests currently active will be stopped
4661
- *
4662
- * This function can't be called in restricted-execution mode.
4663
- *
4664
- * @throws This function can throw errors.
4665
- */
4666
- discardOpenTransaction(): boolean;
4667
- /**
4668
- * @remarks
4669
- * Discard any pending tracked changes. This does not affect
4670
- * the current open transaction contents, only the pending
4671
- * tracked block operations
4672
- *
4673
- * This function can't be called in restricted-execution mode.
4674
- *
4675
- * @returns
4676
- * Returns the number of change requests that were discarded
4677
- * @throws This function can throw errors.
4678
- */
4679
- discardTrackedChanges(): number;
4680
- /**
4681
- * @remarks
4682
- * This function can't be called in restricted-execution mode.
4683
- *
4684
- * @throws This function can throw errors.
4685
- */
4686
- isBusy(): boolean;
4687
- /**
4688
- * @remarks
4689
- * Open a transaction record which will be a container for any
4690
- * number of transaction operations.
4691
- * All transaction operations within a record are grouped and
4692
- * treated as a single atomic unit
4693
- *
4694
- * This function can't be called in restricted-execution mode.
4695
- *
4696
- * @param name
4697
- * Give the transaction record a name
4698
- * @throws This function can throw errors.
4699
- */
4700
- openTransaction(name: string): boolean;
4701
4786
  /**
4702
4787
  * @remarks
4703
4788
  * Perform an redo operation. This will take the last
@@ -4723,41 +4808,6 @@ export class TransactionManager {
4723
4808
  * @throws This function can throw errors.
4724
4809
  */
4725
4810
  redoSize(): number;
4726
- /**
4727
- * @remarks
4728
- * Begin tracking block changes in a specified area. These
4729
- * will be added to a pending changes list.
4730
- * The pending list will be added to the open transaction
4731
- * record when a commit has been issued.
4732
- *
4733
- * This function can't be called in restricted-execution mode.
4734
- *
4735
- * @param from
4736
- * Min block location of a bounding area
4737
- * @param to
4738
- * Max block location of a bounding area
4739
- * @throws This function can throw errors.
4740
- */
4741
- trackBlockChangeArea(from: minecraftserver.Vector3, to: minecraftserver.Vector3): boolean;
4742
- /**
4743
- * @remarks
4744
- * Begin tracking block changes in a list of specified block
4745
- * locations.
4746
- *
4747
- * This function can't be called in restricted-execution mode.
4748
- *
4749
- * @param locations
4750
- * An array of block locations to monitor for changes
4751
- * @throws This function can throw errors.
4752
- */
4753
- trackBlockChangeList(locations: minecraftserver.Vector3[]): boolean;
4754
- /**
4755
- * @remarks
4756
- * This function can't be called in restricted-execution mode.
4757
- *
4758
- * @throws This function can throw errors.
4759
- */
4760
- trackBlockChangeVolume(blockVolume: minecraftserver.BlockVolumeBase): boolean;
4761
4811
  /**
4762
4812
  * @remarks
4763
4813
  * Perform an undo operation. This will take the last
@@ -4827,7 +4877,7 @@ export declare class UserDefinedTransactionHandle<T> {
4827
4877
  * @param transactionName
4828
4878
  * A string name that will be associated with this operation
4829
4879
  */
4830
- addUserDefinedOperation(payload: T, transactionName: string): void;
4880
+ addUserDefinedOperation(payload: T, transactionName: string, pendingTransaction: PendingTransaction): void;
4831
4881
  }
4832
4882
 
4833
4883
  export class UserDefinedTransactionHandlerId {
@@ -5325,6 +5375,24 @@ export class WidgetComponentGizmo extends WidgetComponentBase {
5325
5375
  *
5326
5376
  */
5327
5377
  normalizedOffsetOverride?: minecraftserver.Vector3;
5378
+ /**
5379
+ * @remarks
5380
+ * This property can't be edited in restricted-execution mode.
5381
+ *
5382
+ */
5383
+ scaleMode: WidgetGizmoScaleMode;
5384
+ /**
5385
+ * @remarks
5386
+ * This property can't be edited in restricted-execution mode.
5387
+ *
5388
+ */
5389
+ screenScale: number;
5390
+ /**
5391
+ * @remarks
5392
+ * This property can't be edited in restricted-execution mode.
5393
+ *
5394
+ */
5395
+ worldScale: number;
5328
5396
  /**
5329
5397
  * @remarks
5330
5398
  * This function can't be called in restricted-execution mode.
@@ -6138,6 +6206,16 @@ export interface BlockMaskList {
6138
6206
  maskType: BlockMaskListType;
6139
6207
  }
6140
6208
 
6209
+ export interface BlockUtilityManifest {
6210
+ entries: BlockUtilityManifestEntry[];
6211
+ totalBlocks: number;
6212
+ }
6213
+
6214
+ export interface BlockUtilityManifestEntry {
6215
+ blockIdentifier: string;
6216
+ count: number;
6217
+ }
6218
+
6141
6219
  /**
6142
6220
  * Represents a UI session for a given player
6143
6221
  */
@@ -10311,6 +10389,14 @@ export interface IPropertyPane extends IPane {
10311
10389
  *
10312
10390
  */
10313
10391
  addText(value: IObservableProp<LocalizedString>, options?: ITextPropertyItemOptions): ITextPropertyItem;
10392
+ /**
10393
+ * @remarks
10394
+ * Adds a timeline player pane to the pane. The player owns its
10395
+ * own playhead and a collection of timeline entries that share
10396
+ * that playhead.
10397
+ *
10398
+ */
10399
+ addTimelinePlayer(options?: ITimelinePlayerOptions): ITimelinePlayer;
10314
10400
  /**
10315
10401
  * @remarks
10316
10402
  * Adds a toggle button group to the pane.
@@ -11047,16 +11133,295 @@ export interface ITextPropertyItemOptions extends IPropertyItemOptionsBase {
11047
11133
  }
11048
11134
 
11049
11135
  /**
11050
- * A property item which supports toggle button properties
11136
+ * A pane that hosts a single playhead and a collection of
11137
+ * timeline entries that share it
11051
11138
  */
11052
11139
  // @ts-ignore Class inheritance allowed for native defined classes
11053
- export interface IToggleGroupPropertyItem extends IPropertyItemBase {
11140
+ export interface ITimelinePlayer extends IPropertyItemBase, IPane {
11054
11141
  /**
11055
11142
  * @remarks
11056
- * Current selected entry value.
11143
+ * Number of timeline entries owned by this player.
11057
11144
  *
11058
11145
  */
11059
- readonly value: number;
11146
+ readonly entryCount: number;
11147
+ /**
11148
+ * @remarks
11149
+ * Add a group to the dropdown.
11150
+ *
11151
+ * @param id
11152
+ * Unique identifier for the group.
11153
+ * @param name
11154
+ * Localized display name for the group.
11155
+ * @param tooltip
11156
+ * Optional localized tooltip shown when hovering over the
11157
+ * dropdown entry.
11158
+ */
11159
+ addGroup(id: string, name: LocalizedString, tooltip?: LocalizedString): void;
11160
+ /**
11161
+ * @remarks
11162
+ * Add a Vector3 timeline entry to the player.
11163
+ *
11164
+ * @param options
11165
+ * Per-entry options.
11166
+ */
11167
+ addVector3Timeline(options: IVector3TimelinePlayerEntryOptions): IVector3TimelinePlayerEntry;
11168
+ /**
11169
+ * @remarks
11170
+ * Get the total duration in seconds.
11171
+ *
11172
+ */
11173
+ getDuration(): number;
11174
+ /**
11175
+ * @remarks
11176
+ * Look up an entry by id.
11177
+ *
11178
+ * @param id
11179
+ * Entry identifier.
11180
+ */
11181
+ getEntryById(id: string): ITimelinePlayerEntry | undefined;
11182
+ /**
11183
+ * @remarks
11184
+ * Look up an entry by index.
11185
+ *
11186
+ * @param index
11187
+ * Entry index.
11188
+ */
11189
+ getEntryByIndex(index: number): ITimelinePlayerEntry | undefined;
11190
+ /**
11191
+ * @remarks
11192
+ * Get the current list of groups.
11193
+ *
11194
+ */
11195
+ getGroups(): ITimelinePlayerGroup[];
11196
+ /**
11197
+ * @remarks
11198
+ * Get the current playback state.
11199
+ *
11200
+ */
11201
+ getPlaybackState(): TimelinePlayerPlaybackState;
11202
+ /**
11203
+ * @remarks
11204
+ * Get the decimal precision used for keyframe time spacing.
11205
+ *
11206
+ */
11207
+ getPrecision(): number;
11208
+ /**
11209
+ * @remarks
11210
+ * Get the currently selected group identifier.
11211
+ *
11212
+ */
11213
+ getSelectedGroupId(): string;
11214
+ /**
11215
+ * @remarks
11216
+ * Get the playhead time in seconds.
11217
+ *
11218
+ */
11219
+ getTime(): number;
11220
+ /**
11221
+ * @remarks
11222
+ * Remove an entry by id.
11223
+ *
11224
+ * @param id
11225
+ * Entry identifier.
11226
+ */
11227
+ removeEntry(id: string): boolean;
11228
+ /**
11229
+ * @remarks
11230
+ * Remove a group from the dropdown.
11231
+ *
11232
+ * @param id
11233
+ * Identifier of the group to remove.
11234
+ */
11235
+ removeGroup(id: string): void;
11236
+ /**
11237
+ * @remarks
11238
+ * Rename a group in the dropdown.
11239
+ *
11240
+ * @param id
11241
+ * Identifier of the group to rename.
11242
+ * @param newName
11243
+ * New localized display name.
11244
+ */
11245
+ renameGroup(id: string, newName: LocalizedString): void;
11246
+ /**
11247
+ * @remarks
11248
+ * Set the total duration in seconds.
11249
+ *
11250
+ * @param duration
11251
+ * New duration in seconds.
11252
+ */
11253
+ setDuration(duration: number): void;
11254
+ /**
11255
+ * @remarks
11256
+ * Set the playback state.
11257
+ *
11258
+ * @param state
11259
+ * New playback state.
11260
+ */
11261
+ setPlaybackState(state: TimelinePlayerPlaybackState): void;
11262
+ /**
11263
+ * @remarks
11264
+ * Set the decimal precision used for keyframe time spacing.
11265
+ *
11266
+ * @param precision
11267
+ * Decimal precision.
11268
+ */
11269
+ setPrecision(precision: number): void;
11270
+ /**
11271
+ * @remarks
11272
+ * Set the selected group.
11273
+ *
11274
+ * @param id
11275
+ * Identifier of the group to select.
11276
+ */
11277
+ setSelectedGroupId(id: string): void;
11278
+ /**
11279
+ * @remarks
11280
+ * Set the playhead time.
11281
+ *
11282
+ * @param time
11283
+ * New playhead time in seconds.
11284
+ */
11285
+ setTime(time: number): void;
11286
+ }
11287
+
11288
+ /**
11289
+ * Common interface for all entries owned by a Timeline Player
11290
+ * pane
11291
+ */
11292
+ export interface ITimelinePlayerEntry {
11293
+ /**
11294
+ * @remarks
11295
+ * Unique identifier for the entry.
11296
+ *
11297
+ */
11298
+ readonly id: string;
11299
+ /**
11300
+ * @remarks
11301
+ * Identifier of the parent Timeline Player pane.
11302
+ *
11303
+ */
11304
+ readonly paneId: string;
11305
+ /**
11306
+ * @remarks
11307
+ * Display title shown next to the entry's graph.
11308
+ *
11309
+ */
11310
+ readonly title: LocalizedString | undefined;
11311
+ /**
11312
+ * @remarks
11313
+ * Updates title of the entry.
11314
+ *
11315
+ * @param title
11316
+ * New title.
11317
+ */
11318
+ setTitle(title: LocalizedString | undefined): void;
11319
+ }
11320
+
11321
+ /**
11322
+ * A group entry shown in a Timeline Player's group dropdown
11323
+ */
11324
+ export interface ITimelinePlayerGroup {
11325
+ /**
11326
+ * @remarks
11327
+ * Unique identifier for the group.
11328
+ *
11329
+ */
11330
+ id: string;
11331
+ /**
11332
+ * @remarks
11333
+ * Localized display name shown in the dropdown.
11334
+ *
11335
+ */
11336
+ name: LocalizedString;
11337
+ /**
11338
+ * @remarks
11339
+ * Optional localized tooltip shown when hovering over the
11340
+ * dropdown entry.
11341
+ *
11342
+ */
11343
+ tooltip?: LocalizedString;
11344
+ }
11345
+
11346
+ /**
11347
+ * Optional properties for a Timeline Player pane
11348
+ */
11349
+ // @ts-ignore Class inheritance allowed for native defined classes
11350
+ export interface ITimelinePlayerOptions extends IPropertyItemOptionsBase {
11351
+ /**
11352
+ * @remarks
11353
+ * Total duration in seconds.
11354
+ *
11355
+ */
11356
+ duration?: number;
11357
+ /**
11358
+ * @remarks
11359
+ * Group entries for the dropdown.
11360
+ *
11361
+ */
11362
+ groups?: ITimelinePlayerGroup[];
11363
+ /**
11364
+ * @remarks
11365
+ * Callback triggered when the total duration changes (e.g. via
11366
+ * the timeline drag handle).
11367
+ *
11368
+ */
11369
+ onDurationChanged?: (duration: number) => void;
11370
+ /**
11371
+ * @remarks
11372
+ * Callback triggered when the group selection changes.
11373
+ *
11374
+ */
11375
+ onGroupChanged?: (groupId: string) => void;
11376
+ /**
11377
+ * @remarks
11378
+ * Callback triggered when the play/stop toggle is clicked.
11379
+ *
11380
+ */
11381
+ onPlayStopToggled?: () => void;
11382
+ /**
11383
+ * @remarks
11384
+ * Callback triggered when the redistribute button is clicked.
11385
+ *
11386
+ */
11387
+ onRedistributeClicked?: () => void;
11388
+ /**
11389
+ * @remarks
11390
+ * Callback triggered when the playhead time changes.
11391
+ *
11392
+ */
11393
+ onTimeChanged?: (current: number, prev: number) => void;
11394
+ /**
11395
+ * @remarks
11396
+ * Initial playback state.
11397
+ *
11398
+ */
11399
+ playbackState?: TimelinePlayerPlaybackState;
11400
+ /**
11401
+ * @remarks
11402
+ * Decimal precision for keyframe time values.
11403
+ *
11404
+ */
11405
+ precision?: number;
11406
+ /**
11407
+ * @remarks
11408
+ * Initially selected group identifier.
11409
+ *
11410
+ */
11411
+ selectedGroupId?: string;
11412
+ }
11413
+
11414
+ /**
11415
+ * A property item which supports toggle button properties
11416
+ */
11417
+ // @ts-ignore Class inheritance allowed for native defined classes
11418
+ export interface IToggleGroupPropertyItem extends IPropertyItemBase {
11419
+ /**
11420
+ * @remarks
11421
+ * Current selected entry value.
11422
+ *
11423
+ */
11424
+ readonly value: number;
11060
11425
  /**
11061
11426
  * @remarks
11062
11427
  * Find a toggle entry at an index in the group.
@@ -11280,6 +11645,15 @@ export interface IVector2PropertyItemOptions extends IPropertyItemOptionsBase {
11280
11645
  tooltip?: BasicTooltipContent;
11281
11646
  }
11282
11647
 
11648
+ /**
11649
+ * A keyframe in a Vector3 Timeline Player entry
11650
+ */
11651
+ export interface IVector3Keyframe {
11652
+ id: string;
11653
+ time: number;
11654
+ value: minecraftserver.Vector3;
11655
+ }
11656
+
11283
11657
  /**
11284
11658
  * A property item which supports Vector3 properties
11285
11659
  */
@@ -11381,6 +11755,112 @@ export interface IVector3PropertyItemOptions extends IPropertyItemOptionsBase {
11381
11755
  tooltip?: BasicTooltipContent;
11382
11756
  }
11383
11757
 
11758
+ /**
11759
+ * A Vector3 timeline entry owned by a Timeline Player pane
11760
+ */
11761
+ // @ts-ignore Class inheritance allowed for native defined classes
11762
+ export interface IVector3TimelinePlayerEntry extends ITimelinePlayerEntry {
11763
+ /**
11764
+ * @remarks
11765
+ * Add a keyframe.
11766
+ *
11767
+ * @param keyframe
11768
+ * Keyframe to add.
11769
+ */
11770
+ addKeyframe(keyframe: IVector3Keyframe): void;
11771
+ /**
11772
+ * @remarks
11773
+ * Get the list of keyframes for this entry.
11774
+ *
11775
+ */
11776
+ getKeyframes(): IVector3Keyframe[];
11777
+ /**
11778
+ * @remarks
11779
+ * Get the currently selected keyframe identifier for this
11780
+ * entry, or undefined if no keyframe in this entry is
11781
+ * selected.
11782
+ *
11783
+ */
11784
+ getSelectedKeyframeId(): string | undefined;
11785
+ /**
11786
+ * @remarks
11787
+ * Remove a keyframe by its identifier.
11788
+ *
11789
+ * @param id
11790
+ * Identifier of the keyframe to remove.
11791
+ */
11792
+ removeKeyframe(id: string): void;
11793
+ /**
11794
+ * @remarks
11795
+ * Bulk replace all keyframes.
11796
+ *
11797
+ * @param keyframes
11798
+ * New set of keyframes.
11799
+ */
11800
+ setKeyframes(keyframes: IVector3Keyframe[]): void;
11801
+ /**
11802
+ * @remarks
11803
+ * Set the selected keyframe for this entry.
11804
+ *
11805
+ * @param keyframeId
11806
+ * Identifier of the keyframe to select, or undefined to
11807
+ * deselect.
11808
+ */
11809
+ setSelectedKeyframeId(keyframeId: string | undefined): void;
11810
+ /**
11811
+ * @remarks
11812
+ * Update an existing keyframe. Matched by the id field.
11813
+ *
11814
+ * @param keyframe
11815
+ * Keyframe with updated time/value.
11816
+ */
11817
+ updateKeyframe(keyframe: IVector3Keyframe): void;
11818
+ }
11819
+
11820
+ /**
11821
+ * Optional properties for a Vector3 timeline entry inside a
11822
+ * Timeline Player pane
11823
+ */
11824
+ export interface IVector3TimelinePlayerEntryOptions {
11825
+ /**
11826
+ * @remarks
11827
+ * Initial keyframe entries for this timeline.
11828
+ *
11829
+ */
11830
+ keyframes?: IVector3Keyframe[];
11831
+ /**
11832
+ * @remarks
11833
+ * Callback triggered when a keyframe is added.
11834
+ *
11835
+ */
11836
+ onKeyframeAdded?: (keyframe: IVector3Keyframe) => void;
11837
+ /**
11838
+ * @remarks
11839
+ * Callback triggered when a keyframe is moved or its value
11840
+ * changes.
11841
+ *
11842
+ */
11843
+ onKeyframeChanged?: (keyframe: IVector3Keyframe) => void;
11844
+ /**
11845
+ * @remarks
11846
+ * Callback triggered when a keyframe is removed.
11847
+ *
11848
+ */
11849
+ onKeyframeRemoved?: (keyframe: IVector3Keyframe) => void;
11850
+ /**
11851
+ * @remarks
11852
+ * Callback triggered when a keyframe is selected.
11853
+ *
11854
+ */
11855
+ onKeyframeSelected?: (keyframe: IVector3Keyframe) => void;
11856
+ /**
11857
+ * @remarks
11858
+ * Display title shown next to the entry's graph.
11859
+ *
11860
+ */
11861
+ title?: LocalizedString;
11862
+ }
11863
+
11384
11864
  /**
11385
11865
  * A property item which supports Vector3 Timeline properties
11386
11866
  */
@@ -11751,6 +12231,7 @@ export interface WidgetComponentBoundingBoxOptions extends WidgetComponentBaseOp
11751
12231
  normalizedOrigin?: minecraftserver.Vector3;
11752
12232
  outlineColor?: minecraftserver.RGBA;
11753
12233
  rotation?: minecraftserver.StructureRotation;
12234
+ scaleMode?: WidgetGizmoScaleMode;
11754
12235
  showWorldIntersections?: boolean;
11755
12236
  stateChangeEvent?: (arg0: WidgetComponentBoundingBoxStateChangeEventParameters) => void;
11756
12237
  visibleHull?: boolean;
@@ -11781,6 +12262,7 @@ export interface WidgetComponentGizmoOptions extends WidgetComponentBaseOptions
11781
12262
  axes?: Axis;
11782
12263
  enablePlanes?: boolean;
11783
12264
  normalizedAutoOffset?: minecraftserver.Vector3;
12265
+ scaleMode?: WidgetGizmoScaleMode;
11784
12266
  stateChangeEvent?: (arg0: WidgetComponentGizmoStateChangeEventParameters) => void;
11785
12267
  }
11786
12268
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@minecraft/server-editor",
3
- "version": "0.1.0-beta.1.26.40-preview.26",
3
+ "version": "0.1.0-beta.1.26.40-preview.30",
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.10.0-beta.1.26.40-preview.26",
18
- "@minecraft/vanilla-data": ">=1.20.70 || 1.26.40-preview.26"
17
+ "@minecraft/server": "^2.10.0-beta.1.26.40-preview.30",
18
+ "@minecraft/vanilla-data": ">=1.20.70 || 1.26.40-preview.30"
19
19
  },
20
20
  "license": "MIT"
21
21
  }