@minecraft/server 2.11.0-rc.1.26.60-preview.28 → 2.11.0-rc.1.26.60-preview.29
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.
- package/index.d.ts +735 -0
- package/package.json +2 -2
package/index.d.ts
CHANGED
|
@@ -21214,6 +21214,13 @@ export class StartupEvent {
|
|
|
21214
21214
|
*
|
|
21215
21215
|
*/
|
|
21216
21216
|
readonly itemComponentRegistry: ItemComponentRegistry;
|
|
21217
|
+
/**
|
|
21218
|
+
* @rc
|
|
21219
|
+
* @remarks
|
|
21220
|
+
* @privilege early-execution-readable - This property can be read in early-execution mode.
|
|
21221
|
+
*
|
|
21222
|
+
*/
|
|
21223
|
+
readonly worldClockRegistry: WorldClockRegistry;
|
|
21217
21224
|
}
|
|
21218
21225
|
|
|
21219
21226
|
/**
|
|
@@ -22121,6 +22128,45 @@ export class TickingAreaManager {
|
|
|
22121
22128
|
removeTickingArea(identifier: string | TickingArea): void;
|
|
22122
22129
|
}
|
|
22123
22130
|
|
|
22131
|
+
/**
|
|
22132
|
+
* @rc
|
|
22133
|
+
* A named point in time on a world clock that can occur once
|
|
22134
|
+
* or periodically.
|
|
22135
|
+
*/
|
|
22136
|
+
export class TimeMarker {
|
|
22137
|
+
private constructor();
|
|
22138
|
+
/**
|
|
22139
|
+
* @remarks
|
|
22140
|
+
* The identifier that represents this time marker.
|
|
22141
|
+
*
|
|
22142
|
+
*/
|
|
22143
|
+
readonly name: string;
|
|
22144
|
+
/**
|
|
22145
|
+
* @remarks
|
|
22146
|
+
* The interval (in ticks) at which the time marker repeats. If
|
|
22147
|
+
* not specified, the time marker will only occur once.
|
|
22148
|
+
*
|
|
22149
|
+
* @throws
|
|
22150
|
+
* WorldClockInvalidTimeMarkerError: If the time marker is
|
|
22151
|
+
* invalid.
|
|
22152
|
+
*
|
|
22153
|
+
* {@link WorldClockInvalidTimeMarkerError}
|
|
22154
|
+
*/
|
|
22155
|
+
readonly period?: number;
|
|
22156
|
+
/**
|
|
22157
|
+
* @remarks
|
|
22158
|
+
* The time (in ticks) that the time marker occurs at on a
|
|
22159
|
+
* world clock.
|
|
22160
|
+
*
|
|
22161
|
+
* @throws
|
|
22162
|
+
* WorldClockInvalidTimeMarkerError: If the time marker is
|
|
22163
|
+
* invalid.
|
|
22164
|
+
*
|
|
22165
|
+
* {@link WorldClockInvalidTimeMarkerError}
|
|
22166
|
+
*/
|
|
22167
|
+
readonly time: number;
|
|
22168
|
+
}
|
|
22169
|
+
|
|
22124
22170
|
/**
|
|
22125
22171
|
* Represents a trigger for firing an event.
|
|
22126
22172
|
*/
|
|
@@ -22589,6 +22635,22 @@ export class World {
|
|
|
22589
22635
|
* {@link minecraftcommon.InvalidArgumentError}
|
|
22590
22636
|
*/
|
|
22591
22637
|
getAllPlayers(): Player[];
|
|
22638
|
+
/**
|
|
22639
|
+
* @rc
|
|
22640
|
+
* @remarks
|
|
22641
|
+
* Retrieves a world clock by its name.
|
|
22642
|
+
*
|
|
22643
|
+
* @param name
|
|
22644
|
+
* The name of the world clock to retrieve.
|
|
22645
|
+
* @returns
|
|
22646
|
+
* The {@link WorldClock} with the given name.
|
|
22647
|
+
* @throws
|
|
22648
|
+
* WorldClockNotFoundError: If the world clock with the given
|
|
22649
|
+
* name does not exist.
|
|
22650
|
+
*
|
|
22651
|
+
* {@link WorldClockNotFoundError}
|
|
22652
|
+
*/
|
|
22653
|
+
getClock(name: string): WorldClock;
|
|
22592
22654
|
/**
|
|
22593
22655
|
* @remarks
|
|
22594
22656
|
* Returns the current day.
|
|
@@ -23509,6 +23571,47 @@ export class WorldAfterEvents {
|
|
|
23509
23571
|
*
|
|
23510
23572
|
*/
|
|
23511
23573
|
readonly weatherChange: WeatherChangeAfterEventSignal;
|
|
23574
|
+
/**
|
|
23575
|
+
* @rc
|
|
23576
|
+
* @remarks
|
|
23577
|
+
* This event fires when a {@link WorldClock} is paused.
|
|
23578
|
+
*
|
|
23579
|
+
* @privilege early-execution-readable - This property can be read in early-execution mode.
|
|
23580
|
+
*
|
|
23581
|
+
*/
|
|
23582
|
+
readonly worldClockOnPaused: WorldClockOnPausedAfterEventSignal;
|
|
23583
|
+
/**
|
|
23584
|
+
* @rc
|
|
23585
|
+
* @remarks
|
|
23586
|
+
* This event fires when a {@link WorldClock} is resumed.
|
|
23587
|
+
*
|
|
23588
|
+
* @privilege early-execution-readable - This property can be read in early-execution mode.
|
|
23589
|
+
*
|
|
23590
|
+
*/
|
|
23591
|
+
readonly worldClockOnResumed: WorldClockOnResumedAfterEventSignal;
|
|
23592
|
+
/**
|
|
23593
|
+
* @rc
|
|
23594
|
+
* @remarks
|
|
23595
|
+
* This event fires when the time of a {@link WorldClock} hits
|
|
23596
|
+
* a {@link TimeMarker} on the clock. This can happen during a
|
|
23597
|
+
* regular level tick or when the time is set.
|
|
23598
|
+
*
|
|
23599
|
+
* @privilege early-execution-readable - This property can be read in early-execution mode.
|
|
23600
|
+
*
|
|
23601
|
+
*/
|
|
23602
|
+
readonly worldClockOnTimeMarker: WorldClockOnTimeMarkerAfterEventSignal;
|
|
23603
|
+
/**
|
|
23604
|
+
* @rc
|
|
23605
|
+
* @remarks
|
|
23606
|
+
* This event fires when a {@link WorldClock} time is changed.
|
|
23607
|
+
* This can happen when the time is directly set through
|
|
23608
|
+
* scripts or commands or when the clock reaches the maximum
|
|
23609
|
+
* time and restarts.
|
|
23610
|
+
*
|
|
23611
|
+
* @privilege early-execution-readable - This property can be read in early-execution mode.
|
|
23612
|
+
*
|
|
23613
|
+
*/
|
|
23614
|
+
readonly worldClockOnTimeModified: WorldClockOnTimeModifiedAfterEventSignal;
|
|
23512
23615
|
/**
|
|
23513
23616
|
* @remarks
|
|
23514
23617
|
* @privilege early-execution-readable - This property can be read in early-execution mode.
|
|
@@ -23633,6 +23736,451 @@ export class WorldBeforeEvents {
|
|
|
23633
23736
|
*
|
|
23634
23737
|
*/
|
|
23635
23738
|
readonly weatherChange: WeatherChangeBeforeEventSignal;
|
|
23739
|
+
/**
|
|
23740
|
+
* @rc
|
|
23741
|
+
* @remarks
|
|
23742
|
+
* This event fires when a {@link WorldClock} reaches its
|
|
23743
|
+
* maximum time and is about to restart.
|
|
23744
|
+
*
|
|
23745
|
+
* @privilege early-execution-readable - This property can be read in early-execution mode.
|
|
23746
|
+
*
|
|
23747
|
+
*/
|
|
23748
|
+
readonly worldClockOnRestart: WorldClockOnRestartBeforeEventSignal;
|
|
23749
|
+
}
|
|
23750
|
+
|
|
23751
|
+
/**
|
|
23752
|
+
* @rc
|
|
23753
|
+
* A class that represents a particular clock within a world.
|
|
23754
|
+
*/
|
|
23755
|
+
export class WorldClock {
|
|
23756
|
+
private constructor();
|
|
23757
|
+
/**
|
|
23758
|
+
* @remarks
|
|
23759
|
+
* Retrieves or sets whether the world clock is currently
|
|
23760
|
+
* paused.
|
|
23761
|
+
*
|
|
23762
|
+
* @privilege restricted-execution-read-only - This property can't be edited in restricted-execution mode.
|
|
23763
|
+
*
|
|
23764
|
+
*/
|
|
23765
|
+
isPaused: boolean;
|
|
23766
|
+
/**
|
|
23767
|
+
* @remarks
|
|
23768
|
+
* The identifier that represents this world clock.
|
|
23769
|
+
*
|
|
23770
|
+
*/
|
|
23771
|
+
readonly name: string;
|
|
23772
|
+
/**
|
|
23773
|
+
* @remarks
|
|
23774
|
+
* Retrieves or sets the current time (in ticks) of the world
|
|
23775
|
+
* clock.
|
|
23776
|
+
*
|
|
23777
|
+
* @privilege restricted-execution-read-only - This property can't be edited in restricted-execution mode.
|
|
23778
|
+
*
|
|
23779
|
+
* Minimum Value: 0
|
|
23780
|
+
*/
|
|
23781
|
+
time: number;
|
|
23782
|
+
/**
|
|
23783
|
+
* @remarks
|
|
23784
|
+
* Retrieves the current time markers of the world clock.
|
|
23785
|
+
*
|
|
23786
|
+
*/
|
|
23787
|
+
readonly timeMarkers: TimeMarker[];
|
|
23788
|
+
/**
|
|
23789
|
+
* @remarks
|
|
23790
|
+
* Adds a new time marker to the world clock.
|
|
23791
|
+
*
|
|
23792
|
+
* @privilege no-restricted-execution - This function can't be called in restricted-execution mode.
|
|
23793
|
+
*
|
|
23794
|
+
* @param timeMarkerOptions
|
|
23795
|
+
* Options for creating a time marker.
|
|
23796
|
+
* @throws This function can throw errors.
|
|
23797
|
+
*
|
|
23798
|
+
* {@link WorldClockAddTimeMarkerError}
|
|
23799
|
+
*/
|
|
23800
|
+
addTimeMarker(timeMarkerOptions: TimeMarkerOptions): void;
|
|
23801
|
+
/**
|
|
23802
|
+
* @remarks
|
|
23803
|
+
* Removes an existing time marker from the world clock.
|
|
23804
|
+
*
|
|
23805
|
+
* @privilege no-restricted-execution - This function can't be called in restricted-execution mode.
|
|
23806
|
+
*
|
|
23807
|
+
* @param timeMarker
|
|
23808
|
+
* The time marker or time marker name to remove.
|
|
23809
|
+
* @throws
|
|
23810
|
+
* WorldClockTimeMarkerNotFoundError: If the time marker does
|
|
23811
|
+
* not exist on the world clock.
|
|
23812
|
+
* WorldClockRemoveMinecraftTimeMarkerError: If the time marker
|
|
23813
|
+
* uses the 'minecraft' namespace.
|
|
23814
|
+
*
|
|
23815
|
+
* {@link WorldClockRemoveMinecraftTimeMarkerError}
|
|
23816
|
+
*
|
|
23817
|
+
* {@link WorldClockTimeMarkerNotFoundError}
|
|
23818
|
+
*/
|
|
23819
|
+
removeTimeMarker(timeMarker: string | TimeMarker): void;
|
|
23820
|
+
/**
|
|
23821
|
+
* @remarks
|
|
23822
|
+
* Rewinds the world clock's time to the previous occurrence of
|
|
23823
|
+
* the specified time marker.
|
|
23824
|
+
*
|
|
23825
|
+
* @privilege no-restricted-execution - This function can't be called in restricted-execution mode.
|
|
23826
|
+
*
|
|
23827
|
+
* @param timeMarker
|
|
23828
|
+
* The time marker or time marker name to rewind the world
|
|
23829
|
+
* clock's time to.
|
|
23830
|
+
* @throws
|
|
23831
|
+
* WorldClockTimeMarkerNotFoundError: If the time marker does
|
|
23832
|
+
* not exist on the world clock.
|
|
23833
|
+
* WorldClockRewindError: If the world clock's current time is
|
|
23834
|
+
* before the time marker's first occurrence.
|
|
23835
|
+
*
|
|
23836
|
+
* {@link WorldClockRewindError}
|
|
23837
|
+
*
|
|
23838
|
+
* {@link WorldClockTimeMarkerNotFoundError}
|
|
23839
|
+
*/
|
|
23840
|
+
rewindTo(timeMarker: string | TimeMarker): void;
|
|
23841
|
+
/**
|
|
23842
|
+
* @remarks
|
|
23843
|
+
* Sets the world clock's time to the specified time marker.
|
|
23844
|
+
*
|
|
23845
|
+
* @privilege no-restricted-execution - This function can't be called in restricted-execution mode.
|
|
23846
|
+
*
|
|
23847
|
+
* @param timeMarker
|
|
23848
|
+
* The time marker or time marker name to set the world clock's
|
|
23849
|
+
* time to.
|
|
23850
|
+
* @throws
|
|
23851
|
+
* WorldClockTimeMarkerNotFoundError: If the time marker does
|
|
23852
|
+
* not exist on the world clock.
|
|
23853
|
+
*
|
|
23854
|
+
* {@link WorldClockTimeMarkerNotFoundError}
|
|
23855
|
+
*/
|
|
23856
|
+
set(timeMarker: string | TimeMarker): void;
|
|
23857
|
+
/**
|
|
23858
|
+
* @remarks
|
|
23859
|
+
* Skips the world clock's time to the next occurrence of the
|
|
23860
|
+
* specified time marker.
|
|
23861
|
+
* If the next occurrence overflows the world clock's time, the
|
|
23862
|
+
* time is reset to the first occurrence.
|
|
23863
|
+
*
|
|
23864
|
+
* @privilege no-restricted-execution - This function can't be called in restricted-execution mode.
|
|
23865
|
+
*
|
|
23866
|
+
* @param timeMarker
|
|
23867
|
+
* The time marker or time marker name to skip the world
|
|
23868
|
+
* clock's time to.
|
|
23869
|
+
* @throws
|
|
23870
|
+
* WorldClockTimeMarkerNotFoundError: If the time marker does
|
|
23871
|
+
* not exist on the world clock.
|
|
23872
|
+
*
|
|
23873
|
+
* {@link WorldClockTimeMarkerNotFoundError}
|
|
23874
|
+
*/
|
|
23875
|
+
skipTo(timeMarker: string | TimeMarker): void;
|
|
23876
|
+
}
|
|
23877
|
+
|
|
23878
|
+
/**
|
|
23879
|
+
* @rc
|
|
23880
|
+
* Contains information related to a {@link WorldClock} being
|
|
23881
|
+
* paused.
|
|
23882
|
+
*/
|
|
23883
|
+
export class WorldClockOnPausedAfterEvent {
|
|
23884
|
+
private constructor();
|
|
23885
|
+
/**
|
|
23886
|
+
* @remarks
|
|
23887
|
+
* The world clock that was paused.
|
|
23888
|
+
*
|
|
23889
|
+
*/
|
|
23890
|
+
readonly clock: WorldClock;
|
|
23891
|
+
}
|
|
23892
|
+
|
|
23893
|
+
/**
|
|
23894
|
+
* @rc
|
|
23895
|
+
* Manages callbacks that are connected to a {@link WorldClock}
|
|
23896
|
+
* being paused.
|
|
23897
|
+
*/
|
|
23898
|
+
export class WorldClockOnPausedAfterEventSignal {
|
|
23899
|
+
private constructor();
|
|
23900
|
+
/**
|
|
23901
|
+
* @remarks
|
|
23902
|
+
* Adds a callback that will be called when a world clock is
|
|
23903
|
+
* paused.
|
|
23904
|
+
*
|
|
23905
|
+
* @privilege no-restricted-execution - This function can't be called in restricted-execution mode.
|
|
23906
|
+
*
|
|
23907
|
+
* @privilege early-execution-allowed - This function can be called in early-execution mode.
|
|
23908
|
+
*
|
|
23909
|
+
*/
|
|
23910
|
+
subscribe(
|
|
23911
|
+
callback: (arg0: WorldClockOnPausedAfterEvent) => void,
|
|
23912
|
+
options?: WorldClockEventOptions,
|
|
23913
|
+
): (arg0: WorldClockOnPausedAfterEvent) => void;
|
|
23914
|
+
/**
|
|
23915
|
+
* @remarks
|
|
23916
|
+
* Removes a callback from being called when a world clock is
|
|
23917
|
+
* paused.
|
|
23918
|
+
*
|
|
23919
|
+
* @privilege no-restricted-execution - This function can't be called in restricted-execution mode.
|
|
23920
|
+
*
|
|
23921
|
+
* @privilege early-execution-allowed - This function can be called in early-execution mode.
|
|
23922
|
+
*
|
|
23923
|
+
*/
|
|
23924
|
+
unsubscribe(callback: (arg0: WorldClockOnPausedAfterEvent) => void): void;
|
|
23925
|
+
}
|
|
23926
|
+
|
|
23927
|
+
/**
|
|
23928
|
+
* @rc
|
|
23929
|
+
* Contains information related to a {@link WorldClock}
|
|
23930
|
+
* restarting.
|
|
23931
|
+
*/
|
|
23932
|
+
export class WorldClockOnRestartBeforeEvent {
|
|
23933
|
+
private constructor();
|
|
23934
|
+
/**
|
|
23935
|
+
* @remarks
|
|
23936
|
+
* If set to true, cancels the world clock restart event. This
|
|
23937
|
+
* will keep the world clock at the maximum time value and
|
|
23938
|
+
* prevent it from ticking forward.
|
|
23939
|
+
*
|
|
23940
|
+
*/
|
|
23941
|
+
cancel: boolean;
|
|
23942
|
+
/**
|
|
23943
|
+
* @remarks
|
|
23944
|
+
* The world clock that is restarting.
|
|
23945
|
+
*
|
|
23946
|
+
*/
|
|
23947
|
+
readonly clock: WorldClock;
|
|
23948
|
+
/**
|
|
23949
|
+
* @remarks
|
|
23950
|
+
* The time that the world clock will be set to after it
|
|
23951
|
+
* restarts. If not set, the world clock will be set to 0.
|
|
23952
|
+
*
|
|
23953
|
+
* Minimum Value: 0
|
|
23954
|
+
*/
|
|
23955
|
+
newTime: number;
|
|
23956
|
+
}
|
|
23957
|
+
|
|
23958
|
+
/**
|
|
23959
|
+
* @rc
|
|
23960
|
+
* Manages callbacks that are connected to a {@link WorldClock}
|
|
23961
|
+
* restarting.
|
|
23962
|
+
*/
|
|
23963
|
+
export class WorldClockOnRestartBeforeEventSignal {
|
|
23964
|
+
private constructor();
|
|
23965
|
+
/**
|
|
23966
|
+
* @remarks
|
|
23967
|
+
* Adds a callback that will be called when a world clock is
|
|
23968
|
+
* restarting.
|
|
23969
|
+
*
|
|
23970
|
+
* @privilege no-restricted-execution - This function can't be called in restricted-execution mode.
|
|
23971
|
+
*
|
|
23972
|
+
* @privilege early-execution-allowed - This function can be called in early-execution mode.
|
|
23973
|
+
*
|
|
23974
|
+
* @param callback
|
|
23975
|
+
* This closure is called with restricted-execution privilege.
|
|
23976
|
+
* @returns
|
|
23977
|
+
* Closure that is called with restricted-execution privilege.
|
|
23978
|
+
*/
|
|
23979
|
+
subscribe(
|
|
23980
|
+
callback: (arg0: WorldClockOnRestartBeforeEvent) => void,
|
|
23981
|
+
options?: WorldClockEventOptions,
|
|
23982
|
+
): (arg0: WorldClockOnRestartBeforeEvent) => void;
|
|
23983
|
+
/**
|
|
23984
|
+
* @remarks
|
|
23985
|
+
* Removes a callback from being called when a world clock is
|
|
23986
|
+
* restarting.
|
|
23987
|
+
*
|
|
23988
|
+
* @privilege no-restricted-execution - This function can't be called in restricted-execution mode.
|
|
23989
|
+
*
|
|
23990
|
+
* @privilege early-execution-allowed - This function can be called in early-execution mode.
|
|
23991
|
+
*
|
|
23992
|
+
* @param callback
|
|
23993
|
+
* This closure is called with restricted-execution privilege.
|
|
23994
|
+
*/
|
|
23995
|
+
unsubscribe(callback: (arg0: WorldClockOnRestartBeforeEvent) => void): void;
|
|
23996
|
+
}
|
|
23997
|
+
|
|
23998
|
+
/**
|
|
23999
|
+
* @rc
|
|
24000
|
+
* Contains information related to a {@link WorldClock} being
|
|
24001
|
+
* resumed.
|
|
24002
|
+
*/
|
|
24003
|
+
export class WorldClockOnResumedAfterEvent {
|
|
24004
|
+
private constructor();
|
|
24005
|
+
/**
|
|
24006
|
+
* @remarks
|
|
24007
|
+
* The world clock that was resumed.
|
|
24008
|
+
*
|
|
24009
|
+
*/
|
|
24010
|
+
readonly clock: WorldClock;
|
|
24011
|
+
}
|
|
24012
|
+
|
|
24013
|
+
/**
|
|
24014
|
+
* @rc
|
|
24015
|
+
* Manages callbacks that are connected to a {@link WorldClock}
|
|
24016
|
+
* being resumed.
|
|
24017
|
+
*/
|
|
24018
|
+
export class WorldClockOnResumedAfterEventSignal {
|
|
24019
|
+
private constructor();
|
|
24020
|
+
/**
|
|
24021
|
+
* @remarks
|
|
24022
|
+
* Adds a callback that will be called when a world clock is
|
|
24023
|
+
* resumed.
|
|
24024
|
+
*
|
|
24025
|
+
* @privilege no-restricted-execution - This function can't be called in restricted-execution mode.
|
|
24026
|
+
*
|
|
24027
|
+
* @privilege early-execution-allowed - This function can be called in early-execution mode.
|
|
24028
|
+
*
|
|
24029
|
+
*/
|
|
24030
|
+
subscribe(
|
|
24031
|
+
callback: (arg0: WorldClockOnResumedAfterEvent) => void,
|
|
24032
|
+
options?: WorldClockEventOptions,
|
|
24033
|
+
): (arg0: WorldClockOnResumedAfterEvent) => void;
|
|
24034
|
+
/**
|
|
24035
|
+
* @remarks
|
|
24036
|
+
* Removes a callback from being called when a world clock is
|
|
24037
|
+
* resumed.
|
|
24038
|
+
*
|
|
24039
|
+
* @privilege no-restricted-execution - This function can't be called in restricted-execution mode.
|
|
24040
|
+
*
|
|
24041
|
+
* @privilege early-execution-allowed - This function can be called in early-execution mode.
|
|
24042
|
+
*
|
|
24043
|
+
*/
|
|
24044
|
+
unsubscribe(callback: (arg0: WorldClockOnResumedAfterEvent) => void): void;
|
|
24045
|
+
}
|
|
24046
|
+
|
|
24047
|
+
/**
|
|
24048
|
+
* @rc
|
|
24049
|
+
* Contains information related to when the time of a
|
|
24050
|
+
* {@link WorldClock} hits a {@link TimeMarker}.
|
|
24051
|
+
*/
|
|
24052
|
+
export class WorldClockOnTimeMarkerAfterEvent {
|
|
24053
|
+
private constructor();
|
|
24054
|
+
/**
|
|
24055
|
+
* @remarks
|
|
24056
|
+
* The world clock that hit a time marker.
|
|
24057
|
+
*
|
|
24058
|
+
*/
|
|
24059
|
+
readonly clock: WorldClock;
|
|
24060
|
+
/**
|
|
24061
|
+
* @remarks
|
|
24062
|
+
* The time marker that was hit by the world clock.
|
|
24063
|
+
*
|
|
24064
|
+
*/
|
|
24065
|
+
readonly timeMarker: TimeMarker;
|
|
24066
|
+
}
|
|
24067
|
+
|
|
24068
|
+
/**
|
|
24069
|
+
* @rc
|
|
24070
|
+
* Manages callbacks that are connected to when the time of a
|
|
24071
|
+
* {@link WorldClock} hits a {@link TimeMarker}.
|
|
24072
|
+
*/
|
|
24073
|
+
export class WorldClockOnTimeMarkerAfterEventSignal {
|
|
24074
|
+
private constructor();
|
|
24075
|
+
/**
|
|
24076
|
+
* @remarks
|
|
24077
|
+
* Adds a callback that will be called when a world clock's
|
|
24078
|
+
* time hits a time marker.
|
|
24079
|
+
*
|
|
24080
|
+
* @privilege no-restricted-execution - This function can't be called in restricted-execution mode.
|
|
24081
|
+
*
|
|
24082
|
+
* @privilege early-execution-allowed - This function can be called in early-execution mode.
|
|
24083
|
+
*
|
|
24084
|
+
*/
|
|
24085
|
+
subscribe(
|
|
24086
|
+
callback: (arg0: WorldClockOnTimeMarkerAfterEvent) => void,
|
|
24087
|
+
options?: WorldClockTimeMarkerEventOptions,
|
|
24088
|
+
): (arg0: WorldClockOnTimeMarkerAfterEvent) => void;
|
|
24089
|
+
/**
|
|
24090
|
+
* @remarks
|
|
24091
|
+
* Removes a callback from being called when a world clock's
|
|
24092
|
+
* time hits a time marker.
|
|
24093
|
+
*
|
|
24094
|
+
* @privilege no-restricted-execution - This function can't be called in restricted-execution mode.
|
|
24095
|
+
*
|
|
24096
|
+
* @privilege early-execution-allowed - This function can be called in early-execution mode.
|
|
24097
|
+
*
|
|
24098
|
+
*/
|
|
24099
|
+
unsubscribe(callback: (arg0: WorldClockOnTimeMarkerAfterEvent) => void): void;
|
|
24100
|
+
}
|
|
24101
|
+
|
|
24102
|
+
/**
|
|
24103
|
+
* @rc
|
|
24104
|
+
* Contains information related to changes to the time of a
|
|
24105
|
+
* {@link WorldClock}.
|
|
24106
|
+
*/
|
|
24107
|
+
export class WorldClockOnTimeModifiedAfterEvent {
|
|
24108
|
+
private constructor();
|
|
24109
|
+
/**
|
|
24110
|
+
* @remarks
|
|
24111
|
+
* The world clock that had its time modified.
|
|
24112
|
+
*
|
|
24113
|
+
*/
|
|
24114
|
+
readonly clock: WorldClock;
|
|
24115
|
+
}
|
|
24116
|
+
|
|
24117
|
+
/**
|
|
24118
|
+
* @rc
|
|
24119
|
+
* Manages callbacks that are connected to changes to the time
|
|
24120
|
+
* of a {@link WorldClock}.
|
|
24121
|
+
*/
|
|
24122
|
+
export class WorldClockOnTimeModifiedAfterEventSignal {
|
|
24123
|
+
private constructor();
|
|
24124
|
+
/**
|
|
24125
|
+
* @remarks
|
|
24126
|
+
* Adds a callback that will be called when a world clock's
|
|
24127
|
+
* time is modified.
|
|
24128
|
+
*
|
|
24129
|
+
* @privilege no-restricted-execution - This function can't be called in restricted-execution mode.
|
|
24130
|
+
*
|
|
24131
|
+
* @privilege early-execution-allowed - This function can be called in early-execution mode.
|
|
24132
|
+
*
|
|
24133
|
+
*/
|
|
24134
|
+
subscribe(
|
|
24135
|
+
callback: (arg0: WorldClockOnTimeModifiedAfterEvent) => void,
|
|
24136
|
+
options?: WorldClockEventOptions,
|
|
24137
|
+
): (arg0: WorldClockOnTimeModifiedAfterEvent) => void;
|
|
24138
|
+
/**
|
|
24139
|
+
* @remarks
|
|
24140
|
+
* Removes a callback from being called when a world clock's
|
|
24141
|
+
* time is modified.
|
|
24142
|
+
*
|
|
24143
|
+
* @privilege no-restricted-execution - This function can't be called in restricted-execution mode.
|
|
24144
|
+
*
|
|
24145
|
+
* @privilege early-execution-allowed - This function can be called in early-execution mode.
|
|
24146
|
+
*
|
|
24147
|
+
*/
|
|
24148
|
+
unsubscribe(callback: (arg0: WorldClockOnTimeModifiedAfterEvent) => void): void;
|
|
24149
|
+
}
|
|
24150
|
+
|
|
24151
|
+
/**
|
|
24152
|
+
* @rc
|
|
24153
|
+
* Provides the functionality for registering custom world
|
|
24154
|
+
* clocks. World clocks can only be registered during the
|
|
24155
|
+
* system startup event.
|
|
24156
|
+
*/
|
|
24157
|
+
export class WorldClockRegistry {
|
|
24158
|
+
private constructor();
|
|
24159
|
+
/**
|
|
24160
|
+
* @remarks
|
|
24161
|
+
* Registers a new custom world clock. Must be called during
|
|
24162
|
+
* the system startup event.
|
|
24163
|
+
*
|
|
24164
|
+
* @privilege early-execution-allowed - This function can be called in early-execution mode.
|
|
24165
|
+
*
|
|
24166
|
+
* @param name
|
|
24167
|
+
* The name that represents this world clock. Must have a
|
|
24168
|
+
* namespace and use only valid identifier characters. (e.g.,
|
|
24169
|
+
* 'mypack:my_clock').
|
|
24170
|
+
* @param registrationOptions
|
|
24171
|
+
* Additional options for registering a world clock, such as
|
|
24172
|
+
* including time markers at registration time.
|
|
24173
|
+
* @throws This function can throw errors.
|
|
24174
|
+
*
|
|
24175
|
+
* {@link WorldClockInvalidRegistryError}
|
|
24176
|
+
*
|
|
24177
|
+
* {@link WorldClockRegistrationError}
|
|
24178
|
+
*
|
|
24179
|
+
* {@link WorldClockReloadNewWorldClockError}
|
|
24180
|
+
*
|
|
24181
|
+
* {@link WorldClockReloadTimeMarkerError}
|
|
24182
|
+
*/
|
|
24183
|
+
registerClock(name: string, registrationOptions?: WorldClockRegistrationOptions): void;
|
|
23636
24184
|
}
|
|
23637
24185
|
|
|
23638
24186
|
export class WorldLoadAfterEvent {
|
|
@@ -26646,6 +27194,37 @@ export interface TickingAreaOptions {
|
|
|
26646
27194
|
to: Vector3;
|
|
26647
27195
|
}
|
|
26648
27196
|
|
|
27197
|
+
/**
|
|
27198
|
+
* @rc
|
|
27199
|
+
* Options for creating time markers for world clocks.
|
|
27200
|
+
*/
|
|
27201
|
+
export interface TimeMarkerOptions {
|
|
27202
|
+
/**
|
|
27203
|
+
* @remarks
|
|
27204
|
+
* The name that the time marker will have. Must have a
|
|
27205
|
+
* namespace and use only valid identifier characters. (e.g.,
|
|
27206
|
+
* 'mypack:my_time_marker').
|
|
27207
|
+
*
|
|
27208
|
+
*/
|
|
27209
|
+
name: string;
|
|
27210
|
+
/**
|
|
27211
|
+
* @remarks
|
|
27212
|
+
* The optional repeat period (in ticks) that the time marker
|
|
27213
|
+
* will have. If not specified, the time marker will only occur
|
|
27214
|
+
* once.
|
|
27215
|
+
*
|
|
27216
|
+
* Minimum Value: 0
|
|
27217
|
+
*/
|
|
27218
|
+
period?: number;
|
|
27219
|
+
/**
|
|
27220
|
+
* @remarks
|
|
27221
|
+
* The time (in ticks) that the time marker will occur at.
|
|
27222
|
+
*
|
|
27223
|
+
* Minimum Value: 0
|
|
27224
|
+
*/
|
|
27225
|
+
time: number;
|
|
27226
|
+
}
|
|
27227
|
+
|
|
26649
27228
|
/**
|
|
26650
27229
|
* Contains additional options for displaying a title and
|
|
26651
27230
|
* optional subtitle.
|
|
@@ -26783,6 +27362,57 @@ export interface WaypointTextureSelector {
|
|
|
26783
27362
|
textureBoundsList: WaypointTextureBounds[];
|
|
26784
27363
|
}
|
|
26785
27364
|
|
|
27365
|
+
/**
|
|
27366
|
+
* @rc
|
|
27367
|
+
* Contains parameters for world clock events that filters out
|
|
27368
|
+
* which events are passed to the provided callback.
|
|
27369
|
+
*/
|
|
27370
|
+
export interface WorldClockEventOptions {
|
|
27371
|
+
/**
|
|
27372
|
+
* @remarks
|
|
27373
|
+
* The name of the clock that this event should fire for.
|
|
27374
|
+
*
|
|
27375
|
+
*/
|
|
27376
|
+
clock: string;
|
|
27377
|
+
}
|
|
27378
|
+
|
|
27379
|
+
/**
|
|
27380
|
+
* @rc
|
|
27381
|
+
* Contains additional options for registering world clocks.
|
|
27382
|
+
*/
|
|
27383
|
+
export interface WorldClockRegistrationOptions {
|
|
27384
|
+
/**
|
|
27385
|
+
* @remarks
|
|
27386
|
+
* Set of options to include time markers during world clock
|
|
27387
|
+
* registration.
|
|
27388
|
+
*
|
|
27389
|
+
*/
|
|
27390
|
+
timeMarkers?: TimeMarkerOptions[];
|
|
27391
|
+
}
|
|
27392
|
+
|
|
27393
|
+
/**
|
|
27394
|
+
* @rc
|
|
27395
|
+
* Contains parameters for world clock time marker events that
|
|
27396
|
+
* filters out which events are passed to the provided
|
|
27397
|
+
* callback.
|
|
27398
|
+
*/
|
|
27399
|
+
export interface WorldClockTimeMarkerEventOptions {
|
|
27400
|
+
/**
|
|
27401
|
+
* @remarks
|
|
27402
|
+
* The name of the world clock that this event should fire for.
|
|
27403
|
+
*
|
|
27404
|
+
*/
|
|
27405
|
+
clock: string;
|
|
27406
|
+
/**
|
|
27407
|
+
* @remarks
|
|
27408
|
+
* The name of the time marker that this event should fire for.
|
|
27409
|
+
* If undefined, the event will fire for all time markers on
|
|
27410
|
+
* the world clock.
|
|
27411
|
+
*
|
|
27412
|
+
*/
|
|
27413
|
+
timeMarker?: string;
|
|
27414
|
+
}
|
|
27415
|
+
|
|
26786
27416
|
/**
|
|
26787
27417
|
* Contains additional options for a playSound occurrence.
|
|
26788
27418
|
*/
|
|
@@ -27248,6 +27878,111 @@ export class UnloadedChunksError extends Error {
|
|
|
27248
27878
|
private constructor();
|
|
27249
27879
|
}
|
|
27250
27880
|
|
|
27881
|
+
/**
|
|
27882
|
+
* @rc
|
|
27883
|
+
* Error thrown by {@link WorldClock.addTimeMarker} when
|
|
27884
|
+
* failing to add a time marker to a world clock.
|
|
27885
|
+
*/
|
|
27886
|
+
// @ts-ignore Class inheritance allowed for native defined classes
|
|
27887
|
+
export class WorldClockAddTimeMarkerError extends Error {
|
|
27888
|
+
private constructor();
|
|
27889
|
+
}
|
|
27890
|
+
|
|
27891
|
+
/**
|
|
27892
|
+
* @rc
|
|
27893
|
+
* Thrown when trying to register a world clock outside of the
|
|
27894
|
+
* system startup event.
|
|
27895
|
+
*/
|
|
27896
|
+
// @ts-ignore Class inheritance allowed for native defined classes
|
|
27897
|
+
export class WorldClockInvalidRegistryError extends Error {
|
|
27898
|
+
private constructor();
|
|
27899
|
+
}
|
|
27900
|
+
|
|
27901
|
+
/**
|
|
27902
|
+
* @rc
|
|
27903
|
+
* Error thrown when a time marker is invalid. This can occur
|
|
27904
|
+
* when trying to access data on a time marker that has been
|
|
27905
|
+
* removed.
|
|
27906
|
+
*/
|
|
27907
|
+
// @ts-ignore Class inheritance allowed for native defined classes
|
|
27908
|
+
export class WorldClockInvalidTimeMarkerError extends Error {
|
|
27909
|
+
private constructor();
|
|
27910
|
+
}
|
|
27911
|
+
|
|
27912
|
+
/**
|
|
27913
|
+
* @rc
|
|
27914
|
+
* Error thrown when a world clock is not found in the world
|
|
27915
|
+
* clock registry.
|
|
27916
|
+
*/
|
|
27917
|
+
// @ts-ignore Class inheritance allowed for native defined classes
|
|
27918
|
+
export class WorldClockNotFoundError extends Error {
|
|
27919
|
+
private constructor();
|
|
27920
|
+
}
|
|
27921
|
+
|
|
27922
|
+
/**
|
|
27923
|
+
* @rc
|
|
27924
|
+
* Error thrown by {@link WorldClockRegistry.registerClock}
|
|
27925
|
+
* when failing to register a world clock.
|
|
27926
|
+
*/
|
|
27927
|
+
// @ts-ignore Class inheritance allowed for native defined classes
|
|
27928
|
+
export class WorldClockRegistrationError extends Error {
|
|
27929
|
+
private constructor();
|
|
27930
|
+
}
|
|
27931
|
+
|
|
27932
|
+
/**
|
|
27933
|
+
* @rc
|
|
27934
|
+
* Thrown after using the /reload command when trying to
|
|
27935
|
+
* register a world clock that was not previously registered.
|
|
27936
|
+
* New world clocks cannot be added during a reload.
|
|
27937
|
+
*/
|
|
27938
|
+
// @ts-ignore Class inheritance allowed for native defined classes
|
|
27939
|
+
export class WorldClockReloadNewWorldClockError extends Error {
|
|
27940
|
+
private constructor();
|
|
27941
|
+
}
|
|
27942
|
+
|
|
27943
|
+
/**
|
|
27944
|
+
* @rc
|
|
27945
|
+
* Error thrown after using the /reload command when trying to
|
|
27946
|
+
* re-register an existing world clock with an invalid time
|
|
27947
|
+
* marker.
|
|
27948
|
+
*/
|
|
27949
|
+
// @ts-ignore Class inheritance allowed for native defined classes
|
|
27950
|
+
export class WorldClockReloadTimeMarkerError extends Error {
|
|
27951
|
+
private constructor();
|
|
27952
|
+
}
|
|
27953
|
+
|
|
27954
|
+
/**
|
|
27955
|
+
* @rc
|
|
27956
|
+
* Error thrown by {@link WorldClock.removeTimeMarker} when
|
|
27957
|
+
* trying to remove a time marker with the 'minecraft'
|
|
27958
|
+
* namespace from a world clock.
|
|
27959
|
+
*/
|
|
27960
|
+
// @ts-ignore Class inheritance allowed for native defined classes
|
|
27961
|
+
export class WorldClockRemoveMinecraftTimeMarkerError extends Error {
|
|
27962
|
+
private constructor();
|
|
27963
|
+
}
|
|
27964
|
+
|
|
27965
|
+
/**
|
|
27966
|
+
* @rc
|
|
27967
|
+
* Error thrown by {@link WorldClock.rewindTo} when the world
|
|
27968
|
+
* clock's time is already before the time marker's first
|
|
27969
|
+
* occurrence.
|
|
27970
|
+
*/
|
|
27971
|
+
// @ts-ignore Class inheritance allowed for native defined classes
|
|
27972
|
+
export class WorldClockRewindError extends Error {
|
|
27973
|
+
private constructor();
|
|
27974
|
+
}
|
|
27975
|
+
|
|
27976
|
+
/**
|
|
27977
|
+
* @rc
|
|
27978
|
+
* Error thrown when performing actions on a world clock with a
|
|
27979
|
+
* time marker that does not exist.
|
|
27980
|
+
*/
|
|
27981
|
+
// @ts-ignore Class inheritance allowed for native defined classes
|
|
27982
|
+
export class WorldClockTimeMarkerNotFoundError extends Error {
|
|
27983
|
+
private constructor();
|
|
27984
|
+
}
|
|
27985
|
+
|
|
27251
27986
|
export const HudElementsCount = 13;
|
|
27252
27987
|
export const HudVisibilityCount = 2;
|
|
27253
27988
|
/**
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@minecraft/server",
|
|
3
|
-
"version": "2.11.0-rc.1.26.60-preview.
|
|
3
|
+
"version": "2.11.0-rc.1.26.60-preview.29",
|
|
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.60-preview.
|
|
17
|
+
"@minecraft/vanilla-data": ">=1.20.70 || 1.26.60-preview.29"
|
|
18
18
|
},
|
|
19
19
|
"license": "MIT"
|
|
20
20
|
}
|