@minecraft/server 2.11.0-beta.1.26.50-preview.25 → 2.11.0-beta.1.26.50-preview.26

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 +642 -8
  2. package/package.json +2 -2
package/index.d.ts CHANGED
@@ -221,7 +221,7 @@ export enum CameraShakeType {
221
221
  }
222
222
 
223
223
  /**
224
- * @beta
224
+ * @rc
225
225
  * An enumeration for the clone modes used when cloning blocks.
226
226
  */
227
227
  export enum CloneMode {
@@ -8167,7 +8167,7 @@ export class Dimension {
8167
8167
  options?: BiomeSearchOptions,
8168
8168
  ): Vector3 | undefined;
8169
8169
  /**
8170
- * @beta
8170
+ * @rc
8171
8171
  * @remarks
8172
8172
  * Clones a region of blocks from one area of the dimension to
8173
8173
  * another.
@@ -9118,7 +9118,9 @@ export class DimensionTypes {
9118
9118
  /**
9119
9119
  * @remarks
9120
9120
  * Retrieves a dimension type using a string-based identifier.
9121
- * Currently only works with Vanilla dimensions.
9121
+ * Works with both vanilla dimensions and custom dimensions.
9122
+ * Custom dimensions cannot be retrieved until after the system
9123
+ * startup event has completed.
9122
9124
  *
9123
9125
  * @privilege early-execution-allowed - This function can be called in early-execution mode.
9124
9126
  *
@@ -9126,8 +9128,10 @@ export class DimensionTypes {
9126
9128
  static get(dimensionTypeId: string): DimensionType | undefined;
9127
9129
  /**
9128
9130
  * @remarks
9129
- * Retrieves an array of all dimension types. Currently only
9130
- * works with Vanilla dimensions.
9131
+ * Retrieves an array of all dimension types. Includes both
9132
+ * vanilla dimensions and custom dimensions. Custom dimensions
9133
+ * are not included until after the system startup event has
9134
+ * completed.
9131
9135
  *
9132
9136
  * @privilege early-execution-allowed - This function can be called in early-execution mode.
9133
9137
  *
@@ -12151,6 +12155,28 @@ export class EntityIsStunnedComponent extends EntityComponent {
12151
12155
  // @ts-ignore Class inheritance allowed for native defined classes
12152
12156
  export class EntityIsTamedComponent extends EntityComponent {
12153
12157
  private constructor();
12158
+ /**
12159
+ * @beta
12160
+ * @remarks
12161
+ * Returns the player that has tamed the entity, or 'undefined'
12162
+ * if the entity has no player owner.
12163
+ *
12164
+ * @throws This property can throw when used.
12165
+ *
12166
+ * {@link InvalidEntityError}
12167
+ */
12168
+ readonly tamedToPlayer?: Player;
12169
+ /**
12170
+ * @beta
12171
+ * @remarks
12172
+ * Returns the id of the player that has tamed the entity, or
12173
+ * 'undefined' if the entity has no player owner.
12174
+ *
12175
+ * @throws This property can throw when used.
12176
+ *
12177
+ * {@link InvalidEntityError}
12178
+ */
12179
+ readonly tamedToPlayerId?: string;
12154
12180
  static readonly componentId = 'minecraft:is_tamed';
12155
12181
  }
12156
12182
 
