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

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 +402 -2
  2. package/package.json +2 -2
package/index.d.ts CHANGED
@@ -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
@@ -17717,7 +17754,7 @@ export class PackSettingChangeAfterEvent {
17717
17754
  * The value of the setting.
17718
17755
  *
17719
17756
  */
17720
- readonly settingValue: boolean | number | string;
17757
+ readonly settingValue: string[] | boolean | number | string;
17721
17758
  }
17722
17759
 
17723
17760
  /**
@@ -20360,6 +20397,315 @@ export class PlayerWaypoint extends EntityWaypoint {
20360
20397
  );
20361
20398
  }
20362
20399
 
20400
+ /**
20401
+ * @beta
20402
+ * Describes a block point-of-interest instance returned by a
20403
+ * query.
20404
+ *
20405
+ * Required Experiments:
20406
+ * - Poi
20407
+ *
20408
+ */
20409
+ export class PoiBlockInstance {
20410
+ private constructor();
20411
+ /**
20412
+ * @remarks
20413
+ * Block position of this POI instance.
20414
+ *
20415
+ */
20416
+ readonly position: Vector3;
20417
+ /**
20418
+ * @remarks
20419
+ * Number of tickets currently available to be claimed from
20420
+ * this POI instance.
20421
+ *
20422
+ */
20423
+ readonly tickets: number;
20424
+ /**
20425
+ * @remarks
20426
+ * Type of this POI instance.
20427
+ *
20428
+ */
20429
+ readonly 'type': PoiBlockType;
20430
+ }
20431
+
20432
+ /**
20433
+ * @beta
20434
+ * Provides methods for querying and managing block-based
20435
+ * points of interest in a dimension.
20436
+ *
20437
+ * Required Experiments:
20438
+ * - Poi
20439
+ *
20440
+ */
20441
+ export class PoiBlockManager {
20442
+ private constructor();
20443
+ /**
20444
+ * @remarks
20445
+ * Adds a block point of interest at a position. This method is
20446
+ * intended for temporary usage. Will be replaced when chunk is
20447
+ * reloaded
20448
+ *
20449
+ * @privilege no-restricted-execution - This function can't be called in restricted-execution mode.
20450
+ *
20451
+ * @param position
20452
+ * Block position at which to add the POI.
20453
+ * @param poi
20454
+ * POI type to add, specified by numeric type Id, type name, or
20455
+ * POI type object.
20456
+ */
20457
+ addTemporary(position: Vector3, poi: PoiBlockType | string | number): void;
20458
+ /**
20459
+ * @remarks
20460
+ * Gets the type of the block point of interest at a position.
20461
+ *
20462
+ * @privilege no-restricted-execution - This function can't be called in restricted-execution mode.
20463
+ *
20464
+ * @param position
20465
+ * Block position to inspect.
20466
+ * @returns
20467
+ * The POI type at the position, or undefined if no POI exists
20468
+ * there.
20469
+ */
20470
+ at(position: Vector3): PoiBlockType | undefined;
20471
+ /**
20472
+ * @remarks
20473
+ * Tests whether a block point of interest at a position
20474
+ * matches a type filter.
20475
+ *
20476
+ * @privilege no-restricted-execution - This function can't be called in restricted-execution mode.
20477
+ *
20478
+ * @param position
20479
+ * Block position to inspect.
20480
+ * @param filter
20481
+ * Filter used to select the POI type. A callback receives the
20482
+ * POI type and returns whether it matches; a name filter
20483
+ * matches a type name; and a tag filter requires all specified
20484
+ * tags.
20485
+ * @returns
20486
+ * True if a POI exists at the position and its type matches
20487
+ * the filter; otherwise false.
20488
+ */
20489
+ exists(position: Vector3, filter: ((arg0: PoiBlockType) => boolean) | PoiNameFilter | PoiTagFilter): boolean;
20490
+ /**
20491
+ * @remarks
20492
+ * Returns block points of interest that match the supplied
20493
+ * type and occupancy filters within the specified distance of
20494
+ * a location.
20495
+ *
20496
+ * @privilege no-restricted-execution - This function can't be called in restricted-execution mode.
20497
+ *
20498
+ * @param filter
20499
+ * Filter used to select POI types. A callback receives each
20500
+ * POI type and returns whether it should be included; a name
20501
+ * filter matches a type name; and a tag filter requires all
20502
+ * specified tags.
20503
+ * @param center
20504
+ * Center of the search.
20505
+ * @param blockRadius
20506
+ * Maximum three-dimensional distance from the center, in
20507
+ * blocks.
20508
+ * @param occupancyFilter
20509
+ * Optional filter applied to the occupancy state of matching
20510
+ * POIs. If omitted, POIs in any occupancy state are returned.
20511
+ * @returns
20512
+ * The matching POI instances within range. The result order is
20513
+ * not guaranteed.
20514
+ */
20515
+ getInRange(
20516
+ filter: ((arg0: PoiBlockType) => boolean) | PoiNameFilter | PoiTagFilter,
20517
+ center: Vector3,
20518
+ blockRadius: number,
20519
+ occupancyFilter?: PoiBlockOccupancyFilter,
20520
+ ): PoiBlockInstance[];
20521
+ /**
20522
+ * @remarks
20523
+ * Returns block points of interest that match the supplied
20524
+ * type and occupancy filters within an axis-aligned square
20525
+ * centered on the specified location, sorted from nearest to
20526
+ * farthest.
20527
+ *
20528
+ * @privilege no-restricted-execution - This function can't be called in restricted-execution mode.
20529
+ *
20530
+ * @param filter
20531
+ * Filter used to select POI types. A callback receives each
20532
+ * POI type and returns whether it should be included; a name
20533
+ * filter matches a type name; and a tag filter requires all
20534
+ * specified tags.
20535
+ * @param center
20536
+ * Center of the search and the location from which distances
20537
+ * are calculated.
20538
+ * @param blockRadius
20539
+ * Maximum three-dimensional distance from the center, in
20540
+ * blocks.
20541
+ * @param occupancyFilter
20542
+ * Optional filter applied to the occupancy state of matching
20543
+ * POIs. If omitted, POIs in any occupancy state are returned.
20544
+ * @returns
20545
+ * The matching POI instances and their squared distances from
20546
+ * the center, sorted in ascending distance order.
20547
+ */
20548
+ getInRangeSorted(
20549
+ filter: ((arg0: PoiBlockType) => boolean) | PoiNameFilter | PoiTagFilter,
20550
+ center: Vector3,
20551
+ blockRadius: number,
20552
+ occupancyFilter?: PoiBlockOccupancyFilter,
20553
+ ): PoiDistancePair[];
20554
+ /**
20555
+ * @remarks
20556
+ * Returns block points of interest that match the supplied
20557
+ * type and occupancy filters within an axis-aligned square
20558
+ * centered on the specified location.
20559
+ *
20560
+ * @privilege no-restricted-execution - This function can't be called in restricted-execution mode.
20561
+ *
20562
+ * @param filter
20563
+ * Filter used to select POI types. A callback receives each
20564
+ * POI type and returns whether it should be included; a name
20565
+ * filter matches a type name; and a tag filter requires all
20566
+ * specified tags.
20567
+ * @param center
20568
+ * Center of the search volume.
20569
+ * @param blockRadius
20570
+ * Half-size of the search volume, in blocks, along each axis.
20571
+ * @param occupancyFilter
20572
+ * Optional filter applied to the occupancy state of matching
20573
+ * POIs. If omitted, POIs in any occupancy state are returned.
20574
+ * @returns
20575
+ * The matching POI instances in the search volume.
20576
+ */
20577
+ getInSquare(
20578
+ filter: ((arg0: PoiBlockType) => boolean) | PoiNameFilter | PoiTagFilter,
20579
+ center: Vector3,
20580
+ blockRadius: number,
20581
+ occupancyFilter?: PoiBlockOccupancyFilter,
20582
+ ): PoiBlockInstance[];
20583
+ /**
20584
+ * @remarks
20585
+ * Releases one previously claimed ticket at a block point of
20586
+ * interest.
20587
+ *
20588
+ * @privilege no-restricted-execution - This function can't be called in restricted-execution mode.
20589
+ *
20590
+ * @param center
20591
+ * Block position of the POI whose ticket should be released.
20592
+ * @returns
20593
+ * True if a ticket was released; false if no POI exists at the
20594
+ * position or the POI has no claimed tickets.
20595
+ */
20596
+ release(center: Vector3): boolean;
20597
+ /**
20598
+ * @remarks
20599
+ * Claims one available ticket from a matching block point of
20600
+ * interest within range.
20601
+ *
20602
+ * @privilege no-restricted-execution - This function can't be called in restricted-execution mode.
20603
+ *
20604
+ * @param filter
20605
+ * Filter used to select the POI type to claim. A callback
20606
+ * receives each POI type and returns whether it should be
20607
+ * included; a name filter matches a type name; and a tag
20608
+ * filter requires all specified tags.
20609
+ * @param center
20610
+ * Center of the search.
20611
+ * @param blockRadius
20612
+ * Maximum three-dimensional distance from the center, in
20613
+ * blocks.
20614
+ * @returns
20615
+ * The block position of the claimed POI, or undefined if no
20616
+ * matching POI has an available ticket.
20617
+ */
20618
+ take(
20619
+ filter: ((arg0: PoiBlockType) => boolean) | PoiNameFilter | PoiTagFilter,
20620
+ center: Vector3,
20621
+ blockRadius: number,
20622
+ ): Vector3 | undefined;
20623
+ }
20624
+
20625
+ /**
20626
+ * @beta
20627
+ * Describes a block point-of-interest type.
20628
+ *
20629
+ * Required Experiments:
20630
+ * - Poi
20631
+ *
20632
+ */
20633
+ export class PoiBlockType {
20634
+ private constructor();
20635
+ /**
20636
+ * @remarks
20637
+ * Numeric identifier of this POI type.
20638
+ *
20639
+ */
20640
+ readonly id: number;
20641
+ /**
20642
+ * @remarks
20643
+ * Namespaced identifier of this POI type.
20644
+ *
20645
+ */
20646
+ readonly name: string;
20647
+ /**
20648
+ * @remarks
20649
+ * Maximum number of tickets that can be claimed from each POI
20650
+ * instance of this type.
20651
+ *
20652
+ */
20653
+ readonly tickets: number;
20654
+ /**
20655
+ * @remarks
20656
+ * Maximum range, in blocks, at which this POI type is
20657
+ * considered usable.
20658
+ *
20659
+ */
20660
+ readonly usableRange: number;
20661
+ /**
20662
+ * @remarks
20663
+ * Tests whether this object and another object describe the
20664
+ * same POI type.
20665
+ *
20666
+ * @privilege no-restricted-execution - This function can't be called in restricted-execution mode.
20667
+ *
20668
+ * @param other
20669
+ * POI type to compare with this type.
20670
+ * @returns
20671
+ * True if both objects describe the same POI type; otherwise
20672
+ * false.
20673
+ */
20674
+ equals(other: PoiBlockType): boolean;
20675
+ /**
20676
+ * @remarks
20677
+ * Tests whether the type has the provided tag attribute
20678
+ *
20679
+ * @privilege no-restricted-execution - This function can't be called in restricted-execution mode.
20680
+ *
20681
+ * @param tag
20682
+ * POI tag to check.
20683
+ * @returns
20684
+ * True if the POI conatains the tag; otherwise false.
20685
+ */
20686
+ has(tag: string): boolean;
20687
+ }
20688
+
20689
+ /**
20690
+ * @beta
20691
+ * Provides access to point-of-interest (POI) data in a
20692
+ * dimension.
20693
+ *
20694
+ * Required Experiments:
20695
+ * - Poi
20696
+ *
20697
+ */
20698
+ export class PoiManager {
20699
+ private constructor();
20700
+ /**
20701
+ * @remarks
20702
+ * Provides access to block-based points of interest in the
20703
+ * dimension.
20704
+ *
20705
+ */
20706
+ readonly blocks: PoiBlockManager;
20707
+ }
20708
+
20363
20709
  /**
20364
20710
  * Represents how the potion effect is delivered.
20365
20711
  */
