@minecraft/server 1.3.0-beta.1.20.0-preview.22 → 1.3.0-beta.1.20.0-preview.24
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 +1229 -241
- 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.
|
|
19
|
+
* "version": "1.3.0-internal.1.20.0-preview.24"
|
|
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
|
*/
|
|
@@ -903,6 +1072,21 @@ export class BlockLiquidContainerComponent extends BlockComponent {
|
|
|
903
1072
|
|
|
904
1073
|
/**
|
|
905
1074
|
* @beta
|
|
1075
|
+
* A BlockLocationIterator returns the next block location of
|
|
1076
|
+
* the block volume across which it is iterating.
|
|
1077
|
+
* The BlockLocationIterator is used to abstract the shape of
|
|
1078
|
+
* the block volume it was fetched from (so it can represent
|
|
1079
|
+
* all the block locations that make up rectangles, cubes,
|
|
1080
|
+
* spheres, lines and complex shapes).
|
|
1081
|
+
* Each iteration pass returns the next valid block location in
|
|
1082
|
+
* the parent shape.
|
|
1083
|
+
* Unless otherwise specified by the parent shape - the
|
|
1084
|
+
* BlockLocationIterator will iterate over a 3D space in the
|
|
1085
|
+
* order of increasing X, followed by increasing Z followed by
|
|
1086
|
+
* increasing Y.
|
|
1087
|
+
* (Effectively stepping across the XZ plane, and when all the
|
|
1088
|
+
* locations in that plane are exhausted, increasing the Y
|
|
1089
|
+
* coordinate to the next XZ slice)
|
|
906
1090
|
*/
|
|
907
1091
|
export class BlockLocationIterator implements Iterable<Vector3> {
|
|
908
1092
|
protected constructor();
|
|
@@ -1021,6 +1205,14 @@ export class BlockPermutation {
|
|
|
1021
1205
|
matches(blockName: string, states?: Record<string, boolean | number | string>): boolean;
|
|
1022
1206
|
/**
|
|
1023
1207
|
* @beta
|
|
1208
|
+
* @remarks
|
|
1209
|
+
* Returns a derived BlockPermutation with a specific property
|
|
1210
|
+
* set.
|
|
1211
|
+
*
|
|
1212
|
+
* @param name
|
|
1213
|
+
* Identifier of the block property.
|
|
1214
|
+
* @param value
|
|
1215
|
+
* Value of the block property.
|
|
1024
1216
|
* @throws This function can throw errors.
|
|
1025
1217
|
*/
|
|
1026
1218
|
withState(name: string, value: boolean | number | string): BlockPermutation;
|
|
@@ -1398,79 +1590,139 @@ export class BlockType {
|
|
|
1398
1590
|
|
|
1399
1591
|
/**
|
|
1400
1592
|
* @beta
|
|
1593
|
+
* Block Volume Utils is a utility class that provides a number
|
|
1594
|
+
* of useful functions for the creation and utility of {@link
|
|
1595
|
+
* @minecraft-server.BlockVolume} objects
|
|
1401
1596
|
*/
|
|
1402
1597
|
export class BlockVolumeUtils {
|
|
1403
1598
|
protected constructor();
|
|
1404
1599
|
/**
|
|
1405
1600
|
* @remarks
|
|
1601
|
+
* Check to see if the given location is directly adjacent to
|
|
1602
|
+
* the outer surface of a BlockVolume.
|
|
1603
|
+
*
|
|
1604
|
+
*
|
|
1406
1605
|
* This function can't be called in read-only mode.
|
|
1407
1606
|
*
|
|
1607
|
+
* @param volume
|
|
1608
|
+
* The volume to test against
|
|
1609
|
+
* @param pos
|
|
1610
|
+
* The world block location to test
|
|
1611
|
+
* @returns
|
|
1612
|
+
* If the location is either inside or more than 0 blocks away,
|
|
1613
|
+
* the function will return false.
|
|
1614
|
+
* If the location is directly contacting the outer surface of
|
|
1615
|
+
* the BlockVolume, the function will return true.
|
|
1408
1616
|
*/
|
|
1409
1617
|
static doesLocationTouchFaces(volume: BlockVolume, pos: Vector3): boolean;
|
|
1410
1618
|
/**
|
|
1411
1619
|
* @remarks
|
|
1620
|
+
* Check to see if a two block volumes are directly adjacent
|
|
1621
|
+
* and two faces touch.
|
|
1622
|
+
*
|
|
1412
1623
|
* This function can't be called in read-only mode.
|
|
1413
1624
|
*
|
|
1625
|
+
* @param volume
|
|
1626
|
+
* The volume to test against
|
|
1627
|
+
* @param other
|
|
1628
|
+
* The volume to test
|
|
1629
|
+
* @returns
|
|
1630
|
+
* If the outer faces of both block volumes touch and are
|
|
1631
|
+
* directly adjacent at any point, return true.
|
|
1414
1632
|
*/
|
|
1415
1633
|
static doesVolumeTouchFaces(volume: BlockVolume, other: BlockVolume): boolean;
|
|
1416
1634
|
/**
|
|
1417
1635
|
* @remarks
|
|
1636
|
+
* Test the equality of two block volumes
|
|
1637
|
+
*
|
|
1418
1638
|
* This function can't be called in read-only mode.
|
|
1419
1639
|
*
|
|
1640
|
+
* @returns
|
|
1641
|
+
* Return true if two block volumes are identical
|
|
1420
1642
|
*/
|
|
1421
1643
|
static equals(volume: BlockVolume, other: BlockVolume): boolean;
|
|
1422
1644
|
/**
|
|
1423
1645
|
* @remarks
|
|
1646
|
+
* Fetch a {@link BlockLocationIterator} that represents all of
|
|
1647
|
+
* the block world locations within the specified volume
|
|
1648
|
+
*
|
|
1424
1649
|
* This function can't be called in read-only mode.
|
|
1425
1650
|
*
|
|
1426
1651
|
*/
|
|
1427
1652
|
static getBlockLocationIterator(volume: BlockVolume): BlockLocationIterator;
|
|
1428
1653
|
/**
|
|
1429
1654
|
* @remarks
|
|
1655
|
+
* Return a {@link BoundingBox} object which represents the
|
|
1656
|
+
* validated min and max coordinates of the volume
|
|
1657
|
+
*
|
|
1430
1658
|
* This function can't be called in read-only mode.
|
|
1431
1659
|
*
|
|
1432
1660
|
*/
|
|
1433
1661
|
static getBoundingBox(volume: BlockVolume): BoundingBox;
|
|
1434
1662
|
/**
|
|
1435
1663
|
* @remarks
|
|
1664
|
+
* Return the capacity (volume) of the BlockVolume (W*D*H)
|
|
1665
|
+
*
|
|
1436
1666
|
* This function can't be called in read-only mode.
|
|
1437
1667
|
*
|
|
1438
1668
|
*/
|
|
1439
1669
|
static getCapacity(volume: BlockVolume): number;
|
|
1440
1670
|
/**
|
|
1441
1671
|
* @remarks
|
|
1672
|
+
* Get the largest corner position of the volume (guaranteed to
|
|
1673
|
+
* be >= min)
|
|
1674
|
+
*
|
|
1442
1675
|
* This function can't be called in read-only mode.
|
|
1443
1676
|
*
|
|
1444
1677
|
*/
|
|
1445
1678
|
static getMax(volume: BlockVolume): Vector3;
|
|
1446
1679
|
/**
|
|
1447
1680
|
* @remarks
|
|
1681
|
+
* Get the smallest corner position of the volume (guaranteed
|
|
1682
|
+
* to be <= max)
|
|
1683
|
+
*
|
|
1448
1684
|
* This function can't be called in read-only mode.
|
|
1449
1685
|
*
|
|
1450
1686
|
*/
|
|
1451
1687
|
static getMin(volume: BlockVolume): Vector3;
|
|
1452
1688
|
/**
|
|
1453
1689
|
* @remarks
|
|
1690
|
+
* Get a {@link Vector3} object where each component represents
|
|
1691
|
+
* the number of blocks along that axis
|
|
1692
|
+
*
|
|
1454
1693
|
* This function can't be called in read-only mode.
|
|
1455
1694
|
*
|
|
1456
1695
|
*/
|
|
1457
1696
|
static getSpan(volume: BlockVolume): Vector3;
|
|
1458
1697
|
/**
|
|
1459
1698
|
* @remarks
|
|
1699
|
+
* Return an enumeration which represents the intersection
|
|
1700
|
+
* between two BlockVolume objects
|
|
1701
|
+
*
|
|
1460
1702
|
* This function can't be called in read-only mode.
|
|
1461
1703
|
*
|
|
1462
1704
|
*/
|
|
1463
1705
|
static intersects(volume: BlockVolume, other: BlockVolume): BlockVolumeIntersection;
|
|
1464
1706
|
/**
|
|
1465
1707
|
* @remarks
|
|
1708
|
+
* Check to see if a given world block location is inside a
|
|
1709
|
+
* BlockVolume
|
|
1710
|
+
*
|
|
1466
1711
|
* This function can't be called in read-only mode.
|
|
1467
1712
|
*
|
|
1468
1713
|
*/
|
|
1469
1714
|
static isInside(volume: BlockVolume, pos: Vector3): number;
|
|
1470
1715
|
/**
|
|
1471
1716
|
* @remarks
|
|
1717
|
+
* Move a BlockVolume by a specified amount
|
|
1718
|
+
*
|
|
1472
1719
|
* This function can't be called in read-only mode.
|
|
1473
1720
|
*
|
|
1721
|
+
* @param delta
|
|
1722
|
+
* Amount of blocks to move by
|
|
1723
|
+
* @returns
|
|
1724
|
+
* Returns a new BlockVolume object which represents the new
|
|
1725
|
+
* volume
|
|
1474
1726
|
*/
|
|
1475
1727
|
static translate(volume: BlockVolume, delta: Vector3): BlockVolume;
|
|
1476
1728
|
}
|
|
@@ -1520,41 +1772,86 @@ export class BlockWaterContainerComponent extends BlockLiquidContainerComponent
|
|
|
1520
1772
|
|
|
1521
1773
|
/**
|
|
1522
1774
|
* @beta
|
|
1775
|
+
* Bounding Box Utils is a utility class that provides a number
|
|
1776
|
+
* of useful functions for the creation and utility of {@link
|
|
1777
|
+
* @minecraft-server.BoundingBox} objects
|
|
1523
1778
|
*/
|
|
1524
1779
|
export class BoundingBoxUtils {
|
|
1525
1780
|
protected constructor();
|
|
1526
1781
|
/**
|
|
1527
1782
|
* @remarks
|
|
1783
|
+
* Create a validated instance of a {@link
|
|
1784
|
+
* @minecraft-server.BoundingBox} where the min and max
|
|
1785
|
+
* components are guaranteed to be (min <= max)
|
|
1786
|
+
*
|
|
1528
1787
|
* This function can't be called in read-only mode.
|
|
1529
1788
|
*
|
|
1789
|
+
* @param min
|
|
1790
|
+
* A corner world location
|
|
1791
|
+
* @param max
|
|
1792
|
+
* A corner world location diametrically opposite
|
|
1530
1793
|
*/
|
|
1531
1794
|
static createValid(min: Vector3, max: Vector3): BoundingBox;
|
|
1532
1795
|
/**
|
|
1533
1796
|
* @remarks
|
|
1797
|
+
* Expand a {@link @minecraft-server.BoundingBox} by a given
|
|
1798
|
+
* amount along each axis.
|
|
1799
|
+
* Sizes can be negative to perform contraction.
|
|
1800
|
+
* Note: corners can be inverted if the contraction size is
|
|
1801
|
+
* greater than the span, but the min/max relationship will
|
|
1802
|
+
* remain correct
|
|
1803
|
+
*
|
|
1534
1804
|
* This function can't be called in read-only mode.
|
|
1535
1805
|
*
|
|
1806
|
+
* @returns
|
|
1807
|
+
* Return a new {@link @minecraft-server.BoundingBox} object
|
|
1808
|
+
* representing the changes
|
|
1536
1809
|
*/
|
|
1537
1810
|
static dilate(box: BoundingBox, size: Vector3): BoundingBox;
|
|
1538
1811
|
/**
|
|
1539
1812
|
* @remarks
|
|
1813
|
+
* Check if two {@link @minecraft-server.BoundingBox} objects
|
|
1814
|
+
* are identical
|
|
1815
|
+
*
|
|
1540
1816
|
* This function can't be called in read-only mode.
|
|
1541
1817
|
*
|
|
1542
1818
|
*/
|
|
1543
1819
|
static equals(box: BoundingBox, other: BoundingBox): boolean;
|
|
1544
1820
|
/**
|
|
1545
1821
|
* @remarks
|
|
1822
|
+
* Expand the initial box object bounds to include the 2nd box
|
|
1823
|
+
* argument. The resultant {@link
|
|
1824
|
+
* @minecraft-server.BoundingBox} object will be a BoundingBox
|
|
1825
|
+
* which exactly encompasses the two boxes.
|
|
1826
|
+
*
|
|
1546
1827
|
* This function can't be called in read-only mode.
|
|
1547
1828
|
*
|
|
1829
|
+
* @returns
|
|
1830
|
+
* A new {@link @minecraft-server.BoundingBox} instance
|
|
1831
|
+
* representing the smallest possible bounding box which can
|
|
1832
|
+
* encompass both
|
|
1548
1833
|
*/
|
|
1549
1834
|
static expand(box: BoundingBox, other: BoundingBox): BoundingBox;
|
|
1550
1835
|
/**
|
|
1551
1836
|
* @remarks
|
|
1837
|
+
* Calculate the center block of a given {@link
|
|
1838
|
+
* @minecraft-server.BoundingBox} object.
|
|
1839
|
+
*
|
|
1552
1840
|
* This function can't be called in read-only mode.
|
|
1553
1841
|
*
|
|
1842
|
+
* @returns
|
|
1843
|
+
* Note that {@link @minecraft-server.BoundingBox} objects
|
|
1844
|
+
* represent whole blocks, so the center of boxes which have
|
|
1845
|
+
* odd numbered bounds are not mathematically centered...
|
|
1846
|
+
* i.e. a BoundingBox( 0,0,0 -> 3,3,3 ) would have a center of
|
|
1847
|
+
* (1,1,1) (not (1.5, 1.5, 1.5) as expected)
|
|
1554
1848
|
*/
|
|
1555
1849
|
static getCenter(box: BoundingBox): Vector3;
|
|
1556
1850
|
/**
|
|
1557
1851
|
* @remarks
|
|
1852
|
+
* Calculate the BoundingBox which represents the union area of
|
|
1853
|
+
* two intersecting BoundingBoxes
|
|
1854
|
+
*
|
|
1558
1855
|
* This function can't be called in read-only mode.
|
|
1559
1856
|
*
|
|
1560
1857
|
* @throws This function can throw errors.
|
|
@@ -1562,32 +1859,44 @@ export class BoundingBoxUtils {
|
|
|
1562
1859
|
static getIntersection(box: BoundingBox, other: BoundingBox): BoundingBox;
|
|
1563
1860
|
/**
|
|
1564
1861
|
* @remarks
|
|
1862
|
+
* Get the Span of each of the BoundingBox Axis components
|
|
1863
|
+
*
|
|
1565
1864
|
* This function can't be called in read-only mode.
|
|
1566
1865
|
*
|
|
1567
1866
|
*/
|
|
1568
1867
|
static getSpan(box: BoundingBox): Vector3;
|
|
1569
1868
|
/**
|
|
1570
1869
|
* @remarks
|
|
1870
|
+
* Check to see if two BoundingBox objects intersect
|
|
1871
|
+
*
|
|
1571
1872
|
* This function can't be called in read-only mode.
|
|
1572
1873
|
*
|
|
1573
1874
|
*/
|
|
1574
1875
|
static intersects(box: BoundingBox, other: BoundingBox): boolean;
|
|
1575
1876
|
/**
|
|
1576
1877
|
* @remarks
|
|
1878
|
+
* Check to see if a given coordinate is inside a BoundingBox
|
|
1879
|
+
*
|
|
1577
1880
|
* This function can't be called in read-only mode.
|
|
1578
1881
|
*
|
|
1579
1882
|
*/
|
|
1580
1883
|
static isInside(box: BoundingBox, pos: Vector3): boolean;
|
|
1581
1884
|
/**
|
|
1582
1885
|
* @remarks
|
|
1886
|
+
* Check to see if a BoundingBox is valid (i.e. (min <= max))
|
|
1887
|
+
*
|
|
1583
1888
|
* This function can't be called in read-only mode.
|
|
1584
1889
|
*
|
|
1585
1890
|
*/
|
|
1586
1891
|
static isValid(box: BoundingBox): boolean;
|
|
1587
1892
|
/**
|
|
1588
1893
|
* @remarks
|
|
1894
|
+
* Move a BoundingBox by a given amount
|
|
1895
|
+
*
|
|
1589
1896
|
* This function can't be called in read-only mode.
|
|
1590
1897
|
*
|
|
1898
|
+
* @returns
|
|
1899
|
+
* Return a new BoundingBox object which represents the change
|
|
1591
1900
|
*/
|
|
1592
1901
|
static translate(box: BoundingBox, delta: Vector3): BoundingBox;
|
|
1593
1902
|
}
|
|
@@ -1642,6 +1951,13 @@ export class ChatSendAfterEvent {
|
|
|
1642
1951
|
*
|
|
1643
1952
|
*/
|
|
1644
1953
|
sendToTargets: boolean;
|
|
1954
|
+
/**
|
|
1955
|
+
* @remarks
|
|
1956
|
+
* List of players that will receive this message.
|
|
1957
|
+
*
|
|
1958
|
+
* @returns
|
|
1959
|
+
* List of player objects.
|
|
1960
|
+
*/
|
|
1645
1961
|
getTargets(): Player[];
|
|
1646
1962
|
}
|
|
1647
1963
|
|
|
@@ -1667,6 +1983,14 @@ export class ChatSendBeforeEvent extends ChatSendAfterEvent {
|
|
|
1667
1983
|
*
|
|
1668
1984
|
*/
|
|
1669
1985
|
cancel: boolean;
|
|
1986
|
+
/**
|
|
1987
|
+
* @remarks
|
|
1988
|
+
* Sets an updated list of players that will receive this
|
|
1989
|
+
* message.
|
|
1990
|
+
*
|
|
1991
|
+
* @param players
|
|
1992
|
+
* Updated array of players that should receive this message.
|
|
1993
|
+
*/
|
|
1670
1994
|
setTargets(players: Player[]): void;
|
|
1671
1995
|
}
|
|
1672
1996
|
|
|
@@ -1696,82 +2020,178 @@ export class CommandResult {
|
|
|
1696
2020
|
|
|
1697
2021
|
/**
|
|
1698
2022
|
* @beta
|
|
2023
|
+
* Base class for downstream Component implementations.
|
|
1699
2024
|
*/
|
|
1700
2025
|
export class Component {
|
|
1701
2026
|
protected constructor();
|
|
2027
|
+
/**
|
|
2028
|
+
* @remarks
|
|
2029
|
+
* Identifier of the component.
|
|
2030
|
+
*
|
|
2031
|
+
*/
|
|
1702
2032
|
readonly typeId: string;
|
|
1703
2033
|
}
|
|
1704
2034
|
|
|
1705
2035
|
/**
|
|
1706
2036
|
* @beta
|
|
2037
|
+
* The Compound Block Volume is a collection of individual
|
|
2038
|
+
* block volume definitions which, as a collection, define a
|
|
2039
|
+
* larger volume of (sometimes non-contiguous) irregular
|
|
2040
|
+
* shapes.
|
|
2041
|
+
* This class is loosely based on the concept of CSG
|
|
2042
|
+
* (Computational Solid Geometry) and allows a user to create
|
|
2043
|
+
* complex volumes by building a stack of volumes and voids to
|
|
2044
|
+
* make a larger single volume.
|
|
2045
|
+
* For example - normally a creator would create a hollow cube
|
|
2046
|
+
* by creating 6 "wall" surfaces for each face.
|
|
2047
|
+
* With a Compound Block Volume, a creator can define a hollow
|
|
2048
|
+
* cube by creating a single outer solid cube, and then
|
|
2049
|
+
* defining a further single 'void' cube inside the larger one.
|
|
2050
|
+
* Similarly, the Compound Block Volume can represent irregular
|
|
2051
|
+
* shaped volumes (e.g. a tree consists of a trunk and lots of
|
|
2052
|
+
* leaf cubes which are not necessarily contiguously placed)
|
|
1707
2053
|
*/
|
|
1708
2054
|
export class CompoundBlockVolume {
|
|
2055
|
+
/**
|
|
2056
|
+
* @remarks
|
|
2057
|
+
* Return the 'capacity' of the bounding rectangle which
|
|
2058
|
+
* represents the collection of volumes in the stack
|
|
2059
|
+
*
|
|
2060
|
+
*/
|
|
1709
2061
|
readonly capacity: number;
|
|
2062
|
+
/**
|
|
2063
|
+
* @remarks
|
|
2064
|
+
* Return the number of volumes (positive and negative) in the
|
|
2065
|
+
* volume stack
|
|
2066
|
+
*
|
|
2067
|
+
*/
|
|
1710
2068
|
readonly volumeCount: number;
|
|
1711
2069
|
/**
|
|
1712
2070
|
* @remarks
|
|
2071
|
+
* Clear the contents of the volume stack
|
|
2072
|
+
*
|
|
1713
2073
|
* This function can't be called in read-only mode.
|
|
1714
2074
|
*
|
|
1715
2075
|
*/
|
|
1716
2076
|
clear(): void;
|
|
1717
2077
|
/**
|
|
1718
2078
|
* @remarks
|
|
2079
|
+
* Fetch a Block Location Iterator for the Compound Block
|
|
2080
|
+
* Volume. This iterator will allow a creator to iterate
|
|
2081
|
+
* across all of the selected volumes within the larger
|
|
2082
|
+
* bounding area.
|
|
2083
|
+
* Areas of a volume which have been overridden by a
|
|
2084
|
+
* subtractive volume will not be included in the iterator
|
|
2085
|
+
* step.
|
|
2086
|
+
* (i.e. if you push a cube to the stack, and then push a
|
|
2087
|
+
* subtractive volume to the same location, then the iterator
|
|
2088
|
+
* will step over the initial volume because it is considered
|
|
2089
|
+
* negative space)
|
|
2090
|
+
*
|
|
2091
|
+
*
|
|
1719
2092
|
* This function can't be called in read-only mode.
|
|
1720
2093
|
*
|
|
1721
2094
|
*/
|
|
1722
2095
|
getBlockLocationIterator(): BlockLocationIterator;
|
|
1723
2096
|
/**
|
|
1724
2097
|
* @remarks
|
|
2098
|
+
* Get the largest bounding box that represents a container for
|
|
2099
|
+
* all of the volumes on the stack
|
|
2100
|
+
*
|
|
1725
2101
|
* This function can't be called in read-only mode.
|
|
1726
2102
|
*
|
|
1727
2103
|
*/
|
|
1728
2104
|
getBoundingBox(): BoundingBox;
|
|
1729
2105
|
/**
|
|
1730
2106
|
* @remarks
|
|
2107
|
+
* Get the max block location of the outermost bounding
|
|
2108
|
+
* rectangle which represents the volumes on the stack
|
|
2109
|
+
*
|
|
1731
2110
|
* This function can't be called in read-only mode.
|
|
1732
2111
|
*
|
|
1733
2112
|
*/
|
|
1734
2113
|
getMax(): Vector3;
|
|
1735
2114
|
/**
|
|
1736
2115
|
* @remarks
|
|
2116
|
+
* Get the min block location of the outermost bounding
|
|
2117
|
+
* rectangle which represents the volumes on the stack
|
|
2118
|
+
*
|
|
1737
2119
|
* This function can't be called in read-only mode.
|
|
1738
2120
|
*
|
|
1739
2121
|
*/
|
|
1740
2122
|
getMin(): Vector3;
|
|
1741
2123
|
/**
|
|
1742
2124
|
* @remarks
|
|
2125
|
+
* Return a boolean representing whether or not a given block
|
|
2126
|
+
* location is inside a positive block volume.
|
|
2127
|
+
* E.g. if the stack contains a large cube followed by a
|
|
2128
|
+
* slightly smaller negative cube, and the test location is
|
|
2129
|
+
* within the negative cube - the function will return false
|
|
2130
|
+
* because it's not 'inside' a volume (it IS inside the
|
|
2131
|
+
* bounding rectangle, but it is not inside a positively
|
|
2132
|
+
* defined location)
|
|
2133
|
+
*
|
|
1743
2134
|
* This function can't be called in read-only mode.
|
|
1744
2135
|
*
|
|
2136
|
+
* @param delta
|
|
2137
|
+
* block location to test
|
|
1745
2138
|
*/
|
|
1746
2139
|
isInside(delta: Vector3): boolean;
|
|
1747
2140
|
/**
|
|
1748
2141
|
* @remarks
|
|
2142
|
+
* Inspect the last entry pushed to the volume stack without
|
|
2143
|
+
* affecting the stack contents
|
|
2144
|
+
*
|
|
1749
2145
|
* This function can't be called in read-only mode.
|
|
1750
2146
|
*
|
|
2147
|
+
* @returns
|
|
2148
|
+
* Returns undefined if the stack is empty
|
|
1751
2149
|
*/
|
|
1752
2150
|
peekLastVolume(): CompoundBlockVolumeItem | undefined;
|
|
1753
2151
|
/**
|
|
1754
2152
|
* @remarks
|
|
2153
|
+
* Remove the last entry from the volume stack. This will
|
|
2154
|
+
* reduce the stack size by one
|
|
2155
|
+
*
|
|
1755
2156
|
* This function can't be called in read-only mode.
|
|
1756
2157
|
*
|
|
1757
2158
|
*/
|
|
1758
2159
|
popVolume(): boolean;
|
|
1759
2160
|
/**
|
|
1760
2161
|
* @remarks
|
|
2162
|
+
* Push a volume item to the stack. The volume item contains
|
|
2163
|
+
* an 'action' parameter which determines whether this volume
|
|
2164
|
+
* is a positive or negative space
|
|
2165
|
+
*
|
|
1761
2166
|
* This function can't be called in read-only mode.
|
|
1762
2167
|
*
|
|
2168
|
+
* @param item
|
|
2169
|
+
* Item to push to the end of the stack
|
|
1763
2170
|
*/
|
|
1764
2171
|
pushVolume(item: CompoundBlockVolumeItem): void;
|
|
1765
2172
|
/**
|
|
1766
2173
|
* @remarks
|
|
2174
|
+
* If the volume stack is empty, this function will push the
|
|
2175
|
+
* specified item to the stack.
|
|
2176
|
+
* If the volume stack is NOT empty, this function will replace
|
|
2177
|
+
* the last item on the stack with the new item.
|
|
2178
|
+
*
|
|
1767
2179
|
* This function can't be called in read-only mode.
|
|
1768
2180
|
*
|
|
2181
|
+
* @param item
|
|
2182
|
+
* Item to add or replace
|
|
1769
2183
|
*/
|
|
1770
2184
|
replaceOrAddLastVolume(item: CompoundBlockVolumeItem): boolean;
|
|
1771
2185
|
/**
|
|
1772
2186
|
* @remarks
|
|
2187
|
+
* Move the root block location of the volume by a given
|
|
2188
|
+
* amount. This effectively adds the specified delta to the
|
|
2189
|
+
* block location of all of the volumes in the stack
|
|
2190
|
+
*
|
|
1773
2191
|
* This function can't be called in read-only mode.
|
|
1774
2192
|
*
|
|
2193
|
+
* @param delta
|
|
2194
|
+
* Amount to move
|
|
1775
2195
|
*/
|
|
1776
2196
|
translate(delta: Vector3): void;
|
|
1777
2197
|
}
|
|
@@ -1990,6 +2410,13 @@ export class ContainerSlot {
|
|
|
1990
2410
|
* Throws if the slot's container is invalid.
|
|
1991
2411
|
*/
|
|
1992
2412
|
readonly isStackable: boolean;
|
|
2413
|
+
/**
|
|
2414
|
+
* @remarks
|
|
2415
|
+
* Returns whether the ContainerSlot is valid. The container
|
|
2416
|
+
* slot is valid if the container exists and is loaded, and the
|
|
2417
|
+
* slot index is valid.
|
|
2418
|
+
*
|
|
2419
|
+
*/
|
|
1993
2420
|
readonly isValid: boolean;
|
|
1994
2421
|
/**
|
|
1995
2422
|
* @remarks
|
|
@@ -2060,10 +2487,23 @@ export class ContainerSlot {
|
|
|
2060
2487
|
*
|
|
2061
2488
|
* This function can't be called in read-only mode.
|
|
2062
2489
|
*
|
|
2490
|
+
* @returns
|
|
2491
|
+
* Returns a copy of the item in the slot. Returns undefined if
|
|
2492
|
+
* the slot is empty.
|
|
2063
2493
|
* @throws
|
|
2064
2494
|
* Throws if the slot's container is invalid.
|
|
2065
2495
|
*/
|
|
2066
2496
|
clone(): ItemStack;
|
|
2497
|
+
/**
|
|
2498
|
+
* @remarks
|
|
2499
|
+
* Creates an exact copy of the item stack, including any
|
|
2500
|
+
* custom data or properties.
|
|
2501
|
+
*
|
|
2502
|
+
* @returns
|
|
2503
|
+
* Returns a copy of the item in the slot. Returns undefined if
|
|
2504
|
+
* the slot is empty.
|
|
2505
|
+
* @throws This function can throw errors.
|
|
2506
|
+
*/
|
|
2067
2507
|
getItem(): ItemStack | undefined;
|
|
2068
2508
|
/**
|
|
2069
2509
|
* @remarks
|
|
@@ -2077,7 +2517,27 @@ export class ContainerSlot {
|
|
|
2077
2517
|
* Throws if the slot's container is invalid.
|
|
2078
2518
|
*/
|
|
2079
2519
|
getLore(): string[];
|
|
2520
|
+
/**
|
|
2521
|
+
* @remarks
|
|
2522
|
+
* Returns all tags for the item in the slot.
|
|
2523
|
+
*
|
|
2524
|
+
* @returns
|
|
2525
|
+
* Returns all tags for the item in the slot. Return an empty
|
|
2526
|
+
* array if the the slot is empty.
|
|
2527
|
+
* @throws This function can throw errors.
|
|
2528
|
+
*/
|
|
2080
2529
|
getTags(): string[];
|
|
2530
|
+
/**
|
|
2531
|
+
* @remarks
|
|
2532
|
+
* Returns whether the item in the slot slot has the given tag.
|
|
2533
|
+
*
|
|
2534
|
+
* @param tag
|
|
2535
|
+
* The item tag.
|
|
2536
|
+
* @returns
|
|
2537
|
+
* Returns false when the slot is empty or the item in the slot
|
|
2538
|
+
* does not have the given tag.
|
|
2539
|
+
* @throws This function can throw errors.
|
|
2540
|
+
*/
|
|
2081
2541
|
hasTag(tag: string): boolean;
|
|
2082
2542
|
/**
|
|
2083
2543
|
* @remarks
|
|
@@ -2087,6 +2547,11 @@ export class ContainerSlot {
|
|
|
2087
2547
|
* item stacks. The amount of each item stack is not taken into
|
|
2088
2548
|
* consideration.
|
|
2089
2549
|
*
|
|
2550
|
+
* @param itemStack
|
|
2551
|
+
* The ItemStack that is being compared.
|
|
2552
|
+
* @returns
|
|
2553
|
+
* Returns whether this item stack can be stacked with the
|
|
2554
|
+
* given `itemStack`.
|
|
2090
2555
|
* @throws
|
|
2091
2556
|
* Throws if the slot's container is invalid.
|
|
2092
2557
|
*/
|
|
@@ -2099,6 +2564,8 @@ export class ContainerSlot {
|
|
|
2099
2564
|
*
|
|
2100
2565
|
* This function can't be called in read-only mode.
|
|
2101
2566
|
*
|
|
2567
|
+
* @param blockIdentifiers
|
|
2568
|
+
* The list of blocks, given by their identifiers.
|
|
2102
2569
|
* @throws
|
|
2103
2570
|
* Throws if the slot's container is invalid. Also throws if
|
|
2104
2571
|
* any of the provided block identifiers are invalid.
|
|
@@ -2113,6 +2580,8 @@ export class ContainerSlot {
|
|
|
2113
2580
|
*
|
|
2114
2581
|
* This function can't be called in read-only mode.
|
|
2115
2582
|
*
|
|
2583
|
+
* @param blockIdentifiers
|
|
2584
|
+
* The list of blocks, given by their identifiers.
|
|
2116
2585
|
* @throws
|
|
2117
2586
|
* Throws if the slot's container is invalid. Also throws if
|
|
2118
2587
|
* any of the provided block identifiers are invalid.
|
|
@@ -2120,8 +2589,13 @@ export class ContainerSlot {
|
|
|
2120
2589
|
setCanPlaceOn(blockIdentifiers?: string[]): void;
|
|
2121
2590
|
/**
|
|
2122
2591
|
* @remarks
|
|
2592
|
+
* Sets the given ItemStack in the slot, replacing any existing
|
|
2593
|
+
* item.
|
|
2594
|
+
*
|
|
2123
2595
|
* This function can't be called in read-only mode.
|
|
2124
2596
|
*
|
|
2597
|
+
* @param itemStack
|
|
2598
|
+
* The ItemStack to be placed in the slot.
|
|
2125
2599
|
* @throws This function can throw errors.
|
|
2126
2600
|
*/
|
|
2127
2601
|
setItem(itemStack?: ItemStack): void;
|
|
@@ -2132,6 +2606,9 @@ export class ContainerSlot {
|
|
|
2132
2606
|
*
|
|
2133
2607
|
* This function can't be called in read-only mode.
|
|
2134
2608
|
*
|
|
2609
|
+
* @param loreList
|
|
2610
|
+
* A list of lore strings. Setting this argument to undefined
|
|
2611
|
+
* will clear the lore.
|
|
2135
2612
|
* @throws
|
|
2136
2613
|
* Throws if the slot's container is invalid.
|
|
2137
2614
|
*/
|
|
@@ -2160,6 +2637,9 @@ export class DataDrivenEntityTriggerAfterEvent {
|
|
|
2160
2637
|
readonly id: string;
|
|
2161
2638
|
/**
|
|
2162
2639
|
* @remarks
|
|
2640
|
+
* An updateable list of modifications to component state that
|
|
2641
|
+
* are the effect of this triggered event.
|
|
2642
|
+
*
|
|
2163
2643
|
* This function can't be called in read-only mode.
|
|
2164
2644
|
*
|
|
2165
2645
|
*/
|
|
@@ -2202,7 +2682,21 @@ export class DataDrivenEntityTriggerBeforeEvent {
|
|
|
2202
2682
|
*
|
|
2203
2683
|
*/
|
|
2204
2684
|
readonly id: string;
|
|
2685
|
+
/**
|
|
2686
|
+
* @remarks
|
|
2687
|
+
* An updateable list of modifications to component state that
|
|
2688
|
+
* are the effect of this triggered event.
|
|
2689
|
+
*
|
|
2690
|
+
*/
|
|
2205
2691
|
getModifiers(): DefinitionModifier[];
|
|
2692
|
+
/**
|
|
2693
|
+
* @remarks
|
|
2694
|
+
* Changes a list of modifications to component state that are
|
|
2695
|
+
* the effect of this triggered event.
|
|
2696
|
+
*
|
|
2697
|
+
* @param modifiers
|
|
2698
|
+
* An updated list of modifications to component state.
|
|
2699
|
+
*/
|
|
2206
2700
|
setModifiers(modifiers: DefinitionModifier[]): void;
|
|
2207
2701
|
}
|
|
2208
2702
|
|
|
@@ -2360,8 +2854,7 @@ export class Dimension {
|
|
|
2360
2854
|
/**
|
|
2361
2855
|
* @beta
|
|
2362
2856
|
* @remarks
|
|
2363
|
-
* Returns a block instance at the given location.
|
|
2364
|
-
* was introduced as of version 1.17.10.21.
|
|
2857
|
+
* Returns a block instance at the given location.
|
|
2365
2858
|
*
|
|
2366
2859
|
* @param location
|
|
2367
2860
|
* The location at which to return a block.
|
|
@@ -2376,6 +2869,10 @@ export class Dimension {
|
|
|
2376
2869
|
* Gets the first block that intersects with a vector emanating
|
|
2377
2870
|
* from a location.
|
|
2378
2871
|
*
|
|
2872
|
+
* @param location
|
|
2873
|
+
* Location from where to initiate the ray check.
|
|
2874
|
+
* @param direction
|
|
2875
|
+
* Vector direction to cast the ray.
|
|
2379
2876
|
* @param options
|
|
2380
2877
|
* Additional options for processing this raycast query.
|
|
2381
2878
|
* @throws This function can throw errors.
|
|
@@ -2652,11 +3149,20 @@ export class Effect {
|
|
|
2652
3149
|
/**
|
|
2653
3150
|
* @remarks
|
|
2654
3151
|
* Gets the entire specified duration, in ticks, of this
|
|
2655
|
-
* effect.
|
|
3152
|
+
* effect. There are 20 ticks per second. Use {@link
|
|
3153
|
+
* TicksPerSecond} constant to convert between ticks and
|
|
3154
|
+
* seconds.
|
|
2656
3155
|
*
|
|
2657
3156
|
* @throws This property can throw when used.
|
|
2658
3157
|
*/
|
|
2659
3158
|
readonly duration: number;
|
|
3159
|
+
/**
|
|
3160
|
+
* @remarks
|
|
3161
|
+
* Gets the type id of this effect.
|
|
3162
|
+
*
|
|
3163
|
+
* @throws This property can throw when used.
|
|
3164
|
+
*/
|
|
3165
|
+
readonly typeId: string;
|
|
2660
3166
|
}
|
|
2661
3167
|
|
|
2662
3168
|
/**
|
|
@@ -2718,6 +3224,36 @@ export class EffectType {
|
|
|
2718
3224
|
getName(): string;
|
|
2719
3225
|
}
|
|
2720
3226
|
|
|
3227
|
+
/**
|
|
3228
|
+
* @beta
|
|
3229
|
+
* Represents a type of effect - like poison - that can be
|
|
3230
|
+
* applied to an entity.
|
|
3231
|
+
*/
|
|
3232
|
+
export class EffectTypes {
|
|
3233
|
+
protected constructor();
|
|
3234
|
+
/**
|
|
3235
|
+
* @remarks
|
|
3236
|
+
* Effect type for the given identifier.
|
|
3237
|
+
*
|
|
3238
|
+
* This function can't be called in read-only mode.
|
|
3239
|
+
*
|
|
3240
|
+
* @returns
|
|
3241
|
+
* Effect type for the given identifier or undefined if the
|
|
3242
|
+
* effect does not exist.
|
|
3243
|
+
*/
|
|
3244
|
+
static get(identifier: string): EffectType | undefined;
|
|
3245
|
+
/**
|
|
3246
|
+
* @remarks
|
|
3247
|
+
* Gets all effects.
|
|
3248
|
+
*
|
|
3249
|
+
* This function can't be called in read-only mode.
|
|
3250
|
+
*
|
|
3251
|
+
* @returns
|
|
3252
|
+
* A list of all effects.
|
|
3253
|
+
*/
|
|
3254
|
+
static getAll(): EffectType[];
|
|
3255
|
+
}
|
|
3256
|
+
|
|
2721
3257
|
/**
|
|
2722
3258
|
* @beta
|
|
2723
3259
|
* This class represents a specific leveled enchantment that is
|
|
@@ -2887,7 +3423,18 @@ export class EnchantmentType {
|
|
|
2887
3423
|
*/
|
|
2888
3424
|
export class EnchantmentTypes {
|
|
2889
3425
|
protected constructor();
|
|
2890
|
-
|
|
3426
|
+
/**
|
|
3427
|
+
* @remarks
|
|
3428
|
+
* Retrieves an enchantment with the specified identifier.
|
|
3429
|
+
*
|
|
3430
|
+
* @param enchantmentId
|
|
3431
|
+
* Identifier of the enchantment. For example,
|
|
3432
|
+
* "minecraft:flame".
|
|
3433
|
+
* @returns
|
|
3434
|
+
* If available, returns an EnchantmentType object that
|
|
3435
|
+
* represents the specified enchantment.
|
|
3436
|
+
*/
|
|
3437
|
+
static get(enchantmentId: string): EnchantmentType | undefined;
|
|
2891
3438
|
}
|
|
2892
3439
|
|
|
2893
3440
|
/**
|
|
@@ -2926,6 +3473,12 @@ export class Entity {
|
|
|
2926
3473
|
isSneaking: boolean;
|
|
2927
3474
|
/**
|
|
2928
3475
|
* @beta
|
|
3476
|
+
* @remarks
|
|
3477
|
+
* Whether the entity reference that you have is valid or not.
|
|
3478
|
+
* For example, an entity may be unloaded if it moves into a
|
|
3479
|
+
* chunk that is unloaded, but may be reactivated if the chunk
|
|
3480
|
+
* it is within gets reloaded.
|
|
3481
|
+
*
|
|
2929
3482
|
*/
|
|
2930
3483
|
readonly lifetimeState: EntityLifetimeState;
|
|
2931
3484
|
/**
|
|
@@ -2980,44 +3533,49 @@ export class Entity {
|
|
|
2980
3533
|
* @param effectType
|
|
2981
3534
|
* Type of effect to add to the entity.
|
|
2982
3535
|
* @param duration
|
|
2983
|
-
* Amount of time, in ticks, for the effect to apply.
|
|
2984
|
-
* @
|
|
2985
|
-
*
|
|
3536
|
+
* Amount of time, in ticks, for the effect to apply. There are
|
|
3537
|
+
* 20 ticks per second. Use {@link TicksPerSecond} constant to
|
|
3538
|
+
* convert between ticks and seconds. The value must be within
|
|
3539
|
+
* the range [0, 20000000].
|
|
3540
|
+
* @param options
|
|
3541
|
+
* Additional options for the effect.
|
|
3542
|
+
* @returns
|
|
3543
|
+
* Returns true if the effect was added successfully. This can
|
|
3544
|
+
* fail if the duration or amplifier are outside of the valid
|
|
3545
|
+
* ranges.
|
|
2986
3546
|
* @throws This function can throw errors.
|
|
2987
3547
|
* @example addEffect.js
|
|
2988
3548
|
* ```typescript
|
|
2989
|
-
* const villagerId =
|
|
3549
|
+
* const villagerId = 'minecraft:villager_v2<minecraft:ageable_grow_up>';
|
|
2990
3550
|
* const villagerLoc: mc.Vector3 = { x: 1, y: 2, z: 1 };
|
|
2991
3551
|
* const villager = test.spawn(villagerId, villagerLoc);
|
|
2992
3552
|
* const duration = 20;
|
|
2993
3553
|
*
|
|
2994
|
-
* villager.addEffect(
|
|
2995
|
-
*
|
|
3554
|
+
* villager.addEffect(EffectTypes.get('poison'), duration, { amplifier: 1 });
|
|
2996
3555
|
*
|
|
2997
3556
|
* ```
|
|
2998
3557
|
* @example quickFoxLazyDog.ts
|
|
2999
3558
|
* ```typescript
|
|
3000
|
-
* const fox = overworld.spawnEntity(
|
|
3001
|
-
*
|
|
3002
|
-
*
|
|
3003
|
-
*
|
|
3559
|
+
* const fox = overworld.spawnEntity('minecraft:fox', {
|
|
3560
|
+
* x: targetLocation.x + 1,
|
|
3561
|
+
* y: targetLocation.y + 2,
|
|
3562
|
+
* z: targetLocation.z + 3,
|
|
3004
3563
|
* });
|
|
3005
|
-
* fox.addEffect(mc.MinecraftEffectTypes.speed, 10, 20);
|
|
3006
|
-
* log(
|
|
3564
|
+
* fox.addEffect(mc.MinecraftEffectTypes.speed, 10, { amplifier: 20 });
|
|
3565
|
+
* log('Created a fox.');
|
|
3007
3566
|
*
|
|
3008
|
-
* const wolf = overworld.spawnEntity(
|
|
3009
|
-
*
|
|
3010
|
-
*
|
|
3011
|
-
*
|
|
3567
|
+
* const wolf = overworld.spawnEntity('minecraft:wolf', {
|
|
3568
|
+
* x: targetLocation.x + 4,
|
|
3569
|
+
* y: targetLocation.y + 2,
|
|
3570
|
+
* z: targetLocation.z + 3,
|
|
3012
3571
|
* });
|
|
3013
|
-
* wolf.addEffect(mc.MinecraftEffectTypes.slowness, 10, 20);
|
|
3572
|
+
* wolf.addEffect(mc.MinecraftEffectTypes.slowness, 10, { amplifier: 20 });
|
|
3014
3573
|
* wolf.isSneaking = true;
|
|
3015
|
-
* log(
|
|
3016
|
-
*
|
|
3574
|
+
* log('Created a sneaking wolf.', 1);
|
|
3017
3575
|
*
|
|
3018
3576
|
* ```
|
|
3019
3577
|
*/
|
|
3020
|
-
addEffect(effectType: EffectType, duration: number,
|
|
3578
|
+
addEffect(effectType: EffectType | string, duration: number, options?: EntityEffectOptions): boolean;
|
|
3021
3579
|
/**
|
|
3022
3580
|
* @beta
|
|
3023
3581
|
* @remarks
|
|
@@ -3027,6 +3585,9 @@ export class Entity {
|
|
|
3027
3585
|
*
|
|
3028
3586
|
* @param tag
|
|
3029
3587
|
* Content of the tag to add.
|
|
3588
|
+
* @returns
|
|
3589
|
+
* Returns true if the tag was added successfully. This can
|
|
3590
|
+
* fail if the tag already exists on the entity.
|
|
3030
3591
|
* @throws This function can throw errors.
|
|
3031
3592
|
*/
|
|
3032
3593
|
addTag(tag: string): boolean;
|
|
@@ -3043,6 +3604,10 @@ export class Entity {
|
|
|
3043
3604
|
* Additional options about the source of damage, which may add
|
|
3044
3605
|
* additional effects or spur additional behaviors on this
|
|
3045
3606
|
* entity.
|
|
3607
|
+
* @returns
|
|
3608
|
+
* Whether the entity takes any damage. This can return false
|
|
3609
|
+
* if the entity is invulnerable or if the damage applied is
|
|
3610
|
+
* less than or equal to 0.
|
|
3046
3611
|
* @throws This function can throw errors.
|
|
3047
3612
|
*/
|
|
3048
3613
|
applyDamage(amount: number, options?: EntityApplyDamageByProjectileOptions | EntityApplyDamageOptions): boolean;
|
|
@@ -3101,6 +3666,8 @@ export class Entity {
|
|
|
3101
3666
|
* @param useEffects
|
|
3102
3667
|
* Whether to show any visual effects connected to the
|
|
3103
3668
|
* extinguishing.
|
|
3669
|
+
* @returns
|
|
3670
|
+
* Returns whether the entity was on fire.
|
|
3104
3671
|
* @throws This function can throw errors.
|
|
3105
3672
|
*/
|
|
3106
3673
|
extinguishFire(useEffects?: boolean): boolean;
|
|
@@ -3110,6 +3677,11 @@ export class Entity {
|
|
|
3110
3677
|
* Returns the first intersecting block from the direction that
|
|
3111
3678
|
* this entity is looking at.
|
|
3112
3679
|
*
|
|
3680
|
+
* @param options
|
|
3681
|
+
* Additional configuration options for the ray cast.
|
|
3682
|
+
* @returns
|
|
3683
|
+
* Returns the first intersecting block from the direction that
|
|
3684
|
+
* this entity is looking at.
|
|
3113
3685
|
* @throws This function can throw errors.
|
|
3114
3686
|
*/
|
|
3115
3687
|
getBlockFromViewDirection(options?: BlockRaycastOptions): Block;
|
|
@@ -3124,14 +3696,20 @@ export class Entity {
|
|
|
3124
3696
|
* to retrieve. If no namespace prefix is specified,
|
|
3125
3697
|
* 'minecraft:' is assumed. If the component is not present on
|
|
3126
3698
|
* the entity, undefined is returned.
|
|
3699
|
+
* @returns
|
|
3700
|
+
* Returns the component if it exists on the entity, otherwise
|
|
3701
|
+
* undefined.
|
|
3127
3702
|
*/
|
|
3128
|
-
getComponent(componentId: string): EntityComponent;
|
|
3703
|
+
getComponent(componentId: string): EntityComponent | undefined;
|
|
3129
3704
|
/**
|
|
3130
3705
|
* @beta
|
|
3131
3706
|
* @remarks
|
|
3132
3707
|
* Returns all components that are both present on this entity
|
|
3133
3708
|
* and supported by the API.
|
|
3134
3709
|
*
|
|
3710
|
+
* @returns
|
|
3711
|
+
* Returns all components that are both present on this entity
|
|
3712
|
+
* and supported by the API.
|
|
3135
3713
|
*/
|
|
3136
3714
|
getComponents(): EntityComponent[];
|
|
3137
3715
|
/**
|
|
@@ -3139,6 +3717,8 @@ export class Entity {
|
|
|
3139
3717
|
* @remarks
|
|
3140
3718
|
* Returns a property value.
|
|
3141
3719
|
*
|
|
3720
|
+
* @param identifier
|
|
3721
|
+
* The property identifier.
|
|
3142
3722
|
* @returns
|
|
3143
3723
|
* Returns the value for the property, or undefined if the
|
|
3144
3724
|
* property has not been set.
|
|
@@ -3151,16 +3731,18 @@ export class Entity {
|
|
|
3151
3731
|
* Returns the effect for the specified EffectType on the
|
|
3152
3732
|
* entity, or undefined if the effect is not present.
|
|
3153
3733
|
*
|
|
3734
|
+
* @param effectType
|
|
3735
|
+
* The effect identifier.
|
|
3154
3736
|
* @returns
|
|
3155
3737
|
* Effect object for the specified effect, or undefined if the
|
|
3156
3738
|
* effect is not present.
|
|
3157
3739
|
* @throws This function can throw errors.
|
|
3158
3740
|
*/
|
|
3159
|
-
getEffect(effectType: EffectType): Effect;
|
|
3741
|
+
getEffect(effectType: EffectType | string): Effect | undefined;
|
|
3160
3742
|
/**
|
|
3161
3743
|
* @beta
|
|
3162
3744
|
* @remarks
|
|
3163
|
-
* Returns a set of effects applied to this
|
|
3745
|
+
* Returns a set of effects applied to this entity.
|
|
3164
3746
|
*
|
|
3165
3747
|
* @returns
|
|
3166
3748
|
* List of effects.
|
|
@@ -3170,9 +3752,14 @@ export class Entity {
|
|
|
3170
3752
|
/**
|
|
3171
3753
|
* @beta
|
|
3172
3754
|
* @remarks
|
|
3173
|
-
*
|
|
3174
|
-
*
|
|
3755
|
+
* Gets the entities that this entity is looking at by
|
|
3756
|
+
* performing a ray cast from the view of this entity.
|
|
3175
3757
|
*
|
|
3758
|
+
* @param options
|
|
3759
|
+
* Additional configuration options for the ray cast.
|
|
3760
|
+
* @returns
|
|
3761
|
+
* Returns a set of entities from the direction that this
|
|
3762
|
+
* entity is looking at.
|
|
3176
3763
|
* @throws This function can throw errors.
|
|
3177
3764
|
*/
|
|
3178
3765
|
getEntitiesFromViewDirection(options?: EntityRaycastOptions): Entity[];
|
|
@@ -3182,6 +3769,9 @@ export class Entity {
|
|
|
3182
3769
|
* Returns the current location of the head component of this
|
|
3183
3770
|
* entity.
|
|
3184
3771
|
*
|
|
3772
|
+
* @returns
|
|
3773
|
+
* Returns the current location of the head component of this
|
|
3774
|
+
* entity.
|
|
3185
3775
|
* @throws This function can throw errors.
|
|
3186
3776
|
*/
|
|
3187
3777
|
getHeadLocation(): Vector3;
|
|
@@ -3190,6 +3780,8 @@ export class Entity {
|
|
|
3190
3780
|
* @remarks
|
|
3191
3781
|
* Returns the current rotation component of this entity.
|
|
3192
3782
|
*
|
|
3783
|
+
* @returns
|
|
3784
|
+
* Returns the current rotation component of this entity.
|
|
3193
3785
|
* @throws This function can throw errors.
|
|
3194
3786
|
*/
|
|
3195
3787
|
getRotation(): Vector2;
|
|
@@ -3198,6 +3790,8 @@ export class Entity {
|
|
|
3198
3790
|
* @remarks
|
|
3199
3791
|
* Returns all tags associated with an entity.
|
|
3200
3792
|
*
|
|
3793
|
+
* @returns
|
|
3794
|
+
* Returns the current rotation component of this entity.
|
|
3201
3795
|
* @throws This function can throw errors.
|
|
3202
3796
|
*/
|
|
3203
3797
|
getTags(): string[];
|
|
@@ -3206,6 +3800,8 @@ export class Entity {
|
|
|
3206
3800
|
* @remarks
|
|
3207
3801
|
* Returns the current velocity vector of the entity.
|
|
3208
3802
|
*
|
|
3803
|
+
* @returns
|
|
3804
|
+
* Returns the current velocity vector of the entity.
|
|
3209
3805
|
* @throws This function can throw errors.
|
|
3210
3806
|
*/
|
|
3211
3807
|
getVelocity(): Vector3;
|
|
@@ -3214,6 +3810,8 @@ export class Entity {
|
|
|
3214
3810
|
* @remarks
|
|
3215
3811
|
* Returns the current view direction of the entity.
|
|
3216
3812
|
*
|
|
3813
|
+
* @returns
|
|
3814
|
+
* Returns the current view direction of the entity.
|
|
3217
3815
|
* @throws This function can throw errors.
|
|
3218
3816
|
*/
|
|
3219
3817
|
getViewDirection(): Vector3;
|
|
@@ -3227,15 +3825,20 @@ export class Entity {
|
|
|
3227
3825
|
* The identifier of the component (e.g., 'minecraft:rideable')
|
|
3228
3826
|
* to retrieve. If no namespace prefix is specified,
|
|
3229
3827
|
* 'minecraft:' is assumed.
|
|
3828
|
+
* @returns
|
|
3829
|
+
* Returns true if the specified component is present on this
|
|
3830
|
+
* entity.
|
|
3230
3831
|
*/
|
|
3231
3832
|
hasComponent(componentId: string): boolean;
|
|
3232
3833
|
/**
|
|
3233
3834
|
* @beta
|
|
3234
3835
|
* @remarks
|
|
3235
|
-
*
|
|
3836
|
+
* Returns whether an entity has a particular tag.
|
|
3236
3837
|
*
|
|
3237
3838
|
* @param tag
|
|
3238
3839
|
* Identifier of the tag to test for.
|
|
3840
|
+
* @returns
|
|
3841
|
+
* Returns whether an entity has a particular tag.
|
|
3239
3842
|
* @throws This function can throw errors.
|
|
3240
3843
|
*/
|
|
3241
3844
|
hasTag(tag: string): boolean;
|
|
@@ -3255,8 +3858,15 @@ export class Entity {
|
|
|
3255
3858
|
/**
|
|
3256
3859
|
* @beta
|
|
3257
3860
|
* @remarks
|
|
3861
|
+
* Cause the entity to play the given animation.
|
|
3862
|
+
*
|
|
3258
3863
|
* This function can't be called in read-only mode.
|
|
3259
3864
|
*
|
|
3865
|
+
* @param animationName
|
|
3866
|
+
* The animation identifier. e.g. animation.creeper.swelling
|
|
3867
|
+
* @param options
|
|
3868
|
+
* Additional options to control the playback and transitions
|
|
3869
|
+
* of the animation.
|
|
3260
3870
|
* @throws This function can throw errors.
|
|
3261
3871
|
*/
|
|
3262
3872
|
playAnimation(animationName: string, options?: PlayAnimationOptions): void;
|
|
@@ -3265,9 +3875,29 @@ export class Entity {
|
|
|
3265
3875
|
* @remarks
|
|
3266
3876
|
* Removes a specified property.
|
|
3267
3877
|
*
|
|
3878
|
+
* @param identifier
|
|
3879
|
+
* The property identifier.
|
|
3880
|
+
* @returns
|
|
3881
|
+
* Returns whether the given property existed on the entity.
|
|
3268
3882
|
* @throws This function can throw errors.
|
|
3269
3883
|
*/
|
|
3270
3884
|
removeDynamicProperty(identifier: string): boolean;
|
|
3885
|
+
/**
|
|
3886
|
+
* @beta
|
|
3887
|
+
* @remarks
|
|
3888
|
+
* Removes the specified EffectType on the entity, or returns
|
|
3889
|
+
* false if the effect is not present.
|
|
3890
|
+
*
|
|
3891
|
+
* This function can't be called in read-only mode.
|
|
3892
|
+
*
|
|
3893
|
+
* @param effectType
|
|
3894
|
+
* The effect identifier.
|
|
3895
|
+
* @returns
|
|
3896
|
+
* Returns true if the effect has been removed and false if the
|
|
3897
|
+
* effect is not present.
|
|
3898
|
+
* @throws This function can throw errors.
|
|
3899
|
+
*/
|
|
3900
|
+
removeEffect(effectType: EffectType | string): boolean;
|
|
3271
3901
|
/**
|
|
3272
3902
|
* @beta
|
|
3273
3903
|
* @remarks
|
|
@@ -3277,14 +3907,24 @@ export class Entity {
|
|
|
3277
3907
|
*
|
|
3278
3908
|
* @param tag
|
|
3279
3909
|
* Content of the tag to remove.
|
|
3910
|
+
* @returns
|
|
3911
|
+
* Returns whether the tag existed on the entity.
|
|
3280
3912
|
* @throws This function can throw errors.
|
|
3281
3913
|
*/
|
|
3282
3914
|
removeTag(tag: string): boolean;
|
|
3283
3915
|
/**
|
|
3284
3916
|
* @beta
|
|
3285
3917
|
* @remarks
|
|
3918
|
+
* Runs a synchronous command on the entity.
|
|
3919
|
+
*
|
|
3286
3920
|
* This function can't be called in read-only mode.
|
|
3287
3921
|
*
|
|
3922
|
+
* @param commandString
|
|
3923
|
+
* The command string. Note: This should not include a leading
|
|
3924
|
+
* forward slash.
|
|
3925
|
+
* @returns
|
|
3926
|
+
* A command result containing whether the command was
|
|
3927
|
+
* successful.
|
|
3288
3928
|
* @throws This function can throw errors.
|
|
3289
3929
|
*/
|
|
3290
3930
|
runCommand(commandString: string): CommandResult;
|
|
@@ -3308,6 +3948,8 @@ export class Entity {
|
|
|
3308
3948
|
* @remarks
|
|
3309
3949
|
* Sets a specified property to a value.
|
|
3310
3950
|
*
|
|
3951
|
+
* @param identifier
|
|
3952
|
+
* The property identifier.
|
|
3311
3953
|
* @param value
|
|
3312
3954
|
* Data value of the property to set.
|
|
3313
3955
|
* @throws This function can throw errors.
|
|
@@ -3324,6 +3966,14 @@ export class Entity {
|
|
|
3324
3966
|
*
|
|
3325
3967
|
* @param seconds
|
|
3326
3968
|
* Length of time to set the entity on fire.
|
|
3969
|
+
* @param useEffects
|
|
3970
|
+
* Whether side-effects should be applied (e.g. thawing freeze)
|
|
3971
|
+
* and other conditions such as rain or fire protection should
|
|
3972
|
+
* be taken into consideration.
|
|
3973
|
+
* @returns
|
|
3974
|
+
* Whether the entity was set on fire. This can fail if seconds
|
|
3975
|
+
* is less than or equal to zero, the entity is wet or the
|
|
3976
|
+
* entity is immune to fire.
|
|
3327
3977
|
* @throws This function can throw errors.
|
|
3328
3978
|
*/
|
|
3329
3979
|
setOnFire(seconds: number, useEffects?: boolean): boolean;
|
|
@@ -3334,6 +3984,10 @@ export class Entity {
|
|
|
3334
3984
|
*
|
|
3335
3985
|
* This function can't be called in read-only mode.
|
|
3336
3986
|
*
|
|
3987
|
+
* @param rotation
|
|
3988
|
+
* The x and y rotation of the entity. For most mobs, the x
|
|
3989
|
+
* rotation controls the head tilt and the y rotation controls
|
|
3990
|
+
* the body rotation.
|
|
3337
3991
|
* @throws This function can throw errors.
|
|
3338
3992
|
*/
|
|
3339
3993
|
setRotation(rotation: Vector2): void;
|
|
@@ -3346,6 +4000,8 @@ export class Entity {
|
|
|
3346
4000
|
*
|
|
3347
4001
|
* @param location
|
|
3348
4002
|
* New location for the entity.
|
|
4003
|
+
* @param teleportOptions
|
|
4004
|
+
* Options regarding the teleport operation.
|
|
3349
4005
|
* @throws This function can throw errors.
|
|
3350
4006
|
*/
|
|
3351
4007
|
teleport(location: Vector3, teleportOptions?: TeleportOptions): void;
|
|
@@ -3368,8 +4024,20 @@ export class Entity {
|
|
|
3368
4024
|
/**
|
|
3369
4025
|
* @beta
|
|
3370
4026
|
* @remarks
|
|
4027
|
+
* Attempts to try a teleport, but may not complete the
|
|
4028
|
+
* teleport operation (for example, if there are blocks at the
|
|
4029
|
+
* destination.)
|
|
4030
|
+
*
|
|
3371
4031
|
* This function can't be called in read-only mode.
|
|
3372
4032
|
*
|
|
4033
|
+
* @param location
|
|
4034
|
+
* Location to teleport the entity to.
|
|
4035
|
+
* @param teleportOptions
|
|
4036
|
+
* Options regarding the teleport operation.
|
|
4037
|
+
* @returns
|
|
4038
|
+
* Returns whether the teleport succeeded. This can fail if the
|
|
4039
|
+
* destination chunk is unloaded or if the teleport would
|
|
4040
|
+
* result in intersecting with blocks.
|
|
3373
4041
|
* @throws This function can throw errors.
|
|
3374
4042
|
*/
|
|
3375
4043
|
tryTeleport(location: Vector3, teleportOptions?: TeleportOptions): boolean;
|
|
@@ -3656,8 +4324,6 @@ export class EntityColorComponent extends EntityComponent {
|
|
|
3656
4324
|
protected constructor();
|
|
3657
4325
|
/**
|
|
3658
4326
|
* @remarks
|
|
3659
|
-
* The palette color value of the entity.
|
|
3660
|
-
*
|
|
3661
4327
|
* This property can't be edited in read-only mode.
|
|
3662
4328
|
*
|
|
3663
4329
|
*/
|
|
@@ -3678,6 +4344,7 @@ export class EntityColorComponent extends EntityComponent {
|
|
|
3678
4344
|
export class EntityComponent extends Component {
|
|
3679
4345
|
protected constructor();
|
|
3680
4346
|
/**
|
|
4347
|
+
* @beta
|
|
3681
4348
|
* @remarks
|
|
3682
4349
|
* The entity that owns this component.
|
|
3683
4350
|
*
|
|
@@ -3728,28 +4395,51 @@ export class EntityDieAfterEventSignal extends IEntityDieAfterEventSignal {
|
|
|
3728
4395
|
|
|
3729
4396
|
/**
|
|
3730
4397
|
* @beta
|
|
4398
|
+
* Provides access to a mob's equipment slots. This component
|
|
4399
|
+
* exists for all mob entities.
|
|
3731
4400
|
*/
|
|
3732
4401
|
export class EntityEquipmentInventoryComponent extends EntityComponent {
|
|
3733
4402
|
protected constructor();
|
|
3734
4403
|
static readonly componentId = 'minecraft:equipment_inventory';
|
|
3735
4404
|
/**
|
|
3736
4405
|
* @remarks
|
|
4406
|
+
* Gets the equipped item for the given EquipmentSlot.
|
|
4407
|
+
*
|
|
3737
4408
|
* This function can't be called in read-only mode.
|
|
3738
4409
|
*
|
|
4410
|
+
* @param equipmentSlot
|
|
4411
|
+
* The equipment slot. e.g. "head", "chest", "offhand"
|
|
4412
|
+
* @returns
|
|
4413
|
+
* Returns the item equipped to the given EquipmentSlot. If
|
|
4414
|
+
* empty, returns undefined.
|
|
3739
4415
|
* @throws This function can throw errors.
|
|
3740
4416
|
*/
|
|
3741
4417
|
getEquipment(equipmentSlot: EquipmentSlot): ItemStack | undefined;
|
|
3742
4418
|
/**
|
|
3743
4419
|
* @remarks
|
|
4420
|
+
* Gets the ContainerSlot corresponding to the given
|
|
4421
|
+
* EquipmentSlot.
|
|
4422
|
+
*
|
|
3744
4423
|
* This function can't be called in read-only mode.
|
|
3745
4424
|
*
|
|
4425
|
+
* @param equipmentSlot
|
|
4426
|
+
* The equipment slot. e.g. "head", "chest", "offhand".
|
|
4427
|
+
* @returns
|
|
4428
|
+
* Returns the ContainerSlot corresponding to the given
|
|
4429
|
+
* EquipmentSlot.
|
|
3746
4430
|
* @throws This function can throw errors.
|
|
3747
4431
|
*/
|
|
3748
4432
|
getEquipmentSlot(equipmentSlot: EquipmentSlot): ContainerSlot;
|
|
3749
4433
|
/**
|
|
3750
4434
|
* @remarks
|
|
4435
|
+
* Replaces the item in the given EquipmentSlot.
|
|
4436
|
+
*
|
|
3751
4437
|
* This function can't be called in read-only mode.
|
|
3752
4438
|
*
|
|
4439
|
+
* @param equipmentSlot
|
|
4440
|
+
* The equipment slot. e.g. "head", "chest", "offhand".
|
|
4441
|
+
* @param itemStack
|
|
4442
|
+
* The item to equip. If undefined, clears the slot.
|
|
3753
4443
|
* @throws This function can throw errors.
|
|
3754
4444
|
*/
|
|
3755
4445
|
setEquipment(equipmentSlot: EquipmentSlot, itemStack?: ItemStack): void;
|
|
@@ -3795,8 +4485,6 @@ export class EntityFlyingSpeedComponent extends EntityComponent {
|
|
|
3795
4485
|
protected constructor();
|
|
3796
4486
|
/**
|
|
3797
4487
|
* @remarks
|
|
3798
|
-
* Speed while flying value of the entity.
|
|
3799
|
-
*
|
|
3800
4488
|
* This property can't be edited in read-only mode.
|
|
3801
4489
|
*
|
|
3802
4490
|
*/
|
|
@@ -3818,10 +4506,6 @@ export class EntityFrictionModifierComponent extends EntityComponent {
|
|
|
3818
4506
|
protected constructor();
|
|
3819
4507
|
/**
|
|
3820
4508
|
* @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
4509
|
* This property can't be edited in read-only mode.
|
|
3826
4510
|
*
|
|
3827
4511
|
*/
|
|
@@ -3844,9 +4528,6 @@ export class EntityGroundOffsetComponent extends EntityComponent {
|
|
|
3844
4528
|
protected constructor();
|
|
3845
4529
|
/**
|
|
3846
4530
|
* @remarks
|
|
3847
|
-
* The value of the entity's offset from the terrain, in
|
|
3848
|
-
* blocks.
|
|
3849
|
-
*
|
|
3850
4531
|
* This property can't be edited in read-only mode.
|
|
3851
4532
|
*
|
|
3852
4533
|
*/
|
|
@@ -3892,6 +4573,8 @@ export class EntityHealableComponent extends EntityComponent {
|
|
|
3892
4573
|
* @remarks
|
|
3893
4574
|
* A set of items that can specifically heal this entity.
|
|
3894
4575
|
*
|
|
4576
|
+
* @returns
|
|
4577
|
+
* Entity that this component is associated with.
|
|
3895
4578
|
* @throws This function can throw errors.
|
|
3896
4579
|
*/
|
|
3897
4580
|
getFeedItems(): FeedItem[];
|
|
@@ -4050,7 +4733,6 @@ export class EntityInventoryComponent extends EntityComponent {
|
|
|
4050
4733
|
*/
|
|
4051
4734
|
readonly restrictToOwner: boolean;
|
|
4052
4735
|
/**
|
|
4053
|
-
* @beta
|
|
4054
4736
|
* @remarks
|
|
4055
4737
|
* Identifier of this component. Should always be
|
|
4056
4738
|
* minecraft:inventory.
|
|
@@ -4112,7 +4794,7 @@ export class EntityIsChestedComponent extends EntityComponent {
|
|
|
4112
4794
|
* When added, this component signifies that dyes can be used
|
|
4113
4795
|
* on this entity to change its color.
|
|
4114
4796
|
*/
|
|
4115
|
-
export class
|
|
4797
|
+
export class EntityIsDyeableComponent extends EntityComponent {
|
|
4116
4798
|
protected constructor();
|
|
4117
4799
|
/**
|
|
4118
4800
|
* @remarks
|
|
@@ -4284,7 +4966,6 @@ export class EntityItemComponent extends EntityComponent {
|
|
|
4284
4966
|
*/
|
|
4285
4967
|
readonly itemStack: ItemStack;
|
|
4286
4968
|
/**
|
|
4287
|
-
* @beta
|
|
4288
4969
|
* @remarks
|
|
4289
4970
|
* Identifier of this component.
|
|
4290
4971
|
*
|
|
@@ -4387,9 +5068,6 @@ export class EntityMarkVariantComponent extends EntityComponent {
|
|
|
4387
5068
|
protected constructor();
|
|
4388
5069
|
/**
|
|
4389
5070
|
* @remarks
|
|
4390
|
-
* The identifier of the variant. By convention, 0 is the
|
|
4391
|
-
* identifier of the base entity.
|
|
4392
|
-
*
|
|
4393
5071
|
* This property can't be edited in read-only mode.
|
|
4394
5072
|
*
|
|
4395
5073
|
*/
|
|
@@ -4435,15 +5113,8 @@ export class EntityMountTamingComponent extends EntityComponent {
|
|
|
4435
5113
|
* When added, this movement control allows the mob to swim in
|
|
4436
5114
|
* water and walk on land.
|
|
4437
5115
|
*/
|
|
4438
|
-
export class EntityMovementAmphibiousComponent extends
|
|
5116
|
+
export class EntityMovementAmphibiousComponent extends EntityBaseMovementComponent {
|
|
4439
5117
|
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
5118
|
/**
|
|
4448
5119
|
* @remarks
|
|
4449
5120
|
* Identifier of this component. Should always be
|
|
@@ -4457,15 +5128,8 @@ export class EntityMovementAmphibiousComponent extends EntityComponent {
|
|
|
4457
5128
|
* @beta
|
|
4458
5129
|
* This component accents the movement of an entity.
|
|
4459
5130
|
*/
|
|
4460
|
-
export class EntityMovementBasicComponent extends
|
|
5131
|
+
export class EntityMovementBasicComponent extends EntityBaseMovementComponent {
|
|
4461
5132
|
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
5133
|
/**
|
|
4470
5134
|
* @remarks
|
|
4471
5135
|
* Identifier of this component. Should always be
|
|
@@ -4905,8 +5569,6 @@ export class EntityPushThroughComponent extends EntityComponent {
|
|
|
4905
5569
|
protected constructor();
|
|
4906
5570
|
/**
|
|
4907
5571
|
* @remarks
|
|
4908
|
-
* The value of the entity's push-through, in blocks.
|
|
4909
|
-
*
|
|
4910
5572
|
* This property can't be edited in read-only mode.
|
|
4911
5573
|
*
|
|
4912
5574
|
*/
|
|
@@ -4920,6 +5582,21 @@ export class EntityPushThroughComponent extends EntityComponent {
|
|
|
4920
5582
|
static readonly componentId = 'minecraft:push_through';
|
|
4921
5583
|
}
|
|
4922
5584
|
|
|
5585
|
+
/**
|
|
5586
|
+
* @beta
|
|
5587
|
+
*/
|
|
5588
|
+
export class EntityRemovedAfterEvent {
|
|
5589
|
+
protected constructor();
|
|
5590
|
+
readonly removedEntity: string;
|
|
5591
|
+
}
|
|
5592
|
+
|
|
5593
|
+
/**
|
|
5594
|
+
* @beta
|
|
5595
|
+
*/
|
|
5596
|
+
export class EntityRemovedAfterEventSignal extends IEntityRemovedAfterEventSignal {
|
|
5597
|
+
protected constructor();
|
|
5598
|
+
}
|
|
5599
|
+
|
|
4923
5600
|
/**
|
|
4924
5601
|
* @beta
|
|
4925
5602
|
* When added, this component adds the capability that an
|
|
@@ -5072,10 +5749,6 @@ export class EntityScaleComponent extends EntityComponent {
|
|
|
5072
5749
|
protected constructor();
|
|
5073
5750
|
/**
|
|
5074
5751
|
* @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
5752
|
* This property can't be edited in read-only mode.
|
|
5080
5753
|
*
|
|
5081
5754
|
*/
|
|
@@ -5098,9 +5771,6 @@ export class EntitySkinIdComponent extends EntityComponent {
|
|
|
5098
5771
|
protected constructor();
|
|
5099
5772
|
/**
|
|
5100
5773
|
* @remarks
|
|
5101
|
-
* The identifier of the skin. By convention, 0 is the
|
|
5102
|
-
* identifier of the base skin.
|
|
5103
|
-
*
|
|
5104
5774
|
* This property can't be edited in read-only mode.
|
|
5105
5775
|
*
|
|
5106
5776
|
*/
|
|
@@ -5153,14 +5823,7 @@ export class EntityStrengthComponent extends EntityComponent {
|
|
|
5153
5823
|
*
|
|
5154
5824
|
* @throws This property can throw when used.
|
|
5155
5825
|
*/
|
|
5156
|
-
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
|
-
*/
|
|
5826
|
+
readonly max: number;
|
|
5164
5827
|
readonly value: number;
|
|
5165
5828
|
/**
|
|
5166
5829
|
* @remarks
|
|
@@ -5291,13 +5954,6 @@ export class EntityUnderwaterMovementComponent extends EntityAttributeComponent
|
|
|
5291
5954
|
*/
|
|
5292
5955
|
export class EntityVariantComponent extends EntityComponent {
|
|
5293
5956
|
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
5957
|
readonly value: number;
|
|
5302
5958
|
/**
|
|
5303
5959
|
* @remarks
|
|
@@ -5343,6 +5999,11 @@ export class ExplosionAfterEvent {
|
|
|
5343
5999
|
*
|
|
5344
6000
|
*/
|
|
5345
6001
|
readonly source?: Entity;
|
|
6002
|
+
/**
|
|
6003
|
+
* @remarks
|
|
6004
|
+
* A collection of blocks impacted by this explosion event.
|
|
6005
|
+
*
|
|
6006
|
+
*/
|
|
5346
6007
|
getImpactedBlocks(): Vector3[];
|
|
5347
6008
|
}
|
|
5348
6009
|
|
|
@@ -5368,6 +6029,14 @@ export class ExplosionBeforeEvent extends ExplosionAfterEvent {
|
|
|
5368
6029
|
*
|
|
5369
6030
|
*/
|
|
5370
6031
|
cancel: boolean;
|
|
6032
|
+
/**
|
|
6033
|
+
* @remarks
|
|
6034
|
+
* Updates a collection of blocks impacted by this explosion
|
|
6035
|
+
* event.
|
|
6036
|
+
*
|
|
6037
|
+
* @param blocks
|
|
6038
|
+
* New list of blocks that are impacted by this explosion.
|
|
6039
|
+
*/
|
|
5371
6040
|
setImpactedBlocks(blocks: Vector3[]): void;
|
|
5372
6041
|
}
|
|
5373
6042
|
|
|
@@ -5481,6 +6150,8 @@ export class FluidContainer {
|
|
|
5481
6150
|
|
|
5482
6151
|
/**
|
|
5483
6152
|
* @beta
|
|
6153
|
+
* Provides an adaptable interface for callers to subscribe to
|
|
6154
|
+
* an event that fires when blocks are broken.
|
|
5484
6155
|
*/
|
|
5485
6156
|
export class IBlockBreakAfterEventSignal {
|
|
5486
6157
|
protected constructor();
|
|
@@ -5501,6 +6172,8 @@ export class IBlockBreakAfterEventSignal {
|
|
|
5501
6172
|
|
|
5502
6173
|
/**
|
|
5503
6174
|
* @beta
|
|
6175
|
+
* Provides an adaptable interface for callers to subscribe to
|
|
6176
|
+
* an event that fires when an explosion occurs.
|
|
5504
6177
|
*/
|
|
5505
6178
|
export class IBlockExplodeAfterEventSignal {
|
|
5506
6179
|
protected constructor();
|
|
@@ -5521,6 +6194,8 @@ export class IBlockExplodeAfterEventSignal {
|
|
|
5521
6194
|
|
|
5522
6195
|
/**
|
|
5523
6196
|
* @beta
|
|
6197
|
+
* Provides an adaptable interface for callers to subscribe to
|
|
6198
|
+
* an event that fires after a block is placed.
|
|
5524
6199
|
*/
|
|
5525
6200
|
export class IBlockPlaceAfterEventSignal {
|
|
5526
6201
|
protected constructor();
|
|
@@ -5541,6 +6216,8 @@ export class IBlockPlaceAfterEventSignal {
|
|
|
5541
6216
|
|
|
5542
6217
|
/**
|
|
5543
6218
|
* @beta
|
|
6219
|
+
* Provides an adaptable interface for callers to subscribe to
|
|
6220
|
+
* an event that fires when a button is pushed.
|
|
5544
6221
|
*/
|
|
5545
6222
|
export class IButtonPushAfterEventSignal {
|
|
5546
6223
|
protected constructor();
|
|
@@ -5561,6 +6238,8 @@ export class IButtonPushAfterEventSignal {
|
|
|
5561
6238
|
|
|
5562
6239
|
/**
|
|
5563
6240
|
* @beta
|
|
6241
|
+
* Provides an adaptable interface for callers to subscribe to
|
|
6242
|
+
* an event that fires when a chat message is sent.
|
|
5564
6243
|
*/
|
|
5565
6244
|
export class IChatSendAfterEventSignal {
|
|
5566
6245
|
protected constructor();
|
|
@@ -5581,6 +6260,8 @@ export class IChatSendAfterEventSignal {
|
|
|
5581
6260
|
|
|
5582
6261
|
/**
|
|
5583
6262
|
* @beta
|
|
6263
|
+
* Provides an adaptable interface for callers to subscribe to
|
|
6264
|
+
* an event that fires before a chat message is sent.
|
|
5584
6265
|
*/
|
|
5585
6266
|
export class IChatSendBeforeEventSignal {
|
|
5586
6267
|
protected constructor();
|
|
@@ -5601,6 +6282,9 @@ export class IChatSendBeforeEventSignal {
|
|
|
5601
6282
|
|
|
5602
6283
|
/**
|
|
5603
6284
|
* @beta
|
|
6285
|
+
* Provides an adaptable interface for callers to subscribe to
|
|
6286
|
+
* an event that fires when an entities' definition is
|
|
6287
|
+
* triggered to change.
|
|
5604
6288
|
*/
|
|
5605
6289
|
export class IDataDrivenEntityTriggerAfterEventSignal {
|
|
5606
6290
|
protected constructor();
|
|
@@ -5624,6 +6308,9 @@ export class IDataDrivenEntityTriggerAfterEventSignal {
|
|
|
5624
6308
|
|
|
5625
6309
|
/**
|
|
5626
6310
|
* @beta
|
|
6311
|
+
* Provides an adaptable interface for callers to subscribe to
|
|
6312
|
+
* an event that fires before an entities' definition is
|
|
6313
|
+
* scheduled to change via a triggered event.
|
|
5627
6314
|
*/
|
|
5628
6315
|
export class IDataDrivenEntityTriggerBeforeEventSignal {
|
|
5629
6316
|
protected constructor();
|
|
@@ -5647,6 +6334,8 @@ export class IDataDrivenEntityTriggerBeforeEventSignal {
|
|
|
5647
6334
|
|
|
5648
6335
|
/**
|
|
5649
6336
|
* @beta
|
|
6337
|
+
* Provides an adaptable interface for callers to subscribe to
|
|
6338
|
+
* an event that fires when an effect is added to an entity.
|
|
5650
6339
|
*/
|
|
5651
6340
|
export class IEffectAddAfterEventSignal {
|
|
5652
6341
|
protected constructor();
|
|
@@ -5670,6 +6359,8 @@ export class IEffectAddAfterEventSignal {
|
|
|
5670
6359
|
|
|
5671
6360
|
/**
|
|
5672
6361
|
* @beta
|
|
6362
|
+
* Provides an adaptable interface for callers to subscribe to
|
|
6363
|
+
* an event that fires when an entity dies.
|
|
5673
6364
|
*/
|
|
5674
6365
|
export class IEntityDieAfterEventSignal {
|
|
5675
6366
|
protected constructor();
|
|
@@ -5693,6 +6384,9 @@ export class IEntityDieAfterEventSignal {
|
|
|
5693
6384
|
|
|
5694
6385
|
/**
|
|
5695
6386
|
* @beta
|
|
6387
|
+
* Provides an adaptable interface for callers to subscribe to
|
|
6388
|
+
* an event that fires when an entity hits (melee attacks)
|
|
6389
|
+
* another entity.
|
|
5696
6390
|
*/
|
|
5697
6391
|
export class IEntityHitAfterEventSignal {
|
|
5698
6392
|
protected constructor();
|
|
@@ -5716,6 +6410,8 @@ export class IEntityHitAfterEventSignal {
|
|
|
5716
6410
|
|
|
5717
6411
|
/**
|
|
5718
6412
|
* @beta
|
|
6413
|
+
* Provides an adaptable interface for callers to subscribe to
|
|
6414
|
+
* an event that fires when an entity is hurt.
|
|
5719
6415
|
*/
|
|
5720
6416
|
export class IEntityHurtAfterEventSignal {
|
|
5721
6417
|
protected constructor();
|
|
@@ -5740,6 +6436,31 @@ export class IEntityHurtAfterEventSignal {
|
|
|
5740
6436
|
/**
|
|
5741
6437
|
* @beta
|
|
5742
6438
|
*/
|
|
6439
|
+
export class IEntityRemovedAfterEventSignal {
|
|
6440
|
+
protected constructor();
|
|
6441
|
+
/**
|
|
6442
|
+
* @remarks
|
|
6443
|
+
* This function can't be called in read-only mode.
|
|
6444
|
+
*
|
|
6445
|
+
*/
|
|
6446
|
+
subscribe(
|
|
6447
|
+
callback: (arg: EntityRemovedAfterEvent) => void,
|
|
6448
|
+
options?: EntityEventOptions,
|
|
6449
|
+
): (arg: EntityRemovedAfterEvent) => void;
|
|
6450
|
+
/**
|
|
6451
|
+
* @remarks
|
|
6452
|
+
* This function can't be called in read-only mode.
|
|
6453
|
+
*
|
|
6454
|
+
* @throws This function can throw errors.
|
|
6455
|
+
*/
|
|
6456
|
+
unsubscribe(callback: (arg: EntityRemovedAfterEvent) => void): void;
|
|
6457
|
+
}
|
|
6458
|
+
|
|
6459
|
+
/**
|
|
6460
|
+
* @beta
|
|
6461
|
+
* Provides an adaptable interface for callers to subscribe to
|
|
6462
|
+
* an event that fires after an entity is spawned.
|
|
6463
|
+
*/
|
|
5743
6464
|
export class IEntitySpawnAfterEventSignal {
|
|
5744
6465
|
protected constructor();
|
|
5745
6466
|
/**
|
|
@@ -5759,6 +6480,8 @@ export class IEntitySpawnAfterEventSignal {
|
|
|
5759
6480
|
|
|
5760
6481
|
/**
|
|
5761
6482
|
* @beta
|
|
6483
|
+
* Provides an adaptable interface for callers to subscribe to
|
|
6484
|
+
* an event that fires after an explosion occurs.
|
|
5762
6485
|
*/
|
|
5763
6486
|
export class IExplosionAfterEventSignal {
|
|
5764
6487
|
protected constructor();
|
|
@@ -5779,6 +6502,8 @@ export class IExplosionAfterEventSignal {
|
|
|
5779
6502
|
|
|
5780
6503
|
/**
|
|
5781
6504
|
* @beta
|
|
6505
|
+
* Provides an adaptable interface for callers to subscribe to
|
|
6506
|
+
* an event that fires before an explosion begins.
|
|
5782
6507
|
*/
|
|
5783
6508
|
export class IExplosionBeforeEventSignal {
|
|
5784
6509
|
protected constructor();
|
|
@@ -5799,6 +6524,8 @@ export class IExplosionBeforeEventSignal {
|
|
|
5799
6524
|
|
|
5800
6525
|
/**
|
|
5801
6526
|
* @beta
|
|
6527
|
+
* Provides an adaptable interface for callers to subscribe to
|
|
6528
|
+
* an event that fires after an item has completed charging.
|
|
5802
6529
|
*/
|
|
5803
6530
|
export class IItemCompleteChargeAfterEventSignal {
|
|
5804
6531
|
protected constructor();
|
|
@@ -5819,6 +6546,8 @@ export class IItemCompleteChargeAfterEventSignal {
|
|
|
5819
6546
|
|
|
5820
6547
|
/**
|
|
5821
6548
|
* @beta
|
|
6549
|
+
* Provides an adaptable interface for callers to subscribe to
|
|
6550
|
+
* an event that fires after an items' definition has changed.
|
|
5822
6551
|
*/
|
|
5823
6552
|
export class IItemDefinitionAfterEventSignal {
|
|
5824
6553
|
protected constructor();
|
|
@@ -5841,6 +6570,8 @@ export class IItemDefinitionAfterEventSignal {
|
|
|
5841
6570
|
|
|
5842
6571
|
/**
|
|
5843
6572
|
* @beta
|
|
6573
|
+
* Provides an adaptable interface for callers to subscribe to
|
|
6574
|
+
* an event that fires before an items' definition changes.
|
|
5844
6575
|
*/
|
|
5845
6576
|
export class IItemDefinitionBeforeEventSignal {
|
|
5846
6577
|
protected constructor();
|
|
@@ -5863,6 +6594,8 @@ export class IItemDefinitionBeforeEventSignal {
|
|
|
5863
6594
|
|
|
5864
6595
|
/**
|
|
5865
6596
|
* @beta
|
|
6597
|
+
* Provides an adaptable interface for callers to subscribe to
|
|
6598
|
+
* an event that fires after a charged item is released.
|
|
5866
6599
|
*/
|
|
5867
6600
|
export class IItemReleaseChargeAfterEventSignal {
|
|
5868
6601
|
protected constructor();
|
|
@@ -5883,6 +6616,8 @@ export class IItemReleaseChargeAfterEventSignal {
|
|
|
5883
6616
|
|
|
5884
6617
|
/**
|
|
5885
6618
|
* @beta
|
|
6619
|
+
* Provides an adaptable interface for callers to subscribe to
|
|
6620
|
+
* an event that fires when a chargeable item starts charging.
|
|
5886
6621
|
*/
|
|
5887
6622
|
export class IItemStartChargeAfterEventSignal {
|
|
5888
6623
|
protected constructor();
|
|
@@ -5903,6 +6638,9 @@ export class IItemStartChargeAfterEventSignal {
|
|
|
5903
6638
|
|
|
5904
6639
|
/**
|
|
5905
6640
|
* @beta
|
|
6641
|
+
* Provides an adaptable interface for callers to subscribe to
|
|
6642
|
+
* an event that fires when an item item is starting to be used
|
|
6643
|
+
* on a block.
|
|
5906
6644
|
*/
|
|
5907
6645
|
export class IItemStartUseOnAfterEventSignal {
|
|
5908
6646
|
protected constructor();
|
|
@@ -5923,6 +6661,8 @@ export class IItemStartUseOnAfterEventSignal {
|
|
|
5923
6661
|
|
|
5924
6662
|
/**
|
|
5925
6663
|
* @beta
|
|
6664
|
+
* Provides an adaptable interface for callers to subscribe to
|
|
6665
|
+
* an event that fires when an item stops charging.
|
|
5926
6666
|
*/
|
|
5927
6667
|
export class IItemStopChargeAfterEventSignal {
|
|
5928
6668
|
protected constructor();
|
|
@@ -5943,6 +6683,9 @@ export class IItemStopChargeAfterEventSignal {
|
|
|
5943
6683
|
|
|
5944
6684
|
/**
|
|
5945
6685
|
* @beta
|
|
6686
|
+
* Provides an adaptable interface for callers to subscribe to
|
|
6687
|
+
* an event that fires when an item has stopped being used on a
|
|
6688
|
+
* block.
|
|
5946
6689
|
*/
|
|
5947
6690
|
export class IItemStopUseOnAfterEventSignal {
|
|
5948
6691
|
protected constructor();
|
|
@@ -5963,6 +6706,8 @@ export class IItemStopUseOnAfterEventSignal {
|
|
|
5963
6706
|
|
|
5964
6707
|
/**
|
|
5965
6708
|
* @beta
|
|
6709
|
+
* Provides an adaptable interface for callers to subscribe to
|
|
6710
|
+
* an event that fires after an item is used.
|
|
5966
6711
|
*/
|
|
5967
6712
|
export class IItemUseAfterEventSignal {
|
|
5968
6713
|
protected constructor();
|
|
@@ -5983,6 +6728,8 @@ export class IItemUseAfterEventSignal {
|
|
|
5983
6728
|
|
|
5984
6729
|
/**
|
|
5985
6730
|
* @beta
|
|
6731
|
+
* Provides an adaptable interface for callers to subscribe to
|
|
6732
|
+
* an event that fires before an item is used.
|
|
5986
6733
|
*/
|
|
5987
6734
|
export class IItemUseBeforeEventSignal {
|
|
5988
6735
|
protected constructor();
|
|
@@ -6003,6 +6750,8 @@ export class IItemUseBeforeEventSignal {
|
|
|
6003
6750
|
|
|
6004
6751
|
/**
|
|
6005
6752
|
* @beta
|
|
6753
|
+
* Provides an adaptable interface for callers to subscribe to
|
|
6754
|
+
* an event that fires after an item is used on a block.
|
|
6006
6755
|
*/
|
|
6007
6756
|
export class IItemUseOnAfterEventSignal {
|
|
6008
6757
|
protected constructor();
|
|
@@ -6023,6 +6772,8 @@ export class IItemUseOnAfterEventSignal {
|
|
|
6023
6772
|
|
|
6024
6773
|
/**
|
|
6025
6774
|
* @beta
|
|
6775
|
+
* Provides an adaptable interface for callers to subscribe to
|
|
6776
|
+
* an event that fires before an item is being used on a block.
|
|
6026
6777
|
*/
|
|
6027
6778
|
export class IItemUseOnBeforeEventSignal {
|
|
6028
6779
|
protected constructor();
|
|
@@ -6043,6 +6794,8 @@ export class IItemUseOnBeforeEventSignal {
|
|
|
6043
6794
|
|
|
6044
6795
|
/**
|
|
6045
6796
|
* @beta
|
|
6797
|
+
* Provides an adaptable interface for callers to subscribe to
|
|
6798
|
+
* an event that fires after a lever is used.
|
|
6046
6799
|
*/
|
|
6047
6800
|
export class ILeverActionAfterEventSignal {
|
|
6048
6801
|
protected constructor();
|
|
@@ -6063,6 +6816,8 @@ export class ILeverActionAfterEventSignal {
|
|
|
6063
6816
|
|
|
6064
6817
|
/**
|
|
6065
6818
|
* @beta
|
|
6819
|
+
* Provides an adaptable interface for callers to subscribe to
|
|
6820
|
+
* an event that fires after a piston is activated.
|
|
6066
6821
|
*/
|
|
6067
6822
|
export class IPistonActivateAfterEventSignal {
|
|
6068
6823
|
protected constructor();
|
|
@@ -6083,6 +6838,8 @@ export class IPistonActivateAfterEventSignal {
|
|
|
6083
6838
|
|
|
6084
6839
|
/**
|
|
6085
6840
|
* @beta
|
|
6841
|
+
* Provides an adaptable interface for callers to subscribe to
|
|
6842
|
+
* an event that fires before a piston is activated.
|
|
6086
6843
|
*/
|
|
6087
6844
|
export class IPistonActivateBeforeEventSignal {
|
|
6088
6845
|
protected constructor();
|
|
@@ -6103,6 +6860,8 @@ export class IPistonActivateBeforeEventSignal {
|
|
|
6103
6860
|
|
|
6104
6861
|
/**
|
|
6105
6862
|
* @beta
|
|
6863
|
+
* Provides an adaptable interface for callers to subscribe to
|
|
6864
|
+
* an event that fires after a player joins a world.
|
|
6106
6865
|
*/
|
|
6107
6866
|
export class IPlayerJoinAfterEventSignal {
|
|
6108
6867
|
protected constructor();
|
|
@@ -6123,6 +6882,8 @@ export class IPlayerJoinAfterEventSignal {
|
|
|
6123
6882
|
|
|
6124
6883
|
/**
|
|
6125
6884
|
* @beta
|
|
6885
|
+
* Provides an adaptable interface for callers to subscribe to
|
|
6886
|
+
* an event that fires after a player leaves a world.
|
|
6126
6887
|
*/
|
|
6127
6888
|
export class IPlayerLeaveAfterEventSignal {
|
|
6128
6889
|
protected constructor();
|
|
@@ -6143,6 +6904,8 @@ export class IPlayerLeaveAfterEventSignal {
|
|
|
6143
6904
|
|
|
6144
6905
|
/**
|
|
6145
6906
|
* @beta
|
|
6907
|
+
* Provides an adaptable interface for callers to subscribe to
|
|
6908
|
+
* an event that fires after a player spawns.
|
|
6146
6909
|
*/
|
|
6147
6910
|
export class IPlayerSpawnAfterEventSignal {
|
|
6148
6911
|
protected constructor();
|
|
@@ -6163,6 +6926,8 @@ export class IPlayerSpawnAfterEventSignal {
|
|
|
6163
6926
|
|
|
6164
6927
|
/**
|
|
6165
6928
|
* @beta
|
|
6929
|
+
* Provides an adaptable interface for callers to subscribe to
|
|
6930
|
+
* an event that fires after a projectile hits a target.
|
|
6166
6931
|
*/
|
|
6167
6932
|
export class IProjectileHitAfterEventSignal {
|
|
6168
6933
|
protected constructor();
|
|
@@ -6183,6 +6948,8 @@ export class IProjectileHitAfterEventSignal {
|
|
|
6183
6948
|
|
|
6184
6949
|
/**
|
|
6185
6950
|
* @beta
|
|
6951
|
+
* Provides an adaptable interface for callers to subscribe to
|
|
6952
|
+
* an event that fires when /script event command is called.
|
|
6186
6953
|
*/
|
|
6187
6954
|
export class IScriptEventCommandMessageAfterEventSignal {
|
|
6188
6955
|
protected constructor();
|
|
@@ -6206,6 +6973,9 @@ export class IScriptEventCommandMessageAfterEventSignal {
|
|
|
6206
6973
|
|
|
6207
6974
|
/**
|
|
6208
6975
|
* @beta
|
|
6976
|
+
* Provides an adaptable interface for callers to subscribe to
|
|
6977
|
+
* an event that fires after a server message is sent. Note
|
|
6978
|
+
* that this event is for internal use only.
|
|
6209
6979
|
*/
|
|
6210
6980
|
export class IServerMessageAfterEventSignal {
|
|
6211
6981
|
protected constructor();
|
|
@@ -6226,36 +6996,16 @@ export class IServerMessageAfterEventSignal {
|
|
|
6226
6996
|
|
|
6227
6997
|
/**
|
|
6228
6998
|
* @beta
|
|
6229
|
-
* Contains information related to a chargeable item completing
|
|
6230
|
-
* being charged.
|
|
6231
6999
|
*/
|
|
6232
7000
|
export class ItemCompleteChargeAfterEvent {
|
|
6233
7001
|
protected constructor();
|
|
6234
|
-
/**
|
|
6235
|
-
* @remarks
|
|
6236
|
-
* Returns the item stack that has completed charging.
|
|
6237
|
-
*
|
|
6238
|
-
*/
|
|
6239
7002
|
readonly itemStack: ItemStack;
|
|
6240
|
-
/**
|
|
6241
|
-
* @remarks
|
|
6242
|
-
* Returns the source entity that triggered this item event.
|
|
6243
|
-
*
|
|
6244
|
-
*/
|
|
6245
7003
|
readonly source: Entity;
|
|
6246
|
-
/**
|
|
6247
|
-
* @remarks
|
|
6248
|
-
* Returns the time, in ticks, for the remaining duration left
|
|
6249
|
-
* before the charge completes its cycle.
|
|
6250
|
-
*
|
|
6251
|
-
*/
|
|
6252
7004
|
readonly useDuration: number;
|
|
6253
7005
|
}
|
|
6254
7006
|
|
|
6255
7007
|
/**
|
|
6256
7008
|
* @beta
|
|
6257
|
-
* Manages callbacks that are connected to the completion of
|
|
6258
|
-
* charging for a chargeable item.
|
|
6259
7009
|
*/
|
|
6260
7010
|
export class ItemCompleteChargeAfterEventSignal extends IItemCompleteChargeAfterEventSignal {
|
|
6261
7011
|
protected constructor();
|
|
@@ -6510,37 +7260,16 @@ export class ItemFoodComponent extends ItemComponent {
|
|
|
6510
7260
|
|
|
6511
7261
|
/**
|
|
6512
7262
|
* @beta
|
|
6513
|
-
* Contains information related to a chargeable item when the
|
|
6514
|
-
* player has finished using the item and released the build
|
|
6515
|
-
* action.
|
|
6516
7263
|
*/
|
|
6517
7264
|
export class ItemReleaseChargeAfterEvent {
|
|
6518
7265
|
protected constructor();
|
|
6519
|
-
/**
|
|
6520
|
-
* @remarks
|
|
6521
|
-
* Returns the item stack that triggered this item event.
|
|
6522
|
-
*
|
|
6523
|
-
*/
|
|
6524
7266
|
readonly itemStack: ItemStack;
|
|
6525
|
-
/**
|
|
6526
|
-
* @remarks
|
|
6527
|
-
* Returns the source entity that triggered this item event.
|
|
6528
|
-
*
|
|
6529
|
-
*/
|
|
6530
7267
|
readonly source: Entity;
|
|
6531
|
-
/**
|
|
6532
|
-
* @remarks
|
|
6533
|
-
* Returns the time, in ticks, for the remaining duration left
|
|
6534
|
-
* before the charge completes its cycle.
|
|
6535
|
-
*
|
|
6536
|
-
*/
|
|
6537
7268
|
readonly useDuration: number;
|
|
6538
7269
|
}
|
|
6539
7270
|
|
|
6540
7271
|
/**
|
|
6541
7272
|
* @beta
|
|
6542
|
-
* Manages callbacks that are connected to the releasing of
|
|
6543
|
-
* charging for a chargeable item.
|
|
6544
7273
|
*/
|
|
6545
7274
|
export class ItemReleaseChargeAfterEventSignal extends IItemReleaseChargeAfterEventSignal {
|
|
6546
7275
|
protected constructor();
|
|
@@ -6647,6 +7376,8 @@ export class ItemStack {
|
|
|
6647
7376
|
* Creates an exact copy of the item stack, including any
|
|
6648
7377
|
* custom data or properties.
|
|
6649
7378
|
*
|
|
7379
|
+
* @returns
|
|
7380
|
+
* Returns a copy of this item stack.
|
|
6650
7381
|
*/
|
|
6651
7382
|
clone(): ItemStack;
|
|
6652
7383
|
/**
|
|
@@ -6689,6 +7420,9 @@ export class ItemStack {
|
|
|
6689
7420
|
getLore(): string[];
|
|
6690
7421
|
/**
|
|
6691
7422
|
* @beta
|
|
7423
|
+
* @remarks
|
|
7424
|
+
* Returns a set of tags associated with this item stack.
|
|
7425
|
+
*
|
|
6692
7426
|
*/
|
|
6693
7427
|
getTags(): string[];
|
|
6694
7428
|
/**
|
|
@@ -6704,6 +7438,15 @@ export class ItemStack {
|
|
|
6704
7438
|
hasComponent(componentId: string): boolean;
|
|
6705
7439
|
/**
|
|
6706
7440
|
* @beta
|
|
7441
|
+
* @remarks
|
|
7442
|
+
* Checks whether this item stack has a particular tag
|
|
7443
|
+
* associated with it.
|
|
7444
|
+
*
|
|
7445
|
+
* @param tag
|
|
7446
|
+
* Tag to search for.
|
|
7447
|
+
* @returns
|
|
7448
|
+
* True if the Item Stack has the tag associated with it, else
|
|
7449
|
+
* false.
|
|
6707
7450
|
*/
|
|
6708
7451
|
hasTag(tag: string): boolean;
|
|
6709
7452
|
/**
|
|
@@ -6792,36 +7535,16 @@ export class ItemStack {
|
|
|
6792
7535
|
|
|
6793
7536
|
/**
|
|
6794
7537
|
* @beta
|
|
6795
|
-
* Contains information related to a chargeable item starting
|
|
6796
|
-
* to be charged.
|
|
6797
7538
|
*/
|
|
6798
7539
|
export class ItemStartChargeAfterEvent {
|
|
6799
7540
|
protected constructor();
|
|
6800
|
-
/**
|
|
6801
|
-
* @remarks
|
|
6802
|
-
* The impacted item stack that is starting to be charged.
|
|
6803
|
-
*
|
|
6804
|
-
*/
|
|
6805
7541
|
readonly itemStack: ItemStack;
|
|
6806
|
-
/**
|
|
6807
|
-
* @remarks
|
|
6808
|
-
* Returns the source entity that triggered this item event.
|
|
6809
|
-
*
|
|
6810
|
-
*/
|
|
6811
7542
|
readonly source: Entity;
|
|
6812
|
-
/**
|
|
6813
|
-
* @remarks
|
|
6814
|
-
* Returns the time, in ticks, for the remaining duration left
|
|
6815
|
-
* before the charge completes its cycle.
|
|
6816
|
-
*
|
|
6817
|
-
*/
|
|
6818
7543
|
readonly useDuration: number;
|
|
6819
7544
|
}
|
|
6820
7545
|
|
|
6821
7546
|
/**
|
|
6822
7547
|
* @beta
|
|
6823
|
-
* Manages callbacks that are connected to the start of
|
|
6824
|
-
* charging for a chargeable item.
|
|
6825
7548
|
*/
|
|
6826
7549
|
export class ItemStartChargeAfterEventSignal extends IItemStartChargeAfterEventSignal {
|
|
6827
7550
|
protected constructor();
|
|
@@ -6874,38 +7597,16 @@ export class ItemStartUseOnAfterEventSignal extends IItemStartUseOnAfterEventSig
|
|
|
6874
7597
|
|
|
6875
7598
|
/**
|
|
6876
7599
|
* @beta
|
|
6877
|
-
* Contains information related to a chargeable item has
|
|
6878
|
-
* finished an items use cycle, or when the player has released
|
|
6879
|
-
* the use action with the item.
|
|
6880
7600
|
*/
|
|
6881
7601
|
export class ItemStopChargeAfterEvent {
|
|
6882
7602
|
protected constructor();
|
|
6883
|
-
/**
|
|
6884
|
-
* @remarks
|
|
6885
|
-
* The impacted item stack that is stopping being charged.
|
|
6886
|
-
*
|
|
6887
|
-
*/
|
|
6888
7603
|
readonly itemStack: ItemStack;
|
|
6889
|
-
/**
|
|
6890
|
-
* @remarks
|
|
6891
|
-
* Returns the source entity that triggered this item event.
|
|
6892
|
-
*
|
|
6893
|
-
*/
|
|
6894
7604
|
readonly source: Entity;
|
|
6895
|
-
/**
|
|
6896
|
-
* @remarks
|
|
6897
|
-
* Returns the time, in ticks, for the remaining duration left
|
|
6898
|
-
* before the charge completes its cycle.
|
|
6899
|
-
*
|
|
6900
|
-
*/
|
|
6901
7605
|
readonly useDuration: number;
|
|
6902
7606
|
}
|
|
6903
7607
|
|
|
6904
7608
|
/**
|
|
6905
7609
|
* @beta
|
|
6906
|
-
* Manages callbacks that are connected to the stopping of
|
|
6907
|
-
* charging for an item that has a registered
|
|
6908
|
-
* minecraft:chargeable component.
|
|
6909
7610
|
*/
|
|
6910
7611
|
export class ItemStopChargeAfterEventSignal extends IItemStopChargeAfterEventSignal {
|
|
6911
7612
|
protected constructor();
|
|
@@ -7015,6 +7716,11 @@ export class ItemTypes {
|
|
|
7015
7716
|
*/
|
|
7016
7717
|
export class ItemUseAfterEvent {
|
|
7017
7718
|
protected constructor();
|
|
7719
|
+
/**
|
|
7720
|
+
* @remarks
|
|
7721
|
+
* The impacted item stack that is being used.
|
|
7722
|
+
*
|
|
7723
|
+
*/
|
|
7018
7724
|
itemStack: ItemStack;
|
|
7019
7725
|
/**
|
|
7020
7726
|
* @remarks
|
|
@@ -7081,6 +7787,11 @@ export class ItemUseOnAfterEvent {
|
|
|
7081
7787
|
*
|
|
7082
7788
|
*/
|
|
7083
7789
|
readonly faceLocation: Vector3;
|
|
7790
|
+
/**
|
|
7791
|
+
* @remarks
|
|
7792
|
+
* The impacted item stack that is being used on a block.
|
|
7793
|
+
*
|
|
7794
|
+
*/
|
|
7084
7795
|
readonly itemStack: ItemStack;
|
|
7085
7796
|
/**
|
|
7086
7797
|
* @remarks
|
|
@@ -7125,6 +7836,9 @@ export class ItemUseOnBeforeEventSignal extends IItemUseOnBeforeEventSignal {
|
|
|
7125
7836
|
|
|
7126
7837
|
/**
|
|
7127
7838
|
* @beta
|
|
7839
|
+
* An event that fires before the watchdog is about to
|
|
7840
|
+
* terminate a world because various performance metrics for
|
|
7841
|
+
* scripting have exceeded a threshold.
|
|
7128
7842
|
*/
|
|
7129
7843
|
export class IWatchdogTerminateBeforeEventSignal {
|
|
7130
7844
|
protected constructor();
|
|
@@ -7145,6 +7859,7 @@ export class IWatchdogTerminateBeforeEventSignal {
|
|
|
7145
7859
|
|
|
7146
7860
|
/**
|
|
7147
7861
|
* @beta
|
|
7862
|
+
* An event that fires after the weather has changed.
|
|
7148
7863
|
*/
|
|
7149
7864
|
export class IWeatherChangeAfterEventSignal {
|
|
7150
7865
|
protected constructor();
|
|
@@ -7165,6 +7880,8 @@ export class IWeatherChangeAfterEventSignal {
|
|
|
7165
7880
|
|
|
7166
7881
|
/**
|
|
7167
7882
|
* @beta
|
|
7883
|
+
* An event that fires when a world is first initialized or
|
|
7884
|
+
* loaded.
|
|
7168
7885
|
*/
|
|
7169
7886
|
export class IWorldInitializeAfterEventSignal {
|
|
7170
7887
|
protected constructor();
|
|
@@ -16227,12 +16944,18 @@ export class ProjectileHitAfterEvent {
|
|
|
16227
16944
|
readonly source: Entity;
|
|
16228
16945
|
/**
|
|
16229
16946
|
* @remarks
|
|
16947
|
+
* Contains additional information about the block that was hit
|
|
16948
|
+
* by the projectile, or undefined if the projectile did not
|
|
16949
|
+
* hit a block.
|
|
16950
|
+
*
|
|
16230
16951
|
* This function can't be called in read-only mode.
|
|
16231
16952
|
*
|
|
16232
16953
|
*/
|
|
16233
16954
|
getBlockHit(): BlockHitInformation | undefined;
|
|
16234
16955
|
/**
|
|
16235
16956
|
* @remarks
|
|
16957
|
+
* Contains additional information about a block that was hit.
|
|
16958
|
+
*
|
|
16236
16959
|
* This function can't be called in read-only mode.
|
|
16237
16960
|
*
|
|
16238
16961
|
*/
|
|
@@ -17360,6 +18083,10 @@ export class WorldInitializeAfterEvent {
|
|
|
17360
18083
|
|
|
17361
18084
|
/**
|
|
17362
18085
|
* @beta
|
|
18086
|
+
* Manages callbacks that are run at the initialization of the
|
|
18087
|
+
* scripting environment for a World. Do note that this event
|
|
18088
|
+
* may run multiple times within a session in the case that the
|
|
18089
|
+
* /reload command is used.
|
|
17363
18090
|
*/
|
|
17364
18091
|
export class WorldInitializeAfterEventSignal extends IWorldInitializeAfterEventSignal {
|
|
17365
18092
|
protected constructor();
|
|
@@ -17367,8 +18094,15 @@ export class WorldInitializeAfterEventSignal extends IWorldInitializeAfterEventS
|
|
|
17367
18094
|
|
|
17368
18095
|
/**
|
|
17369
18096
|
* @beta
|
|
18097
|
+
* Contains additional options for a block fill operation.
|
|
17370
18098
|
*/
|
|
17371
18099
|
export interface BlockFillOptions {
|
|
18100
|
+
/**
|
|
18101
|
+
* @remarks
|
|
18102
|
+
* When specified, the fill operation will only apply to blocks
|
|
18103
|
+
* that match this description.
|
|
18104
|
+
*
|
|
18105
|
+
*/
|
|
17372
18106
|
matchingBlock?: BlockPermutation;
|
|
17373
18107
|
}
|
|
17374
18108
|
|
|
@@ -17428,17 +18162,83 @@ export interface BlockRaycastOptions {
|
|
|
17428
18162
|
|
|
17429
18163
|
/**
|
|
17430
18164
|
* @beta
|
|
18165
|
+
* A BlockVolume is a simple interface to an object which
|
|
18166
|
+
* represents a 3D rectangle of a given size (in blocks) at a
|
|
18167
|
+
* world block location.
|
|
18168
|
+
* Note that these are not analogous to "min" and "max" values,
|
|
18169
|
+
* in that the vector components are not guaranteed to be in
|
|
18170
|
+
* any order.
|
|
18171
|
+
* In addition, these vector positions are not interchangeable
|
|
18172
|
+
* with BlockLocation.
|
|
18173
|
+
* If you want to get this volume represented as range of of
|
|
18174
|
+
* BlockLocations, you can use the getBoundingBox utility
|
|
18175
|
+
* function.
|
|
18176
|
+
* This volume class will maintain the ordering of the corner
|
|
18177
|
+
* indexes as initially set. imagine that each corner is
|
|
18178
|
+
* assigned in Editor - as you move the corner around
|
|
18179
|
+
* (potentially inverting the min/max relationship of the
|
|
18180
|
+
* bounds) - what
|
|
18181
|
+
* you had originally selected as the top/left corner would
|
|
18182
|
+
* traditionally become the bottom/right.
|
|
18183
|
+
* When manually editing these kinds of volumes, you need to
|
|
18184
|
+
* maintain the identity of the corner as you edit - the
|
|
18185
|
+
* BlockVolume utility functions do this.
|
|
18186
|
+
*
|
|
18187
|
+
* Important to note that this measures block sizes (to/from) -
|
|
18188
|
+
* a normal AABB (0,0,0) to (0,0,0) would traditionally be of
|
|
18189
|
+
* size (0,0,0)
|
|
18190
|
+
* However, because we're measuring blocks - the size or span
|
|
18191
|
+
* of a BlockVolume would actually be (1,1,1)
|
|
18192
|
+
*
|
|
17431
18193
|
*/
|
|
17432
18194
|
export interface BlockVolume {
|
|
18195
|
+
/**
|
|
18196
|
+
* @remarks
|
|
18197
|
+
* A world block location that represents a corner in a 3D
|
|
18198
|
+
* rectangle
|
|
18199
|
+
*
|
|
18200
|
+
*/
|
|
17433
18201
|
from: Vector3;
|
|
18202
|
+
/**
|
|
18203
|
+
* @remarks
|
|
18204
|
+
* A world block location that represents the opposite corner
|
|
18205
|
+
* in a 3D rectangle
|
|
18206
|
+
*
|
|
18207
|
+
*/
|
|
17434
18208
|
to: Vector3;
|
|
17435
18209
|
}
|
|
17436
18210
|
|
|
17437
18211
|
/**
|
|
17438
18212
|
* @beta
|
|
18213
|
+
* A BoundingBox is an interface to an object which represents
|
|
18214
|
+
* an AABB aligned rectangle.
|
|
18215
|
+
* The BoundingBox assumes that it was created in a valid state
|
|
18216
|
+
* (min <= max) but cannot guarantee it (unless it was created
|
|
18217
|
+
* using the associated {@link
|
|
18218
|
+
* @minecraft-server.BoundingBoxUtils} utility functions.
|
|
18219
|
+
* The min/max coordinates represent the diametrically opposite
|
|
18220
|
+
* corners of the rectangle.
|
|
18221
|
+
* The BoundingBox is not a representation of blocks - it has
|
|
18222
|
+
* no association with any type, it is just a mathematical
|
|
18223
|
+
* construct - so a rectangle with
|
|
18224
|
+
* ( 0,0,0 ) -> ( 0,0,0 )
|
|
18225
|
+
* has a size of ( 0,0,0 ) (unlike the very similar {@link
|
|
18226
|
+
* BlockVolume} object)
|
|
17439
18227
|
*/
|
|
17440
18228
|
export interface BoundingBox {
|
|
18229
|
+
/**
|
|
18230
|
+
* @remarks
|
|
18231
|
+
* A {@link @minecraft-server.Vector3} that represents the
|
|
18232
|
+
* largest corner of the rectangle
|
|
18233
|
+
*
|
|
18234
|
+
*/
|
|
17441
18235
|
max: Vector3;
|
|
18236
|
+
/**
|
|
18237
|
+
* @remarks
|
|
18238
|
+
* A {@link @minecraft-server.Vector3} that represents the
|
|
18239
|
+
* smallest corner of the rectangle
|
|
18240
|
+
*
|
|
18241
|
+
*/
|
|
17442
18242
|
min: Vector3;
|
|
17443
18243
|
}
|
|
17444
18244
|
|
|
@@ -17479,34 +18279,92 @@ export interface Color {
|
|
|
17479
18279
|
|
|
17480
18280
|
/**
|
|
17481
18281
|
* @beta
|
|
18282
|
+
* This interface defines an entry into the {@link
|
|
18283
|
+
* @minecraft-server/CompoundBlockVolume} which represents a
|
|
18284
|
+
* volume of positive or negative space.
|
|
18285
|
+
*
|
|
17482
18286
|
*/
|
|
17483
18287
|
export interface CompoundBlockVolumeItem {
|
|
18288
|
+
/**
|
|
18289
|
+
* @remarks
|
|
18290
|
+
* The 'action' defines how the block volume is represented in
|
|
18291
|
+
* the compound block volume stack.
|
|
18292
|
+
* 'Add' creates a block volume which is positively selected
|
|
18293
|
+
* 'Subtract' creates a block volume which represents a hole or
|
|
18294
|
+
* negative space in the overall compound block volume.
|
|
18295
|
+
*
|
|
18296
|
+
*/
|
|
17484
18297
|
action: CompoundBlockVolumeAction;
|
|
18298
|
+
/**
|
|
18299
|
+
* @remarks
|
|
18300
|
+
* The volume of space
|
|
18301
|
+
*
|
|
18302
|
+
*/
|
|
17485
18303
|
volume: BlockVolume;
|
|
17486
18304
|
}
|
|
17487
18305
|
|
|
17488
18306
|
/**
|
|
17489
18307
|
* @beta
|
|
18308
|
+
* Additional options for when damage has been applied via a
|
|
18309
|
+
* projectile.
|
|
17490
18310
|
*/
|
|
17491
18311
|
export interface EntityApplyDamageByProjectileOptions {
|
|
18312
|
+
/**
|
|
18313
|
+
* @remarks
|
|
18314
|
+
* Optional entity that fired the projectile.
|
|
18315
|
+
*
|
|
18316
|
+
*/
|
|
17492
18317
|
damagingEntity?: Entity;
|
|
18318
|
+
/**
|
|
18319
|
+
* @remarks
|
|
18320
|
+
* Projectile that caused damage.
|
|
18321
|
+
*
|
|
18322
|
+
*/
|
|
17493
18323
|
damagingProjectile: Entity;
|
|
17494
18324
|
}
|
|
17495
18325
|
|
|
17496
18326
|
/**
|
|
17497
18327
|
* @beta
|
|
18328
|
+
* Additional descriptions and metadata for a damage event.
|
|
17498
18329
|
*/
|
|
17499
18330
|
export interface EntityApplyDamageOptions {
|
|
18331
|
+
/**
|
|
18332
|
+
* @remarks
|
|
18333
|
+
* Underlying cause of the damage.
|
|
18334
|
+
*
|
|
18335
|
+
*/
|
|
17500
18336
|
cause: EntityDamageCause;
|
|
18337
|
+
/**
|
|
18338
|
+
* @remarks
|
|
18339
|
+
* Optional entity that caused the damage.
|
|
18340
|
+
*
|
|
18341
|
+
*/
|
|
17501
18342
|
damagingEntity?: Entity;
|
|
17502
18343
|
}
|
|
17503
18344
|
|
|
17504
18345
|
/**
|
|
17505
18346
|
* @beta
|
|
18347
|
+
* Provides information about how damage has been applied to an
|
|
18348
|
+
* entity.
|
|
17506
18349
|
*/
|
|
17507
18350
|
export interface EntityDamageSource {
|
|
18351
|
+
/**
|
|
18352
|
+
* @remarks
|
|
18353
|
+
* Cause enumeration of damage.
|
|
18354
|
+
*
|
|
18355
|
+
*/
|
|
17508
18356
|
cause: EntityDamageCause;
|
|
18357
|
+
/**
|
|
18358
|
+
* @remarks
|
|
18359
|
+
* Optional entity that caused the damage.
|
|
18360
|
+
*
|
|
18361
|
+
*/
|
|
17509
18362
|
damagingEntity?: Entity;
|
|
18363
|
+
/**
|
|
18364
|
+
* @remarks
|
|
18365
|
+
* Optional projectile that may have caused damage.
|
|
18366
|
+
*
|
|
18367
|
+
*/
|
|
17510
18368
|
damagingProjectile?: Entity;
|
|
17511
18369
|
}
|
|
17512
18370
|
|
|
@@ -17540,6 +18398,25 @@ export interface EntityDataDrivenTriggerEventOptions {
|
|
|
17540
18398
|
eventTypes?: string[];
|
|
17541
18399
|
}
|
|
17542
18400
|
|
|
18401
|
+
/**
|
|
18402
|
+
* @beta
|
|
18403
|
+
* Contains additional options for entity effects.
|
|
18404
|
+
*/
|
|
18405
|
+
export interface EntityEffectOptions {
|
|
18406
|
+
/**
|
|
18407
|
+
* @remarks
|
|
18408
|
+
* The strength of the effect.
|
|
18409
|
+
*
|
|
18410
|
+
*/
|
|
18411
|
+
amplifier?: number;
|
|
18412
|
+
/**
|
|
18413
|
+
* @remarks
|
|
18414
|
+
* If true, will show particles when effect is on the entity.
|
|
18415
|
+
*
|
|
18416
|
+
*/
|
|
18417
|
+
showParticles?: boolean;
|
|
18418
|
+
}
|
|
18419
|
+
|
|
17543
18420
|
/**
|
|
17544
18421
|
* @beta
|
|
17545
18422
|
* Contains optional parameters for registering an entity
|
|
@@ -17877,20 +18754,60 @@ export interface NumberRange {
|
|
|
17877
18754
|
|
|
17878
18755
|
/**
|
|
17879
18756
|
* @beta
|
|
18757
|
+
* Contains additional options for how an animation is played.
|
|
17880
18758
|
*/
|
|
17881
18759
|
export interface PlayAnimationOptions {
|
|
18760
|
+
/**
|
|
18761
|
+
* @remarks
|
|
18762
|
+
* Amount of time to fade out after an animation stops.
|
|
18763
|
+
*
|
|
18764
|
+
*/
|
|
17882
18765
|
blendOutTime?: number;
|
|
18766
|
+
/**
|
|
18767
|
+
* @remarks
|
|
18768
|
+
* Specifies a controller to use that has been defined on the
|
|
18769
|
+
* entity.
|
|
18770
|
+
*
|
|
18771
|
+
*/
|
|
17883
18772
|
controller?: string;
|
|
18773
|
+
/**
|
|
18774
|
+
* @remarks
|
|
18775
|
+
* Specifies the state to transition to.
|
|
18776
|
+
*
|
|
18777
|
+
*/
|
|
17884
18778
|
nextState?: string;
|
|
18779
|
+
/**
|
|
18780
|
+
* @remarks
|
|
18781
|
+
* Specifies a Molang expression for when this animation should
|
|
18782
|
+
* complete.
|
|
18783
|
+
*
|
|
18784
|
+
*/
|
|
17885
18785
|
stopExpression?: string;
|
|
17886
18786
|
}
|
|
17887
18787
|
|
|
17888
18788
|
/**
|
|
17889
18789
|
* @beta
|
|
18790
|
+
* Additional options for how a sound plays for a player.
|
|
17890
18791
|
*/
|
|
17891
18792
|
export interface PlayerSoundOptions {
|
|
18793
|
+
/**
|
|
18794
|
+
* @remarks
|
|
18795
|
+
* Location of the sound; if not specified, the sound is played
|
|
18796
|
+
* near a player.
|
|
18797
|
+
*
|
|
18798
|
+
*/
|
|
17892
18799
|
location?: Vector3;
|
|
18800
|
+
/**
|
|
18801
|
+
* @remarks
|
|
18802
|
+
* Optional pitch of the sound.
|
|
18803
|
+
*
|
|
18804
|
+
*/
|
|
17893
18805
|
pitch?: number;
|
|
18806
|
+
/**
|
|
18807
|
+
* @remarks
|
|
18808
|
+
* Optional volume of the sound.
|
|
18809
|
+
*
|
|
18810
|
+
*/
|
|
17894
18811
|
volume?: number;
|
|
17895
18812
|
}
|
|
17896
18813
|
|
|
@@ -17907,9 +18824,21 @@ export interface RawMessage {
|
|
|
17907
18824
|
|
|
17908
18825
|
/**
|
|
17909
18826
|
* @beta
|
|
18827
|
+
* Provides a description of a score token to use within a raw
|
|
18828
|
+
* message.
|
|
17910
18829
|
*/
|
|
17911
18830
|
export interface RawMessageScore {
|
|
18831
|
+
/**
|
|
18832
|
+
* @remarks
|
|
18833
|
+
* Name of the score value to match.
|
|
18834
|
+
*
|
|
18835
|
+
*/
|
|
17912
18836
|
name?: string;
|
|
18837
|
+
/**
|
|
18838
|
+
* @remarks
|
|
18839
|
+
* Name of the score value to match.
|
|
18840
|
+
*
|
|
18841
|
+
*/
|
|
17913
18842
|
objective?: string;
|
|
17914
18843
|
}
|
|
17915
18844
|
|
|
@@ -17919,7 +18848,7 @@ export interface RawMessageScore {
|
|
|
17919
18848
|
* `RawMessage` is serialized the contents are put into a
|
|
17920
18849
|
* rawtext property, so this is useful when reading saved
|
|
17921
18850
|
* RawMessages. See `BlockSignComponent.setText` and
|
|
17922
|
-
* `BlockSignComponent.getRawText` for examples
|
|
18851
|
+
* `BlockSignComponent.getRawText` for examples.
|
|
17923
18852
|
*/
|
|
17924
18853
|
export interface RawText {
|
|
17925
18854
|
rawtext?: RawMessage[];
|
|
@@ -17947,19 +18876,56 @@ export interface ScoreboardObjectiveDisplayOptions {
|
|
|
17947
18876
|
|
|
17948
18877
|
/**
|
|
17949
18878
|
* @beta
|
|
18879
|
+
* Contains additional options for registering a script event
|
|
18880
|
+
* event callback.
|
|
17950
18881
|
*/
|
|
17951
18882
|
export interface ScriptEventMessageFilterOptions {
|
|
18883
|
+
/**
|
|
18884
|
+
* @remarks
|
|
18885
|
+
* Optional list of namespaces to filter inbound script event
|
|
18886
|
+
* messages.
|
|
18887
|
+
*
|
|
18888
|
+
*/
|
|
17952
18889
|
namespaces: string[];
|
|
17953
18890
|
}
|
|
17954
18891
|
|
|
17955
18892
|
/**
|
|
17956
18893
|
* @beta
|
|
18894
|
+
* Contains additional options for teleporting an entity.
|
|
17957
18895
|
*/
|
|
17958
18896
|
export interface TeleportOptions {
|
|
18897
|
+
/**
|
|
18898
|
+
* @remarks
|
|
18899
|
+
* Whether to check whether blocks will block the entity after
|
|
18900
|
+
* teleport.
|
|
18901
|
+
*
|
|
18902
|
+
*/
|
|
17959
18903
|
checkForBlocks?: boolean;
|
|
18904
|
+
/**
|
|
18905
|
+
* @remarks
|
|
18906
|
+
* Dimension to potentially move the entity to. If not
|
|
18907
|
+
* specified, the entity is teleported within the dimension
|
|
18908
|
+
* that they reside.
|
|
18909
|
+
*
|
|
18910
|
+
*/
|
|
17960
18911
|
dimension?: Dimension;
|
|
18912
|
+
/**
|
|
18913
|
+
* @remarks
|
|
18914
|
+
* Location that the entity should be facing after teleport.
|
|
18915
|
+
*
|
|
18916
|
+
*/
|
|
17961
18917
|
facingLocation?: Vector3;
|
|
18918
|
+
/**
|
|
18919
|
+
* @remarks
|
|
18920
|
+
* Whether to retain the entities velocity after teleport.
|
|
18921
|
+
*
|
|
18922
|
+
*/
|
|
17962
18923
|
keepVelocity?: boolean;
|
|
18924
|
+
/**
|
|
18925
|
+
* @remarks
|
|
18926
|
+
* Rotation of the entity after teleport.
|
|
18927
|
+
*
|
|
18928
|
+
*/
|
|
17963
18929
|
rotation?: Vector2;
|
|
17964
18930
|
}
|
|
17965
18931
|
|
|
@@ -17997,9 +18963,20 @@ export interface TitleDisplayOptions {
|
|
|
17997
18963
|
|
|
17998
18964
|
/**
|
|
17999
18965
|
* @beta
|
|
18966
|
+
* Represents a two-directional vector.
|
|
18000
18967
|
*/
|
|
18001
18968
|
export interface Vector2 {
|
|
18969
|
+
/**
|
|
18970
|
+
* @remarks
|
|
18971
|
+
* X component of the two-dimensional vector.
|
|
18972
|
+
*
|
|
18973
|
+
*/
|
|
18002
18974
|
x: number;
|
|
18975
|
+
/**
|
|
18976
|
+
* @remarks
|
|
18977
|
+
* Y component of the two-dimensional vector.
|
|
18978
|
+
*
|
|
18979
|
+
*/
|
|
18003
18980
|
y: number;
|
|
18004
18981
|
}
|
|
18005
18982
|
|
|
@@ -18030,15 +19007,26 @@ export interface Vector3 {
|
|
|
18030
19007
|
|
|
18031
19008
|
/**
|
|
18032
19009
|
* @beta
|
|
19010
|
+
* Contains additional options for a world-level playSound
|
|
19011
|
+
* occurrence.
|
|
18033
19012
|
*/
|
|
18034
19013
|
export interface WorldSoundOptions {
|
|
19014
|
+
/**
|
|
19015
|
+
* @remarks
|
|
19016
|
+
* Pitch of the sound played at the world level.
|
|
19017
|
+
*
|
|
19018
|
+
*/
|
|
18035
19019
|
pitch?: number;
|
|
19020
|
+
/**
|
|
19021
|
+
* @remarks
|
|
19022
|
+
* Relative volume and space by which this sound is heard.
|
|
19023
|
+
*
|
|
19024
|
+
*/
|
|
18036
19025
|
volume?: number;
|
|
18037
19026
|
}
|
|
18038
19027
|
|
|
18039
19028
|
/**
|
|
18040
19029
|
* @beta
|
|
18041
|
-
* The error type thrown when a command fails.
|
|
18042
19030
|
*/
|
|
18043
19031
|
export class CommandError extends Error {
|
|
18044
19032
|
protected constructor();
|