@@ -21035,7 +21061,7 @@ export class PrimitiveShapesManager {
21035
21061
  */
21036
21062
  addText(text: TextPrimitive, dimension?: Dimension): void;
21037
21063
  /**
21038
- * @beta
21064
+ * @rc
21039
21065
  * @remarks
21040
21066
  * Fetches and queries all primitive shapes stored in the
21041
21067
  * manager and returns the results as an array of shape
@@ -23597,6 +23623,45 @@ export class TickingAreaManager {
23597
23623
  removeTickingArea(identifier: string | TickingArea): void;
23598
23624
  }
23599
23625
 
23626
+ /**
23627
+ * @beta
23628
+ * A named point in time on a world clock that can occur once
23629
+ * or periodically.
23630
+ */
23631
+ export class TimeMarker {
23632
+ private constructor();
23633
+ /**
23634
+ * @remarks
23635
+ * The identifier that represents this time marker.
23636
+ *
23637
+ */
23638
+ readonly name: string;
23639
+ /**
23640
+ * @remarks
23641
+ * The interval (in ticks) at which the time marker repeats. If
23642
+ * not specified, the time marker will only occur once.
23643
+ *
23644
+ * @throws
23645
+ * WorldClockInvalidTimeMarkerError: If the time marker is
23646
+ * invalid.
23647
+ *
23648
+ * {@link WorldClockInvalidTimeMarkerError}
23649
+ */
23650
+ readonly period?: number;
23651
+ /**
23652
+ * @remarks
23653
+ * The time (in ticks) that the time marker occurs at on a
23654
+ * world clock.
23655
+ *
23656
+ * @throws
23657
+ * WorldClockInvalidTimeMarkerError: If the time marker is
23658
+ * invalid.
23659
+ *
23660
+ * {@link WorldClockInvalidTimeMarkerError}
23661
+ */
23662
+ readonly time: number;
23663
+ }
23664
+
23600
23665
  /**
23601
23666
  * Represents a trigger for firing an event.
23602
23667
  */
@@ -25133,6 +25198,47 @@ export class WorldAfterEvents {
25133
25198
  *
25134
25199
  */
25135
25200
  readonly weatherChange: WeatherChangeAfterEventSignal;
25201
+ /**
25202
+ * @beta
25203
+ * @remarks
25204
+ * This event fires when a {@link WorldClock} is paused.
25205
+ *
25206
+ * @privilege early-execution-readable - This property can be read in early-execution mode.
25207
+ *
25208
+ */
25209
+ readonly worldClockOnPaused: WorldClockOnPausedAfterEventSignal;
25210
+ /**
25211
+ * @beta
25212
+ * @remarks
25213
+ * This event fires when a {@link WorldClock} is resumed.
25214
+ *
25215
+ * @privilege early-execution-readable - This property can be read in early-execution mode.
25216
+ *
25217
+ */
25218
+ readonly worldClockOnResumed: WorldClockOnResumedAfterEventSignal;
25219
+ /**
25220
+ * @beta
25221
+ * @remarks
25222
+ * This event fires when the time of a {@link WorldClock} hits
25223
+ * a {@link TimeMarker} on the clock. This can happen during a
25224
+ * regular level tick or when the time is set.
25225
+ *
25226
+ * @privilege early-execution-readable - This property can be read in early-execution mode.
25227
+ *
25228
+ */
25229
+ readonly worldClockOnTimeMarker: WorldClockOnTimeMarkerAfterEventSignal;
25230
+ /**
25231
+ * @beta
25232
+ * @remarks
25233
+ * This event fires when a {@link WorldClock} time is changed.
25234
+ * This can happen when the time is directly set through
25235
+ * scripts or commands or when the clock reaches the maximum
25236
+ * time and restarts.
25237
+ *
25238
+ * @privilege early-execution-readable - This property can be read in early-execution mode.
25239
+ *
25240
+ */
25241
+ readonly worldClockOnTimeModified: WorldClockOnTimeModifiedAfterEventSignal;
25136
25242
  /**
25137
25243
  * @remarks
25138
25244
  * @privilege early-execution-readable - This property can be read in early-execution mode.
@@ -25304,6 +25410,16 @@ export class WorldBeforeEvents {
25304
25410
  *
25305
25411
  */
25306
25412
  readonly weatherChange: WeatherChangeBeforeEventSignal;
25413
+ /**
25414
+ * @beta
25415
+ * @remarks
25416
+ * This event fires when a {@link WorldClock} reaches its
25417
+ * maximum time and is about to restart.
25418
+ *
25419
+ * @privilege early-execution-readable - This property can be read in early-execution mode.
25420
+ *
25421
+ */
25422
+ readonly worldClockOnRestart: WorldClockOnRestartBeforeEventSignal;
25307
25423
  }
25308
25424
 
25309
25425
  /**
@@ -25337,6 +25453,373 @@ export class WorldClock {
25337
25453
  * Minimum Value: 0
25338
25454
  */
25339
25455
  time: number;
25456
+ /**
25457
+ * @remarks
25458
+ * Retrieves the current time markers of the world clock.
25459
+ *
25460
+ */
25461
+ readonly timeMarkers: TimeMarker[];
25462
+ /**
25463
+ * @remarks
25464
+ * Adds a new time marker to the world clock.
25465
+ *
25466
+ * @privilege no-restricted-execution - This function can't be called in restricted-execution mode.
25467
+ *
25468
+ * @param timeMarkerOptions
25469
+ * Options for creating a time marker.
25470
+ * @throws This function can throw errors.
25471
+ *
25472
+ * {@link WorldClockAddTimeMarkerError}
25473
+ */
25474
+ addTimeMarker(timeMarkerOptions: TimeMarkerOptions): void;
25475
+ /**
25476
+ * @remarks
25477
+ * Removes an existing time marker from the world clock.
25478
+ *
25479
+ * @privilege no-restricted-execution - This function can't be called in restricted-execution mode.
25480
+ *
25481
+ * @param timeMarker
25482
+ * The time marker or time marker name to remove.
25483
+ * @throws
25484
+ * WorldClockTimeMarkerNotFoundError: If the time marker does
25485
+ * not exist on the world clock.
25486
+ * WorldClockRemoveMinecraftTimeMarkerError: If the time marker
25487
+ * uses the 'minecraft' namespace.
25488
+ *
25489
+ * {@link WorldClockRemoveMinecraftTimeMarkerError}
25490
+ *
25491
+ * {@link WorldClockTimeMarkerNotFoundError}
25492
+ */
25493
+ removeTimeMarker(timeMarker: string | TimeMarker): void;
25494
+ /**
25495
+ * @remarks
25496
+ * Rewinds the world clock's time to the previous occurrence of
25497
+ * the specified time marker.
25498
+ *
25499
+ * @privilege no-restricted-execution - This function can't be called in restricted-execution mode.
25500
+ *
25501
+ * @param timeMarker
25502
+ * The time marker or time marker name to rewind the world
25503
+ * clock's time to.
25504
+ * @throws
25505
+ * WorldClockTimeMarkerNotFoundError: If the time marker does
25506
+ * not exist on the world clock.
25507
+ * WorldClockRewindError: If the world clock's current time is
25508
+ * before the time marker's first occurrence.
25509
+ *
25510
+ * {@link WorldClockRewindError}
25511
+ *
25512
+ * {@link WorldClockTimeMarkerNotFoundError}
25513
+ */
25514
+ rewindTo(timeMarker: string | TimeMarker): void;
25515
+ /**
25516
+ * @remarks
25517
+ * Sets the world clock's time to the specified time marker.
25518
+ *
25519
+ * @privilege no-restricted-execution - This function can't be called in restricted-execution mode.
25520
+ *
25521
+ * @param timeMarker
25522
+ * The time marker or time marker name to set the world clock's
25523
+ * time to.
25524
+ * @throws
25525
+ * WorldClockTimeMarkerNotFoundError: If the time marker does
25526
+ * not exist on the world clock.
25527
+ *
25528
+ * {@link WorldClockTimeMarkerNotFoundError}
25529
+ */
25530
+ set(timeMarker: string | TimeMarker): void;
25531
+ /**
25532
+ * @remarks
25533
+ * Skips the world clock's time to the next occurrence of the
25534
+ * specified time marker.
25535
+ * If the next occurrence overflows the world clock's time, the
25536
+ * time is reset to the first occurrence.
25537
+ *
25538
+ * @privilege no-restricted-execution - This function can't be called in restricted-execution mode.
25539
+ *
25540
+ * @param timeMarker
25541
+ * The time marker or time marker name to skip the world
25542
+ * clock's time to.
25543
+ * @throws
25544
+ * WorldClockTimeMarkerNotFoundError: If the time marker does
25545
+ * not exist on the world clock.
25546
+ *
25547
+ * {@link WorldClockTimeMarkerNotFoundError}
25548
+ */
25549
+ skipTo(timeMarker: string | TimeMarker): void;
25550
+ }
25551
+
25552
+ /**
25553
+ * @beta
25554
+ * Contains information related to a {@link WorldClock} being
25555
+ * paused.
25556
+ */
25557
+ export class WorldClockOnPausedAfterEvent {
25558
+ private constructor();
25559
+ /**
25560
+ * @remarks
25561
+ * The world clock that was paused.
25562
+ *
25563
+ */
25564
+ readonly clock: WorldClock;
25565
+ }
25566
+
25567
+ /**
25568
+ * @beta
25569
+ * Manages callbacks that are connected to a {@link WorldClock}
25570
+ * being paused.
25571
+ */
25572
+ export class WorldClockOnPausedAfterEventSignal {
25573
+ private constructor();
25574
+ /**
25575
+ * @remarks
25576
+ * Adds a callback that will be called when a world clock is
25577
+ * paused.
25578
+ *
25579
+ * @privilege no-restricted-execution - This function can't be called in restricted-execution mode.
25580
+ *
25581
+ * @privilege early-execution-allowed - This function can be called in early-execution mode.
25582
+ *
25583
+ */
25584
+ subscribe(
25585
+ callback: (arg0: WorldClockOnPausedAfterEvent) => void,
25586
+ options?: WorldClockEventOptions,
25587
+ ): (arg0: WorldClockOnPausedAfterEvent) => void;
25588
+ /**
25589
+ * @remarks
25590
+ * Removes a callback from being called when a world clock is
25591
+ * paused.
25592
+ *
25593
+ * @privilege no-restricted-execution - This function can't be called in restricted-execution mode.
25594
+ *
25595
+ * @privilege early-execution-allowed - This function can be called in early-execution mode.
25596
+ *
25597
+ */
25598
+ unsubscribe(callback: (arg0: WorldClockOnPausedAfterEvent) => void): void;
25599
+ }
25600
+
25601
+ /**
25602
+ * @beta
25603
+ * Contains information related to a {@link WorldClock}
25604
+ * restarting.
25605
+ */
25606
+ export class WorldClockOnRestartBeforeEvent {
25607
+ private constructor();
25608
+ /**
25609
+ * @remarks
25610
+ * If set to true, cancels the world clock restart event. This
25611
+ * will keep the world clock at the maximum time value and
25612
+ * prevent it from ticking forward.
25613
+ *
25614
+ */
25615
+ cancel: boolean;
25616
+ /**
25617
+ * @remarks
25618
+ * The world clock that is restarting.
25619
+ *
25620
+ */
25621
+ readonly clock: WorldClock;
25622
+ /**
25623
+ * @remarks
25624
+ * The time that the world clock will be set to after it
25625
+ * restarts. If not set, the world clock will be set to 0.
25626
+ *
25627
+ * Minimum Value: 0
25628
+ */
25629
+ newTime: number;
25630
+ }
25631
+
25632
+ /**
25633
+ * @beta
25634
+ * Manages callbacks that are connected to a {@link WorldClock}
25635
+ * restarting.
25636
+ */
25637
+ export class WorldClockOnRestartBeforeEventSignal {
25638
+ private constructor();
25639
+ /**
25640
+ * @remarks
25641
+ * Adds a callback that will be called when a world clock is
25642
+ * restarting.
25643
+ *
25644
+ * @privilege no-restricted-execution - This function can't be called in restricted-execution mode.
25645
+ *
25646
+ * @privilege early-execution-allowed - This function can be called in early-execution mode.
25647
+ *
25648
+ * @param callback
25649
+ * This closure is called with restricted-execution privilege.
25650
+ * @returns
25651
+ * Closure that is called with restricted-execution privilege.
25652
+ */
25653
+ subscribe(
25654
+ callback: (arg0: WorldClockOnRestartBeforeEvent) => void,
25655
+ options?: WorldClockEventOptions,
25656
+ ): (arg0: WorldClockOnRestartBeforeEvent) => void;
25657
+ /**
25658
+ * @remarks
25659
+ * Removes a callback from being called when a world clock is
25660
+ * restarting.
25661
+ *
25662
+ * @privilege no-restricted-execution - This function can't be called in restricted-execution mode.
25663
+ *
25664
+ * @privilege early-execution-allowed - This function can be called in early-execution mode.
25665
+ *
25666
+ * @param callback
25667
+ * This closure is called with restricted-execution privilege.
25668
+ */
25669
+ unsubscribe(callback: (arg0: WorldClockOnRestartBeforeEvent) => void): void;
25670
+ }
25671
+
25672
+ /**
25673
+ * @beta
25674
+ * Contains information related to a {@link WorldClock} being
25675
+ * resumed.
25676
+ */
25677
+ export class WorldClockOnResumedAfterEvent {
25678
+ private constructor();
25679
+ /**
25680
+ * @remarks
25681
+ * The world clock that was resumed.
25682
+ *
25683
+ */
25684
+ readonly clock: WorldClock;
25685
+ }
25686
+
25687
+ /**
25688
+ * @beta
25689
+ * Manages callbacks that are connected to a {@link WorldClock}
25690
+ * being resumed.
25691
+ */
25692
+ export class WorldClockOnResumedAfterEventSignal {
25693
+ private constructor();
25694
+ /**
25695
+ * @remarks
25696
+ * Adds a callback that will be called when a world clock is
25697
+ * resumed.
25698
+ *
25699
+ * @privilege no-restricted-execution - This function can't be called in restricted-execution mode.
25700
+ *
25701
+ * @privilege early-execution-allowed - This function can be called in early-execution mode.
25702
+ *
25703
+ */
25704
+ subscribe(
25705
+ callback: (arg0: WorldClockOnResumedAfterEvent) => void,
25706
+ options?: WorldClockEventOptions,
25707
+ ): (arg0: WorldClockOnResumedAfterEvent) => void;
25708
+ /**
25709
+ * @remarks
25710
+ * Removes a callback from being called when a world clock is
25711
+ * resumed.
25712
+ *
25713
+ * @privilege no-restricted-execution - This function can't be called in restricted-execution mode.
25714
+ *
25715
+ * @privilege early-execution-allowed - This function can be called in early-execution mode.
25716
+ *
25717
+ */
25718
+ unsubscribe(callback: (arg0: WorldClockOnResumedAfterEvent) => void): void;
25719
+ }
25720
+
25721
+ /**
25722
+ * @beta
25723
+ * Contains information related to when the time of a
25724
+ * {@link WorldClock} hits a {@link TimeMarker}.
25725
+ */
25726
+ export class WorldClockOnTimeMarkerAfterEvent {
25727
+ private constructor();
25728
+ /**
25729
+ * @remarks
25730
+ * The world clock that hit a time marker.
25731
+ *
25732
+ */
25733
+ readonly clock: WorldClock;
25734
+ /**
25735
+ * @remarks
25736
+ * The time marker that was hit by the world clock.
25737
+ *
25738
+ */
25739
+ readonly timeMarker: TimeMarker;
25740
+ }
25741
+
25742
+ /**
25743
+ * @beta
25744
+ * Manages callbacks that are connected to when the time of a
25745
+ * {@link WorldClock} hits a {@link TimeMarker}.
25746
+ */
25747
+ export class WorldClockOnTimeMarkerAfterEventSignal {
25748
+ private constructor();
25749
+ /**
25750
+ * @remarks
25751
+ * Adds a callback that will be called when a world clock's
25752
+ * time hits a time marker.
25753
+ *
25754
+ * @privilege no-restricted-execution - This function can't be called in restricted-execution mode.
25755
+ *
25756
+ * @privilege early-execution-allowed - This function can be called in early-execution mode.
25757
+ *
25758
+ */
25759
+ subscribe(
25760
+ callback: (arg0: WorldClockOnTimeMarkerAfterEvent) => void,
25761
+ options?: WorldClockTimeMarkerEventOptions,
25762
+ ): (arg0: WorldClockOnTimeMarkerAfterEvent) => void;
25763
+ /**
25764
+ * @remarks
25765
+ * Removes a callback from being called when a world clock's
25766
+ * time hits a time marker.
25767
+ *
25768
+ * @privilege no-restricted-execution - This function can't be called in restricted-execution mode.
25769
+ *
25770
+ * @privilege early-execution-allowed - This function can be called in early-execution mode.
25771
+ *
25772
+ */
25773
+ unsubscribe(callback: (arg0: WorldClockOnTimeMarkerAfterEvent) => void): void;
25774
+ }
25775
+
25776
+ /**
25777
+ * @beta
25778
+ * Contains information related to changes to the time of a
25779
+ * {@link WorldClock}.
25780
+ */
25781
+ export class WorldClockOnTimeModifiedAfterEvent {
25782
+ private constructor();
25783
+ /**
25784
+ * @remarks
25785
+ * The world clock that had its time modified.
25786
+ *
25787
+ */
25788
+ readonly clock: WorldClock;
25789
+ }
25790
+
25791
+ /**
25792
+ * @beta
25793
+ * Manages callbacks that are connected to changes to the time
25794
+ * of a {@link WorldClock}.
25795
+ */
25796
+ export class WorldClockOnTimeModifiedAfterEventSignal {
25797
+ private constructor();
25798
+ /**
25799
+ * @remarks
25800
+ * Adds a callback that will be called when a world clock's
25801
+ * time is modified.
25802
+ *
25803
+ * @privilege no-restricted-execution - This function can't be called in restricted-execution mode.
25804
+ *
25805
+ * @privilege early-execution-allowed - This function can be called in early-execution mode.
25806
+ *
25807
+ */
25808
+ subscribe(
25809
+ callback: (arg0: WorldClockOnTimeModifiedAfterEvent) => void,
25810
+ options?: WorldClockEventOptions,
25811
+ ): (arg0: WorldClockOnTimeModifiedAfterEvent) => void;
25812
+ /**
25813
+ * @remarks
25814
+ * Removes a callback from being called when a world clock's
25815
+ * time is modified.
25816
+ *
25817
+ * @privilege no-restricted-execution - This function can't be called in restricted-execution mode.
25818
+ *
25819
+ * @privilege early-execution-allowed - This function can be called in early-execution mode.
25820
+ *
25821
+ */
25822
+ unsubscribe(callback: (arg0: WorldClockOnTimeModifiedAfterEvent) => void): void;
25340
25823
  }
