@minecraft/server 2.11.0-beta.1.26.50-preview.24 → 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.
- package/index.d.ts +1048 -14
- package/package.json +2 -2
package/index.d.ts
CHANGED
|
@@ -221,7 +221,7 @@ export enum CameraShakeType {
|
|
|
221
221
|
}
|
|
222
222
|
|
|
223
223
|
/**
|
|
224
|
-
* @
|
|
224
|
+
* @rc
|
|
225
225
|
* An enumeration for the clone modes used when cloning blocks.
|
|
226
226
|
*/
|
|
227
227
|
export enum CloneMode {
|
|
@@ -2736,6 +2736,34 @@ export enum PlayerWaypointsMode {
|
|
|
2736
2736
|
Off = 'Off',
|
|
2737
2737
|
}
|
|
2738
2738
|
|
|
2739
|
+
/**
|
|
2740
|
+
* @beta
|
|
2741
|
+
* Specifies how a block point-of-interest query filters
|
|
2742
|
+
* instances by ticket occupancy.
|
|
2743
|
+
*/
|
|
2744
|
+
export enum PoiBlockOccupancyFilter {
|
|
2745
|
+
/**
|
|
2746
|
+
* @remarks
|
|
2747
|
+
* Includes POI instances regardless of their occupancy or
|
|
2748
|
+
* available ticket count.
|
|
2749
|
+
*
|
|
2750
|
+
*/
|
|
2751
|
+
Any = 'Any',
|
|
2752
|
+
/**
|
|
2753
|
+
* @remarks
|
|
2754
|
+
* Includes POI instances with no available tickets.
|
|
2755
|
+
*
|
|
2756
|
+
*/
|
|
2757
|
+
Full = 'Full',
|
|
2758
|
+
/**
|
|
2759
|
+
* @remarks
|
|
2760
|
+
* Includes POI instances with at least one ticket available to
|
|
2761
|
+
* be claimed.
|
|
2762
|
+
*
|
|
2763
|
+
*/
|
|
2764
|
+
HasVacancy = 'HasVacancy',
|
|
2765
|
+
}
|
|
2766
|
+
|
|
2739
2767
|
/**
|
|
2740
2768
|
* Contains objectives and participants for the scoreboard.
|
|
2741
2769
|
*/
|
|
@@ -8098,6 +8126,15 @@ export class Dimension {
|
|
|
8098
8126
|
*
|
|
8099
8127
|
*/
|
|
8100
8128
|
readonly localizationKey: string;
|
|
8129
|
+
/**
|
|
8130
|
+
* @beta
|
|
8131
|
+
* @remarks
|
|
8132
|
+
* Provides access to point-of-interest (POI) managers for this
|
|
8133
|
+
* dimension. This property is available only when the POI
|
|
8134
|
+
* experiment is enabled.
|
|
8135
|
+
*
|
|
8136
|
+
*/
|
|
8137
|
+
readonly poiManager: PoiManager;
|
|
8101
8138
|
/**
|
|
8102
8139
|
* @remarks
|
|
8103
8140
|
* Calculates the location of the closest biome of a particular
|
|
@@ -8130,7 +8167,7 @@ export class Dimension {
|
|
|
8130
8167
|
options?: BiomeSearchOptions,
|
|
8131
8168
|
): Vector3 | undefined;
|
|
8132
8169
|
/**
|
|
8133
|
-
* @
|
|
8170
|
+
* @rc
|
|
8134
8171
|
* @remarks
|
|
8135
8172
|
* Clones a region of blocks from one area of the dimension to
|
|
8136
8173
|
* another.
|
|
@@ -9081,7 +9118,9 @@ export class DimensionTypes {
|
|
|
9081
9118
|
/**
|
|
9082
9119
|
* @remarks
|
|
9083
9120
|
* Retrieves a dimension type using a string-based identifier.
|
|
9084
|
-
*
|
|
9121
|
+
* Works with both vanilla dimensions and custom dimensions.
|
|
9122
|
+
* Custom dimensions cannot be retrieved until after the system
|
|
9123
|
+
* startup event has completed.
|
|
9085
9124
|
*
|
|
9086
9125
|
* @privilege early-execution-allowed - This function can be called in early-execution mode.
|
|
9087
9126
|
*
|
|
@@ -9089,8 +9128,10 @@ export class DimensionTypes {
|
|
|
9089
9128
|
static get(dimensionTypeId: string): DimensionType | undefined;
|
|
9090
9129
|
/**
|
|
9091
9130
|
* @remarks
|
|
9092
|
-
* Retrieves an array of all dimension types.
|
|
9093
|
-
*
|
|
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.
|
|
9094
9135
|
*
|
|
9095
9136
|
* @privilege early-execution-allowed - This function can be called in early-execution mode.
|
|
9096
9137
|
*
|
|
@@ -12114,6 +12155,28 @@ export class EntityIsStunnedComponent extends EntityComponent {
|
|
|
12114
12155
|
// @ts-ignore Class inheritance allowed for native defined classes
|
|
12115
12156
|
export class EntityIsTamedComponent extends EntityComponent {
|
|
12116
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;
|
|
12117
12180
|
static readonly componentId = 'minecraft:is_tamed';
|
|
12118
12181
|
}
|
|
12119
12182
|
|
|
@@ -17717,7 +17780,7 @@ export class PackSettingChangeAfterEvent {
|
|
|
17717
17780
|
* The value of the setting.
|
|
17718
17781
|
*
|
|
17719
17782
|
*/
|
|
17720
|
-
readonly settingValue: boolean | number | string;
|
|
17783
|
+
readonly settingValue: string[] | boolean | number | string;
|
|
17721
17784
|
}
|
|
17722
17785
|
|
|
17723
17786
|
/**
|
|
@@ -20360,6 +20423,315 @@ export class PlayerWaypoint extends EntityWaypoint {
|
|
|
20360
20423
|
);
|
|
20361
20424
|
}
|
|
20362
20425
|
|
|
20426
|
+
/**
|
|
20427
|
+
* @beta
|
|
20428
|
+
* Describes a block point-of-interest instance returned by a
|
|
20429
|
+
* query.
|
|
20430
|
+
*
|
|
20431
|
+
* Required Experiments:
|
|
20432
|
+
* - Poi
|
|
20433
|
+
*
|
|
20434
|
+
*/
|
|
20435
|
+
export class PoiBlockInstance {
|
|
20436
|
+
private constructor();
|
|
20437
|
+
/**
|
|
20438
|
+
* @remarks
|
|
20439
|
+
* Block position of this POI instance.
|
|
20440
|
+
*
|
|
20441
|
+
*/
|
|
20442
|
+
readonly position: Vector3;
|
|
20443
|
+
/**
|
|
20444
|
+
* @remarks
|
|
20445
|
+
* Number of tickets currently available to be claimed from
|
|
20446
|
+
* this POI instance.
|
|
20447
|
+
*
|
|
20448
|
+
*/
|
|
20449
|
+
readonly tickets: number;
|
|
20450
|
+
/**
|
|
20451
|
+
* @remarks
|
|
20452
|
+
* Type of this POI instance.
|
|
20453
|
+
*
|
|
20454
|
+
*/
|
|
20455
|
+
readonly 'type': PoiBlockType;
|
|
20456
|
+
}
|
|
20457
|
+
|
|
20458
|
+
/**
|
|
20459
|
+
* @beta
|
|
20460
|
+
* Provides methods for querying and managing block-based
|
|
20461
|
+
* points of interest in a dimension.
|
|
20462
|
+
*
|
|
20463
|
+
* Required Experiments:
|
|
20464
|
+
* - Poi
|
|
20465
|
+
*
|
|
20466
|
+
*/
|
|
20467
|
+
export class PoiBlockManager {
|
|
20468
|
+
private constructor();
|
|
20469
|
+
/**
|
|
20470
|
+
* @remarks
|
|
20471
|
+
* Adds a block point of interest at a position. This method is
|
|
20472
|
+
* intended for temporary usage. Will be replaced when chunk is
|
|
20473
|
+
* reloaded
|
|
20474
|
+
*
|
|
20475
|
+
* @privilege no-restricted-execution - This function can't be called in restricted-execution mode.
|
|
20476
|
+
*
|
|
20477
|
+
* @param position
|
|
20478
|
+
* Block position at which to add the POI.
|
|
20479
|
+
* @param poi
|
|
20480
|
+
* POI type to add, specified by numeric type Id, type name, or
|
|
20481
|
+
* POI type object.
|
|
20482
|
+
*/
|
|
20483
|
+
addTemporary(position: Vector3, poi: PoiBlockType | string | number): void;
|
|
20484
|
+
/**
|
|
20485
|
+
* @remarks
|
|
20486
|
+
* Gets the type of the block point of interest at a position.
|
|
20487
|
+
*
|
|
20488
|
+
* @privilege no-restricted-execution - This function can't be called in restricted-execution mode.
|
|
20489
|
+
*
|
|
20490
|
+
* @param position
|
|
20491
|
+
* Block position to inspect.
|
|
20492
|
+
* @returns
|
|
20493
|
+
* The POI type at the position, or undefined if no POI exists
|
|
20494
|
+
* there.
|
|
20495
|
+
*/
|
|
20496
|
+
at(position: Vector3): PoiBlockType | undefined;
|
|
20497
|
+
/**
|
|
20498
|
+
* @remarks
|
|
20499
|
+
* Tests whether a block point of interest at a position
|
|
20500
|
+
* matches a type filter.
|
|
20501
|
+
*
|
|
20502
|
+
* @privilege no-restricted-execution - This function can't be called in restricted-execution mode.
|
|
20503
|
+
*
|
|
20504
|
+
* @param position
|
|
20505
|
+
* Block position to inspect.
|
|
20506
|
+
* @param filter
|
|
20507
|
+
* Filter used to select the POI type. A callback receives the
|
|
20508
|
+
* POI type and returns whether it matches; a name filter
|
|
20509
|
+
* matches a type name; and a tag filter requires all specified
|
|
20510
|
+
* tags.
|
|
20511
|
+
* @returns
|
|
20512
|
+
* True if a POI exists at the position and its type matches
|
|
20513
|
+
* the filter; otherwise false.
|
|
20514
|
+
*/
|
|
20515
|
+
exists(position: Vector3, filter: ((arg0: PoiBlockType) => boolean) | PoiNameFilter | PoiTagFilter): boolean;
|
|
20516
|
+
/**
|
|
20517
|
+
* @remarks
|
|
20518
|
+
* Returns block points of interest that match the supplied
|
|
20519
|
+
* type and occupancy filters within the specified distance of
|
|
20520
|
+
* a location.
|
|
20521
|
+
*
|
|
20522
|
+
* @privilege no-restricted-execution - This function can't be called in restricted-execution mode.
|
|
20523
|
+
*
|
|
20524
|
+
* @param filter
|
|
20525
|
+
* Filter used to select POI types. A callback receives each
|
|
20526
|
+
* POI type and returns whether it should be included; a name
|
|
20527
|
+
* filter matches a type name; and a tag filter requires all
|
|
20528
|
+
* specified tags.
|
|
20529
|
+
* @param center
|
|
20530
|
+
* Center of the search.
|
|
20531
|
+
* @param blockRadius
|
|
20532
|
+
* Maximum three-dimensional distance from the center, in
|
|
20533
|
+
* blocks.
|
|
20534
|
+
* @param occupancyFilter
|
|
20535
|
+
* Optional filter applied to the occupancy state of matching
|
|
20536
|
+
* POIs. If omitted, POIs in any occupancy state are returned.
|
|
20537
|
+
* @returns
|
|
20538
|
+
* The matching POI instances within range. The result order is
|
|
20539
|
+
* not guaranteed.
|
|
20540
|
+
*/
|
|
20541
|
+
getInRange(
|
|
20542
|
+
filter: ((arg0: PoiBlockType) => boolean) | PoiNameFilter | PoiTagFilter,
|
|
20543
|
+
center: Vector3,
|
|
20544
|
+
blockRadius: number,
|
|
20545
|
+
occupancyFilter?: PoiBlockOccupancyFilter,
|
|
20546
|
+
): PoiBlockInstance[];
|
|
20547
|
+
/**
|
|
20548
|
+
* @remarks
|
|
20549
|
+
* Returns block points of interest that match the supplied
|
|
20550
|
+
* type and occupancy filters within an axis-aligned square
|
|
20551
|
+
* centered on the specified location, sorted from nearest to
|
|
20552
|
+
* farthest.
|
|
20553
|
+
*
|
|
20554
|
+
* @privilege no-restricted-execution - This function can't be called in restricted-execution mode.
|
|
20555
|
+
*
|
|
20556
|
+
* @param filter
|
|
20557
|
+
* Filter used to select POI types. A callback receives each
|
|
20558
|
+
* POI type and returns whether it should be included; a name
|
|
20559
|
+
* filter matches a type name; and a tag filter requires all
|
|
20560
|
+
* specified tags.
|
|
20561
|
+
* @param center
|
|
20562
|
+
* Center of the search and the location from which distances
|
|
20563
|
+
* are calculated.
|
|
20564
|
+
* @param blockRadius
|
|
20565
|
+
* Maximum three-dimensional distance from the center, in
|
|
20566
|
+
* blocks.
|
|
20567
|
+
* @param occupancyFilter
|
|
20568
|
+
* Optional filter applied to the occupancy state of matching
|
|
20569
|
+
* POIs. If omitted, POIs in any occupancy state are returned.
|
|
20570
|
+
* @returns
|
|
20571
|
+
* The matching POI instances and their squared distances from
|
|
20572
|
+
* the center, sorted in ascending distance order.
|
|
20573
|
+
*/
|
|
20574
|
+
getInRangeSorted(
|
|
20575
|
+
filter: ((arg0: PoiBlockType) => boolean) | PoiNameFilter | PoiTagFilter,
|
|
20576
|
+
center: Vector3,
|
|
20577
|
+
blockRadius: number,
|
|
20578
|
+
occupancyFilter?: PoiBlockOccupancyFilter,
|
|
20579
|
+
): PoiDistancePair[];
|
|
20580
|
+
/**
|
|
20581
|
+
* @remarks
|
|
20582
|
+
* Returns block points of interest that match the supplied
|
|
20583
|
+
* type and occupancy filters within an axis-aligned square
|
|
20584
|
+
* centered on the specified location.
|
|
20585
|
+
*
|
|
20586
|
+
* @privilege no-restricted-execution - This function can't be called in restricted-execution mode.
|
|
20587
|
+
*
|
|
20588
|
+
* @param filter
|
|
20589
|
+
* Filter used to select POI types. A callback receives each
|
|
20590
|
+
* POI type and returns whether it should be included; a name
|
|
20591
|
+
* filter matches a type name; and a tag filter requires all
|
|
20592
|
+
* specified tags.
|
|
20593
|
+
* @param center
|
|
20594
|
+
* Center of the search volume.
|
|
20595
|
+
* @param blockRadius
|
|
20596
|
+
* Half-size of the search volume, in blocks, along each axis.
|
|
20597
|
+
* @param occupancyFilter
|
|
20598
|
+
* Optional filter applied to the occupancy state of matching
|
|
20599
|
+
* POIs. If omitted, POIs in any occupancy state are returned.
|
|
20600
|
+
* @returns
|
|
20601
|
+
* The matching POI instances in the search volume.
|
|
20602
|
+
*/
|
|
20603
|
+
getInSquare(
|
|
20604
|
+
filter: ((arg0: PoiBlockType) => boolean) | PoiNameFilter | PoiTagFilter,
|
|
20605
|
+
center: Vector3,
|
|
20606
|
+
blockRadius: number,
|
|
20607
|
+
occupancyFilter?: PoiBlockOccupancyFilter,
|
|
20608
|
+
): PoiBlockInstance[];
|
|
20609
|
+
/**
|
|
20610
|
+
* @remarks
|
|
20611
|
+
* Releases one previously claimed ticket at a block point of
|
|
20612
|
+
* interest.
|
|
20613
|
+
*
|
|
20614
|
+
* @privilege no-restricted-execution - This function can't be called in restricted-execution mode.
|
|
20615
|
+
*
|
|
20616
|
+
* @param center
|
|
20617
|
+
* Block position of the POI whose ticket should be released.
|
|
20618
|
+
* @returns
|
|
20619
|
+
* True if a ticket was released; false if no POI exists at the
|
|
20620
|
+
* position or the POI has no claimed tickets.
|
|
20621
|
+
*/
|
|
20622
|
+
release(center: Vector3): boolean;
|
|
20623
|
+
/**
|
|
20624
|
+
* @remarks
|
|
20625
|
+
* Claims one available ticket from a matching block point of
|
|
20626
|
+
* interest within range.
|
|
20627
|
+
*
|
|
20628
|
+
* @privilege no-restricted-execution - This function can't be called in restricted-execution mode.
|
|
20629
|
+
*
|
|
20630
|
+
* @param filter
|
|
20631
|
+
* Filter used to select the POI type to claim. A callback
|
|
20632
|
+
* receives each POI type and returns whether it should be
|
|
20633
|
+
* included; a name filter matches a type name; and a tag
|
|
20634
|
+
* filter requires all specified tags.
|
|
20635
|
+
* @param center
|
|
20636
|
+
* Center of the search.
|
|
20637
|
+
* @param blockRadius
|
|
20638
|
+
* Maximum three-dimensional distance from the center, in
|
|
20639
|
+
* blocks.
|
|
20640
|
+
* @returns
|
|
20641
|
+
* The block position of the claimed POI, or undefined if no
|
|
20642
|
+
* matching POI has an available ticket.
|
|
20643
|
+
*/
|
|
20644
|
+
take(
|
|
20645
|
+
filter: ((arg0: PoiBlockType) => boolean) | PoiNameFilter | PoiTagFilter,
|
|
20646
|
+
center: Vector3,
|
|
20647
|
+
blockRadius: number,
|
|
20648
|
+
): Vector3 | undefined;
|
|
20649
|
+
}
|
|
20650
|
+
|
|
20651
|
+
/**
|
|
20652
|
+
* @beta
|
|
20653
|
+
* Describes a block point-of-interest type.
|
|
20654
|
+
*
|
|
20655
|
+
* Required Experiments:
|
|
20656
|
+
* - Poi
|
|
20657
|
+
*
|
|
20658
|
+
*/
|
|
20659
|
+
export class PoiBlockType {
|
|
20660
|
+
private constructor();
|
|
20661
|
+
/**
|
|
20662
|
+
* @remarks
|
|
20663
|
+
* Numeric identifier of this POI type.
|
|
20664
|
+
*
|
|
20665
|
+
*/
|
|
20666
|
+
readonly id: number;
|
|
20667
|
+
/**
|
|
20668
|
+
* @remarks
|
|
20669
|
+
* Namespaced identifier of this POI type.
|
|
20670
|
+
*
|
|
20671
|
+
*/
|
|
20672
|
+
readonly name: string;
|
|
20673
|
+
/**
|
|
20674
|
+
* @remarks
|
|
20675
|
+
* Maximum number of tickets that can be claimed from each POI
|
|
20676
|
+
* instance of this type.
|
|
20677
|
+
*
|
|
20678
|
+
*/
|
|
20679
|
+
readonly tickets: number;
|
|
20680
|
+
/**
|
|
20681
|
+
* @remarks
|
|
20682
|
+
* Maximum range, in blocks, at which this POI type is
|
|
20683
|
+
* considered usable.
|
|
20684
|
+
*
|
|
20685
|
+
*/
|
|
20686
|
+
readonly usableRange: number;
|
|
20687
|
+
/**
|
|
20688
|
+
* @remarks
|
|
20689
|
+
* Tests whether this object and another object describe the
|
|
20690
|
+
* same POI type.
|
|
20691
|
+
*
|
|
20692
|
+
* @privilege no-restricted-execution - This function can't be called in restricted-execution mode.
|
|
20693
|
+
*
|
|
20694
|
+
* @param other
|
|
20695
|
+
* POI type to compare with this type.
|
|
20696
|
+
* @returns
|
|
20697
|
+
* True if both objects describe the same POI type; otherwise
|
|
20698
|
+
* false.
|
|
20699
|
+
*/
|
|
20700
|
+
equals(other: PoiBlockType): boolean;
|
|
20701
|
+
/**
|
|
20702
|
+
* @remarks
|
|
20703
|
+
* Tests whether the type has the provided tag attribute
|
|
20704
|
+
*
|
|
20705
|
+
* @privilege no-restricted-execution - This function can't be called in restricted-execution mode.
|
|
20706
|
+
*
|
|
20707
|
+
* @param tag
|
|
20708
|
+
* POI tag to check.
|
|
20709
|
+
* @returns
|
|
20710
|
+
* True if the POI conatains the tag; otherwise false.
|
|
20711
|
+
*/
|
|
20712
|
+
has(tag: string): boolean;
|
|
20713
|
+
}
|
|
20714
|
+
|
|
20715
|
+
/**
|
|
20716
|
+
* @beta
|
|
20717
|
+
* Provides access to point-of-interest (POI) data in a
|
|
20718
|
+
* dimension.
|
|
20719
|
+
*
|
|
20720
|
+
* Required Experiments:
|
|
20721
|
+
* - Poi
|
|
20722
|
+
*
|
|
20723
|
+
*/
|
|
20724
|
+
export class PoiManager {
|
|
20725
|
+
private constructor();
|
|
20726
|
+
/**
|
|
20727
|
+
* @remarks
|
|
20728
|
+
* Provides access to block-based points of interest in the
|
|
20729
|
+
* dimension.
|
|
20730
|
+
*
|
|
20731
|
+
*/
|
|
20732
|
+
readonly blocks: PoiBlockManager;
|
|
20733
|
+
}
|
|
20734
|
+
|
|
20363
20735
|
/**
|
|
20364
20736
|
* Represents how the potion effect is delivered.
|
|
20365
20737
|
*/
|
|
@@ -20689,7 +21061,7 @@ export class PrimitiveShapesManager {
|
|
|
20689
21061
|
*/
|
|
20690
21062
|
addText(text: TextPrimitive, dimension?: Dimension): void;
|
|
20691
21063
|
/**
|
|
20692
|
-
* @
|
|
21064
|
+
* @rc
|
|
20693
21065
|
* @remarks
|
|
20694
21066
|
* Fetches and queries all primitive shapes stored in the
|
|
20695
21067
|
* manager and returns the results as an array of shape
|
|
@@ -23251,6 +23623,45 @@ export class TickingAreaManager {
|
|
|
23251
23623
|
removeTickingArea(identifier: string | TickingArea): void;
|
|
23252
23624
|
}
|
|
23253
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
|
+
|
|
23254
23665
|
/**
|
|
23255
23666
|
* Represents a trigger for firing an event.
|
|
23256
23667
|
*/
|
|
@@ -23993,7 +24404,7 @@ export class World {
|
|
|
23993
24404
|
* @privilege early-execution-allowed - This function can be called in early-execution mode.
|
|
23994
24405
|
*
|
|
23995
24406
|
*/
|
|
23996
|
-
getPackSettings(): Record<string, boolean | number | string>;
|
|
24407
|
+
getPackSettings(): Record<string, string[] | boolean | number | string>;
|
|
23997
24408
|
/**
|
|
23998
24409
|
* @remarks
|
|
23999
24410
|
* Returns a set of players based on a set of conditions
|
|
@@ -24787,6 +25198,47 @@ export class WorldAfterEvents {
|
|
|
24787
25198
|
*
|
|
24788
25199
|
*/
|
|
24789
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;
|
|
24790
25242
|
/**
|
|
24791
25243
|
* @remarks
|
|
24792
25244
|
* @privilege early-execution-readable - This property can be read in early-execution mode.
|
|
@@ -24958,11 +25410,21 @@ export class WorldBeforeEvents {
|
|
|
24958
25410
|
*
|
|
24959
25411
|
*/
|
|
24960
25412
|
readonly weatherChange: WeatherChangeBeforeEventSignal;
|
|
24961
|
-
|
|
24962
|
-
|
|
24963
|
-
|
|
24964
|
-
|
|
24965
|
-
|
|
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;
|
|
25423
|
+
}
|
|
25424
|
+
|
|
25425
|
+
/**
|
|
25426
|
+
* @beta
|
|
25427
|
+
* A class that represents a particular clock within a world.
|
|
24966
25428
|
*/
|
|
24967
25429
|
export class WorldClock {
|
|
24968
25430
|
private constructor();
|
|
@@ -24991,6 +25453,373 @@ export class WorldClock {
|
|
|
24991
25453
|
* Minimum Value: 0
|
|
24992
25454
|
*/
|
|
24993
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;
|
|
24994
25823
|
}
|
|
24995
25824
|
|
|
24996
25825
|
/**
|
|
@@ -25012,6 +25841,9 @@ export class WorldClockRegistry {
|
|
|
25012
25841
|
* The name that represents this world clock. Must have a
|
|
25013
25842
|
* namespace and use only valid identifier characters. (e.g.,
|
|
25014
25843
|
* 'mypack:my_clock').
|
|
25844
|
+
* @param registrationOptions
|
|
25845
|
+
* Additional options for registering a world clock, such as
|
|
25846
|
+
* including time markers at registration time.
|
|
25015
25847
|
* @throws This function can throw errors.
|
|
25016
25848
|
*
|
|
25017
25849
|
* {@link WorldClockInvalidRegistryError}
|
|
@@ -25019,8 +25851,10 @@ export class WorldClockRegistry {
|
|
|
25019
25851
|
* {@link WorldClockRegistrationError}
|
|
25020
25852
|
*
|
|
25021
25853
|
* {@link WorldClockReloadNewWorldClockError}
|
|
25854
|
+
*
|
|
25855
|
+
* {@link WorldClockReloadTimeMarkerError}
|
|
25022
25856
|
*/
|
|
25023
|
-
registerClock(name: string): void;
|
|
25857
|
+
registerClock(name: string, registrationOptions?: WorldClockRegistrationOptions): void;
|
|
25024
25858
|
}
|
|
25025
25859
|
|
|
25026
25860
|
export class WorldLoadAfterEvent {
|
|
@@ -27284,6 +28118,56 @@ export interface PlayerVisibilityRules extends EntityVisibilityRules {
|
|
|
27284
28118
|
|
|
27285
28119
|
/**
|
|
27286
28120
|
* @beta
|
|
28121
|
+
* Associates a block point-of-interest instance with its
|
|
28122
|
+
* squared distance from a query center.
|
|
28123
|
+
*/
|
|
28124
|
+
export interface PoiDistancePair {
|
|
28125
|
+
/**
|
|
28126
|
+
* @remarks
|
|
28127
|
+
* Squared three-dimensional distance, in blocks squared, from
|
|
28128
|
+
* the query center to the POI position.
|
|
28129
|
+
*
|
|
28130
|
+
*/
|
|
28131
|
+
distance: number;
|
|
28132
|
+
/**
|
|
28133
|
+
* @remarks
|
|
28134
|
+
* POI instance at this distance.
|
|
28135
|
+
*
|
|
28136
|
+
*/
|
|
28137
|
+
poi: PoiBlockInstance;
|
|
28138
|
+
}
|
|
28139
|
+
|
|
28140
|
+
/**
|
|
28141
|
+
* @beta
|
|
28142
|
+
* Selects block point-of-interest types by their exact
|
|
28143
|
+
* namespaced identifier.
|
|
28144
|
+
*/
|
|
28145
|
+
export interface PoiNameFilter {
|
|
28146
|
+
/**
|
|
28147
|
+
* @remarks
|
|
28148
|
+
* Exact namespaced POI type identifier to match.
|
|
28149
|
+
*
|
|
28150
|
+
*/
|
|
28151
|
+
name: string;
|
|
28152
|
+
}
|
|
28153
|
+
|
|
28154
|
+
/**
|
|
28155
|
+
* @beta
|
|
28156
|
+
* Selects block point-of-interest types that have all
|
|
28157
|
+
* specified tags.
|
|
28158
|
+
*/
|
|
28159
|
+
export interface PoiTagFilter {
|
|
28160
|
+
/**
|
|
28161
|
+
* @remarks
|
|
28162
|
+
* Namespaced POI tags that a matching type must contain. All
|
|
28163
|
+
* tags in the array are required.
|
|
28164
|
+
*
|
|
28165
|
+
*/
|
|
28166
|
+
tags: string[];
|
|
28167
|
+
}
|
|
28168
|
+
|
|
28169
|
+
/**
|
|
28170
|
+
* @rc
|
|
27287
28171
|
* Contains optional filters that control which primitive
|
|
27288
28172
|
* shapes are returned from a primitive shapes query.
|
|
27289
28173
|
*/
|
|
@@ -28061,6 +28945,37 @@ export interface TickingAreaOptions {
|
|
|
28061
28945
|
to: Vector3;
|
|
28062
28946
|
}
|
|
28063
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
|
+
|
|
28064
28979
|
/**
|
|
28065
28980
|
* Contains additional options for displaying a title and
|
|
28066
28981
|
* optional subtitle.
|
|
@@ -28198,10 +29113,65 @@ export interface WaypointTextureSelector {
|
|
|
28198
29113
|
textureBoundsList: WaypointTextureBounds[];
|
|
28199
29114
|
}
|
|
28200
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
|
+
|
|
28201
29167
|
/**
|
|
28202
29168
|
* Contains additional options for a playSound occurrence.
|
|
28203
29169
|
*/
|
|
28204
29170
|
export interface WorldSoundOptions {
|
|
29171
|
+
/**
|
|
29172
|
+
* @beta
|
|
29173
|
+
*/
|
|
29174
|
+
isBroadcast?: boolean;
|
|
28205
29175
|
/**
|
|
28206
29176
|
* @beta
|
|
28207
29177
|
* @remarks
|
|
@@ -28663,6 +29633,16 @@ export class UnloadedChunksError extends Error {
|
|
|
28663
29633
|
private constructor();
|
|
28664
29634
|
}
|
|
28665
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
|
+
|
|
28666
29646
|
/**
|
|
28667
29647
|
* @beta
|
|
28668
29648
|
* Thrown when trying to register a world clock outside of the
|
|
@@ -28673,6 +29653,17 @@ export class WorldClockInvalidRegistryError extends Error {
|
|
|
28673
29653
|
private constructor();
|
|
28674
29654
|
}
|
|
28675
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
|
+
|
|
28676
29667
|
/**
|
|
28677
29668
|
* @beta
|
|
28678
29669
|
* Error thrown when a world clock is not found in the world
|
|
@@ -28704,6 +29695,49 @@ export class WorldClockReloadNewWorldClockError extends Error {
|
|
|
28704
29695
|
private constructor();
|
|
28705
29696
|
}
|
|
28706
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
|
+
|
|
28707
29741
|
export const HudElementsCount = 13;
|
|
28708
29742
|
export const HudVisibilityCount = 2;
|
|
28709
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.
|
|
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.
|
|
17
|
+
"@minecraft/vanilla-data": ">=1.20.70 || 1.26.50-preview.26"
|
|
18
18
|
},
|
|
19
19
|
"license": "MIT"
|
|
20
20
|
}
|