@minecraft/server 2.8.0-beta.1.26.20-preview.28 → 2.9.0-beta.1.26.30-preview.21

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 +143 -34
  2. package/package.json +2 -2
package/index.d.ts CHANGED
@@ -16,7 +16,7 @@
16
16
  * ```json
17
17
  * {
18
18
  * "module_name": "@minecraft/server",
19
- * "version": "2.8.0-beta"
19
+ * "version": "2.9.0-beta"
20
20
  * }
21
21
  * ```
22
22
  *
@@ -837,7 +837,7 @@ export enum EntityComponentTypes {
837
837
  Color2 = 'minecraft:color2',
838
838
  CursorInventory = 'minecraft:cursor_inventory',
839
839
  /**
840
- * @beta
840
+ * @rc
841
841
  * @remarks
842
842
  * Represents this entity's ender inventory properties.
843
843
  *
@@ -1866,10 +1866,6 @@ export enum GameRule {
1866
1866
  *
1867
1867
  */
1868
1868
  KeepInventory = 'keepInventory',
1869
- /**
1870
- * @beta
1871
- */
1872
- LocatorBar = 'locatorBar',
1873
1869
  /**
1874
1870
  * @remarks
1875
1871
  * The maximum number of chained commands that can execute per
@@ -1897,6 +1893,14 @@ export enum GameRule {
1897
1893
  *
1898
1894
  */
1899
1895
  PlayersSleepingPercentage = 'playersSleepingPercentage',
1896
+ /**
1897
+ * @beta
1898
+ * @remarks
1899
+ * Controls which player waypoints are automatically added to
1900
+ * the players locator bar.
1901
+ *
1902
+ */
1903
+ PlayerWaypoints = 'playerWaypoints',
1900
1904
  /**
1901
1905
  * @remarks
1902
1906
  * Controls whether projectiles (entities with a projectile
@@ -2687,6 +2691,14 @@ export enum PlayerPermissionLevel {
2687
2691
  Custom = 3,
2688
2692
  }
2689
2693
 
2694
+ /**
2695
+ * @beta
2696
+ */
2697
+ export enum PlayerWaypointsMode {
2698
+ Everyone = 'Everyone',
2699
+ Off = 'Off',
2700
+ }
2701
+
2690
2702
  /**
2691
2703
  * Contains objectives and participants for the scoreboard.
2692
2704
  */
@@ -5050,7 +5062,7 @@ export class BlockComponentTickEvent extends BlockEvent {
5050
5062
  }
5051
5063
 
5052
5064
  /**
5053
- * @beta
5065
+ * @rc
5054
5066
  * Contains information regarding a specific container block
5055
5067
  * being closed.
5056
5068
  */
@@ -5068,7 +5080,7 @@ export class BlockContainerClosedAfterEvent extends BlockEvent {
5068
5080
  }
5069
5081
 
5070
5082
  /**
5071
- * @beta
5083
+ * @rc
5072
5084
  * Manages callbacks that are connected to when a block
5073
5085
  * container is closed.
5074
5086
  */
@@ -5102,7 +5114,7 @@ export class BlockContainerClosedAfterEventSignal {
5102
5114
  }
5103
5115
 
5104
5116
  /**
5105
- * @beta
5117
+ * @rc
5106
5118
  * Contains information regarding a specific container block
5107
5119
  * being opened.
5108
5120
  */
@@ -5120,7 +5132,7 @@ export class BlockContainerOpenedAfterEvent extends BlockEvent {
5120
5132
  }
5121
5133
 
5122
5134
  /**
5123
- * @beta
5135
+ * @rc
5124
5136
  * Manages callbacks that are connected to when a block
5125
5137
  * container is opened.
5126
5138
  */
@@ -6759,7 +6771,7 @@ export class ChatSendBeforeEventSignal {
6759
6771
  export class ClientSystemInfo extends SystemInfo {
6760
6772
  private constructor();
6761
6773
  /**
6762
- * @beta
6774
+ * @rc
6763
6775
  * @remarks
6764
6776
  * The locale selected by the client (e.g., en_US, fr_FR,
6765
6777
  * ja_JP). Note that in most cases, server scripts should not
@@ -10974,7 +10986,7 @@ export class EntityComponent extends Component {
10974
10986
  }
10975
10987
 
10976
10988
  /**
10977
- * @beta
10989
+ * @rc
10978
10990
  * Contains information regarding a specific entity container
10979
10991
  * being closed.
10980
10992
  */
@@ -10990,7 +11002,7 @@ export class EntityContainerClosedAfterEvent {
10990
11002
  }
10991
11003
 
10992
11004
  /**
10993
- * @beta
11005
+ * @rc
10994
11006
  * Manages callbacks that are connected to when an entity
10995
11007
  * container is closed.
10996
11008
  */
@@ -11024,7 +11036,7 @@ export class EntityContainerClosedAfterEventSignal {
11024
11036
  }
11025
11037
 
11026
11038
  /**
11027
- * @beta
11039
+ * @rc
11028
11040
  * Contains information regarding a specific entity container
11029
11041
  * being opened.
11030
11042
  */
@@ -11040,7 +11052,7 @@ export class EntityContainerOpenedAfterEvent {
11040
11052
  }
11041
11053
 
11042
11054
  /**
11043
- * @beta
11055
+ * @rc
11044
11056
  * Manages callbacks that are connected to when an entity
11045
11057
  * container is opened.
11046
11058
  */
@@ -11167,7 +11179,7 @@ export class EntityDieAfterEventSignal {
11167
11179
  }
11168
11180
 
11169
11181
  /**
11170
- * @beta
11182
+ * @rc
11171
11183
  * Represents this entity's ender inventory properties. This
11172
11184
  * component is always present on players and any items in its
11173
11185
  * container will display for the player when they access an
@@ -13721,6 +13733,68 @@ export class EntityUnderwaterMovementComponent extends EntityAttributeComponent
13721
13733
  static readonly componentId = 'minecraft:underwater_movement';
13722
13734
  }
13723
13735
 
13736
+ /**
13737
+ * @beta
13738
+ * Contains information related to firing of a data driven
13739
+ * entity version upgrade.
13740
+ */
13741
+ export class EntityUpgradeAfterEvent {
13742
+ private constructor();
13743
+ /**
13744
+ * @remarks
13745
+ * Entity that the upgrade triggered on.
13746
+ *
13747
+ */
13748
+ readonly entity: Entity;
13749
+ /**
13750
+ * @remarks
13751
+ * Name of the data driven upgrade being triggered.
13752
+ *
13753
+ */
13754
+ readonly upgradeId: string;
13755
+ /**
13756
+ * @remarks
13757
+ * An updateable list of modifications to component state that
13758
+ * are the effect of this triggered upgrade.
13759
+ *
13760
+ */
13761
+ getModifiers(): DefinitionModifier[];
13762
+ }
13763
+
13764
+ /**
13765
+ * @beta
13766
+ * Contains event registration related to firing of a data
13767
+ * driven entity version upgrade.
13768
+ */
13769
+ export class EntityUpgradeAfterEventSignal {
13770
+ private constructor();
13771
+ /**
13772
+ * @remarks
13773
+ * Adds a callback that will be called after a data driven
13774
+ * entity version upgrade is triggered.
13775
+ *
13776
+ * This function can't be called in restricted-execution mode.
13777
+ *
13778
+ * This function can be called in early-execution mode.
13779
+ *
13780
+ */
13781
+ subscribe(
13782
+ callback: (arg0: EntityUpgradeAfterEvent) => void,
13783
+ options?: EntityDataDrivenTriggerEventOptions,
13784
+ ): (arg0: EntityUpgradeAfterEvent) => void;
13785
+ /**
13786
+ * @remarks
13787
+ * Removes a callback that will be called after a data driven
13788
+ * entity version upgrade is triggered.
13789
+ *
13790
+ * This function can't be called in restricted-execution mode.
13791
+ *
13792
+ * This function can be called in early-execution mode.
13793
+ *
13794
+ */
13795
+ unsubscribe(callback: (arg0: EntityUpgradeAfterEvent) => void): void;
13796
+ }
13797
+
13724
13798
  /**
13725
13799
  * Used to differentiate the component group of a variant of an
13726
13800
  * entity from others. (e.g. ocelot, villager).
@@ -14214,36 +14288,36 @@ export class GameRules {
14214
14288
  */
14215
14289
  keepInventory: boolean;
14216
14290
  /**
14217
- * @beta
14218
14291
  * @remarks
14219
14292
  * This property can't be edited in restricted-execution mode.
14220
14293
  *
14221
14294
  */
14222
- locatorBar: boolean;
14295
+ maxCommandChainLength: number;
14223
14296
  /**
14224
14297
  * @remarks
14225
14298
  * This property can't be edited in restricted-execution mode.
14226
14299
  *
14227
14300
  */
14228
- maxCommandChainLength: number;
14301
+ mobGriefing: boolean;
14229
14302
  /**
14230
14303
  * @remarks
14231
14304
  * This property can't be edited in restricted-execution mode.
14232
14305
  *
14233
14306
  */
14234
- mobGriefing: boolean;
14307
+ naturalRegeneration: boolean;
14235
14308
  /**
14236
14309
  * @remarks
14237
14310
  * This property can't be edited in restricted-execution mode.
14238
14311
  *
14239
14312
  */
14240
- naturalRegeneration: boolean;
14313
+ playersSleepingPercentage: number;
14241
14314
  /**
14315
+ * @beta
14242
14316
  * @remarks
14243
14317
  * This property can't be edited in restricted-execution mode.
14244
14318
  *
14245
14319
  */
14246
- playersSleepingPercentage: number;
14320
+ playerWaypoints: PlayerWaypointsMode;
14247
14321
  /**
14248
14322
  * @remarks
14249
14323
  * This property can't be edited in restricted-execution mode.
@@ -16591,9 +16665,9 @@ export class LocationWaypoint extends Waypoint {
16591
16665
  *
16592
16666
  * Note: You can control whether vanilla player waypoints are
16593
16667
  * automatically added to the locator bar using the
16594
- * `locatorbar` {@link GameRule}. This game rule is currently
16595
- * named `locatorbar` but will likely be renamed in a future
16596
- * update to be more descriptive.
16668
+ * `playerWaypoints` {@link GameRule}. Accepted values are
16669
+ * `off` (players are not shown on the locator bar) and
16670
+ * `everyone` (all players are visible on the locator bar).
16597
16671
  *
16598
16672
  * Note: You can only modify, remove, or query waypoints that
16599
16673
  * were added by this pack.
@@ -17573,6 +17647,18 @@ export class Player extends Entity {
17573
17647
  * {@link InvalidEntityError}
17574
17648
  */
17575
17649
  readonly playerPermissionLevel: PlayerPermissionLevel;
17650
+ /**
17651
+ * @beta
17652
+ * @remarks
17653
+ * Gets the player's Playfab ID.
17654
+ *
17655
+ * @throws This property can throw when used.
17656
+ *
17657
+ * {@link minecraftcommon.EngineError}
17658
+ *
17659
+ * {@link InvalidEntityError}
17660
+ */
17661
+ readonly playfabId: string;
17576
17662
  /**
17577
17663
  * @remarks
17578
17664
  * This property can't be edited in restricted-execution mode.
@@ -17687,6 +17773,22 @@ export class Player extends Entity {
17687
17773
  * @throws This function can throw errors.
17688
17774
  */
17689
17775
  getItemCooldown(cooldownCategory: string): number;
17776
+ /**
17777
+ * @beta
17778
+ * @remarks
17779
+ * Gets the player's ping in milliseconds.
17780
+ *
17781
+ * This function can't be called in restricted-execution mode.
17782
+ *
17783
+ * @returns
17784
+ * The player's ping in milliseconds.
17785
+ * @throws This function can throw errors.
17786
+ *
17787
+ * {@link minecraftcommon.EngineError}
17788
+ *
17789
+ * {@link InvalidEntityError}
17790
+ */
17791
+ getPing(): number;
17690
17792
  /**
17691
17793
  * @remarks
17692
17794
  * Gets the current spawn point of the player.
@@ -21587,7 +21689,7 @@ export class StructureManager {
21587
21689
  */
21588
21690
  get(identifier: string): Structure | undefined;
21589
21691
  /**
21590
- * @beta
21692
+ * @rc
21591
21693
  * @remarks
21592
21694
  * Returns a list of all structures contained in behavior
21593
21695
  * packs. Does not include structures saved to the world or in
@@ -23233,7 +23335,7 @@ export class World {
23233
23335
  export class WorldAfterEvents {
23234
23336
  private constructor();
23235
23337
  /**
23236
- * @beta
23338
+ * @rc
23237
23339
  * @remarks
23238
23340
  * This event fires when a block container is closed.
23239
23341
  *
@@ -23242,7 +23344,7 @@ export class WorldAfterEvents {
23242
23344
  */
23243
23345
  readonly blockContainerClosed: BlockContainerClosedAfterEventSignal;
23244
23346
  /**
23245
- * @beta
23347
+ * @rc
23246
23348
  * @remarks
23247
23349
  * This event fires when a block container is opened.
23248
23350
  *
@@ -23298,7 +23400,7 @@ export class WorldAfterEvents {
23298
23400
  */
23299
23401
  readonly effectAdd: EffectAddAfterEventSignal;
23300
23402
  /**
23301
- * @beta
23403
+ * @rc
23302
23404
  * @remarks
23303
23405
  * This event fires when an entity container is closed.
23304
23406
  *
@@ -23307,7 +23409,7 @@ export class WorldAfterEvents {
23307
23409
  */
23308
23410
  readonly entityContainerClosed: EntityContainerClosedAfterEventSignal;
23309
23411
  /**
23310
- * @beta
23412
+ * @rc
23311
23413
  * @remarks
23312
23414
  * This event fires when an entity container is opened.
23313
23415
  *
@@ -23404,6 +23506,13 @@ export class WorldAfterEvents {
23404
23506
  *
23405
23507
  */
23406
23508
  readonly entitySpawn: EntitySpawnAfterEventSignal;
23509
+ /**
23510
+ * @beta
23511
+ * @remarks
23512
+ * This property can be read in early-execution mode.
23513
+ *
23514
+ */
23515
+ readonly entityUpgrade: EntityUpgradeAfterEventSignal;
23407
23516
  /**
23408
23517
  * @remarks
23409
23518
  * This event is fired after an explosion occurs.
@@ -23998,7 +24107,7 @@ export interface BlockBoundingBox {
23998
24107
  }
23999
24108
 
24000
24109
  /**
24001
- * @beta
24110
+ * @rc
24002
24111
  * Options used to filter block container access events.
24003
24112
  */
24004
24113
  export interface BlockContainerAccessEventOptions {
@@ -24456,7 +24565,7 @@ export interface CompoundBlockVolumeItem {
24456
24565
  }
24457
24566
 
24458
24567
  /**
24459
- * @beta
24568
+ * @rc
24460
24569
  * Represents the source of a container access.
24461
24570
  */
24462
24571
  export interface ContainerAccessSource {
@@ -24469,7 +24578,7 @@ export interface ContainerAccessSource {
24469
24578
  }
24470
24579
 
24471
24580
  /**
24472
- * @beta
24581
+ * @rc
24473
24582
  * Options for use when filtering container access sources.
24474
24583
  */
24475
24584
  export interface ContainerAccessSourceFilter {
@@ -24773,7 +24882,7 @@ export interface EntityApplyDamageOptions {
24773
24882
  }
24774
24883
 
24775
24884
  /**
24776
- * @beta
24885
+ * @rc
24777
24886
  * Options used to filter entity container access events.
24778
24887
  */
24779
24888
  export interface EntityContainerAccessEventOptions {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@minecraft/server",
3
- "version": "2.8.0-beta.1.26.20-preview.28",
3
+ "version": "2.9.0-beta.1.26.30-preview.21",
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.20-preview.28"
17
+ "@minecraft/vanilla-data": ">=1.20.70 || 1.26.30-preview.21"
18
18
  },
19
19
  "license": "MIT"
20
20
  }