25341
25824
 
25342
25825
  /**
@@ -25358,6 +25841,9 @@ export class WorldClockRegistry {
25358
25841
  * The name that represents this world clock. Must have a
25359
25842
  * namespace and use only valid identifier characters. (e.g.,
25360
25843
  * 'mypack:my_clock').
25844
+ * @param registrationOptions
25845
+ * Additional options for registering a world clock, such as
25846
+ * including time markers at registration time.
25361
25847
  * @throws This function can throw errors.
25362
25848
  *
25363
25849
  * {@link WorldClockInvalidRegistryError}
@@ -25365,8 +25851,10 @@ export class WorldClockRegistry {
25365
25851
  * {@link WorldClockRegistrationError}
25366
25852
  *
25367
25853
  * {@link WorldClockReloadNewWorldClockError}
25854
+ *
25855
+ * {@link WorldClockReloadTimeMarkerError}
25368
25856
  */
25369
- registerClock(name: string): void;
25857
+ registerClock(name: string, registrationOptions?: WorldClockRegistrationOptions): void;
25370
25858
  }
25371
25859
 
25372
25860
  export class WorldLoadAfterEvent {
@@ -27679,7 +28167,7 @@ export interface PoiTagFilter {
27679
28167
  }
27680
28168
 
27681
28169
  /**
27682
- * @beta
28170
+ * @rc
27683
28171
  * Contains optional filters that control which primitive
27684
28172
  * shapes are returned from a primitive shapes query.
27685
28173
  */
@@ -28457,6 +28945,37 @@ export interface TickingAreaOptions {
28457
28945
  to: Vector3;
28458
28946
  }
28459
28947
 
28948
+ /**
28949
+ * @beta
28950
+ * Options for creating time markers for world clocks.
28951
+ */
28952
+ export interface TimeMarkerOptions {
28953
+ /**
28954
+ * @remarks
28955
+ * The name that the time marker will have. Must have a
28956
+ * namespace and use only valid identifier characters. (e.g.,
28957
+ * 'mypack:my_time_marker').
28958
+ *
28959
+ */
28960
+ name: string;
28961
+ /**
28962
+ * @remarks
28963
+ * The optional repeat period (in ticks) that the time marker
28964
+ * will have. If not specified, the time marker will only occur
28965
+ * once.
28966
+ *
28967
+ * Minimum Value: 0
28968
+ */
28969
+ period?: number;
28970
+ /**
28971
+ * @remarks
28972
+ * The time (in ticks) that the time marker will occur at.
28973
+ *
28974
+ * Minimum Value: 0
28975
+ */
28976
+ time: number;
28977
+ }
28978
+
28460
28979
  /**
28461
28980
  * Contains additional options for displaying a title and
28462
28981
  * optional subtitle.
@@ -28594,6 +29113,57 @@ export interface WaypointTextureSelector {
28594
29113
  textureBoundsList: WaypointTextureBounds[];
28595
29114
  }
28596
29115
 
29116
+ /**
29117
+ * @beta
29118
+ * Contains parameters for world clock events that filters out
29119
+ * which events are passed to the provided callback.
29120
+ */
29121
+ export interface WorldClockEventOptions {
29122
+ /**
29123
+ * @remarks
29124
+ * The name of the clock that this event should fire for.
29125
+ *
29126
+ */
29127
+ clock: string;
29128
+ }
29129
+
29130
+ /**
29131
+ * @beta
29132
+ * Contains additional options for registering world clocks.
29133
+ */
29134
+ export interface WorldClockRegistrationOptions {
29135
+ /**
29136
+ * @remarks
29137
+ * Set of options to include time markers during world clock
29138
+ * registration.
29139
+ *
29140
+ */
29141
+ timeMarkers?: TimeMarkerOptions[];
29142
+ }
29143
+
29144
+ /**
29145
+ * @beta
29146
+ * Contains parameters for world clock time marker events that
29147
+ * filters out which events are passed to the provided
29148
+ * callback.
29149
+ */
29150
+ export interface WorldClockTimeMarkerEventOptions {
29151
+ /**
29152
+ * @remarks
29153
+ * The name of the world clock that this event should fire for.
29154
+ *
29155
+ */
29156
+ clock: string;
29157
+ /**
29158
+ * @remarks
29159
+ * The name of the time marker that this event should fire for.
29160
+ * If undefined, the event will fire for all time markers on
29161
+ * the world clock.
29162
+ *
29163
+ */
29164
+ timeMarker?: string;
29165
+ }
29166
+
28597
29167
  /**
28598
29168
  * Contains additional options for a playSound occurrence.
28599
29169
  */
@@ -29063,6 +29633,16 @@ export class UnloadedChunksError extends Error {
29063
29633
  private constructor();
29064
29634
  }
29065
29635
 
29636
+ /**
29637
+ * @beta
29638
+ * Error thrown by {@link WorldClock.addTimeMarker} when
29639
+ * failing to add a time marker to a world clock.
29640
+ */
29641
+ // @ts-ignore Class inheritance allowed for native defined classes
29642
+ export class WorldClockAddTimeMarkerError extends Error {
29643
+ private constructor();
29644
+ }
29645
+
29066
29646
  /**
29067
29647
  * @beta
29068
29648
  * Thrown when trying to register a world clock outside of the
@@ -29073,6 +29653,17 @@ export class WorldClockInvalidRegistryError extends Error {
29073
29653
  private constructor();
29074
29654
  }
29075
29655
 
29656
+ /**
29657
+ * @beta
29658
+ * Error thrown when a time marker is invalid. This can occur
29659
+ * when trying to access data on a time marker that has been
29660
+ * removed.
29661
+ */
29662
+ // @ts-ignore Class inheritance allowed for native defined classes
29663
+ export class WorldClockInvalidTimeMarkerError extends Error {
29664
+ private constructor();
29665
+ }
29666
+
29076
29667
  /**
29077
29668
  * @beta
29078
29669
  * Error thrown when a world clock is not found in the world
@@ -29104,6 +29695,49 @@ export class WorldClockReloadNewWorldClockError extends Error {
29104
29695
  private constructor();
29105
29696
  }
29106
29697
 
29698
+ /**
29699
+ * @beta
29700
+ * Error thrown after using the /reload command when trying to
29701
+ * re-register an existing world clock with an invalid time
29702
+ * marker.
29703
+ */
29704
+ // @ts-ignore Class inheritance allowed for native defined classes
29705
+ export class WorldClockReloadTimeMarkerError extends Error {
29706
+ private constructor();
29707
+ }
29708
+
29709
+ /**
29710
+ * @beta
29711
+ * Error thrown by {@link WorldClock.removeTimeMarker} when
29712
+ * trying to remove a time marker with the 'minecraft'
29713
+ * namespace from a world clock.
29714
+ */
29715
+ // @ts-ignore Class inheritance allowed for native defined classes
29716
+ export class WorldClockRemoveMinecraftTimeMarkerError extends Error {
29717
+ private constructor();
29718
+ }
29719
+
29720
+ /**
29721
+ * @beta
29722
+ * Error thrown by {@link WorldClock.rewindTo} when the world
29723
+ * clock's time is already before the time marker's first
29724
+ * occurrence.
29725
+ */
29726
+ // @ts-ignore Class inheritance allowed for native defined classes
29727
+ export class WorldClockRewindError extends Error {
29728
+ private constructor();
29729
+ }
29730
+
29731
+ /**
29732
+ * @beta
29733
+ * Error thrown when performing actions on a world clock with a
29734
+ * time marker that does not exist.
29735
+ */
29736
+ // @ts-ignore Class inheritance allowed for native defined classes
29737
+ export class WorldClockTimeMarkerNotFoundError extends Error {
29738
+ private constructor();
29739
+ }
29740
+
29107
29741
  export const HudElementsCount = 13;
29108
29742
  export const HudVisibilityCount = 2;
29109
29743
  /**
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@minecraft/server",
3
- "version": "2.11.0-beta.1.26.50-preview.25",
3
+ "version": "2.11.0-beta.1.26.50-preview.26",
4
4
  "description": "",
5
5
  "contributors": [
6
6
  {
@@ -14,7 +14,7 @@
14
14
  ],
15
15
  "peerDependencies": {
16
16
  "@minecraft/common": "^1.2.0",
17
- "@minecraft/vanilla-data": ">=1.20.70 || 1.26.50-preview.25"
17
+ "@minecraft/vanilla-data": ">=1.20.70 || 1.26.50-preview.26"
18
18
  },
19
19
  "license": "MIT"
20
20
  }