@@ -23993,7 +24339,7 @@ export class World {
23993
24339
  * @privilege early-execution-allowed - This function can be called in early-execution mode.
23994
24340
  *
23995
24341
  */
23996
- getPackSettings(): Record<string, boolean | number | string>;
24342
+ getPackSettings(): Record<string, string[] | boolean | number | string>;
23997
24343
  /**
23998
24344
  * @remarks
23999
24345
  * Returns a set of players based on a set of conditions
@@ -27282,6 +27628,56 @@ export interface PlayerVisibilityRules extends EntityVisibilityRules {
27282
27628
  showSpectatorToSpectator?: boolean;
27283
27629
  }
27284
27630
 
27631
+ /**
27632
+ * @beta
27633
+ * Associates a block point-of-interest instance with its
27634
+ * squared distance from a query center.
27635
+ */
27636
+ export interface PoiDistancePair {
27637
+ /**
27638
+ * @remarks
27639
+ * Squared three-dimensional distance, in blocks squared, from
27640
+ * the query center to the POI position.
27641
+ *
27642
+ */
27643
+ distance: number;
27644
+ /**
27645
+ * @remarks
27646
+ * POI instance at this distance.
27647
+ *
27648
+ */
27649
+ poi: PoiBlockInstance;
27650
+ }
27651
+
27652
+ /**
27653
+ * @beta
27654
+ * Selects block point-of-interest types by their exact
27655
+ * namespaced identifier.
27656
+ */
27657
+ export interface PoiNameFilter {
27658
+ /**
27659
+ * @remarks
27660
+ * Exact namespaced POI type identifier to match.
27661
+ *
27662
+ */
27663
+ name: string;
27664
+ }
27665
+
27666
+ /**
27667
+ * @beta
27668
+ * Selects block point-of-interest types that have all
27669
+ * specified tags.
27670
+ */
27671
+ export interface PoiTagFilter {
27672
+ /**
27673
+ * @remarks
27674
+ * Namespaced POI tags that a matching type must contain. All
27675
+ * tags in the array are required.
27676
+ *
27677
+ */
27678
+ tags: string[];
27679
+ }
27680
+
27285
27681
  /**
27286
27682
  * @beta
27287
27683
  * Contains optional filters that control which primitive
@@ -28202,6 +28598,10 @@ export interface WaypointTextureSelector {
28202
28598
  * Contains additional options for a playSound occurrence.
28203
28599
  */
28204
28600
  export interface WorldSoundOptions {
28601
+ /**
28602
+ * @beta
28603
+ */
28604
+ isBroadcast?: boolean;
28205
28605
  /**
28206
28606
  * @beta
28207
28607
  * @remarks
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.24",
3
+ "version": "2.11.0-beta.1.26.50-preview.25",
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.24"
17
+ "@minecraft/vanilla-data": ">=1.20.70 || 1.26.50-preview.25"
18
18
  },
19
19
  "license": "MIT"
20
20
  }