@minecraft/server 1.3.0-beta.1.20.0-preview.22 → 1.3.0-beta.1.20.0-preview.23

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 +750 -156
  2. package/package.json +1 -1
package/index.d.ts CHANGED
@@ -16,7 +16,7 @@
16
16
  * ```json
17
17
  * {
18
18
  * "module_name": "@minecraft/server",
19
- * "version": "1.3.0-internal.1.20.0-preview.22"
19
+ * "version": "1.3.0-internal.1.20.0-preview.23"
20
20
  * }
21
21
  * ```
22
22
  *
@@ -40,94 +40,27 @@ export enum CompoundBlockVolumeAction {
40
40
 
41
41
  /**
42
42
  * @beta
43
- * Represents a direction for expressing relative position or
44
- * facing.
45
43
  */
46
44
  export enum Direction {
47
- /**
48
- * @beta
49
- * @remarks
50
- * Represents an object located or facing in the down (z - 1)
51
- * direction.
52
- *
53
- */
54
45
  down = 'down',
55
- /**
56
- * @beta
57
- * @remarks
58
- * Represents an object located or facing in the east (x + 1)
59
- * direction.
60
- *
61
- */
62
46
  east = 'east',
63
- /**
64
- * @beta
65
- * @remarks
66
- * Represents an object located or facing in the north (z - 1)
67
- * direction.
68
- *
69
- */
70
47
  north = 'north',
71
- /**
72
- * @beta
73
- * @remarks
74
- * Represents an object located or facing in the south (z + 1)
75
- * direction.
76
- *
77
- */
78
48
  south = 'south',
79
- /**
80
- * @beta
81
- * @remarks
82
- * Represents an object located or facing in the up (z + 1)
83
- * direction.
84
- *
85
- */
86
49
  up = 'up',
87
- /**
88
- * @beta
89
- * @remarks
90
- * Represents an object located or facing in the west (x - 1)
91
- * direction.
92
- *
93
- */
94
50
  west = 'west',
95
51
  }
96
52
 
97
53
  /**
98
54
  * @beta
99
- * An enumeration for the locations where scoreboard objectives
100
- * can be displayed.
101
55
  */
102
56
  export enum DisplaySlotId {
103
- /**
104
- * @beta
105
- * @remarks
106
- * Score for an objective is displayed below a player's
107
- * nametag.
108
- *
109
- */
110
57
  belowname = 'belowname',
111
- /**
112
- * @beta
113
- * @remarks
114
- * This objective and respective list of players is shown on
115
- * the Pause menu.
116
- *
117
- */
118
58
  list = 'list',
119
- /**
120
- * @beta
121
- * @remarks
122
- * The objective is shown on the right-hand side of the screen.
123
- *
124
- */
125
59
  sidebar = 'sidebar',
126
60
  }
127
61
 
128
62
  /**
129
63
  * @beta
130
- * All the dye types supported by scripting
131
64
  */
132
65
  export enum DyeColor {
133
66
  black = 'black',
@@ -425,52 +358,280 @@ export enum WeatherType {
425
358
 
426
359
  /**
427
360
  * @beta
361
+ * Contains a set of events that are available across the scope
362
+ * of the World.
428
363
  */
429
364
  export class AfterEvents {
430
365
  protected constructor();
366
+ /**
367
+ * @remarks
368
+ * This event fires for a block that is broken by a player.
369
+ *
370
+ */
431
371
  readonly blockBreak: BlockBreakAfterEventSignal;
372
+ /**
373
+ * @remarks
374
+ * This event fires for each BlockLocation destroyed by an
375
+ * explosion. It is fired after the blocks have already been
376
+ * destroyed.
377
+ *
378
+ */
432
379
  readonly blockExplode: BlockExplodeAfterEventSignal;
380
+ /**
381
+ * @remarks
382
+ * This event fires for a block that is placed by a player.
383
+ *
384
+ */
433
385
  readonly blockPlace: BlockPlaceAfterEventSignal;
386
+ /**
387
+ * @remarks
388
+ * This event fires when a button is pushed.
389
+ *
390
+ */
434
391
  readonly buttonPush: ButtonPushAfterEventSignal;
392
+ /**
393
+ * @remarks
394
+ * This event is triggered after a chat message has been
395
+ * broadcast or sent to players.
396
+ *
397
+ */
435
398
  readonly chatSend: ChatSendAfterEventSignal;
399
+ /**
400
+ * @remarks
401
+ * This event is fired when an entity event has been triggered
402
+ * that will update the component definition state of an
403
+ * entity.
404
+ *
405
+ */
436
406
  readonly dataDrivenEntityTriggerEvent: DataDrivenEntityTriggerAfterEventSignal;
407
+ /**
408
+ * @remarks
409
+ * This event fires when an effect, like poisoning, is added to
410
+ * an entity.
411
+ *
412
+ */
437
413
  readonly effectAdd: EffectAddAfterEventSignal;
414
+ /**
415
+ * @remarks
416
+ * This event fires when an entity dies.
417
+ *
418
+ */
438
419
  readonly entityDie: EntityDieAfterEventSignal;
420
+ /**
421
+ * @remarks
422
+ * This event fires when an entity hits (makes a melee attack)
423
+ * and potentially impacts another entity or block.
424
+ *
425
+ */
439
426
  readonly entityHit: EntityHitAfterEventSignal;
427
+ /**
428
+ * @remarks
429
+ * This event fires when an entity is hurt (takes damage).
430
+ *
431
+ */
440
432
  readonly entityHurt: EntityHurtAfterEventSignal;
433
+ readonly entityRemoved: EntityRemovedAfterEventSignal;
434
+ /**
435
+ * @remarks
436
+ * This event fires when an entity is spawned.
437
+ *
438
+ */
441
439
  readonly entitySpawn: EntitySpawnAfterEventSignal;
440
+ /**
441
+ * @remarks
442
+ * This event is fired after an explosion occurs.
443
+ *
444
+ */
442
445
  readonly explosion: ExplosionAfterEventSignal;
446
+ /**
447
+ * @remarks
448
+ * This event fires when a chargeable item completes charging.
449
+ *
450
+ */
443
451
  readonly itemCompleteCharge: ItemCompleteChargeAfterEventSignal;
452
+ /**
453
+ * @remarks
454
+ * For custom items, this event is triggered when the
455
+ * fundamental set of defined components for the item change.
456
+ * Note that this event is only fired for custom data-driven
457
+ * items.
458
+ *
459
+ */
444
460
  readonly itemDefinitionEvent: ItemDefinitionAfterEventSignal;
461
+ /**
462
+ * @remarks
463
+ * This event fires when a chargeable item is released from
464
+ * charging.
465
+ *
466
+ */
445
467
  readonly itemReleaseCharge: ItemReleaseChargeAfterEventSignal;
468
+ /**
469
+ * @remarks
470
+ * This event fires when a chargeable item starts charging.
471
+ *
472
+ */
446
473
  readonly itemStartCharge: ItemStartChargeAfterEventSignal;
474
+ /**
475
+ * @remarks
476
+ * This event fires when a player successfully uses an item or
477
+ * places a block by pressing the Use Item / Place Block
478
+ * button. If multiple blocks are placed, this event will only
479
+ * occur once at the beginning of the block placement. Note:
480
+ * This event cannot be used with Hoe or Axe items.
481
+ *
482
+ */
447
483
  readonly itemStartUseOn: ItemStartUseOnAfterEventSignal;
484
+ /**
485
+ * @remarks
486
+ * This event fires when a chargeable item stops charging.
487
+ *
488
+ */
448
489
  readonly itemStopCharge: ItemStopChargeAfterEventSignal;
490
+ /**
491
+ * @remarks
492
+ * This event fires when a player releases the Use Item / Place
493
+ * Block button after successfully using an item. Note: This
494
+ * event cannot be used with Hoe or Axe items.
495
+ *
496
+ */
449
497
  readonly itemStopUseOn: ItemStopUseOnAfterEventSignal;
498
+ /**
499
+ * @remarks
500
+ * This event fires when an item is successfully used by a
501
+ * player.
502
+ *
503
+ */
450
504
  readonly itemUse: ItemUseAfterEventSignal;
505
+ /**
506
+ * @remarks
507
+ * This event fires when an item is used on a block by a
508
+ * player.
509
+ *
510
+ */
451
511
  readonly itemUseOn: ItemUseOnAfterEventSignal;
512
+ /**
513
+ * @remarks
514
+ * This event fires when a lever activates or is deactivated.
515
+ *
516
+ */
452
517
  readonly leverActivate: LeverActionAfterEventSignal;
518
+ /**
519
+ * @remarks
520
+ * This event is an internal implementation detail, and is
521
+ * otherwise not currently functional.
522
+ *
523
+ */
453
524
  readonly messageReceive: ServerMessageAfterEventSignal;
525
+ /**
526
+ * @remarks
527
+ * This event fires when a piston expands or retracts.
528
+ *
529
+ */
454
530
  readonly pistonActivate: PistonActivateAfterEventSignal;
531
+ /**
532
+ * @remarks
533
+ * This event fires when a player joins a world. See also
534
+ * playerSpawn for another related event you can trap for when
535
+ * a player is spawned the first time within a world.
536
+ *
537
+ */
455
538
  readonly playerJoin: PlayerJoinAfterEventSignal;
539
+ /**
540
+ * @remarks
541
+ * This event fires when a player leaves a world.
542
+ *
543
+ */
456
544
  readonly playerLeave: PlayerLeaveAfterEventSignal;
545
+ /**
546
+ * @remarks
547
+ * This event fires when a player spawns or respawns. Note that
548
+ * an additional flag within this event will tell you whether
549
+ * the player is spawning right after join vs. a respawn.
550
+ *
551
+ */
457
552
  readonly playerSpawn: PlayerSpawnAfterEventSignal;
553
+ /**
554
+ * @remarks
555
+ * This event fires when a projectile hits an entity or block.
556
+ *
557
+ */
458
558
  readonly projectileHit: ProjectileHitAfterEventSignal;
559
+ /**
560
+ * @remarks
561
+ * This event will be triggered when the weather changes within
562
+ * Minecraft.
563
+ *
564
+ */
459
565
  readonly weatherChange: WeatherChangeAfterEventSignal;
566
+ /**
567
+ * @remarks
568
+ * This event fires when the script environment is initialized
569
+ * on a World. In addition, you can register dynamic properties
570
+ * within the scope of a world Initialize event.
571
+ *
572
+ */
460
573
  readonly worldInitialize: WorldInitializeAfterEventSignal;
461
574
  }
462
575
 
463
576
  /**
464
577
  * @beta
578
+ * A set of events that fire before an actual action occurs. In
579
+ * most cases, you can potentially cancel or modify the
580
+ * impending event. Note that in before events any APIs that
581
+ * modify gameplay state will not function and will throw an
582
+ * error. (e.g., dimension.spawnEntity)
465
583
  */
466
584
  export class BeforeEvents {
467
585
  protected constructor();
586
+ /**
587
+ * @remarks
588
+ * This event is triggered after a chat message has been
589
+ * broadcast or sent to players.
590
+ *
591
+ */
468
592
  readonly chatSend: ChatSendBeforeEventSignal;
593
+ /**
594
+ * @remarks
595
+ * This event is fired when an entity event has been triggered
596
+ * that will update the component definition state of an
597
+ * entity.
598
+ *
599
+ */
469
600
  readonly dataDrivenEntityTriggerEvent: DataDrivenEntityTriggerBeforeEventSignal;
601
+ /**
602
+ * @remarks
603
+ * This event is fired after an explosion occurs.
604
+ *
605
+ */
470
606
  readonly explosion: ExplosionBeforeEventSignal;
607
+ /**
608
+ * @remarks
609
+ * For custom items, this event is triggered when the
610
+ * fundamental set of defined components for the item change.
611
+ * Note that this event is only fired for custom data-driven
612
+ * items.
613
+ *
614
+ */
471
615
  readonly itemDefinitionEvent: ItemDefinitionBeforeEventSignal;
616
+ /**
617
+ * @remarks
618
+ * This event fires when an item is successfully used by a
619
+ * player.
620
+ *
621
+ */
472
622
  readonly itemUse: ItemUseBeforeEventSignal;
623
+ /**
624
+ * @remarks
625
+ * This event fires when an item is used on a block by a
626
+ * player.
627
+ *
628
+ */
473
629
  readonly itemUseOn: ItemUseOnBeforeEventSignal;
630
+ /**
631
+ * @remarks
632
+ * This event fires when a piston expands or retracts.
633
+ *
634
+ */
474
635
  readonly pistonActivate: PistonActivateBeforeEventSignal;
475
636
  }
476
637
 
@@ -830,6 +991,11 @@ export class BlockEvent {
830
991
  */
831
992
  export class BlockExplodeAfterEvent extends BlockEvent {
832
993
  protected constructor();
994
+ /**
995
+ * @remarks
996
+ * Description of the block that has exploded.
997
+ *
998
+ */
833
999
  readonly explodedBlockPermutation: BlockPermutation;
834
1000
  /**
835
1001
  * @remarks
@@ -863,7 +1029,6 @@ export class BlockInventoryComponent extends BlockComponent {
863
1029
  */
864
1030
  readonly container: Container;
865
1031
  /**
866
- * @beta
867
1032
  * @remarks
868
1033
  * Identifier of this component. Should always be
869
1034
  * minecraft:inventory.
@@ -890,11 +1055,15 @@ export class BlockLavaContainerComponent extends BlockLiquidContainerComponent {
890
1055
 
891
1056
  /**
892
1057
  * @beta
1058
+ * For blocks that can contain a liquid (e.g., a cauldron),
1059
+ * this is a base component for liquid containers.
893
1060
  */
894
1061
  export class BlockLiquidContainerComponent extends BlockComponent {
895
1062
  protected constructor();
896
1063
  /**
897
1064
  * @remarks
1065
+ * Relative fill level of the liquid container.
1066
+ *
898
1067
  * This property can't be edited in read-only mode.
899
1068
  *
900
1069
  */
@@ -1021,6 +1190,14 @@ export class BlockPermutation {
1021
1190
  matches(blockName: string, states?: Record<string, boolean | number | string>): boolean;
1022
1191
  /**
1023
1192
  * @beta
1193
+ * @remarks
1194
+ * Returns a derived BlockPermutation with a specific property
1195
+ * set.
1196
+ *
1197
+ * @param name
1198
+ * Identifier of the block property.
1199
+ * @param value
1200
+ * Value of the block property.
1024
1201
  * @throws This function can throw errors.
1025
1202
  */
1026
1203
  withState(name: string, value: boolean | number | string): BlockPermutation;
@@ -1642,6 +1819,13 @@ export class ChatSendAfterEvent {
1642
1819
  *
1643
1820
  */
1644
1821
  sendToTargets: boolean;
1822
+ /**
1823
+ * @remarks
1824
+ * List of players that will receive this message.
1825
+ *
1826
+ * @returns
1827
+ * List of player objects.
1828
+ */
1645
1829
  getTargets(): Player[];
1646
1830
  }
1647
1831
 
@@ -1667,6 +1851,14 @@ export class ChatSendBeforeEvent extends ChatSendAfterEvent {
1667
1851
  *
1668
1852
  */
1669
1853
  cancel: boolean;
1854
+ /**
1855
+ * @remarks
1856
+ * Sets an updated list of players that will receive this
1857
+ * message.
1858
+ *
1859
+ * @param players
1860
+ * Updated array of players that should receive this message.
1861
+ */
1670
1862
  setTargets(players: Player[]): void;
1671
1863
  }
1672
1864
 
@@ -1696,9 +1888,15 @@ export class CommandResult {
1696
1888
 
1697
1889
  /**
1698
1890
  * @beta
1891
+ * Base class for downstream Component implementations.
1699
1892
  */
1700
1893
  export class Component {
1701
1894
  protected constructor();
1895
+ /**
1896
+ * @remarks
1897
+ * Identifier of the component.
1898
+ *
1899
+ */
1702
1900
  readonly typeId: string;
1703
1901
  }
1704
1902
 
@@ -2160,6 +2358,9 @@ export class DataDrivenEntityTriggerAfterEvent {
2160
2358
  readonly id: string;
2161
2359
  /**
2162
2360
  * @remarks
2361
+ * An updateable list of modifications to component state that
2362
+ * are the effect of this triggered event.
2363
+ *
2163
2364
  * This function can't be called in read-only mode.
2164
2365
  *
2165
2366
  */
@@ -2202,7 +2403,21 @@ export class DataDrivenEntityTriggerBeforeEvent {
2202
2403
  *
2203
2404
  */
2204
2405
  readonly id: string;
2406
+ /**
2407
+ * @remarks
2408
+ * An updateable list of modifications to component state that
2409
+ * are the effect of this triggered event.
2410
+ *
2411
+ */
2205
2412
  getModifiers(): DefinitionModifier[];
2413
+ /**
2414
+ * @remarks
2415
+ * Changes a list of modifications to component state that are
2416
+ * the effect of this triggered event.
2417
+ *
2418
+ * @param modifiers
2419
+ * An updated list of modifications to component state.
2420
+ */
2206
2421
  setModifiers(modifiers: DefinitionModifier[]): void;
2207
2422
  }
2208
2423
 
@@ -2360,8 +2575,7 @@ export class Dimension {
2360
2575
  /**
2361
2576
  * @beta
2362
2577
  * @remarks
2363
- * Returns a block instance at the given location. This method
2364
- * was introduced as of version 1.17.10.21.
2578
+ * Returns a block instance at the given location.
2365
2579
  *
2366
2580
  * @param location
2367
2581
  * The location at which to return a block.
@@ -2376,6 +2590,10 @@ export class Dimension {
2376
2590
  * Gets the first block that intersects with a vector emanating
2377
2591
  * from a location.
2378
2592
  *
2593
+ * @param location
2594
+ * Location from where to initiate the ray check.
2595
+ * @param direction
2596
+ * Vector direction to cast the ray.
2379
2597
  * @param options
2380
2598
  * Additional options for processing this raycast query.
2381
2599
  * @throws This function can throw errors.
@@ -2652,11 +2870,20 @@ export class Effect {
2652
2870
  /**
2653
2871
  * @remarks
2654
2872
  * Gets the entire specified duration, in ticks, of this
2655
- * effect.
2873
+ * effect. There are 20 ticks per second. Use {@link
2874
+ * TicksPerSecond} constant to convert between ticks and
2875
+ * seconds.
2656
2876
  *
2657
2877
  * @throws This property can throw when used.
2658
2878
  */
2659
2879
  readonly duration: number;
2880
+ /**
2881
+ * @remarks
2882
+ * Gets the type id of this effect.
2883
+ *
2884
+ * @throws This property can throw when used.
2885
+ */
2886
+ readonly typeId: string;
2660
2887
  }
2661
2888
 
2662
2889
  /**
@@ -2713,9 +2940,39 @@ export class EffectType {
2713
2940
  * Identifier name of this effect type.
2714
2941
  *
2715
2942
  * @returns
2716
- * Identifier of the effect type.
2943
+ * Identifier of the effect type.
2944
+ */
2945
+ getName(): string;
2946
+ }
2947
+
2948
+ /**
2949
+ * @beta
2950
+ * Represents a type of effect - like poison - that can be
2951
+ * applied to an entity.
2952
+ */
2953
+ export class EffectTypes {
2954
+ protected constructor();
2955
+ /**
2956
+ * @remarks
2957
+ * Effect type for the given identifier.
2958
+ *
2959
+ * This function can't be called in read-only mode.
2960
+ *
2961
+ * @returns
2962
+ * Effect type for the given identifier or undefined if the
2963
+ * effect does not exist.
2964
+ */
2965
+ static get(identifier: string): EffectType | undefined;
2966
+ /**
2967
+ * @remarks
2968
+ * Gets all effects.
2969
+ *
2970
+ * This function can't be called in read-only mode.
2971
+ *
2972
+ * @returns
2973
+ * A list of all effects.
2717
2974
  */
2718
- getName(): string;
2975
+ static getAll(): EffectType[];
2719
2976
  }
2720
2977
 
2721
2978
  /**
@@ -2887,7 +3144,18 @@ export class EnchantmentType {
2887
3144
  */
2888
3145
  export class EnchantmentTypes {
2889
3146
  protected constructor();
2890
- static get(enchantmentId: string): EnchantmentType;
3147
+ /**
3148
+ * @remarks
3149
+ * Retrieves an enchantment with the specified identifier.
3150
+ *
3151
+ * @param enchantmentId
3152
+ * Identifier of the enchantment. For example,
3153
+ * "minecraft:flame".
3154
+ * @returns
3155
+ * If available, returns an EnchantmentType object that
3156
+ * represents the specified enchantment.
3157
+ */
3158
+ static get(enchantmentId: string): EnchantmentType | undefined;
2891
3159
  }
2892
3160
 
2893
3161
  /**
@@ -2926,6 +3194,12 @@ export class Entity {
2926
3194
  isSneaking: boolean;
2927
3195
  /**
2928
3196
  * @beta
3197
+ * @remarks
3198
+ * Whether the entity reference that you have is valid or not.
3199
+ * For example, an entity may be unloaded if it moves into a
3200
+ * chunk that is unloaded, but may be reactivated if the chunk
3201
+ * it is within gets reloaded.
3202
+ *
2929
3203
  */
2930
3204
  readonly lifetimeState: EntityLifetimeState;
2931
3205
  /**
@@ -2980,44 +3254,44 @@ export class Entity {
2980
3254
  * @param effectType
2981
3255
  * Type of effect to add to the entity.
2982
3256
  * @param duration
2983
- * Amount of time, in ticks, for the effect to apply.
2984
- * @param amplifier
2985
- * Optional amplification of the effect to apply.
3257
+ * Amount of time, in ticks, for the effect to apply. There are
3258
+ * 20 ticks per second. Use {@link TicksPerSecond} constant to
3259
+ * convert between ticks and seconds.
3260
+ * @param options
3261
+ * Additional options for the effect.
2986
3262
  * @throws This function can throw errors.
2987
3263
  * @example addEffect.js
2988
3264
  * ```typescript
2989
- * const villagerId = "minecraft:villager_v2<minecraft:ageable_grow_up>";
3265
+ * const villagerId = 'minecraft:villager_v2<minecraft:ageable_grow_up>';
2990
3266
  * const villagerLoc: mc.Vector3 = { x: 1, y: 2, z: 1 };
2991
3267
  * const villager = test.spawn(villagerId, villagerLoc);
2992
3268
  * const duration = 20;
2993
3269
  *
2994
- * villager.addEffect(MinecraftEffectTypes.poison, duration, 1);
2995
- *
3270
+ * villager.addEffect(EffectTypes.get('poison'), duration, { amplifier: 1 });
2996
3271
  *
2997
3272
  * ```
2998
3273
  * @example quickFoxLazyDog.ts
2999
3274
  * ```typescript
3000
- * const fox = overworld.spawnEntity("minecraft:fox", {
3001
- * x: targetLocation.x + 1,
3002
- * y: targetLocation.y + 2,
3003
- * z: targetLocation.z + 3,
3275
+ * const fox = overworld.spawnEntity('minecraft:fox', {
3276
+ * x: targetLocation.x + 1,
3277
+ * y: targetLocation.y + 2,
3278
+ * z: targetLocation.z + 3,
3004
3279
  * });
3005
- * fox.addEffect(mc.MinecraftEffectTypes.speed, 10, 20);
3006
- * log("Created a fox.");
3280
+ * fox.addEffect(mc.MinecraftEffectTypes.speed, 10, { amplifier: 20 });
3281
+ * log('Created a fox.');
3007
3282
  *
3008
- * const wolf = overworld.spawnEntity("minecraft:wolf", {
3009
- * x: targetLocation.x + 4,
3010
- * y: targetLocation.y + 2,
3011
- * z: targetLocation.z + 3,
3283
+ * const wolf = overworld.spawnEntity('minecraft:wolf', {
3284
+ * x: targetLocation.x + 4,
3285
+ * y: targetLocation.y + 2,
3286
+ * z: targetLocation.z + 3,
3012
3287
  * });
3013
- * wolf.addEffect(mc.MinecraftEffectTypes.slowness, 10, 20);
3288
+ * wolf.addEffect(mc.MinecraftEffectTypes.slowness, 10, { amplifier: 20 });
3014
3289
  * wolf.isSneaking = true;
3015
- * log("Created a sneaking wolf.", 1);
3016
- *
3290
+ * log('Created a sneaking wolf.', 1);
3017
3291
  *
3018
3292
  * ```
3019
3293
  */
3020
- addEffect(effectType: EffectType, duration: number, amplifier?: number, showParticles?: boolean): void;
3294
+ addEffect(effectType: EffectType | string, duration: number, options?: EntityEffectOptions): boolean;
3021
3295
  /**
3022
3296
  * @beta
3023
3297
  * @remarks
@@ -3125,7 +3399,7 @@ export class Entity {
3125
3399
  * 'minecraft:' is assumed. If the component is not present on
3126
3400
  * the entity, undefined is returned.
3127
3401
  */
3128
- getComponent(componentId: string): EntityComponent;
3402
+ getComponent(componentId: string): EntityComponent | undefined;
3129
3403
  /**
3130
3404
  * @beta
3131
3405
  * @remarks
@@ -3156,11 +3430,11 @@ export class Entity {
3156
3430
  * effect is not present.
3157
3431
  * @throws This function can throw errors.
3158
3432
  */
3159
- getEffect(effectType: EffectType): Effect;
3433
+ getEffect(effectType: EffectType | string): Effect | undefined;
3160
3434
  /**
3161
3435
  * @beta
3162
3436
  * @remarks
3163
- * Returns a set of effects applied to this item.
3437
+ * Returns a set of effects applied to this entity.
3164
3438
  *
3165
3439
  * @returns
3166
3440
  * List of effects.
@@ -3268,6 +3542,20 @@ export class Entity {
3268
3542
  * @throws This function can throw errors.
3269
3543
  */
3270
3544
  removeDynamicProperty(identifier: string): boolean;
3545
+ /**
3546
+ * @beta
3547
+ * @remarks
3548
+ * Removes the specified EffectType on the entity, or returns
3549
+ * false if the effect is not present.
3550
+ *
3551
+ * This function can't be called in read-only mode.
3552
+ *
3553
+ * @returns
3554
+ * Returns true if the effect has been removed and false if the
3555
+ * effect is not present.
3556
+ * @throws This function can throw errors.
3557
+ */
3558
+ removeEffect(effectType: EffectType | string): boolean;
3271
3559
  /**
3272
3560
  * @beta
3273
3561
  * @remarks
@@ -3283,6 +3571,8 @@ export class Entity {
3283
3571
  /**
3284
3572
  * @beta
3285
3573
  * @remarks
3574
+ * Runs a synchronous command on the entity.
3575
+ *
3286
3576
  * This function can't be called in read-only mode.
3287
3577
  *
3288
3578
  * @throws This function can throw errors.
@@ -3368,8 +3658,16 @@ export class Entity {
3368
3658
  /**
3369
3659
  * @beta
3370
3660
  * @remarks
3661
+ * Attempts to try a teleport, but may not complete the
3662
+ * teleport operation (for example, if there are blocks at the
3663
+ * destination.)
3664
+ *
3371
3665
  * This function can't be called in read-only mode.
3372
3666
  *
3667
+ * @param location
3668
+ * Location to teleport the entity to.
3669
+ * @param teleportOptions
3670
+ * Options regarding the teleport operation.
3373
3671
  * @throws This function can throw errors.
3374
3672
  */
3375
3673
  tryTeleport(location: Vector3, teleportOptions?: TeleportOptions): boolean;
@@ -3656,8 +3954,6 @@ export class EntityColorComponent extends EntityComponent {
3656
3954
  protected constructor();
3657
3955
  /**
3658
3956
  * @remarks
3659
- * The palette color value of the entity.
3660
- *
3661
3957
  * This property can't be edited in read-only mode.
3662
3958
  *
3663
3959
  */
@@ -3678,6 +3974,7 @@ export class EntityColorComponent extends EntityComponent {
3678
3974
  export class EntityComponent extends Component {
3679
3975
  protected constructor();
3680
3976
  /**
3977
+ * @beta
3681
3978
  * @remarks
3682
3979
  * The entity that owns this component.
3683
3980
  *
@@ -3795,8 +4092,6 @@ export class EntityFlyingSpeedComponent extends EntityComponent {
3795
4092
  protected constructor();
3796
4093
  /**
3797
4094
  * @remarks
3798
- * Speed while flying value of the entity.
3799
- *
3800
4095
  * This property can't be edited in read-only mode.
3801
4096
  *
3802
4097
  */
@@ -3818,10 +4113,6 @@ export class EntityFrictionModifierComponent extends EntityComponent {
3818
4113
  protected constructor();
3819
4114
  /**
3820
4115
  * @remarks
3821
- * The higher the number, the more the friction affects this
3822
- * entity. A value of 1.0 means regular friction, while 2.0
3823
- * means twice as much.
3824
- *
3825
4116
  * This property can't be edited in read-only mode.
3826
4117
  *
3827
4118
  */
@@ -3844,9 +4135,6 @@ export class EntityGroundOffsetComponent extends EntityComponent {
3844
4135
  protected constructor();
3845
4136
  /**
3846
4137
  * @remarks
3847
- * The value of the entity's offset from the terrain, in
3848
- * blocks.
3849
- *
3850
4138
  * This property can't be edited in read-only mode.
3851
4139
  *
3852
4140
  */
@@ -3892,6 +4180,8 @@ export class EntityHealableComponent extends EntityComponent {
3892
4180
  * @remarks
3893
4181
  * A set of items that can specifically heal this entity.
3894
4182
  *
4183
+ * @returns
4184
+ * Entity that this component is associated with.
3895
4185
  * @throws This function can throw errors.
3896
4186
  */
3897
4187
  getFeedItems(): FeedItem[];
@@ -4050,7 +4340,6 @@ export class EntityInventoryComponent extends EntityComponent {
4050
4340
  */
4051
4341
  readonly restrictToOwner: boolean;
4052
4342
  /**
4053
- * @beta
4054
4343
  * @remarks
4055
4344
  * Identifier of this component. Should always be
4056
4345
  * minecraft:inventory.
@@ -4112,7 +4401,7 @@ export class EntityIsChestedComponent extends EntityComponent {
4112
4401
  * When added, this component signifies that dyes can be used
4113
4402
  * on this entity to change its color.
4114
4403
  */
4115
- export class EntityIsDyableComponent extends EntityComponent {
4404
+ export class EntityIsDyeableComponent extends EntityComponent {
4116
4405
  protected constructor();
4117
4406
  /**
4118
4407
  * @remarks
@@ -4284,7 +4573,6 @@ export class EntityItemComponent extends EntityComponent {
4284
4573
  */
4285
4574
  readonly itemStack: ItemStack;
4286
4575
  /**
4287
- * @beta
4288
4576
  * @remarks
4289
4577
  * Identifier of this component.
4290
4578
  *
@@ -4387,9 +4675,6 @@ export class EntityMarkVariantComponent extends EntityComponent {
4387
4675
  protected constructor();
4388
4676
  /**
4389
4677
  * @remarks
4390
- * The identifier of the variant. By convention, 0 is the
4391
- * identifier of the base entity.
4392
- *
4393
4678
  * This property can't be edited in read-only mode.
4394
4679
  *
4395
4680
  */
@@ -4435,15 +4720,8 @@ export class EntityMountTamingComponent extends EntityComponent {
4435
4720
  * When added, this movement control allows the mob to swim in
4436
4721
  * water and walk on land.
4437
4722
  */
4438
- export class EntityMovementAmphibiousComponent extends EntityComponent {
4723
+ export class EntityMovementAmphibiousComponent extends EntityBaseMovementComponent {
4439
4724
  protected constructor();
4440
- /**
4441
- * @remarks
4442
- * The maximum number in degrees the mob can turn per tick.
4443
- *
4444
- * @throws This property can throw when used.
4445
- */
4446
- readonly maxTurn: number;
4447
4725
  /**
4448
4726
  * @remarks
4449
4727
  * Identifier of this component. Should always be
@@ -4457,15 +4735,8 @@ export class EntityMovementAmphibiousComponent extends EntityComponent {
4457
4735
  * @beta
4458
4736
  * This component accents the movement of an entity.
4459
4737
  */
4460
- export class EntityMovementBasicComponent extends EntityComponent {
4738
+ export class EntityMovementBasicComponent extends EntityBaseMovementComponent {
4461
4739
  protected constructor();
4462
- /**
4463
- * @remarks
4464
- * The maximum number in degrees the mob can turn per tick.
4465
- *
4466
- * @throws This property can throw when used.
4467
- */
4468
- readonly maxTurn: number;
4469
4740
  /**
4470
4741
  * @remarks
4471
4742
  * Identifier of this component. Should always be
@@ -4905,8 +5176,6 @@ export class EntityPushThroughComponent extends EntityComponent {
4905
5176
  protected constructor();
4906
5177
  /**
4907
5178
  * @remarks
4908
- * The value of the entity's push-through, in blocks.
4909
- *
4910
5179
  * This property can't be edited in read-only mode.
4911
5180
  *
4912
5181
  */
@@ -4920,6 +5189,21 @@ export class EntityPushThroughComponent extends EntityComponent {
4920
5189
  static readonly componentId = 'minecraft:push_through';
4921
5190
  }
4922
5191
 
5192
+ /**
5193
+ * @beta
5194
+ */
5195
+ export class EntityRemovedAfterEvent {
5196
+ protected constructor();
5197
+ readonly removedEntity: string;
5198
+ }
5199
+
5200
+ /**
5201
+ * @beta
5202
+ */
5203
+ export class EntityRemovedAfterEventSignal extends IEntityRemovedAfterEventSignal {
5204
+ protected constructor();
5205
+ }
5206
+
4923
5207
  /**
4924
5208
  * @beta
4925
5209
  * When added, this component adds the capability that an
@@ -5072,10 +5356,6 @@ export class EntityScaleComponent extends EntityComponent {
5072
5356
  protected constructor();
5073
5357
  /**
5074
5358
  * @remarks
5075
- * The value of the scale. 1.0 means the entity will appear at
5076
- * the scale they are defined in their model. Higher numbers
5077
- * make the entity bigger.
5078
- *
5079
5359
  * This property can't be edited in read-only mode.
5080
5360
  *
5081
5361
  */
@@ -5098,9 +5378,6 @@ export class EntitySkinIdComponent extends EntityComponent {
5098
5378
  protected constructor();
5099
5379
  /**
5100
5380
  * @remarks
5101
- * The identifier of the skin. By convention, 0 is the
5102
- * identifier of the base skin.
5103
- *
5104
5381
  * This property can't be edited in read-only mode.
5105
5382
  *
5106
5383
  */
@@ -5154,13 +5431,6 @@ export class EntityStrengthComponent extends EntityComponent {
5154
5431
  * @throws This property can throw when used.
5155
5432
  */
5156
5433
  readonly max: number;
5157
- /**
5158
- * @remarks
5159
- * Current strength value of this entity, after any effects or
5160
- * component updates are applied.
5161
- *
5162
- * @throws This property can throw when used.
5163
- */
5164
5434
  readonly value: number;
5165
5435
  /**
5166
5436
  * @remarks
@@ -5291,13 +5561,6 @@ export class EntityUnderwaterMovementComponent extends EntityAttributeComponent
5291
5561
  */
5292
5562
  export class EntityVariantComponent extends EntityComponent {
5293
5563
  protected constructor();
5294
- /**
5295
- * @remarks
5296
- * The identifier of the variant. By convention, 0 is the
5297
- * identifier of the base entity.
5298
- *
5299
- * @throws This property can throw when used.
5300
- */
5301
5564
  readonly value: number;
5302
5565
  /**
5303
5566
  * @remarks
@@ -5343,6 +5606,11 @@ export class ExplosionAfterEvent {
5343
5606
  *
5344
5607
  */
5345
5608
  readonly source?: Entity;
5609
+ /**
5610
+ * @remarks
5611
+ * A collection of blocks impacted by this explosion event.
5612
+ *
5613
+ */
5346
5614
  getImpactedBlocks(): Vector3[];
5347
5615
  }
5348
5616
 
@@ -5368,6 +5636,14 @@ export class ExplosionBeforeEvent extends ExplosionAfterEvent {
5368
5636
  *
5369
5637
  */
5370
5638
  cancel: boolean;
5639
+ /**
5640
+ * @remarks
5641
+ * Updates a collection of blocks impacted by this explosion
5642
+ * event.
5643
+ *
5644
+ * @param blocks
5645
+ * New list of blocks that are impacted by this explosion.
5646
+ */
5371
5647
  setImpactedBlocks(blocks: Vector3[]): void;
5372
5648
  }
5373
5649
 
@@ -5481,6 +5757,8 @@ export class FluidContainer {
5481
5757
 
5482
5758
  /**
5483
5759
  * @beta
5760
+ * Provides an adaptable interface for callers to subscribe to
5761
+ * an event that fires when blocks are broken.
5484
5762
  */
5485
5763
  export class IBlockBreakAfterEventSignal {
5486
5764
  protected constructor();
@@ -5501,6 +5779,8 @@ export class IBlockBreakAfterEventSignal {
5501
5779
 
5502
5780
  /**
5503
5781
  * @beta
5782
+ * Provides an adaptable interface for callers to subscribe to
5783
+ * an event that fires when an explosion occurs.
5504
5784
  */
5505
5785
  export class IBlockExplodeAfterEventSignal {
5506
5786
  protected constructor();
@@ -5521,6 +5801,8 @@ export class IBlockExplodeAfterEventSignal {
5521
5801
 
5522
5802
  /**
5523
5803
  * @beta
5804
+ * Provides an adaptable interface for callers to subscribe to
5805
+ * an event that fires after a block is placed.
5524
5806
  */
5525
5807
  export class IBlockPlaceAfterEventSignal {
5526
5808
  protected constructor();
@@ -5541,6 +5823,8 @@ export class IBlockPlaceAfterEventSignal {
5541
5823
 
5542
5824
  /**
5543
5825
  * @beta
5826
+ * Provides an adaptable interface for callers to subscribe to
5827
+ * an event that fires when a button is pushed.
5544
5828
  */
5545
5829
  export class IButtonPushAfterEventSignal {
5546
5830
  protected constructor();
@@ -5561,6 +5845,8 @@ export class IButtonPushAfterEventSignal {
5561
5845
 
5562
5846
  /**
5563
5847
  * @beta
5848
+ * Provides an adaptable interface for callers to subscribe to
5849
+ * an event that fires when a chat message is sent.
5564
5850
  */
5565
5851
  export class IChatSendAfterEventSignal {
5566
5852
  protected constructor();
@@ -5581,6 +5867,8 @@ export class IChatSendAfterEventSignal {
5581
5867
 
5582
5868
  /**
5583
5869
  * @beta
5870
+ * Provides an adaptable interface for callers to subscribe to
5871
+ * an event that fires before a chat message is sent.
5584
5872
  */
5585
5873
  export class IChatSendBeforeEventSignal {
5586
5874
  protected constructor();
@@ -5601,6 +5889,9 @@ export class IChatSendBeforeEventSignal {
5601
5889
 
5602
5890
  /**
5603
5891
  * @beta
5892
+ * Provides an adaptable interface for callers to subscribe to
5893
+ * an event that fires when an entities' definition is
5894
+ * triggered to change.
5604
5895
  */
5605
5896
  export class IDataDrivenEntityTriggerAfterEventSignal {
5606
5897
  protected constructor();
@@ -5624,6 +5915,9 @@ export class IDataDrivenEntityTriggerAfterEventSignal {
5624
5915
 
5625
5916
  /**
5626
5917
  * @beta
5918
+ * Provides an adaptable interface for callers to subscribe to
5919
+ * an event that fires before an entities' definition is
5920
+ * scheduled to change via a triggered event.
5627
5921
  */
5628
5922
  export class IDataDrivenEntityTriggerBeforeEventSignal {
5629
5923
  protected constructor();
@@ -5647,6 +5941,8 @@ export class IDataDrivenEntityTriggerBeforeEventSignal {
5647
5941
 
5648
5942
  /**
5649
5943
  * @beta
5944
+ * Provides an adaptable interface for callers to subscribe to
5945
+ * an event that fires when an effect is added to an entity.
5650
5946
  */
5651
5947
  export class IEffectAddAfterEventSignal {
5652
5948
  protected constructor();
@@ -5670,6 +5966,8 @@ export class IEffectAddAfterEventSignal {
5670
5966
 
5671
5967
  /**
5672
5968
  * @beta
5969
+ * Provides an adaptable interface for callers to subscribe to
5970
+ * an event that fires when an entity dies.
5673
5971
  */
5674
5972
  export class IEntityDieAfterEventSignal {
5675
5973
  protected constructor();
@@ -5693,6 +5991,9 @@ export class IEntityDieAfterEventSignal {
5693
5991
 
5694
5992
  /**
5695
5993
  * @beta
5994
+ * Provides an adaptable interface for callers to subscribe to
5995
+ * an event that fires when an entity hits (melee attacks)
5996
+ * another entity.
5696
5997
  */
5697
5998
  export class IEntityHitAfterEventSignal {
5698
5999
  protected constructor();
@@ -5716,6 +6017,8 @@ export class IEntityHitAfterEventSignal {
5716
6017
 
5717
6018
  /**
5718
6019
  * @beta
6020
+ * Provides an adaptable interface for callers to subscribe to
6021
+ * an event that fires when an entity is hurt.
5719
6022
  */
5720
6023
  export class IEntityHurtAfterEventSignal {
5721
6024
  protected constructor();
@@ -5740,6 +6043,31 @@ export class IEntityHurtAfterEventSignal {
5740
6043
  /**
5741
6044
  * @beta
5742
6045
  */
6046
+ export class IEntityRemovedAfterEventSignal {
6047
+ protected constructor();
6048
+ /**
6049
+ * @remarks
6050
+ * This function can't be called in read-only mode.
6051
+ *
6052
+ */
6053
+ subscribe(
6054
+ callback: (arg: EntityRemovedAfterEvent) => void,
6055
+ options?: EntityEventOptions,
6056
+ ): (arg: EntityRemovedAfterEvent) => void;
6057
+ /**
6058
+ * @remarks
6059
+ * This function can't be called in read-only mode.
6060
+ *
6061
+ * @throws This function can throw errors.
6062
+ */
6063
+ unsubscribe(callback: (arg: EntityRemovedAfterEvent) => void): void;
6064
+ }
6065
+
6066
+ /**
6067
+ * @beta
6068
+ * Provides an adaptable interface for callers to subscribe to
6069
+ * an event that fires after an entity is spawned.
6070
+ */
5743
6071
  export class IEntitySpawnAfterEventSignal {
5744
6072
  protected constructor();
5745
6073
  /**
@@ -5759,6 +6087,8 @@ export class IEntitySpawnAfterEventSignal {
5759
6087
 
5760
6088
  /**
5761
6089
  * @beta
6090
+ * Provides an adaptable interface for callers to subscribe to
6091
+ * an event that fires after an explosion occurs.
5762
6092
  */
5763
6093
  export class IExplosionAfterEventSignal {
5764
6094
  protected constructor();
@@ -5779,6 +6109,8 @@ export class IExplosionAfterEventSignal {
5779
6109
 
5780
6110
  /**
5781
6111
  * @beta
6112
+ * Provides an adaptable interface for callers to subscribe to
6113
+ * an event that fires before an explosion begins.
5782
6114
  */
5783
6115
  export class IExplosionBeforeEventSignal {
5784
6116
  protected constructor();
@@ -5799,6 +6131,8 @@ export class IExplosionBeforeEventSignal {
5799
6131
 
5800
6132
  /**
5801
6133
  * @beta
6134
+ * Provides an adaptable interface for callers to subscribe to
6135
+ * an event that fires after an item has completed charging.
5802
6136
  */
5803
6137
  export class IItemCompleteChargeAfterEventSignal {
5804
6138
  protected constructor();
@@ -5819,6 +6153,8 @@ export class IItemCompleteChargeAfterEventSignal {
5819
6153
 
5820
6154
  /**
5821
6155
  * @beta
6156
+ * Provides an adaptable interface for callers to subscribe to
6157
+ * an event that fires after an items' definition has changed.
5822
6158
  */
5823
6159
  export class IItemDefinitionAfterEventSignal {
5824
6160
  protected constructor();
@@ -5841,6 +6177,8 @@ export class IItemDefinitionAfterEventSignal {
5841
6177
 
5842
6178
  /**
5843
6179
  * @beta
6180
+ * Provides an adaptable interface for callers to subscribe to
6181
+ * an event that fires before an items' definition changes.
5844
6182
  */
5845
6183
  export class IItemDefinitionBeforeEventSignal {
5846
6184
  protected constructor();
@@ -5863,6 +6201,8 @@ export class IItemDefinitionBeforeEventSignal {
5863
6201
 
5864
6202
  /**
5865
6203
  * @beta
6204
+ * Provides an adaptable interface for callers to subscribe to
6205
+ * an event that fires after a charged item is released.
5866
6206
  */
5867
6207
  export class IItemReleaseChargeAfterEventSignal {
5868
6208
  protected constructor();
@@ -5883,6 +6223,8 @@ export class IItemReleaseChargeAfterEventSignal {
5883
6223
 
5884
6224
  /**
5885
6225
  * @beta
6226
+ * Provides an adaptable interface for callers to subscribe to
6227
+ * an event that fires when a chargeable item starts charging.
5886
6228
  */
5887
6229
  export class IItemStartChargeAfterEventSignal {
5888
6230
  protected constructor();
@@ -5903,6 +6245,9 @@ export class IItemStartChargeAfterEventSignal {
5903
6245
 
5904
6246
  /**
5905
6247
  * @beta
6248
+ * Provides an adaptable interface for callers to subscribe to
6249
+ * an event that fires when an item item is starting to be used
6250
+ * on a block.
5906
6251
  */
5907
6252
  export class IItemStartUseOnAfterEventSignal {
5908
6253
  protected constructor();
@@ -5923,6 +6268,8 @@ export class IItemStartUseOnAfterEventSignal {
5923
6268
 
5924
6269
  /**
5925
6270
  * @beta
6271
+ * Provides an adaptable interface for callers to subscribe to
6272
+ * an event that fires when an item stops charging.
5926
6273
  */
5927
6274
  export class IItemStopChargeAfterEventSignal {
5928
6275
  protected constructor();
@@ -5943,6 +6290,9 @@ export class IItemStopChargeAfterEventSignal {
5943
6290
 
5944
6291
  /**
5945
6292
  * @beta
6293
+ * Provides an adaptable interface for callers to subscribe to
6294
+ * an event that fires when an item has stopped being used on a
6295
+ * block.
5946
6296
  */
5947
6297
  export class IItemStopUseOnAfterEventSignal {
5948
6298
  protected constructor();
@@ -5963,6 +6313,8 @@ export class IItemStopUseOnAfterEventSignal {
5963
6313
 
5964
6314
  /**
5965
6315
  * @beta
6316
+ * Provides an adaptable interface for callers to subscribe to
6317
+ * an event that fires after an item is used.
5966
6318
  */
5967
6319
  export class IItemUseAfterEventSignal {
5968
6320
  protected constructor();
@@ -5983,6 +6335,8 @@ export class IItemUseAfterEventSignal {
5983
6335
 
5984
6336
  /**
5985
6337
  * @beta
6338
+ * Provides an adaptable interface for callers to subscribe to
6339
+ * an event that fires before an item is used.
5986
6340
  */
5987
6341
  export class IItemUseBeforeEventSignal {
5988
6342
  protected constructor();
@@ -6003,6 +6357,8 @@ export class IItemUseBeforeEventSignal {
6003
6357
 
6004
6358
  /**
6005
6359
  * @beta
6360
+ * Provides an adaptable interface for callers to subscribe to
6361
+ * an event that fires after an item is used on a block.
6006
6362
  */
6007
6363
  export class IItemUseOnAfterEventSignal {
6008
6364
  protected constructor();
@@ -6023,6 +6379,8 @@ export class IItemUseOnAfterEventSignal {
6023
6379
 
6024
6380
  /**
6025
6381
  * @beta
6382
+ * Provides an adaptable interface for callers to subscribe to
6383
+ * an event that fires before an item is being used on a block.
6026
6384
  */
6027
6385
  export class IItemUseOnBeforeEventSignal {
6028
6386
  protected constructor();
@@ -6043,6 +6401,8 @@ export class IItemUseOnBeforeEventSignal {
6043
6401
 
6044
6402
  /**
6045
6403
  * @beta
6404
+ * Provides an adaptable interface for callers to subscribe to
6405
+ * an event that fires after a lever is used.
6046
6406
  */
6047
6407
  export class ILeverActionAfterEventSignal {
6048
6408
  protected constructor();
@@ -6063,6 +6423,8 @@ export class ILeverActionAfterEventSignal {
6063
6423
 
6064
6424
  /**
6065
6425
  * @beta
6426
+ * Provides an adaptable interface for callers to subscribe to
6427
+ * an event that fires after a piston is activated.
6066
6428
  */
6067
6429
  export class IPistonActivateAfterEventSignal {
6068
6430
  protected constructor();
@@ -6083,6 +6445,8 @@ export class IPistonActivateAfterEventSignal {
6083
6445
 
6084
6446
  /**
6085
6447
  * @beta
6448
+ * Provides an adaptable interface for callers to subscribe to
6449
+ * an event that fires before a piston is activated.
6086
6450
  */
6087
6451
  export class IPistonActivateBeforeEventSignal {
6088
6452
  protected constructor();
@@ -6103,6 +6467,8 @@ export class IPistonActivateBeforeEventSignal {
6103
6467
 
6104
6468
  /**
6105
6469
  * @beta
6470
+ * Provides an adaptable interface for callers to subscribe to
6471
+ * an event that fires after a player joins a world.
6106
6472
  */
6107
6473
  export class IPlayerJoinAfterEventSignal {
6108
6474
  protected constructor();
@@ -6123,6 +6489,8 @@ export class IPlayerJoinAfterEventSignal {
6123
6489
 
6124
6490
  /**
6125
6491
  * @beta
6492
+ * Provides an adaptable interface for callers to subscribe to
6493
+ * an event that fires after a player leaves a world.
6126
6494
  */
6127
6495
  export class IPlayerLeaveAfterEventSignal {
6128
6496
  protected constructor();
@@ -6143,6 +6511,8 @@ export class IPlayerLeaveAfterEventSignal {
6143
6511
 
6144
6512
  /**
6145
6513
  * @beta
6514
+ * Provides an adaptable interface for callers to subscribe to
6515
+ * an event that fires after a player spawns.
6146
6516
  */
6147
6517
  export class IPlayerSpawnAfterEventSignal {
6148
6518
  protected constructor();
@@ -6163,6 +6533,8 @@ export class IPlayerSpawnAfterEventSignal {
6163
6533
 
6164
6534
  /**
6165
6535
  * @beta
6536
+ * Provides an adaptable interface for callers to subscribe to
6537
+ * an event that fires after a projectile hits a target.
6166
6538
  */
6167
6539
  export class IProjectileHitAfterEventSignal {
6168
6540
  protected constructor();
@@ -6183,6 +6555,8 @@ export class IProjectileHitAfterEventSignal {
6183
6555
 
6184
6556
  /**
6185
6557
  * @beta
6558
+ * Provides an adaptable interface for callers to subscribe to
6559
+ * an event that fires when /script event command is called.
6186
6560
  */
6187
6561
  export class IScriptEventCommandMessageAfterEventSignal {
6188
6562
  protected constructor();
@@ -6206,6 +6580,9 @@ export class IScriptEventCommandMessageAfterEventSignal {
6206
6580
 
6207
6581
  /**
6208
6582
  * @beta
6583
+ * Provides an adaptable interface for callers to subscribe to
6584
+ * an event that fires after a server message is sent. Note
6585
+ * that this event is for internal use only.
6209
6586
  */
6210
6587
  export class IServerMessageAfterEventSignal {
6211
6588
  protected constructor();
@@ -6647,6 +7024,8 @@ export class ItemStack {
6647
7024
  * Creates an exact copy of the item stack, including any
6648
7025
  * custom data or properties.
6649
7026
  *
7027
+ * @returns
7028
+ * Returns a copy of this item stack.
6650
7029
  */
6651
7030
  clone(): ItemStack;
6652
7031
  /**
@@ -6689,6 +7068,9 @@ export class ItemStack {
6689
7068
  getLore(): string[];
6690
7069
  /**
6691
7070
  * @beta
7071
+ * @remarks
7072
+ * Returns a set of tags associated with this item stack.
7073
+ *
6692
7074
  */
6693
7075
  getTags(): string[];
6694
7076
  /**
@@ -6704,6 +7086,15 @@ export class ItemStack {
6704
7086
  hasComponent(componentId: string): boolean;
6705
7087
  /**
6706
7088
  * @beta
7089
+ * @remarks
7090
+ * Checks whether this item stack has a particular tag
7091
+ * associated with it.
7092
+ *
7093
+ * @param tag
7094
+ * Tag to search for.
7095
+ * @returns
7096
+ * True if the Item Stack has the tag associated with it, else
7097
+ * false.
6707
7098
  */
6708
7099
  hasTag(tag: string): boolean;
6709
7100
  /**
@@ -7015,6 +7406,11 @@ export class ItemTypes {
7015
7406
  */
7016
7407
  export class ItemUseAfterEvent {
7017
7408
  protected constructor();
7409
+ /**
7410
+ * @remarks
7411
+ * The impacted item stack that is being used.
7412
+ *
7413
+ */
7018
7414
  itemStack: ItemStack;
7019
7415
  /**
7020
7416
  * @remarks
@@ -7081,6 +7477,11 @@ export class ItemUseOnAfterEvent {
7081
7477
  *
7082
7478
  */
7083
7479
  readonly faceLocation: Vector3;
7480
+ /**
7481
+ * @remarks
7482
+ * The impacted item stack that is being used on a block.
7483
+ *
7484
+ */
7084
7485
  readonly itemStack: ItemStack;
7085
7486
  /**
7086
7487
  * @remarks
@@ -7125,6 +7526,9 @@ export class ItemUseOnBeforeEventSignal extends IItemUseOnBeforeEventSignal {
7125
7526
 
7126
7527
  /**
7127
7528
  * @beta
7529
+ * An event that fires before the watchdog is about to
7530
+ * terminate a world because various performance metrics for
7531
+ * scripting have exceeded a threshold.
7128
7532
  */
7129
7533
  export class IWatchdogTerminateBeforeEventSignal {
7130
7534
  protected constructor();
@@ -7145,6 +7549,7 @@ export class IWatchdogTerminateBeforeEventSignal {
7145
7549
 
7146
7550
  /**
7147
7551
  * @beta
7552
+ * An event that fires after the weather has changed.
7148
7553
  */
7149
7554
  export class IWeatherChangeAfterEventSignal {
7150
7555
  protected constructor();
@@ -7165,6 +7570,8 @@ export class IWeatherChangeAfterEventSignal {
7165
7570
 
7166
7571
  /**
7167
7572
  * @beta
7573
+ * An event that fires when a world is first initialized or
7574
+ * loaded.
7168
7575
  */
7169
7576
  export class IWorldInitializeAfterEventSignal {
7170
7577
  protected constructor();
@@ -16227,12 +16634,18 @@ export class ProjectileHitAfterEvent {
16227
16634
  readonly source: Entity;
16228
16635
  /**
16229
16636
  * @remarks
16637
+ * Contains additional information about the block that was hit
16638
+ * by the projectile, or undefined if the projectile did not
16639
+ * hit a block.
16640
+ *
16230
16641
  * This function can't be called in read-only mode.
16231
16642
  *
16232
16643
  */
16233
16644
  getBlockHit(): BlockHitInformation | undefined;
16234
16645
  /**
16235
16646
  * @remarks
16647
+ * Contains additional information about a block that was hit.
16648
+ *
16236
16649
  * This function can't be called in read-only mode.
16237
16650
  *
16238
16651
  */
@@ -17360,6 +17773,10 @@ export class WorldInitializeAfterEvent {
17360
17773
 
17361
17774
  /**
17362
17775
  * @beta
17776
+ * Manages callbacks that are run at the initialization of the
17777
+ * scripting environment for a World. Do note that this event
17778
+ * may run multiple times within a session in the case that the
17779
+ * /reload command is used.
17363
17780
  */
17364
17781
  export class WorldInitializeAfterEventSignal extends IWorldInitializeAfterEventSignal {
17365
17782
  protected constructor();
@@ -17367,8 +17784,15 @@ export class WorldInitializeAfterEventSignal extends IWorldInitializeAfterEventS
17367
17784
 
17368
17785
  /**
17369
17786
  * @beta
17787
+ * Contains additional options for a block fill operation.
17370
17788
  */
17371
17789
  export interface BlockFillOptions {
17790
+ /**
17791
+ * @remarks
17792
+ * When specified, the fill operation will only apply to blocks
17793
+ * that match this description.
17794
+ *
17795
+ */
17372
17796
  matchingBlock?: BlockPermutation;
17373
17797
  }
17374
17798
 
@@ -17487,26 +17911,66 @@ export interface CompoundBlockVolumeItem {
17487
17911
 
17488
17912
  /**
17489
17913
  * @beta
17914
+ * Additional options for when damage has been applied via a
17915
+ * projectile.
17490
17916
  */
17491
17917
  export interface EntityApplyDamageByProjectileOptions {
17918
+ /**
17919
+ * @remarks
17920
+ * Optional entity that fired the projectile.
17921
+ *
17922
+ */
17492
17923
  damagingEntity?: Entity;
17924
+ /**
17925
+ * @remarks
17926
+ * Projectile that caused damage.
17927
+ *
17928
+ */
17493
17929
  damagingProjectile: Entity;
17494
17930
  }
17495
17931
 
17496
17932
  /**
17497
17933
  * @beta
17934
+ * Additional descriptions and metadata for a damage event.
17498
17935
  */
17499
17936
  export interface EntityApplyDamageOptions {
17937
+ /**
17938
+ * @remarks
17939
+ * Underlying cause of the damage.
17940
+ *
17941
+ */
17500
17942
  cause: EntityDamageCause;
17943
+ /**
17944
+ * @remarks
17945
+ * Optional entity that caused the damage.
17946
+ *
17947
+ */
17501
17948
  damagingEntity?: Entity;
17502
17949
  }
17503
17950
 
17504
17951
  /**
17505
17952
  * @beta
17953
+ * Provides information about how damage has been applied to an
17954
+ * entity.
17506
17955
  */
17507
17956
  export interface EntityDamageSource {
17957
+ /**
17958
+ * @remarks
17959
+ * Cause enumeration of damage.
17960
+ *
17961
+ */
17508
17962
  cause: EntityDamageCause;
17963
+ /**
17964
+ * @remarks
17965
+ * Optional entity that caused the damage.
17966
+ *
17967
+ */
17509
17968
  damagingEntity?: Entity;
17969
+ /**
17970
+ * @remarks
17971
+ * Optional projectile that may have caused damage.
17972
+ *
17973
+ */
17510
17974
  damagingProjectile?: Entity;
17511
17975
  }
17512
17976
 
@@ -17540,6 +18004,25 @@ export interface EntityDataDrivenTriggerEventOptions {
17540
18004
  eventTypes?: string[];
17541
18005
  }
17542
18006
 
18007
+ /**
18008
+ * @beta
18009
+ * Contains additional options for entity effects.
18010
+ */
18011
+ export interface EntityEffectOptions {
18012
+ /**
18013
+ * @remarks
18014
+ * The strength of the effect.
18015
+ *
18016
+ */
18017
+ amplifier?: number;
18018
+ /**
18019
+ * @remarks
18020
+ * If true, will show particles when effect is on the entity.
18021
+ *
18022
+ */
18023
+ showParticles?: boolean;
18024
+ }
18025
+
17543
18026
  /**
17544
18027
  * @beta
17545
18028
  * Contains optional parameters for registering an entity
@@ -17877,20 +18360,60 @@ export interface NumberRange {
17877
18360
 
17878
18361
  /**
17879
18362
  * @beta
18363
+ * Contains additional options for how an animation is played.
17880
18364
  */
17881
18365
  export interface PlayAnimationOptions {
18366
+ /**
18367
+ * @remarks
18368
+ * Amount of time to fade out after an animation stops.
18369
+ *
18370
+ */
17882
18371
  blendOutTime?: number;
18372
+ /**
18373
+ * @remarks
18374
+ * Specifies a controller to use that has been defined on the
18375
+ * entity.
18376
+ *
18377
+ */
17883
18378
  controller?: string;
18379
+ /**
18380
+ * @remarks
18381
+ * Specifies the state to transition to.
18382
+ *
18383
+ */
17884
18384
  nextState?: string;
18385
+ /**
18386
+ * @remarks
18387
+ * Specifies a Molang expression for when this animation should
18388
+ * complete.
18389
+ *
18390
+ */
17885
18391
  stopExpression?: string;
17886
18392
  }
17887
18393
 
17888
18394
  /**
17889
18395
  * @beta
18396
+ * Additional options for how a sound plays for a player.
17890
18397
  */
17891
18398
  export interface PlayerSoundOptions {
18399
+ /**
18400
+ * @remarks
18401
+ * Location of the sound; if not specified, the sound is played
18402
+ * near a player.
18403
+ *
18404
+ */
17892
18405
  location?: Vector3;
18406
+ /**
18407
+ * @remarks
18408
+ * Optional pitch of the sound.
18409
+ *
18410
+ */
17893
18411
  pitch?: number;
18412
+ /**
18413
+ * @remarks
18414
+ * Optional volume of the sound.
18415
+ *
18416
+ */
17894
18417
  volume?: number;
17895
18418
  }
17896
18419
 
@@ -17907,9 +18430,21 @@ export interface RawMessage {
17907
18430
 
17908
18431
  /**
17909
18432
  * @beta
18433
+ * Provides a description of a score token to use within a raw
18434
+ * message.
17910
18435
  */
17911
18436
  export interface RawMessageScore {
18437
+ /**
18438
+ * @remarks
18439
+ * Name of the score value to match.
18440
+ *
18441
+ */
17912
18442
  name?: string;
18443
+ /**
18444
+ * @remarks
18445
+ * Name of the score value to match.
18446
+ *
18447
+ */
17913
18448
  objective?: string;
17914
18449
  }
17915
18450
 
@@ -17919,7 +18454,7 @@ export interface RawMessageScore {
17919
18454
  * `RawMessage` is serialized the contents are put into a
17920
18455
  * rawtext property, so this is useful when reading saved
17921
18456
  * RawMessages. See `BlockSignComponent.setText` and
17922
- * `BlockSignComponent.getRawText` for examples
18457
+ * `BlockSignComponent.getRawText` for examples.
17923
18458
  */
17924
18459
  export interface RawText {
17925
18460
  rawtext?: RawMessage[];
@@ -17947,19 +18482,56 @@ export interface ScoreboardObjectiveDisplayOptions {
17947
18482
 
17948
18483
  /**
17949
18484
  * @beta
18485
+ * Contains additional options for registering a script event
18486
+ * event callback.
17950
18487
  */
17951
18488
  export interface ScriptEventMessageFilterOptions {
18489
+ /**
18490
+ * @remarks
18491
+ * Optional list of namespaces to filter inbound script event
18492
+ * messages.
18493
+ *
18494
+ */
17952
18495
  namespaces: string[];
17953
18496
  }
17954
18497
 
17955
18498
  /**
17956
18499
  * @beta
18500
+ * Contains additional options for teleporting an entity.
17957
18501
  */
17958
18502
  export interface TeleportOptions {
18503
+ /**
18504
+ * @remarks
18505
+ * Whether to check whether blocks will block the entity after
18506
+ * teleport.
18507
+ *
18508
+ */
17959
18509
  checkForBlocks?: boolean;
18510
+ /**
18511
+ * @remarks
18512
+ * Dimension to potentially move the entity to. If not
18513
+ * specified, the entity is teleported within the dimension
18514
+ * that they reside.
18515
+ *
18516
+ */
17960
18517
  dimension?: Dimension;
18518
+ /**
18519
+ * @remarks
18520
+ * Location that the entity should be facing after teleport.
18521
+ *
18522
+ */
17961
18523
  facingLocation?: Vector3;
18524
+ /**
18525
+ * @remarks
18526
+ * Whether to retain the entities velocity after teleport.
18527
+ *
18528
+ */
17962
18529
  keepVelocity?: boolean;
18530
+ /**
18531
+ * @remarks
18532
+ * Rotation of the entity after teleport.
18533
+ *
18534
+ */
17963
18535
  rotation?: Vector2;
17964
18536
  }
17965
18537
 
@@ -17997,9 +18569,20 @@ export interface TitleDisplayOptions {
17997
18569
 
17998
18570
  /**
17999
18571
  * @beta
18572
+ * Represents a two-directional vector.
18000
18573
  */
18001
18574
  export interface Vector2 {
18575
+ /**
18576
+ * @remarks
18577
+ * X component of the two-dimensional vector.
18578
+ *
18579
+ */
18002
18580
  x: number;
18581
+ /**
18582
+ * @remarks
18583
+ * Y component of the two-dimensional vector.
18584
+ *
18585
+ */
18003
18586
  y: number;
18004
18587
  }
18005
18588
 
@@ -18030,15 +18613,26 @@ export interface Vector3 {
18030
18613
 
18031
18614
  /**
18032
18615
  * @beta
18616
+ * Contains additional options for a world-level playSound
18617
+ * occurrence.
18033
18618
  */
18034
18619
  export interface WorldSoundOptions {
18620
+ /**
18621
+ * @remarks
18622
+ * Pitch of the sound played at the world level.
18623
+ *
18624
+ */
18035
18625
  pitch?: number;
18626
+ /**
18627
+ * @remarks
18628
+ * Relative volume and space by which this sound is heard.
18629
+ *
18630
+ */
18036
18631
  volume?: number;
18037
18632
  }
18038
18633
 
18039
18634
  /**
18040
18635
  * @beta
18041
- * The error type thrown when a command fails.
18042
18636
  */
18043
18637
  export class CommandError extends Error {
18044
18638
  protected constructor();