@minecraft/server 1.6.0-beta.1.20.30-preview.25 → 1.6.0-beta.1.20.30-stable
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/README.md +1 -3
- package/index.d.ts +351 -297
- package/package.json +1 -1
package/index.d.ts
CHANGED
|
@@ -7,7 +7,6 @@
|
|
|
7
7
|
Copyright (c) Microsoft Corporation.
|
|
8
8
|
***************************************************************************** */
|
|
9
9
|
/**
|
|
10
|
-
* @beta
|
|
11
10
|
* @packageDocumentation
|
|
12
11
|
* Contains many types related to manipulating a Minecraft
|
|
13
12
|
* world, including entities, blocks, dimensions, and more.
|
|
@@ -16,7 +15,7 @@
|
|
|
16
15
|
* ```json
|
|
17
16
|
* {
|
|
18
17
|
* "module_name": "@minecraft/server",
|
|
19
|
-
* "version": "1.
|
|
18
|
+
* "version": "1.5.0"
|
|
20
19
|
* }
|
|
21
20
|
* ```
|
|
22
21
|
*
|
|
@@ -104,47 +103,40 @@ export enum CompoundBlockVolumePositionRelativity {
|
|
|
104
103
|
}
|
|
105
104
|
|
|
106
105
|
/**
|
|
107
|
-
* @beta
|
|
108
106
|
* A general purpose relative direction enumeration.
|
|
109
107
|
*/
|
|
110
108
|
export enum Direction {
|
|
111
109
|
/**
|
|
112
|
-
* @beta
|
|
113
110
|
* @remarks
|
|
114
111
|
* Returns the block beneath (y - 1) of this item.
|
|
115
112
|
*
|
|
116
113
|
*/
|
|
117
114
|
Down = 'Down',
|
|
118
115
|
/**
|
|
119
|
-
* @beta
|
|
120
116
|
* @remarks
|
|
121
117
|
* Returns the block to the east (x + 1) of this item.
|
|
122
118
|
*
|
|
123
119
|
*/
|
|
124
120
|
East = 'East',
|
|
125
121
|
/**
|
|
126
|
-
* @beta
|
|
127
122
|
* @remarks
|
|
128
123
|
* Returns the block to the east (z + 1) of this item.
|
|
129
124
|
*
|
|
130
125
|
*/
|
|
131
126
|
North = 'North',
|
|
132
127
|
/**
|
|
133
|
-
* @beta
|
|
134
128
|
* @remarks
|
|
135
129
|
* Returns the block to the south (z - 1) of this item.
|
|
136
130
|
*
|
|
137
131
|
*/
|
|
138
132
|
South = 'South',
|
|
139
133
|
/**
|
|
140
|
-
* @beta
|
|
141
134
|
* @remarks
|
|
142
135
|
* Returns the block above (y + 1) of this item.
|
|
143
136
|
*
|
|
144
137
|
*/
|
|
145
138
|
Up = 'Up',
|
|
146
139
|
/**
|
|
147
|
-
* @beta
|
|
148
140
|
* @remarks
|
|
149
141
|
* Returns the block to the west (x - 1) of this item.
|
|
150
142
|
*
|
|
@@ -153,33 +145,145 @@ export enum Direction {
|
|
|
153
145
|
}
|
|
154
146
|
|
|
155
147
|
/**
|
|
156
|
-
*
|
|
148
|
+
* Specifies a mechanism for displaying scores on a scoreboard.
|
|
157
149
|
*/
|
|
158
150
|
export enum DisplaySlotId {
|
|
151
|
+
/**
|
|
152
|
+
* @remarks
|
|
153
|
+
* Displays the score below the player's name.
|
|
154
|
+
*
|
|
155
|
+
*/
|
|
159
156
|
BelowName = 'BelowName',
|
|
157
|
+
/**
|
|
158
|
+
* @remarks
|
|
159
|
+
* Displays the score as a list on the pause screen.
|
|
160
|
+
*
|
|
161
|
+
*/
|
|
160
162
|
List = 'List',
|
|
163
|
+
/**
|
|
164
|
+
* @remarks
|
|
165
|
+
* Displays the score on the side of the player's screen.
|
|
166
|
+
*
|
|
167
|
+
*/
|
|
161
168
|
Sidebar = 'Sidebar',
|
|
162
169
|
}
|
|
163
170
|
|
|
164
171
|
/**
|
|
165
172
|
* @beta
|
|
173
|
+
* Specifies different colors for use as dye.
|
|
166
174
|
*/
|
|
167
175
|
export enum DyeColor {
|
|
176
|
+
/**
|
|
177
|
+
* @beta
|
|
178
|
+
* @remarks
|
|
179
|
+
* Black dye color.
|
|
180
|
+
*
|
|
181
|
+
*/
|
|
168
182
|
Black = 'Black',
|
|
183
|
+
/**
|
|
184
|
+
* @beta
|
|
185
|
+
* @remarks
|
|
186
|
+
* Blue dye color.
|
|
187
|
+
*
|
|
188
|
+
*/
|
|
169
189
|
Blue = 'Blue',
|
|
190
|
+
/**
|
|
191
|
+
* @beta
|
|
192
|
+
* @remarks
|
|
193
|
+
* Brown dye color.
|
|
194
|
+
*
|
|
195
|
+
*/
|
|
170
196
|
Brown = 'Brown',
|
|
197
|
+
/**
|
|
198
|
+
* @beta
|
|
199
|
+
* @remarks
|
|
200
|
+
* Cyan dye color.
|
|
201
|
+
*
|
|
202
|
+
*/
|
|
171
203
|
Cyan = 'Cyan',
|
|
204
|
+
/**
|
|
205
|
+
* @beta
|
|
206
|
+
* @remarks
|
|
207
|
+
* Gray dye color.
|
|
208
|
+
*
|
|
209
|
+
*/
|
|
172
210
|
Gray = 'Gray',
|
|
211
|
+
/**
|
|
212
|
+
* @beta
|
|
213
|
+
* @remarks
|
|
214
|
+
* Green dye color.
|
|
215
|
+
*
|
|
216
|
+
*/
|
|
173
217
|
Green = 'Green',
|
|
218
|
+
/**
|
|
219
|
+
* @beta
|
|
220
|
+
* @remarks
|
|
221
|
+
* Light blue dye color.
|
|
222
|
+
*
|
|
223
|
+
*/
|
|
174
224
|
LightBlue = 'LightBlue',
|
|
225
|
+
/**
|
|
226
|
+
* @beta
|
|
227
|
+
* @remarks
|
|
228
|
+
* Lime dye color.
|
|
229
|
+
*
|
|
230
|
+
*/
|
|
175
231
|
Lime = 'Lime',
|
|
232
|
+
/**
|
|
233
|
+
* @beta
|
|
234
|
+
* @remarks
|
|
235
|
+
* Magenta dye color.
|
|
236
|
+
*
|
|
237
|
+
*/
|
|
176
238
|
Magenta = 'Magenta',
|
|
239
|
+
/**
|
|
240
|
+
* @beta
|
|
241
|
+
* @remarks
|
|
242
|
+
* Orange dye color.
|
|
243
|
+
*
|
|
244
|
+
*/
|
|
177
245
|
Orange = 'Orange',
|
|
246
|
+
/**
|
|
247
|
+
* @beta
|
|
248
|
+
* @remarks
|
|
249
|
+
* Pink dye color.
|
|
250
|
+
*
|
|
251
|
+
*/
|
|
178
252
|
Pink = 'Pink',
|
|
253
|
+
/**
|
|
254
|
+
* @beta
|
|
255
|
+
* @remarks
|
|
256
|
+
* Purple dye color.
|
|
257
|
+
*
|
|
258
|
+
*/
|
|
179
259
|
Purple = 'Purple',
|
|
260
|
+
/**
|
|
261
|
+
* @beta
|
|
262
|
+
* @remarks
|
|
263
|
+
* Red dye color.
|
|
264
|
+
*
|
|
265
|
+
*/
|
|
180
266
|
Red = 'Red',
|
|
267
|
+
/**
|
|
268
|
+
* @beta
|
|
269
|
+
* @remarks
|
|
270
|
+
* Silver dye color.
|
|
271
|
+
*
|
|
272
|
+
*/
|
|
181
273
|
Silver = 'Silver',
|
|
274
|
+
/**
|
|
275
|
+
* @beta
|
|
276
|
+
* @remarks
|
|
277
|
+
* White dye color.
|
|
278
|
+
*
|
|
279
|
+
*/
|
|
182
280
|
White = 'White',
|
|
281
|
+
/**
|
|
282
|
+
* @beta
|
|
283
|
+
* @remarks
|
|
284
|
+
* Yellow dye color.
|
|
285
|
+
*
|
|
286
|
+
*/
|
|
183
287
|
Yellow = 'Yellow',
|
|
184
288
|
}
|
|
185
289
|
|
|
@@ -221,9 +325,6 @@ export enum EasingType {
|
|
|
221
325
|
Spring = 'Spring',
|
|
222
326
|
}
|
|
223
327
|
|
|
224
|
-
/**
|
|
225
|
-
* @beta
|
|
226
|
-
*/
|
|
227
328
|
export enum EntityDamageCause {
|
|
228
329
|
anvil = 'anvil',
|
|
229
330
|
blockExplosion = 'blockExplosion',
|
|
@@ -323,13 +424,11 @@ export enum EntityLifetimeState {
|
|
|
323
424
|
}
|
|
324
425
|
|
|
325
426
|
/**
|
|
326
|
-
* @beta
|
|
327
427
|
* The equipment slot of the mob. This includes armor, offhand
|
|
328
428
|
* and mainhand slots.
|
|
329
429
|
*/
|
|
330
430
|
export enum EquipmentSlot {
|
|
331
431
|
/**
|
|
332
|
-
* @beta
|
|
333
432
|
* @remarks
|
|
334
433
|
* The chest slot. This slot is used to hold items such as
|
|
335
434
|
* Chestplate or Elytra.
|
|
@@ -337,7 +436,6 @@ export enum EquipmentSlot {
|
|
|
337
436
|
*/
|
|
338
437
|
Chest = 'Chest',
|
|
339
438
|
/**
|
|
340
|
-
* @beta
|
|
341
439
|
* @remarks
|
|
342
440
|
* The feet slot. This slot is used to hold items such as
|
|
343
441
|
* Boots.
|
|
@@ -345,7 +443,6 @@ export enum EquipmentSlot {
|
|
|
345
443
|
*/
|
|
346
444
|
Feet = 'Feet',
|
|
347
445
|
/**
|
|
348
|
-
* @beta
|
|
349
446
|
* @remarks
|
|
350
447
|
* The head slot. This slot is used to hold items such as
|
|
351
448
|
* Helmets or Carved Pumpkins.
|
|
@@ -353,7 +450,6 @@ export enum EquipmentSlot {
|
|
|
353
450
|
*/
|
|
354
451
|
Head = 'Head',
|
|
355
452
|
/**
|
|
356
|
-
* @beta
|
|
357
453
|
* @remarks
|
|
358
454
|
* The legs slot. This slot is used to hold items such as
|
|
359
455
|
* Leggings.
|
|
@@ -361,7 +457,6 @@ export enum EquipmentSlot {
|
|
|
361
457
|
*/
|
|
362
458
|
Legs = 'Legs',
|
|
363
459
|
/**
|
|
364
|
-
* @beta
|
|
365
460
|
* @remarks
|
|
366
461
|
* The mainhand slot. For players, the mainhand slot refers to
|
|
367
462
|
* the currently active hotbar slot.
|
|
@@ -369,7 +464,6 @@ export enum EquipmentSlot {
|
|
|
369
464
|
*/
|
|
370
465
|
Mainhand = 'Mainhand',
|
|
371
466
|
/**
|
|
372
|
-
* @beta
|
|
373
467
|
* @remarks
|
|
374
468
|
* The offhand slot. This slot is used to hold items such as
|
|
375
469
|
* shields and maps.
|
|
@@ -415,12 +509,10 @@ export enum FluidType {
|
|
|
415
509
|
}
|
|
416
510
|
|
|
417
511
|
/**
|
|
418
|
-
* @beta
|
|
419
512
|
* Represents a game mode for the current world experience.
|
|
420
513
|
*/
|
|
421
514
|
export enum GameMode {
|
|
422
515
|
/**
|
|
423
|
-
* @beta
|
|
424
516
|
* @remarks
|
|
425
517
|
* World is in a more locked-down experience, where blocks may
|
|
426
518
|
* not be manipulated.
|
|
@@ -428,7 +520,6 @@ export enum GameMode {
|
|
|
428
520
|
*/
|
|
429
521
|
adventure = 'adventure',
|
|
430
522
|
/**
|
|
431
|
-
* @beta
|
|
432
523
|
* @remarks
|
|
433
524
|
* World is in a full creative mode. In creative mode, the
|
|
434
525
|
* player has all the resources available in the item selection
|
|
@@ -441,7 +532,6 @@ export enum GameMode {
|
|
|
441
532
|
*/
|
|
442
533
|
creative = 'creative',
|
|
443
534
|
/**
|
|
444
|
-
* @beta
|
|
445
535
|
* @remarks
|
|
446
536
|
* World is in spectator mode. In spectator mode, spectators
|
|
447
537
|
* are always flying and cannot become grounded. Spectators can
|
|
@@ -454,7 +544,6 @@ export enum GameMode {
|
|
|
454
544
|
*/
|
|
455
545
|
spectator = 'spectator',
|
|
456
546
|
/**
|
|
457
|
-
* @beta
|
|
458
547
|
* @remarks
|
|
459
548
|
* World is in a survival mode, where players can take damage
|
|
460
549
|
* and entities may not be peaceful. Survival mode is where the
|
|
@@ -467,26 +556,22 @@ export enum GameMode {
|
|
|
467
556
|
}
|
|
468
557
|
|
|
469
558
|
/**
|
|
470
|
-
* @beta
|
|
471
559
|
* Describes how an an item can be moved within a container.
|
|
472
560
|
*/
|
|
473
561
|
export enum ItemLockMode {
|
|
474
562
|
/**
|
|
475
|
-
* @beta
|
|
476
563
|
* @remarks
|
|
477
564
|
* The item cannot be dropped or crafted with.
|
|
478
565
|
*
|
|
479
566
|
*/
|
|
480
567
|
inventory = 'inventory',
|
|
481
568
|
/**
|
|
482
|
-
* @beta
|
|
483
569
|
* @remarks
|
|
484
570
|
* The item has no container restrictions.
|
|
485
571
|
*
|
|
486
572
|
*/
|
|
487
573
|
none = 'none',
|
|
488
574
|
/**
|
|
489
|
-
* @beta
|
|
490
575
|
* @remarks
|
|
491
576
|
* The item cannot be moved from its slot, dropped or crafted
|
|
492
577
|
* with.
|
|
@@ -513,13 +598,11 @@ export enum MoonPhase {
|
|
|
513
598
|
}
|
|
514
599
|
|
|
515
600
|
/**
|
|
516
|
-
* @beta
|
|
517
601
|
* Used for specifying a sort order for how to display an
|
|
518
602
|
* objective and its list of participants.
|
|
519
603
|
*/
|
|
520
604
|
export enum ObjectiveSortOrder {
|
|
521
605
|
/**
|
|
522
|
-
* @beta
|
|
523
606
|
* @remarks
|
|
524
607
|
* Objective participant list is displayed in ascending (e.g.,
|
|
525
608
|
* A-Z) order.
|
|
@@ -527,7 +610,6 @@ export enum ObjectiveSortOrder {
|
|
|
527
610
|
*/
|
|
528
611
|
Ascending = 0,
|
|
529
612
|
/**
|
|
530
|
-
* @beta
|
|
531
613
|
* @remarks
|
|
532
614
|
* Objective participant list is displayed in descending (e.g.,
|
|
533
615
|
* Z-A) order.
|
|
@@ -537,19 +619,16 @@ export enum ObjectiveSortOrder {
|
|
|
537
619
|
}
|
|
538
620
|
|
|
539
621
|
/**
|
|
540
|
-
* @beta
|
|
541
622
|
* Contains objectives and participants for the scoreboard.
|
|
542
623
|
*/
|
|
543
624
|
export enum ScoreboardIdentityType {
|
|
544
625
|
/**
|
|
545
|
-
* @beta
|
|
546
626
|
* @remarks
|
|
547
627
|
* This scoreboard participant is tied to an entity.
|
|
548
628
|
*
|
|
549
629
|
*/
|
|
550
630
|
Entity = 'Entity',
|
|
551
631
|
/**
|
|
552
|
-
* @beta
|
|
553
632
|
* @remarks
|
|
554
633
|
* This scoreboard participant is tied to a pseudo player
|
|
555
634
|
* entity - typically this is used to store scores as data or
|
|
@@ -558,7 +637,6 @@ export enum ScoreboardIdentityType {
|
|
|
558
637
|
*/
|
|
559
638
|
FakePlayer = 'FakePlayer',
|
|
560
639
|
/**
|
|
561
|
-
* @beta
|
|
562
640
|
* @remarks
|
|
563
641
|
* This scoreboard participant is tied to a player.
|
|
564
642
|
*
|
|
@@ -567,12 +645,10 @@ export enum ScoreboardIdentityType {
|
|
|
567
645
|
}
|
|
568
646
|
|
|
569
647
|
/**
|
|
570
|
-
* @beta
|
|
571
648
|
* Describes where the script event originated from.
|
|
572
649
|
*/
|
|
573
650
|
export enum ScriptEventSource {
|
|
574
651
|
/**
|
|
575
|
-
* @beta
|
|
576
652
|
* @remarks
|
|
577
653
|
* The script event originated from a Block such as a Command
|
|
578
654
|
* Block.
|
|
@@ -580,7 +656,6 @@ export enum ScriptEventSource {
|
|
|
580
656
|
*/
|
|
581
657
|
Block = 'Block',
|
|
582
658
|
/**
|
|
583
|
-
* @beta
|
|
584
659
|
* @remarks
|
|
585
660
|
* The script event originated from an Entity such as a Player,
|
|
586
661
|
* Command Block Minecart or Animation Controller.
|
|
@@ -588,14 +663,12 @@ export enum ScriptEventSource {
|
|
|
588
663
|
*/
|
|
589
664
|
Entity = 'Entity',
|
|
590
665
|
/**
|
|
591
|
-
* @beta
|
|
592
666
|
* @remarks
|
|
593
667
|
* The script event originated from an NPC dialogue.
|
|
594
668
|
*
|
|
595
669
|
*/
|
|
596
670
|
NPCDialogue = 'NPCDialogue',
|
|
597
671
|
/**
|
|
598
|
-
* @beta
|
|
599
672
|
* @remarks
|
|
600
673
|
* The script event originated from the server, such as from a
|
|
601
674
|
* runCommand API call or a dedicated server console.
|
|
@@ -626,7 +699,6 @@ export enum SignSide {
|
|
|
626
699
|
}
|
|
627
700
|
|
|
628
701
|
/**
|
|
629
|
-
* @beta
|
|
630
702
|
* Provides numeric values for common periods in the Minecraft
|
|
631
703
|
* day.
|
|
632
704
|
*/
|
|
@@ -666,15 +738,34 @@ export enum WatchdogTerminateReason {
|
|
|
666
738
|
|
|
667
739
|
/**
|
|
668
740
|
* @beta
|
|
741
|
+
* Used to specify the type of weather condition within the
|
|
742
|
+
* world.
|
|
669
743
|
*/
|
|
670
744
|
export enum WeatherType {
|
|
745
|
+
/**
|
|
746
|
+
* @beta
|
|
747
|
+
* @remarks
|
|
748
|
+
* Specifies a clear weather condition.
|
|
749
|
+
*
|
|
750
|
+
*/
|
|
671
751
|
Clear = 'Clear',
|
|
752
|
+
/**
|
|
753
|
+
* @beta
|
|
754
|
+
* @remarks
|
|
755
|
+
* Specifies a rain weather condition.
|
|
756
|
+
*
|
|
757
|
+
*/
|
|
672
758
|
Rain = 'Rain',
|
|
759
|
+
/**
|
|
760
|
+
* @beta
|
|
761
|
+
* @remarks
|
|
762
|
+
* Specifies a rain and thunder weather condition.
|
|
763
|
+
*
|
|
764
|
+
*/
|
|
673
765
|
Thunder = 'Thunder',
|
|
674
766
|
}
|
|
675
767
|
|
|
676
768
|
/**
|
|
677
|
-
* @beta
|
|
678
769
|
* Represents a block in a dimension. A block represents a
|
|
679
770
|
* unique X, Y, and Z within a dimension and get/sets the state
|
|
680
771
|
* of the block at that location. This type was significantly
|
|
@@ -695,17 +786,25 @@ export class Block {
|
|
|
695
786
|
* space).
|
|
696
787
|
*
|
|
697
788
|
* @throws This property can throw when used.
|
|
789
|
+
*
|
|
790
|
+
* {@link LocationInUnloadedChunkError}
|
|
791
|
+
*
|
|
792
|
+
* {@link LocationOutOfWorldBoundariesError}
|
|
698
793
|
*/
|
|
699
794
|
readonly isAir: boolean;
|
|
700
795
|
/**
|
|
701
796
|
* @beta
|
|
702
797
|
* @remarks
|
|
703
798
|
* Returns true if this block is a liquid block - (e.g., a
|
|
704
|
-
* water block and a lava
|
|
799
|
+
* water block and a lava block are liquid, while an air block
|
|
705
800
|
* and a stone block are not. Water logged blocks are not
|
|
706
801
|
* liquid blocks).
|
|
707
802
|
*
|
|
708
803
|
* @throws This property can throw when used.
|
|
804
|
+
*
|
|
805
|
+
* {@link LocationInUnloadedChunkError}
|
|
806
|
+
*
|
|
807
|
+
* {@link LocationOutOfWorldBoundariesError}
|
|
709
808
|
*/
|
|
710
809
|
readonly isLiquid: boolean;
|
|
711
810
|
/**
|
|
@@ -716,6 +815,10 @@ export class Block {
|
|
|
716
815
|
* ladder block and a fence block are not).
|
|
717
816
|
*
|
|
718
817
|
* @throws This property can throw when used.
|
|
818
|
+
*
|
|
819
|
+
* {@link LocationInUnloadedChunkError}
|
|
820
|
+
*
|
|
821
|
+
* {@link LocationOutOfWorldBoundariesError}
|
|
719
822
|
*/
|
|
720
823
|
readonly isSolid: boolean;
|
|
721
824
|
/**
|
|
@@ -740,6 +843,10 @@ export class Block {
|
|
|
740
843
|
* block.
|
|
741
844
|
*
|
|
742
845
|
* @throws This property can throw when used.
|
|
846
|
+
*
|
|
847
|
+
* {@link LocationInUnloadedChunkError}
|
|
848
|
+
*
|
|
849
|
+
* {@link LocationOutOfWorldBoundariesError}
|
|
743
850
|
*/
|
|
744
851
|
readonly permutation: BlockPermutation;
|
|
745
852
|
/**
|
|
@@ -748,6 +855,10 @@ export class Block {
|
|
|
748
855
|
* Gets the type of block.
|
|
749
856
|
*
|
|
750
857
|
* @throws This property can throw when used.
|
|
858
|
+
*
|
|
859
|
+
* {@link LocationInUnloadedChunkError}
|
|
860
|
+
*
|
|
861
|
+
* {@link LocationOutOfWorldBoundariesError}
|
|
751
862
|
*/
|
|
752
863
|
readonly 'type': BlockType;
|
|
753
864
|
/**
|
|
@@ -756,6 +867,10 @@ export class Block {
|
|
|
756
867
|
* Identifier of the type of block for this block.
|
|
757
868
|
*
|
|
758
869
|
* @throws This property can throw when used.
|
|
870
|
+
*
|
|
871
|
+
* {@link LocationInUnloadedChunkError}
|
|
872
|
+
*
|
|
873
|
+
* {@link LocationOutOfWorldBoundariesError}
|
|
759
874
|
*/
|
|
760
875
|
readonly typeId: string;
|
|
761
876
|
/**
|
|
@@ -792,10 +907,15 @@ export class Block {
|
|
|
792
907
|
* Returns `true` if the block type or permutation can be
|
|
793
908
|
* placed on this block, else `false`.
|
|
794
909
|
* @throws This function can throw errors.
|
|
910
|
+
*
|
|
911
|
+
* {@link Error}
|
|
912
|
+
*
|
|
913
|
+
* {@link LocationInUnloadedChunkError}
|
|
914
|
+
*
|
|
915
|
+
* {@link LocationOutOfWorldBoundariesError}
|
|
795
916
|
*/
|
|
796
917
|
canPlace(blockToPlace: BlockPermutation | BlockType | string, faceToPlaceOn?: Direction): boolean;
|
|
797
918
|
/**
|
|
798
|
-
* @beta
|
|
799
919
|
* @remarks
|
|
800
920
|
* Gets additional configuration properties (a component) for
|
|
801
921
|
* specific capabilities of particular blocks - for example, an
|
|
@@ -808,6 +928,10 @@ export class Block {
|
|
|
808
928
|
* Returns the component object if it is present on the
|
|
809
929
|
* particular block.
|
|
810
930
|
* @throws This function can throw errors.
|
|
931
|
+
*
|
|
932
|
+
* {@link LocationInUnloadedChunkError}
|
|
933
|
+
*
|
|
934
|
+
* {@link LocationOutOfWorldBoundariesError}
|
|
811
935
|
*/
|
|
812
936
|
getComponent(componentName: string): BlockComponent | undefined;
|
|
813
937
|
/**
|
|
@@ -823,6 +947,10 @@ export class Block {
|
|
|
823
947
|
* Whether additional data facets of the item stack are
|
|
824
948
|
* included.
|
|
825
949
|
* @throws This function can throw errors.
|
|
950
|
+
*
|
|
951
|
+
* {@link LocationInUnloadedChunkError}
|
|
952
|
+
*
|
|
953
|
+
* {@link LocationOutOfWorldBoundariesError}
|
|
826
954
|
*/
|
|
827
955
|
getItemStack(amount?: number, withData?: boolean): ItemStack;
|
|
828
956
|
/**
|
|
@@ -834,6 +962,10 @@ export class Block {
|
|
|
834
962
|
* Returns undefined if redstone power is not applicable to
|
|
835
963
|
* this block.
|
|
836
964
|
* @throws This function can throw errors.
|
|
965
|
+
*
|
|
966
|
+
* {@link LocationInUnloadedChunkError}
|
|
967
|
+
*
|
|
968
|
+
* {@link LocationOutOfWorldBoundariesError}
|
|
837
969
|
*/
|
|
838
970
|
getRedstonePower(): number | undefined;
|
|
839
971
|
/**
|
|
@@ -844,6 +976,10 @@ export class Block {
|
|
|
844
976
|
* @returns
|
|
845
977
|
* The list of tags that the block has.
|
|
846
978
|
* @throws This function can throw errors.
|
|
979
|
+
*
|
|
980
|
+
* {@link LocationInUnloadedChunkError}
|
|
981
|
+
*
|
|
982
|
+
* {@link LocationOutOfWorldBoundariesError}
|
|
847
983
|
*/
|
|
848
984
|
getTags(): string[];
|
|
849
985
|
/**
|
|
@@ -858,6 +994,10 @@ export class Block {
|
|
|
858
994
|
* Returns `true` if the permutation of this block has the tag,
|
|
859
995
|
* else `false`.
|
|
860
996
|
* @throws This function can throw errors.
|
|
997
|
+
*
|
|
998
|
+
* {@link LocationInUnloadedChunkError}
|
|
999
|
+
*
|
|
1000
|
+
* {@link LocationOutOfWorldBoundariesError}
|
|
861
1001
|
* @example check_block_tags.js
|
|
862
1002
|
* ```typescript
|
|
863
1003
|
* import { world } from "@minecraft/server";
|
|
@@ -872,7 +1012,6 @@ export class Block {
|
|
|
872
1012
|
*/
|
|
873
1013
|
hasTag(tag: string): boolean;
|
|
874
1014
|
/**
|
|
875
|
-
* @beta
|
|
876
1015
|
* @remarks
|
|
877
1016
|
* Returns true if this reference to a block is still valid
|
|
878
1017
|
* (for example, if the block is unloaded, references to that
|
|
@@ -893,6 +1032,10 @@ export class Block {
|
|
|
893
1032
|
* Permutation that contains a set of property states for the
|
|
894
1033
|
* Block.
|
|
895
1034
|
* @throws This function can throw errors.
|
|
1035
|
+
*
|
|
1036
|
+
* {@link LocationInUnloadedChunkError}
|
|
1037
|
+
*
|
|
1038
|
+
* {@link LocationOutOfWorldBoundariesError}
|
|
896
1039
|
*/
|
|
897
1040
|
setPermutation(permutation: BlockPermutation): void;
|
|
898
1041
|
/**
|
|
@@ -906,6 +1049,12 @@ export class Block {
|
|
|
906
1049
|
* Identifier of the type of block to apply - for example,
|
|
907
1050
|
* minecraft:powered_repeater.
|
|
908
1051
|
* @throws This function can throw errors.
|
|
1052
|
+
*
|
|
1053
|
+
* {@link Error}
|
|
1054
|
+
*
|
|
1055
|
+
* {@link LocationInUnloadedChunkError}
|
|
1056
|
+
*
|
|
1057
|
+
* {@link LocationOutOfWorldBoundariesError}
|
|
909
1058
|
*/
|
|
910
1059
|
setType(blockType: BlockType | string): void;
|
|
911
1060
|
/**
|
|
@@ -923,6 +1072,10 @@ export class Block {
|
|
|
923
1072
|
* Returns `true` if the block permutation data was
|
|
924
1073
|
* successfully set, else `false`.
|
|
925
1074
|
* @throws This function can throw errors.
|
|
1075
|
+
*
|
|
1076
|
+
* {@link LocationInUnloadedChunkError}
|
|
1077
|
+
*
|
|
1078
|
+
* {@link LocationOutOfWorldBoundariesError}
|
|
926
1079
|
*/
|
|
927
1080
|
trySetPermutation(permutation: BlockPermutation): boolean;
|
|
928
1081
|
}
|
|
@@ -967,14 +1120,12 @@ export class BlockAreaSize {
|
|
|
967
1120
|
}
|
|
968
1121
|
|
|
969
1122
|
/**
|
|
970
|
-
* @beta
|
|
971
1123
|
* Base type for components associated with blocks.
|
|
972
1124
|
*/
|
|
973
1125
|
// @ts-ignore Class inheritance allowed for native defined classes
|
|
974
1126
|
export class BlockComponent extends Component {
|
|
975
1127
|
private constructor();
|
|
976
1128
|
/**
|
|
977
|
-
* @beta
|
|
978
1129
|
* @remarks
|
|
979
1130
|
* Block instance that this component pertains to.
|
|
980
1131
|
*
|
|
@@ -983,7 +1134,6 @@ export class BlockComponent extends Component {
|
|
|
983
1134
|
}
|
|
984
1135
|
|
|
985
1136
|
/**
|
|
986
|
-
* @beta
|
|
987
1137
|
* Contains information regarding an event that impacts a
|
|
988
1138
|
* specific block.
|
|
989
1139
|
*/
|
|
@@ -1055,7 +1205,6 @@ export class BlockExplodeAfterEventSignal {
|
|
|
1055
1205
|
}
|
|
1056
1206
|
|
|
1057
1207
|
/**
|
|
1058
|
-
* @beta
|
|
1059
1208
|
* Represents the inventory of a block in the world. Used with
|
|
1060
1209
|
* blocks like chests.
|
|
1061
1210
|
*/
|
|
@@ -1149,7 +1298,6 @@ export class BlockLocationIterator implements Iterable<Vector3> {
|
|
|
1149
1298
|
}
|
|
1150
1299
|
|
|
1151
1300
|
/**
|
|
1152
|
-
* @beta
|
|
1153
1301
|
* Contains the combination of type {@link BlockType} and
|
|
1154
1302
|
* properties (also sometimes called block state) which
|
|
1155
1303
|
* describe a block (but does not belong to a specific {@link
|
|
@@ -1628,10 +1776,28 @@ export class BlockType {
|
|
|
1628
1776
|
|
|
1629
1777
|
/**
|
|
1630
1778
|
* @beta
|
|
1779
|
+
* Contains a catalog of Minecraft Block Types that are
|
|
1780
|
+
* available in this world.
|
|
1631
1781
|
*/
|
|
1632
1782
|
export class BlockTypes {
|
|
1633
1783
|
private constructor();
|
|
1784
|
+
/**
|
|
1785
|
+
* @remarks
|
|
1786
|
+
* Returns a BlockType object for the specified identifier.
|
|
1787
|
+
*
|
|
1788
|
+
* @param typeName
|
|
1789
|
+
* Identifier of the block type. Should follow a namespace:id
|
|
1790
|
+
* pattern, such as minecraft:dirt.
|
|
1791
|
+
* @returns
|
|
1792
|
+
* BlockType object, or undefined if the block type is not
|
|
1793
|
+
* available within this world.
|
|
1794
|
+
*/
|
|
1634
1795
|
static get(typeName: string): BlockType | undefined;
|
|
1796
|
+
/**
|
|
1797
|
+
* @remarks
|
|
1798
|
+
* Returns a collection of all available block types.
|
|
1799
|
+
*
|
|
1800
|
+
*/
|
|
1635
1801
|
static getAll(): BlockType[];
|
|
1636
1802
|
}
|
|
1637
1803
|
|
|
@@ -1943,7 +2109,6 @@ export class BoundingBoxUtils {
|
|
|
1943
2109
|
}
|
|
1944
2110
|
|
|
1945
2111
|
/**
|
|
1946
|
-
* @beta
|
|
1947
2112
|
* Contains information related to changes to a button push.
|
|
1948
2113
|
*/
|
|
1949
2114
|
// @ts-ignore Class inheritance allowed for native defined classes
|
|
@@ -1958,7 +2123,6 @@ export class ButtonPushAfterEvent extends BlockEvent {
|
|
|
1958
2123
|
}
|
|
1959
2124
|
|
|
1960
2125
|
/**
|
|
1961
|
-
* @beta
|
|
1962
2126
|
* Manages callbacks that are connected to when a button is
|
|
1963
2127
|
* pushed.
|
|
1964
2128
|
*/
|
|
@@ -1969,11 +2133,18 @@ export class ButtonPushAfterEventSignal extends IButtonPushAfterEventSignal {
|
|
|
1969
2133
|
|
|
1970
2134
|
/**
|
|
1971
2135
|
* @beta
|
|
2136
|
+
* Contains methods relating to the active camera for the
|
|
2137
|
+
* specified player.
|
|
1972
2138
|
*/
|
|
1973
2139
|
export class Camera {
|
|
1974
2140
|
private constructor();
|
|
1975
2141
|
/**
|
|
1976
2142
|
* @remarks
|
|
2143
|
+
* Clears the active camera for the specified player. Causes
|
|
2144
|
+
* the specified players to end any in-progress camera
|
|
2145
|
+
* perspectives, including any eased camera motions, and return
|
|
2146
|
+
* to their normal perspective.
|
|
2147
|
+
*
|
|
1977
2148
|
* This function can't be called in read-only mode.
|
|
1978
2149
|
*
|
|
1979
2150
|
* @throws This function can throw errors.
|
|
@@ -1981,15 +2152,26 @@ export class Camera {
|
|
|
1981
2152
|
clear(): void;
|
|
1982
2153
|
/**
|
|
1983
2154
|
* @remarks
|
|
2155
|
+
* Begins a camera fade transition. A fade transition is a
|
|
2156
|
+
* full-screen color that fades-in, holds, and then fades-out.
|
|
2157
|
+
*
|
|
1984
2158
|
* This function can't be called in read-only mode.
|
|
1985
2159
|
*
|
|
2160
|
+
* @param fadeCameraOptions
|
|
2161
|
+
* Additional options around camera fade operations.
|
|
1986
2162
|
* @throws This function can throw errors.
|
|
1987
2163
|
*/
|
|
1988
2164
|
fade(fadeCameraOptions?: CameraFadeOptions): void;
|
|
1989
2165
|
/**
|
|
1990
2166
|
* @remarks
|
|
2167
|
+
* Sets the current active camera for the specified player.
|
|
2168
|
+
*
|
|
1991
2169
|
* This function can't be called in read-only mode.
|
|
1992
2170
|
*
|
|
2171
|
+
* @param cameraPreset
|
|
2172
|
+
* Identifier of a camera preset file defined within JSON.
|
|
2173
|
+
* @param setOptions
|
|
2174
|
+
* Additional options for the camera.
|
|
1993
2175
|
* @throws This function can throw errors.
|
|
1994
2176
|
*/
|
|
1995
2177
|
setCamera(
|
|
@@ -2149,7 +2331,6 @@ export class CommandResult {
|
|
|
2149
2331
|
}
|
|
2150
2332
|
|
|
2151
2333
|
/**
|
|
2152
|
-
* @beta
|
|
2153
2334
|
* Base class for downstream Component implementations.
|
|
2154
2335
|
*/
|
|
2155
2336
|
export class Component {
|
|
@@ -2161,7 +2342,6 @@ export class Component {
|
|
|
2161
2342
|
*/
|
|
2162
2343
|
readonly typeId: string;
|
|
2163
2344
|
/**
|
|
2164
|
-
* @beta
|
|
2165
2345
|
* @remarks
|
|
2166
2346
|
* Returns whether the component is valid. A component is
|
|
2167
2347
|
* considered valid if its owner is valid, in addition to any
|
|
@@ -2426,7 +2606,6 @@ export class CompoundBlockVolume {
|
|
|
2426
2606
|
}
|
|
2427
2607
|
|
|
2428
2608
|
/**
|
|
2429
|
-
* @beta
|
|
2430
2609
|
* Represents a container that can hold sets of items. Used
|
|
2431
2610
|
* with entities such as Players, Chest Minecarts, Llamas, and
|
|
2432
2611
|
* more.
|
|
@@ -2512,7 +2691,6 @@ export class Container {
|
|
|
2512
2691
|
*/
|
|
2513
2692
|
getSlot(slot: number): ContainerSlot;
|
|
2514
2693
|
/**
|
|
2515
|
-
* @beta
|
|
2516
2694
|
* @remarks
|
|
2517
2695
|
* Returns whether a container object (or the entity or block
|
|
2518
2696
|
* that this container is associated with) is still available
|
|
@@ -3058,6 +3236,10 @@ export class Dimension {
|
|
|
3058
3236
|
* @param explosionOptions
|
|
3059
3237
|
* Additional configurable options for the explosion.
|
|
3060
3238
|
* @throws This function can throw errors.
|
|
3239
|
+
*
|
|
3240
|
+
* {@link LocationInUnloadedChunkError}
|
|
3241
|
+
*
|
|
3242
|
+
* {@link LocationOutOfWorldBoundariesError}
|
|
3061
3243
|
* @example createExplosion.ts
|
|
3062
3244
|
* ```typescript
|
|
3063
3245
|
* const overworld = mc.world.getDimension("overworld");
|
|
@@ -3122,7 +3304,6 @@ export class Dimension {
|
|
|
3122
3304
|
options?: BlockFillOptions,
|
|
3123
3305
|
): number;
|
|
3124
3306
|
/**
|
|
3125
|
-
* @beta
|
|
3126
3307
|
* @remarks
|
|
3127
3308
|
* Returns a block instance at the given location.
|
|
3128
3309
|
*
|
|
@@ -3140,10 +3321,13 @@ export class Dimension {
|
|
|
3140
3321
|
* trying to interact with a position outside of dimension
|
|
3141
3322
|
* height range
|
|
3142
3323
|
*
|
|
3324
|
+
*
|
|
3325
|
+
* {@link LocationInUnloadedChunkError}
|
|
3326
|
+
*
|
|
3327
|
+
* {@link LocationOutOfWorldBoundariesError}
|
|
3143
3328
|
*/
|
|
3144
3329
|
getBlock(location: Vector3): Block | undefined;
|
|
3145
3330
|
/**
|
|
3146
|
-
* @beta
|
|
3147
3331
|
* @remarks
|
|
3148
3332
|
* Gets the first block that intersects with a vector emanating
|
|
3149
3333
|
* from a location.
|
|
@@ -3157,7 +3341,6 @@ export class Dimension {
|
|
|
3157
3341
|
*/
|
|
3158
3342
|
getBlockFromRay(location: Vector3, direction: Vector3, options?: BlockRaycastOptions): BlockRaycastHit | undefined;
|
|
3159
3343
|
/**
|
|
3160
|
-
* @beta
|
|
3161
3344
|
* @remarks
|
|
3162
3345
|
* Returns a set of entities based on a set of conditions
|
|
3163
3346
|
* defined via the EntityQueryOptions set of filter criteria.
|
|
@@ -3226,7 +3409,6 @@ export class Dimension {
|
|
|
3226
3409
|
*/
|
|
3227
3410
|
getEntities(options?: EntityQueryOptions): Entity[];
|
|
3228
3411
|
/**
|
|
3229
|
-
* @beta
|
|
3230
3412
|
* @remarks
|
|
3231
3413
|
* Returns a set of entities at a particular location.
|
|
3232
3414
|
*
|
|
@@ -3237,7 +3419,6 @@ export class Dimension {
|
|
|
3237
3419
|
*/
|
|
3238
3420
|
getEntitiesAtBlockLocation(location: Vector3): Entity[];
|
|
3239
3421
|
/**
|
|
3240
|
-
* @beta
|
|
3241
3422
|
* @remarks
|
|
3242
3423
|
* Gets entities that intersect with a specified vector
|
|
3243
3424
|
* emanating from a location.
|
|
@@ -3247,7 +3428,6 @@ export class Dimension {
|
|
|
3247
3428
|
*/
|
|
3248
3429
|
getEntitiesFromRay(location: Vector3, direction: Vector3, options?: EntityRaycastOptions): EntityRaycastHit[];
|
|
3249
3430
|
/**
|
|
3250
|
-
* @beta
|
|
3251
3431
|
* @remarks
|
|
3252
3432
|
* Returns a set of players based on a set of conditions
|
|
3253
3433
|
* defined via the EntityQueryOptions set of filter criteria.
|
|
@@ -3261,7 +3441,6 @@ export class Dimension {
|
|
|
3261
3441
|
*/
|
|
3262
3442
|
getPlayers(options?: EntityQueryOptions): Player[];
|
|
3263
3443
|
/**
|
|
3264
|
-
* @beta
|
|
3265
3444
|
* @remarks
|
|
3266
3445
|
* Runs a command synchronously using the context of the
|
|
3267
3446
|
* broader dimenion.
|
|
@@ -3280,6 +3459,8 @@ export class Dimension {
|
|
|
3280
3459
|
* command. Note that in many cases, if the command does not
|
|
3281
3460
|
* operate (e.g., a target selector found no matches), this
|
|
3282
3461
|
* method will not throw an exception.
|
|
3462
|
+
*
|
|
3463
|
+
* {@link CommandError}
|
|
3283
3464
|
*/
|
|
3284
3465
|
runCommand(commandString: string): CommandResult;
|
|
3285
3466
|
/**
|
|
@@ -3320,7 +3501,6 @@ export class Dimension {
|
|
|
3320
3501
|
*/
|
|
3321
3502
|
setWeather(weatherType: WeatherType, duration?: number): void;
|
|
3322
3503
|
/**
|
|
3323
|
-
* @beta
|
|
3324
3504
|
* @remarks
|
|
3325
3505
|
* Creates a new entity (e.g., a mob) at the specified
|
|
3326
3506
|
* location.
|
|
@@ -3335,6 +3515,10 @@ export class Dimension {
|
|
|
3335
3515
|
* @returns
|
|
3336
3516
|
* Newly created entity at the specified location.
|
|
3337
3517
|
* @throws This function can throw errors.
|
|
3518
|
+
*
|
|
3519
|
+
* {@link LocationInUnloadedChunkError}
|
|
3520
|
+
*
|
|
3521
|
+
* {@link LocationOutOfWorldBoundariesError}
|
|
3338
3522
|
* @example createOldHorse.ts
|
|
3339
3523
|
* ```typescript
|
|
3340
3524
|
* const overworld = mc.world.getDimension("overworld");
|
|
@@ -3377,7 +3561,6 @@ export class Dimension {
|
|
|
3377
3561
|
*/
|
|
3378
3562
|
spawnEntity(identifier: string, location: Vector3): Entity;
|
|
3379
3563
|
/**
|
|
3380
|
-
* @beta
|
|
3381
3564
|
* @remarks
|
|
3382
3565
|
* Creates a new item stack as an entity at the specified
|
|
3383
3566
|
* location.
|
|
@@ -3389,6 +3572,10 @@ export class Dimension {
|
|
|
3389
3572
|
* @returns
|
|
3390
3573
|
* Newly created item stack entity at the specified location.
|
|
3391
3574
|
* @throws This function can throw errors.
|
|
3575
|
+
*
|
|
3576
|
+
* {@link LocationInUnloadedChunkError}
|
|
3577
|
+
*
|
|
3578
|
+
* {@link LocationOutOfWorldBoundariesError}
|
|
3392
3579
|
* @example itemStacks.ts
|
|
3393
3580
|
* ```typescript
|
|
3394
3581
|
* const overworld = mc.world.getDimension('overworld');
|
|
@@ -3420,7 +3607,6 @@ export class Dimension {
|
|
|
3420
3607
|
*/
|
|
3421
3608
|
spawnItem(itemStack: ItemStack, location: Vector3): Entity;
|
|
3422
3609
|
/**
|
|
3423
|
-
* @beta
|
|
3424
3610
|
* @remarks
|
|
3425
3611
|
* Creates a new particle emitter at a specified location in
|
|
3426
3612
|
* the world.
|
|
@@ -3435,6 +3621,10 @@ export class Dimension {
|
|
|
3435
3621
|
* A set of optional, customizable variables that can be
|
|
3436
3622
|
* adjusted for this particle.
|
|
3437
3623
|
* @throws This function can throw errors.
|
|
3624
|
+
*
|
|
3625
|
+
* {@link LocationInUnloadedChunkError}
|
|
3626
|
+
*
|
|
3627
|
+
* {@link LocationOutOfWorldBoundariesError}
|
|
3438
3628
|
* @example spawnParticle.ts
|
|
3439
3629
|
* ```typescript
|
|
3440
3630
|
* for (let i = 0; i < 100; i++) {
|
|
@@ -3460,6 +3650,11 @@ export class Dimension {
|
|
|
3460
3650
|
*/
|
|
3461
3651
|
export class DimensionType {
|
|
3462
3652
|
private constructor();
|
|
3653
|
+
/**
|
|
3654
|
+
* @remarks
|
|
3655
|
+
* Identifier of the dimension type.
|
|
3656
|
+
*
|
|
3657
|
+
*/
|
|
3463
3658
|
readonly typeId: string;
|
|
3464
3659
|
}
|
|
3465
3660
|
|
|
@@ -3525,7 +3720,6 @@ export class DynamicPropertiesDefinition {
|
|
|
3525
3720
|
}
|
|
3526
3721
|
|
|
3527
3722
|
/**
|
|
3528
|
-
* @beta
|
|
3529
3723
|
* Represents an effect - like poison - that has been added to
|
|
3530
3724
|
* an Entity.
|
|
3531
3725
|
*/
|
|
@@ -3638,7 +3832,6 @@ export class EffectAddAfterEventSignal {
|
|
|
3638
3832
|
}
|
|
3639
3833
|
|
|
3640
3834
|
/**
|
|
3641
|
-
* @beta
|
|
3642
3835
|
* Represents a type of effect - like poison - that can be
|
|
3643
3836
|
* applied to an entity.
|
|
3644
3837
|
*/
|
|
@@ -3875,7 +4068,6 @@ export class EnchantmentTypes {
|
|
|
3875
4068
|
export class Entity {
|
|
3876
4069
|
private constructor();
|
|
3877
4070
|
/**
|
|
3878
|
-
* @beta
|
|
3879
4071
|
* @remarks
|
|
3880
4072
|
* Dimension that the entity is currently within.
|
|
3881
4073
|
*
|
|
@@ -3986,7 +4178,6 @@ export class Entity {
|
|
|
3986
4178
|
*/
|
|
3987
4179
|
readonly lifetimeState: EntityLifetimeState;
|
|
3988
4180
|
/**
|
|
3989
|
-
* @beta
|
|
3990
4181
|
* @remarks
|
|
3991
4182
|
* Current location of the entity.
|
|
3992
4183
|
*
|
|
@@ -3994,7 +4185,6 @@ export class Entity {
|
|
|
3994
4185
|
*/
|
|
3995
4186
|
readonly location: Vector3;
|
|
3996
4187
|
/**
|
|
3997
|
-
* @beta
|
|
3998
4188
|
* @remarks
|
|
3999
4189
|
* Given name of the entity.
|
|
4000
4190
|
*
|
|
@@ -4003,7 +4193,6 @@ export class Entity {
|
|
|
4003
4193
|
*/
|
|
4004
4194
|
nameTag: string;
|
|
4005
4195
|
/**
|
|
4006
|
-
* @beta
|
|
4007
4196
|
* @remarks
|
|
4008
4197
|
* Returns a scoreboard identity that represents this entity.
|
|
4009
4198
|
* Will remain valid when the entity is killed.
|
|
@@ -4028,7 +4217,6 @@ export class Entity {
|
|
|
4028
4217
|
*/
|
|
4029
4218
|
readonly typeId: string;
|
|
4030
4219
|
/**
|
|
4031
|
-
* @beta
|
|
4032
4220
|
* @remarks
|
|
4033
4221
|
* Adds or updates an effect, like poison, to the entity.
|
|
4034
4222
|
*
|
|
@@ -4087,7 +4275,6 @@ export class Entity {
|
|
|
4087
4275
|
*/
|
|
4088
4276
|
addEffect(effectType: EffectType | string, duration: number, options?: EntityEffectOptions): void;
|
|
4089
4277
|
/**
|
|
4090
|
-
* @beta
|
|
4091
4278
|
* @remarks
|
|
4092
4279
|
* Adds a specified tag to an entity.
|
|
4093
4280
|
*
|
|
@@ -4122,7 +4309,6 @@ export class Entity {
|
|
|
4122
4309
|
*/
|
|
4123
4310
|
addTag(tag: string): boolean;
|
|
4124
4311
|
/**
|
|
4125
|
-
* @beta
|
|
4126
4312
|
* @remarks
|
|
4127
4313
|
* Applies a set of damage to an entity.
|
|
4128
4314
|
*
|
|
@@ -4155,7 +4341,6 @@ export class Entity {
|
|
|
4155
4341
|
*/
|
|
4156
4342
|
applyDamage(amount: number, options?: EntityApplyDamageByProjectileOptions | EntityApplyDamageOptions): boolean;
|
|
4157
4343
|
/**
|
|
4158
|
-
* @beta
|
|
4159
4344
|
* @remarks
|
|
4160
4345
|
* Applies impulse vector to the current velocity of the
|
|
4161
4346
|
* entity.
|
|
@@ -4177,7 +4362,6 @@ export class Entity {
|
|
|
4177
4362
|
*/
|
|
4178
4363
|
applyImpulse(vector: Vector3): void;
|
|
4179
4364
|
/**
|
|
4180
|
-
* @beta
|
|
4181
4365
|
* @remarks
|
|
4182
4366
|
* Applies impulse vector to the current velocity of the
|
|
4183
4367
|
* entity.
|
|
@@ -4213,7 +4397,6 @@ export class Entity {
|
|
|
4213
4397
|
*/
|
|
4214
4398
|
applyKnockback(directionX: number, directionZ: number, horizontalStrength: number, verticalStrength: number): void;
|
|
4215
4399
|
/**
|
|
4216
|
-
* @beta
|
|
4217
4400
|
* @remarks
|
|
4218
4401
|
* Sets the current velocity of the Entity to zero. Note that
|
|
4219
4402
|
* this method may not have an impact on Players.
|
|
@@ -4277,7 +4460,6 @@ export class Entity {
|
|
|
4277
4460
|
*/
|
|
4278
4461
|
extinguishFire(useEffects?: boolean): boolean;
|
|
4279
4462
|
/**
|
|
4280
|
-
* @beta
|
|
4281
4463
|
* @remarks
|
|
4282
4464
|
* Returns the first intersecting block from the direction that
|
|
4283
4465
|
* this entity is looking at.
|
|
@@ -4291,7 +4473,6 @@ export class Entity {
|
|
|
4291
4473
|
*/
|
|
4292
4474
|
getBlockFromViewDirection(options?: BlockRaycastOptions): BlockRaycastHit | undefined;
|
|
4293
4475
|
/**
|
|
4294
|
-
* @beta
|
|
4295
4476
|
* @remarks
|
|
4296
4477
|
* Gets a component (that represents additional capabilities)
|
|
4297
4478
|
* for an entity.
|
|
@@ -4307,7 +4488,6 @@ export class Entity {
|
|
|
4307
4488
|
*/
|
|
4308
4489
|
getComponent(componentId: string): EntityComponent | undefined;
|
|
4309
4490
|
/**
|
|
4310
|
-
* @beta
|
|
4311
4491
|
* @remarks
|
|
4312
4492
|
* Returns all components that are both present on this entity
|
|
4313
4493
|
* and supported by the API.
|
|
@@ -4331,7 +4511,6 @@ export class Entity {
|
|
|
4331
4511
|
*/
|
|
4332
4512
|
getDynamicProperty(identifier: string): boolean | number | string | Vector3 | undefined;
|
|
4333
4513
|
/**
|
|
4334
|
-
* @beta
|
|
4335
4514
|
* @remarks
|
|
4336
4515
|
* Returns the effect for the specified EffectType on the
|
|
4337
4516
|
* entity, undefined if the effect is not present, or throws an
|
|
@@ -4347,7 +4526,6 @@ export class Entity {
|
|
|
4347
4526
|
*/
|
|
4348
4527
|
getEffect(effectType: EffectType | string): Effect | undefined;
|
|
4349
4528
|
/**
|
|
4350
|
-
* @beta
|
|
4351
4529
|
* @remarks
|
|
4352
4530
|
* Returns a set of effects applied to this entity.
|
|
4353
4531
|
*
|
|
@@ -4357,7 +4535,6 @@ export class Entity {
|
|
|
4357
4535
|
*/
|
|
4358
4536
|
getEffects(): Effect[];
|
|
4359
4537
|
/**
|
|
4360
|
-
* @beta
|
|
4361
4538
|
* @remarks
|
|
4362
4539
|
* Gets the entities that this entity is looking at by
|
|
4363
4540
|
* performing a ray cast from the view of this entity.
|
|
@@ -4371,7 +4548,6 @@ export class Entity {
|
|
|
4371
4548
|
*/
|
|
4372
4549
|
getEntitiesFromViewDirection(options?: EntityRaycastOptions): EntityRaycastHit[];
|
|
4373
4550
|
/**
|
|
4374
|
-
* @beta
|
|
4375
4551
|
* @remarks
|
|
4376
4552
|
* Returns the current location of the head component of this
|
|
4377
4553
|
* entity.
|
|
@@ -4412,7 +4588,6 @@ export class Entity {
|
|
|
4412
4588
|
*/
|
|
4413
4589
|
getRotation(): Vector2;
|
|
4414
4590
|
/**
|
|
4415
|
-
* @beta
|
|
4416
4591
|
* @remarks
|
|
4417
4592
|
* Returns all tags associated with an entity.
|
|
4418
4593
|
*
|
|
@@ -4422,7 +4597,6 @@ export class Entity {
|
|
|
4422
4597
|
*/
|
|
4423
4598
|
getTags(): string[];
|
|
4424
4599
|
/**
|
|
4425
|
-
* @beta
|
|
4426
4600
|
* @remarks
|
|
4427
4601
|
* Returns the current velocity vector of the entity.
|
|
4428
4602
|
*
|
|
@@ -4442,7 +4616,6 @@ export class Entity {
|
|
|
4442
4616
|
*/
|
|
4443
4617
|
getVelocity(): Vector3;
|
|
4444
4618
|
/**
|
|
4445
|
-
* @beta
|
|
4446
4619
|
* @remarks
|
|
4447
4620
|
* Returns the current view direction of the entity.
|
|
4448
4621
|
*
|
|
@@ -4452,7 +4625,6 @@ export class Entity {
|
|
|
4452
4625
|
*/
|
|
4453
4626
|
getViewDirection(): Vector3;
|
|
4454
4627
|
/**
|
|
4455
|
-
* @beta
|
|
4456
4628
|
* @remarks
|
|
4457
4629
|
* Returns true if the specified component is present on this
|
|
4458
4630
|
* entity.
|
|
@@ -4467,7 +4639,6 @@ export class Entity {
|
|
|
4467
4639
|
*/
|
|
4468
4640
|
hasComponent(componentId: string): boolean;
|
|
4469
4641
|
/**
|
|
4470
|
-
* @beta
|
|
4471
4642
|
* @remarks
|
|
4472
4643
|
* Returns whether an entity has a particular tag.
|
|
4473
4644
|
*
|
|
@@ -4479,7 +4650,6 @@ export class Entity {
|
|
|
4479
4650
|
*/
|
|
4480
4651
|
hasTag(tag: string): boolean;
|
|
4481
4652
|
/**
|
|
4482
|
-
* @beta
|
|
4483
4653
|
* @remarks
|
|
4484
4654
|
* Returns whether the entity can be manipulated by script. A
|
|
4485
4655
|
* Player is considered valid when it's EntityLifetimeState is
|
|
@@ -4490,7 +4660,6 @@ export class Entity {
|
|
|
4490
4660
|
*/
|
|
4491
4661
|
isValid(): boolean;
|
|
4492
4662
|
/**
|
|
4493
|
-
* @beta
|
|
4494
4663
|
* @remarks
|
|
4495
4664
|
* Kills this entity. The entity will drop loot as normal.
|
|
4496
4665
|
*
|
|
@@ -4561,7 +4730,6 @@ export class Entity {
|
|
|
4561
4730
|
*/
|
|
4562
4731
|
removeDynamicProperty(identifier: string): boolean;
|
|
4563
4732
|
/**
|
|
4564
|
-
* @beta
|
|
4565
4733
|
* @remarks
|
|
4566
4734
|
* Removes the specified EffectType on the entity, or returns
|
|
4567
4735
|
* false if the effect is not present.
|
|
@@ -4577,7 +4745,6 @@ export class Entity {
|
|
|
4577
4745
|
*/
|
|
4578
4746
|
removeEffect(effectType: EffectType | string): boolean;
|
|
4579
4747
|
/**
|
|
4580
|
-
* @beta
|
|
4581
4748
|
* @remarks
|
|
4582
4749
|
* Removes a specified tag from an entity.
|
|
4583
4750
|
*
|
|
@@ -4611,7 +4778,6 @@ export class Entity {
|
|
|
4611
4778
|
*/
|
|
4612
4779
|
resetProperty(identifier: string): boolean | number | string;
|
|
4613
4780
|
/**
|
|
4614
|
-
* @beta
|
|
4615
4781
|
* @remarks
|
|
4616
4782
|
* Runs a synchronous command on the entity.
|
|
4617
4783
|
*
|
|
@@ -4624,6 +4790,10 @@ export class Entity {
|
|
|
4624
4790
|
* A command result containing whether the command was
|
|
4625
4791
|
* successful.
|
|
4626
4792
|
* @throws This function can throw errors.
|
|
4793
|
+
*
|
|
4794
|
+
* {@link CommandError}
|
|
4795
|
+
*
|
|
4796
|
+
* {@link Error}
|
|
4627
4797
|
*/
|
|
4628
4798
|
runCommand(commandString: string): CommandResult;
|
|
4629
4799
|
/**
|
|
@@ -4741,7 +4911,6 @@ export class Entity {
|
|
|
4741
4911
|
*/
|
|
4742
4912
|
setRotation(rotation: Vector2): void;
|
|
4743
4913
|
/**
|
|
4744
|
-
* @beta
|
|
4745
4914
|
* @remarks
|
|
4746
4915
|
* Teleports the selected entity to a new location
|
|
4747
4916
|
*
|
|
@@ -4774,7 +4943,6 @@ export class Entity {
|
|
|
4774
4943
|
*/
|
|
4775
4944
|
teleport(location: Vector3, teleportOptions?: TeleportOptions): void;
|
|
4776
4945
|
/**
|
|
4777
|
-
* @beta
|
|
4778
4946
|
* @remarks
|
|
4779
4947
|
* Triggers an entity type event. For every entity, a number of
|
|
4780
4948
|
* events are defined in an entities' definition for key entity
|
|
@@ -4798,7 +4966,6 @@ export class Entity {
|
|
|
4798
4966
|
*/
|
|
4799
4967
|
triggerEvent(eventName: string): void;
|
|
4800
4968
|
/**
|
|
4801
|
-
* @beta
|
|
4802
4969
|
* @remarks
|
|
4803
4970
|
* Attempts to try a teleport, but may not complete the
|
|
4804
4971
|
* teleport operation (for example, if there are blocks at the
|
|
@@ -4890,7 +5057,6 @@ export class EntityAgeableComponent extends EntityComponent {
|
|
|
4890
5057
|
}
|
|
4891
5058
|
|
|
4892
5059
|
/**
|
|
4893
|
-
* @beta
|
|
4894
5060
|
* This is a base abstract class for any entity component that
|
|
4895
5061
|
* centers around a number and can have a minimum, maximum, and
|
|
4896
5062
|
* default defined value.
|
|
@@ -4970,7 +5136,6 @@ export class EntityAttributeComponent extends EntityComponent {
|
|
|
4970
5136
|
}
|
|
4971
5137
|
|
|
4972
5138
|
/**
|
|
4973
|
-
* @beta
|
|
4974
5139
|
* Base class for a family of entity movement events.
|
|
4975
5140
|
*/
|
|
4976
5141
|
// @ts-ignore Class inheritance allowed for native defined classes
|
|
@@ -5078,7 +5243,6 @@ export class EntityBreathableComponent extends EntityComponent {
|
|
|
5078
5243
|
}
|
|
5079
5244
|
|
|
5080
5245
|
/**
|
|
5081
|
-
* @beta
|
|
5082
5246
|
* When added, this component signifies that the entity can
|
|
5083
5247
|
* climb up ladders.
|
|
5084
5248
|
*/
|
|
@@ -5089,7 +5253,6 @@ export class EntityCanClimbComponent extends EntityComponent {
|
|
|
5089
5253
|
}
|
|
5090
5254
|
|
|
5091
5255
|
/**
|
|
5092
|
-
* @beta
|
|
5093
5256
|
* When added, this component signifies that the entity can
|
|
5094
5257
|
* fly, and the pathfinder won't be restricted to paths where a
|
|
5095
5258
|
* solid block is required underneath it.
|
|
@@ -5101,7 +5264,6 @@ export class EntityCanFlyComponent extends EntityComponent {
|
|
|
5101
5264
|
}
|
|
5102
5265
|
|
|
5103
5266
|
/**
|
|
5104
|
-
* @beta
|
|
5105
5267
|
* When added, this component signifies that the entity can
|
|
5106
5268
|
* power jump like the horse does within Minecraft.
|
|
5107
5269
|
*/
|
|
@@ -5112,7 +5274,6 @@ export class EntityCanPowerJumpComponent extends EntityComponent {
|
|
|
5112
5274
|
}
|
|
5113
5275
|
|
|
5114
5276
|
/**
|
|
5115
|
-
* @beta
|
|
5116
5277
|
* Defines the entity's color. Only works on certain entities
|
|
5117
5278
|
* that have predefined color values (e.g., sheep, llama,
|
|
5118
5279
|
* shulker).
|
|
@@ -5132,7 +5293,6 @@ export class EntityColorComponent extends EntityComponent {
|
|
|
5132
5293
|
}
|
|
5133
5294
|
|
|
5134
5295
|
/**
|
|
5135
|
-
* @beta
|
|
5136
5296
|
* Base class for downstream entity components.
|
|
5137
5297
|
*/
|
|
5138
5298
|
// @ts-ignore Class inheritance allowed for native defined classes
|
|
@@ -5173,7 +5333,6 @@ export class EntityDefinitionFeedItem {
|
|
|
5173
5333
|
}
|
|
5174
5334
|
|
|
5175
5335
|
/**
|
|
5176
|
-
* @beta
|
|
5177
5336
|
* Contains data related to the death of an entity in the game.
|
|
5178
5337
|
*/
|
|
5179
5338
|
export class EntityDieAfterEvent {
|
|
@@ -5194,7 +5353,6 @@ export class EntityDieAfterEvent {
|
|
|
5194
5353
|
}
|
|
5195
5354
|
|
|
5196
5355
|
/**
|
|
5197
|
-
* @beta
|
|
5198
5356
|
* Supports registering for an event that fires after an entity
|
|
5199
5357
|
* has died.
|
|
5200
5358
|
*/
|
|
@@ -5232,7 +5390,6 @@ export class EntityDieAfterEventSignal {
|
|
|
5232
5390
|
}
|
|
5233
5391
|
|
|
5234
5392
|
/**
|
|
5235
|
-
* @beta
|
|
5236
5393
|
* Provides access to a mob's equipment slots. This component
|
|
5237
5394
|
* exists for all mob entities.
|
|
5238
5395
|
*/
|
|
@@ -5286,7 +5443,6 @@ export class EntityEquippableComponent extends EntityComponent {
|
|
|
5286
5443
|
}
|
|
5287
5444
|
|
|
5288
5445
|
/**
|
|
5289
|
-
* @beta
|
|
5290
5446
|
* When added, this component signifies that this entity
|
|
5291
5447
|
* doesn't take damage from fire.
|
|
5292
5448
|
*/
|
|
@@ -5297,7 +5453,6 @@ export class EntityFireImmuneComponent extends EntityComponent {
|
|
|
5297
5453
|
}
|
|
5298
5454
|
|
|
5299
5455
|
/**
|
|
5300
|
-
* @beta
|
|
5301
5456
|
* When added, this component signifies that this entity can
|
|
5302
5457
|
* float in liquid blocks.
|
|
5303
5458
|
*/
|
|
@@ -5308,7 +5463,6 @@ export class EntityFloatsInLiquidComponent extends EntityComponent {
|
|
|
5308
5463
|
}
|
|
5309
5464
|
|
|
5310
5465
|
/**
|
|
5311
|
-
* @beta
|
|
5312
5466
|
* Represents the flying speed of an entity.
|
|
5313
5467
|
*/
|
|
5314
5468
|
// @ts-ignore Class inheritance allowed for native defined classes
|
|
@@ -5326,7 +5480,6 @@ export class EntityFlyingSpeedComponent extends EntityComponent {
|
|
|
5326
5480
|
}
|
|
5327
5481
|
|
|
5328
5482
|
/**
|
|
5329
|
-
* @beta
|
|
5330
5483
|
* Defines how much friction affects this entity.
|
|
5331
5484
|
*/
|
|
5332
5485
|
// @ts-ignore Class inheritance allowed for native defined classes
|
|
@@ -5345,7 +5498,6 @@ export class EntityFrictionModifierComponent extends EntityComponent {
|
|
|
5345
5498
|
}
|
|
5346
5499
|
|
|
5347
5500
|
/**
|
|
5348
|
-
* @beta
|
|
5349
5501
|
* Sets the offset from the ground that the entity is actually
|
|
5350
5502
|
* at.
|
|
5351
5503
|
*/
|
|
@@ -5354,7 +5506,9 @@ export class EntityGroundOffsetComponent extends EntityComponent {
|
|
|
5354
5506
|
private constructor();
|
|
5355
5507
|
/**
|
|
5356
5508
|
* @remarks
|
|
5357
|
-
* Value of this particular ground offset.
|
|
5509
|
+
* Value of this particular ground offset. Note that this value
|
|
5510
|
+
* is effectively read only; setting the ground offset value
|
|
5511
|
+
* will not have an impact on the related entity.
|
|
5358
5512
|
*
|
|
5359
5513
|
* This property can't be edited in read-only mode.
|
|
5360
5514
|
*
|
|
@@ -5364,7 +5518,6 @@ export class EntityGroundOffsetComponent extends EntityComponent {
|
|
|
5364
5518
|
}
|
|
5365
5519
|
|
|
5366
5520
|
/**
|
|
5367
|
-
* @beta
|
|
5368
5521
|
* Defines the interactions with this entity for healing it.
|
|
5369
5522
|
*/
|
|
5370
5523
|
// @ts-ignore Class inheritance allowed for native defined classes
|
|
@@ -5400,7 +5553,6 @@ export class EntityHealableComponent extends EntityComponent {
|
|
|
5400
5553
|
}
|
|
5401
5554
|
|
|
5402
5555
|
/**
|
|
5403
|
-
* @beta
|
|
5404
5556
|
* Contains information related to an entity when its health
|
|
5405
5557
|
* changes. Warning: don't change the health of an entity in
|
|
5406
5558
|
* this event, or it will cause an infinite loop!
|
|
@@ -5428,7 +5580,6 @@ export class EntityHealthChangedAfterEvent {
|
|
|
5428
5580
|
}
|
|
5429
5581
|
|
|
5430
5582
|
/**
|
|
5431
|
-
* @beta
|
|
5432
5583
|
* Manages callbacks that are connected to when the health of
|
|
5433
5584
|
* an entity changes.
|
|
5434
5585
|
*/
|
|
@@ -5459,7 +5610,6 @@ export class EntityHealthChangedAfterEventSignal {
|
|
|
5459
5610
|
}
|
|
5460
5611
|
|
|
5461
5612
|
/**
|
|
5462
|
-
* @beta
|
|
5463
5613
|
* Defines the health properties of an entity.
|
|
5464
5614
|
*/
|
|
5465
5615
|
// @ts-ignore Class inheritance allowed for native defined classes
|
|
@@ -5469,7 +5619,6 @@ export class EntityHealthComponent extends EntityAttributeComponent {
|
|
|
5469
5619
|
}
|
|
5470
5620
|
|
|
5471
5621
|
/**
|
|
5472
|
-
* @beta
|
|
5473
5622
|
* Contains information related to an entity hitting a block.
|
|
5474
5623
|
*/
|
|
5475
5624
|
export class EntityHitBlockAfterEvent {
|
|
@@ -5495,7 +5644,6 @@ export class EntityHitBlockAfterEvent {
|
|
|
5495
5644
|
}
|
|
5496
5645
|
|
|
5497
5646
|
/**
|
|
5498
|
-
* @beta
|
|
5499
5647
|
* Manages callbacks that are connected to when an entity hits
|
|
5500
5648
|
* a block.
|
|
5501
5649
|
*/
|
|
@@ -5526,7 +5674,6 @@ export class EntityHitBlockAfterEventSignal {
|
|
|
5526
5674
|
}
|
|
5527
5675
|
|
|
5528
5676
|
/**
|
|
5529
|
-
* @beta
|
|
5530
5677
|
* Contains information related to an entity hitting (melee
|
|
5531
5678
|
* attacking) another entity.
|
|
5532
5679
|
*/
|
|
@@ -5547,7 +5694,6 @@ export class EntityHitEntityAfterEvent {
|
|
|
5547
5694
|
}
|
|
5548
5695
|
|
|
5549
5696
|
/**
|
|
5550
|
-
* @beta
|
|
5551
5697
|
* Manages callbacks that are connected to when an entity makes
|
|
5552
5698
|
* a melee attack on another entity.
|
|
5553
5699
|
*/
|
|
@@ -5578,7 +5724,6 @@ export class EntityHitEntityAfterEventSignal {
|
|
|
5578
5724
|
}
|
|
5579
5725
|
|
|
5580
5726
|
/**
|
|
5581
|
-
* @beta
|
|
5582
5727
|
* Contains information related to an entity getting hurt.
|
|
5583
5728
|
*/
|
|
5584
5729
|
export class EntityHurtAfterEvent {
|
|
@@ -5605,7 +5750,6 @@ export class EntityHurtAfterEvent {
|
|
|
5605
5750
|
}
|
|
5606
5751
|
|
|
5607
5752
|
/**
|
|
5608
|
-
* @beta
|
|
5609
5753
|
* Manages callbacks that are connected to when an entity is
|
|
5610
5754
|
* hurt.
|
|
5611
5755
|
*/
|
|
@@ -5634,7 +5778,6 @@ export class EntityHurtAfterEventSignal {
|
|
|
5634
5778
|
}
|
|
5635
5779
|
|
|
5636
5780
|
/**
|
|
5637
|
-
* @beta
|
|
5638
5781
|
* Defines this entity's inventory properties.
|
|
5639
5782
|
*/
|
|
5640
5783
|
// @ts-ignore Class inheritance allowed for native defined classes
|
|
@@ -5696,7 +5839,6 @@ export class EntityInventoryComponent extends EntityComponent {
|
|
|
5696
5839
|
}
|
|
5697
5840
|
|
|
5698
5841
|
/**
|
|
5699
|
-
* @beta
|
|
5700
5842
|
* When added, this component signifies that this entity is a
|
|
5701
5843
|
* baby.
|
|
5702
5844
|
*/
|
|
@@ -5707,7 +5849,6 @@ export class EntityIsBabyComponent extends EntityComponent {
|
|
|
5707
5849
|
}
|
|
5708
5850
|
|
|
5709
5851
|
/**
|
|
5710
|
-
* @beta
|
|
5711
5852
|
* When added, this component signifies that this entity is
|
|
5712
5853
|
* charged.
|
|
5713
5854
|
*/
|
|
@@ -5718,7 +5859,6 @@ export class EntityIsChargedComponent extends EntityComponent {
|
|
|
5718
5859
|
}
|
|
5719
5860
|
|
|
5720
5861
|
/**
|
|
5721
|
-
* @beta
|
|
5722
5862
|
* When added, this component signifies that this entity is
|
|
5723
5863
|
* currently carrying a chest.
|
|
5724
5864
|
*/
|
|
@@ -5729,7 +5869,6 @@ export class EntityIsChestedComponent extends EntityComponent {
|
|
|
5729
5869
|
}
|
|
5730
5870
|
|
|
5731
5871
|
/**
|
|
5732
|
-
* @beta
|
|
5733
5872
|
* When added, this component signifies that dyes can be used
|
|
5734
5873
|
* on this entity to change its color.
|
|
5735
5874
|
*/
|
|
@@ -5740,7 +5879,6 @@ export class EntityIsDyeableComponent extends EntityComponent {
|
|
|
5740
5879
|
}
|
|
5741
5880
|
|
|
5742
5881
|
/**
|
|
5743
|
-
* @beta
|
|
5744
5882
|
* When added, this component signifies that this entity can
|
|
5745
5883
|
* hide from hostile mobs while invisible.
|
|
5746
5884
|
*/
|
|
@@ -5751,7 +5889,6 @@ export class EntityIsHiddenWhenInvisibleComponent extends EntityComponent {
|
|
|
5751
5889
|
}
|
|
5752
5890
|
|
|
5753
5891
|
/**
|
|
5754
|
-
* @beta
|
|
5755
5892
|
* When added, this component signifies that this entity this
|
|
5756
5893
|
* currently on fire.
|
|
5757
5894
|
*/
|
|
@@ -5762,7 +5899,6 @@ export class EntityIsIgnitedComponent extends EntityComponent {
|
|
|
5762
5899
|
}
|
|
5763
5900
|
|
|
5764
5901
|
/**
|
|
5765
|
-
* @beta
|
|
5766
5902
|
* When added, this component signifies that this entity is an
|
|
5767
5903
|
* illager captain.
|
|
5768
5904
|
*/
|
|
@@ -5773,7 +5909,6 @@ export class EntityIsIllagerCaptainComponent extends EntityComponent {
|
|
|
5773
5909
|
}
|
|
5774
5910
|
|
|
5775
5911
|
/**
|
|
5776
|
-
* @beta
|
|
5777
5912
|
* When added, this component signifies that this entity is
|
|
5778
5913
|
* currently saddled.
|
|
5779
5914
|
*/
|
|
@@ -5784,7 +5919,6 @@ export class EntityIsSaddledComponent extends EntityComponent {
|
|
|
5784
5919
|
}
|
|
5785
5920
|
|
|
5786
5921
|
/**
|
|
5787
|
-
* @beta
|
|
5788
5922
|
* When added, this component signifies that this entity is
|
|
5789
5923
|
* currently shaking.
|
|
5790
5924
|
*/
|
|
@@ -5795,7 +5929,6 @@ export class EntityIsShakingComponent extends EntityComponent {
|
|
|
5795
5929
|
}
|
|
5796
5930
|
|
|
5797
5931
|
/**
|
|
5798
|
-
* @beta
|
|
5799
5932
|
* When added, this component signifies that this entity is
|
|
5800
5933
|
* currently sheared.
|
|
5801
5934
|
*/
|
|
@@ -5806,7 +5939,6 @@ export class EntityIsShearedComponent extends EntityComponent {
|
|
|
5806
5939
|
}
|
|
5807
5940
|
|
|
5808
5941
|
/**
|
|
5809
|
-
* @beta
|
|
5810
5942
|
* When added, this component signifies that this entity can be
|
|
5811
5943
|
* stacked.
|
|
5812
5944
|
*/
|
|
@@ -5817,7 +5949,6 @@ export class EntityIsStackableComponent extends EntityComponent {
|
|
|
5817
5949
|
}
|
|
5818
5950
|
|
|
5819
5951
|
/**
|
|
5820
|
-
* @beta
|
|
5821
5952
|
* When added, this component signifies that this entity is
|
|
5822
5953
|
* currently stunned.
|
|
5823
5954
|
*/
|
|
@@ -5828,7 +5959,6 @@ export class EntityIsStunnedComponent extends EntityComponent {
|
|
|
5828
5959
|
}
|
|
5829
5960
|
|
|
5830
5961
|
/**
|
|
5831
|
-
* @beta
|
|
5832
5962
|
* When added, this component signifies that this entity is
|
|
5833
5963
|
* currently tamed.
|
|
5834
5964
|
*/
|
|
@@ -5839,7 +5969,6 @@ export class EntityIsTamedComponent extends EntityComponent {
|
|
|
5839
5969
|
}
|
|
5840
5970
|
|
|
5841
5971
|
/**
|
|
5842
|
-
* @beta
|
|
5843
5972
|
* If added onto the entity, this indicates that the entity
|
|
5844
5973
|
* represents a free-floating item in the world. Lets you
|
|
5845
5974
|
* retrieve the actual item stack contents via the itemStack
|
|
@@ -5986,7 +6115,6 @@ export class EntityLoadAfterEventSignal {
|
|
|
5986
6115
|
}
|
|
5987
6116
|
|
|
5988
6117
|
/**
|
|
5989
|
-
* @beta
|
|
5990
6118
|
* Additional variant value. Can be used to further
|
|
5991
6119
|
* differentiate variants.
|
|
5992
6120
|
*/
|
|
@@ -6027,7 +6155,6 @@ export class EntityMountTamingComponent extends EntityComponent {
|
|
|
6027
6155
|
}
|
|
6028
6156
|
|
|
6029
6157
|
/**
|
|
6030
|
-
* @beta
|
|
6031
6158
|
* When added, this movement control allows the mob to swim in
|
|
6032
6159
|
* water and walk on land.
|
|
6033
6160
|
*/
|
|
@@ -6038,7 +6165,6 @@ export class EntityMovementAmphibiousComponent extends EntityBaseMovementCompone
|
|
|
6038
6165
|
}
|
|
6039
6166
|
|
|
6040
6167
|
/**
|
|
6041
|
-
* @beta
|
|
6042
6168
|
* This component accents the movement of an entity.
|
|
6043
6169
|
*/
|
|
6044
6170
|
// @ts-ignore Class inheritance allowed for native defined classes
|
|
@@ -6058,7 +6184,6 @@ export class EntityMovementComponent extends EntityAttributeComponent {
|
|
|
6058
6184
|
}
|
|
6059
6185
|
|
|
6060
6186
|
/**
|
|
6061
|
-
* @beta
|
|
6062
6187
|
* When added, this move control causes the mob to fly.
|
|
6063
6188
|
*/
|
|
6064
6189
|
// @ts-ignore Class inheritance allowed for native defined classes
|
|
@@ -6068,7 +6193,6 @@ export class EntityMovementFlyComponent extends EntityBaseMovementComponent {
|
|
|
6068
6193
|
}
|
|
6069
6194
|
|
|
6070
6195
|
/**
|
|
6071
|
-
* @beta
|
|
6072
6196
|
* When added, this move control allows a mob to fly, swim,
|
|
6073
6197
|
* climb, etc.
|
|
6074
6198
|
*/
|
|
@@ -6103,7 +6227,6 @@ export class EntityMovementGlideComponent extends EntityBaseMovementComponent {
|
|
|
6103
6227
|
}
|
|
6104
6228
|
|
|
6105
6229
|
/**
|
|
6106
|
-
* @beta
|
|
6107
6230
|
* When added, this move control causes the mob to hover.
|
|
6108
6231
|
*/
|
|
6109
6232
|
// @ts-ignore Class inheritance allowed for native defined classes
|
|
@@ -6113,7 +6236,6 @@ export class EntityMovementHoverComponent extends EntityBaseMovementComponent {
|
|
|
6113
6236
|
}
|
|
6114
6237
|
|
|
6115
6238
|
/**
|
|
6116
|
-
* @beta
|
|
6117
6239
|
* Move control that causes the mob to jump as it moves with a
|
|
6118
6240
|
* specified delay between jumps.
|
|
6119
6241
|
*/
|
|
@@ -6124,7 +6246,6 @@ export class EntityMovementJumpComponent extends EntityBaseMovementComponent {
|
|
|
6124
6246
|
}
|
|
6125
6247
|
|
|
6126
6248
|
/**
|
|
6127
|
-
* @beta
|
|
6128
6249
|
* When added, this move control causes the mob to hop as it
|
|
6129
6250
|
* moves.
|
|
6130
6251
|
*/
|
|
@@ -6402,7 +6523,6 @@ export class EntityOnFireComponent extends EntityComponent {
|
|
|
6402
6523
|
}
|
|
6403
6524
|
|
|
6404
6525
|
/**
|
|
6405
|
-
* @beta
|
|
6406
6526
|
* Sets the distance through which the entity can push through.
|
|
6407
6527
|
*/
|
|
6408
6528
|
// @ts-ignore Class inheritance allowed for native defined classes
|
|
@@ -6666,7 +6786,6 @@ export class EntityRidingComponent extends EntityComponent {
|
|
|
6666
6786
|
}
|
|
6667
6787
|
|
|
6668
6788
|
/**
|
|
6669
|
-
* @beta
|
|
6670
6789
|
* Sets the entity's visual size.
|
|
6671
6790
|
*/
|
|
6672
6791
|
// @ts-ignore Class inheritance allowed for native defined classes
|
|
@@ -6684,7 +6803,6 @@ export class EntityScaleComponent extends EntityComponent {
|
|
|
6684
6803
|
}
|
|
6685
6804
|
|
|
6686
6805
|
/**
|
|
6687
|
-
* @beta
|
|
6688
6806
|
* Skin Id value. Can be used to differentiate skins, such as
|
|
6689
6807
|
* base skins for villagers.
|
|
6690
6808
|
*/
|
|
@@ -6903,7 +7021,6 @@ export class EntityUnderwaterMovementComponent extends EntityAttributeComponent
|
|
|
6903
7021
|
}
|
|
6904
7022
|
|
|
6905
7023
|
/**
|
|
6906
|
-
* @beta
|
|
6907
7024
|
* Used to differentiate the component group of a variant of an
|
|
6908
7025
|
* entity from others. (e.g. ocelot, villager).
|
|
6909
7026
|
*/
|
|
@@ -6922,7 +7039,6 @@ export class EntityVariantComponent extends EntityComponent {
|
|
|
6922
7039
|
}
|
|
6923
7040
|
|
|
6924
7041
|
/**
|
|
6925
|
-
* @beta
|
|
6926
7042
|
* When added, this component signifies that this entity wants
|
|
6927
7043
|
* to become a jockey.
|
|
6928
7044
|
*/
|
|
@@ -7042,7 +7158,6 @@ export class ExplosionBeforeEventSignal {
|
|
|
7042
7158
|
}
|
|
7043
7159
|
|
|
7044
7160
|
/**
|
|
7045
|
-
* @beta
|
|
7046
7161
|
* As part of the Healable component, represents a specific
|
|
7047
7162
|
* item that can be fed to an entity to cause health effects.
|
|
7048
7163
|
*/
|
|
@@ -7074,7 +7189,6 @@ export class FeedItem {
|
|
|
7074
7189
|
}
|
|
7075
7190
|
|
|
7076
7191
|
/**
|
|
7077
|
-
* @beta
|
|
7078
7192
|
* Represents an effect that is applied as a result of a food
|
|
7079
7193
|
* item being fed to an entity.
|
|
7080
7194
|
*/
|
|
@@ -7141,7 +7255,6 @@ export class FluidContainer {
|
|
|
7141
7255
|
}
|
|
7142
7256
|
|
|
7143
7257
|
/**
|
|
7144
|
-
* @beta
|
|
7145
7258
|
* Provides an adaptable interface for callers to subscribe to
|
|
7146
7259
|
* an event that fires when a button is pushed.
|
|
7147
7260
|
*/
|
|
@@ -7163,7 +7276,6 @@ export class IButtonPushAfterEventSignal {
|
|
|
7163
7276
|
}
|
|
7164
7277
|
|
|
7165
7278
|
/**
|
|
7166
|
-
* @beta
|
|
7167
7279
|
* Provides an adaptable interface for callers to subscribe to
|
|
7168
7280
|
* an event that fires after a lever is used.
|
|
7169
7281
|
*/
|
|
@@ -7185,7 +7297,6 @@ export class ILeverActionAfterEventSignal {
|
|
|
7185
7297
|
}
|
|
7186
7298
|
|
|
7187
7299
|
/**
|
|
7188
|
-
* @beta
|
|
7189
7300
|
* Provides an adaptable interface for callers to subscribe to
|
|
7190
7301
|
* an event that fires after a player joins a world.
|
|
7191
7302
|
*/
|
|
@@ -7207,7 +7318,6 @@ export class IPlayerJoinAfterEventSignal {
|
|
|
7207
7318
|
}
|
|
7208
7319
|
|
|
7209
7320
|
/**
|
|
7210
|
-
* @beta
|
|
7211
7321
|
* Provides an adaptable interface for callers to subscribe to
|
|
7212
7322
|
* an event that fires after a player leaves a world.
|
|
7213
7323
|
*/
|
|
@@ -7229,7 +7339,6 @@ export class IPlayerLeaveAfterEventSignal {
|
|
|
7229
7339
|
}
|
|
7230
7340
|
|
|
7231
7341
|
/**
|
|
7232
|
-
* @beta
|
|
7233
7342
|
* Provides an adaptable interface for callers to subscribe to
|
|
7234
7343
|
* an event that fires after a player spawns.
|
|
7235
7344
|
*/
|
|
@@ -7251,7 +7360,6 @@ export class IPlayerSpawnAfterEventSignal {
|
|
|
7251
7360
|
}
|
|
7252
7361
|
|
|
7253
7362
|
/**
|
|
7254
|
-
* @beta
|
|
7255
7363
|
* Contains information related to a chargeable item completing
|
|
7256
7364
|
* being charged.
|
|
7257
7365
|
*/
|
|
@@ -7279,7 +7387,6 @@ export class ItemCompleteUseAfterEvent {
|
|
|
7279
7387
|
}
|
|
7280
7388
|
|
|
7281
7389
|
/**
|
|
7282
|
-
* @beta
|
|
7283
7390
|
* Manages callbacks that are connected to the completion of
|
|
7284
7391
|
* charging for a chargeable item.
|
|
7285
7392
|
*/
|
|
@@ -7307,7 +7414,6 @@ export class ItemCompleteUseAfterEventSignal {
|
|
|
7307
7414
|
}
|
|
7308
7415
|
|
|
7309
7416
|
/**
|
|
7310
|
-
* @beta
|
|
7311
7417
|
* Base class for item components.
|
|
7312
7418
|
*/
|
|
7313
7419
|
// @ts-ignore Class inheritance allowed for native defined classes
|
|
@@ -7585,7 +7691,6 @@ export class ItemFoodComponent extends ItemComponent {
|
|
|
7585
7691
|
}
|
|
7586
7692
|
|
|
7587
7693
|
/**
|
|
7588
|
-
* @beta
|
|
7589
7694
|
* Contains information related to a chargeable item when the
|
|
7590
7695
|
* player has finished using the item and released the build
|
|
7591
7696
|
* action.
|
|
@@ -7614,7 +7719,6 @@ export class ItemReleaseUseAfterEvent {
|
|
|
7614
7719
|
}
|
|
7615
7720
|
|
|
7616
7721
|
/**
|
|
7617
|
-
* @beta
|
|
7618
7722
|
* Manages callbacks that are connected to the releasing of
|
|
7619
7723
|
* charging for a chargeable item.
|
|
7620
7724
|
*/
|
|
@@ -7642,7 +7746,6 @@ export class ItemReleaseUseAfterEventSignal {
|
|
|
7642
7746
|
}
|
|
7643
7747
|
|
|
7644
7748
|
/**
|
|
7645
|
-
* @beta
|
|
7646
7749
|
* Defines a collection of items.
|
|
7647
7750
|
*/
|
|
7648
7751
|
export class ItemStack {
|
|
@@ -7797,7 +7900,6 @@ export class ItemStack {
|
|
|
7797
7900
|
*/
|
|
7798
7901
|
getComponents(): ItemComponent[];
|
|
7799
7902
|
/**
|
|
7800
|
-
* @beta
|
|
7801
7903
|
* @remarks
|
|
7802
7904
|
* Returns the lore value - a secondary display string - for an
|
|
7803
7905
|
* ItemStack.
|
|
@@ -7897,7 +7999,6 @@ export class ItemStack {
|
|
|
7897
7999
|
*/
|
|
7898
8000
|
setCanPlaceOn(blockIdentifiers?: string[]): void;
|
|
7899
8001
|
/**
|
|
7900
|
-
* @beta
|
|
7901
8002
|
* @remarks
|
|
7902
8003
|
* Sets the lore value - a secondary display string - for an
|
|
7903
8004
|
* ItemStack. The lore list is cleared if set to an empty
|
|
@@ -7954,7 +8055,6 @@ export class ItemStack {
|
|
|
7954
8055
|
}
|
|
7955
8056
|
|
|
7956
8057
|
/**
|
|
7957
|
-
* @beta
|
|
7958
8058
|
* Contains information related to a chargeable item starting
|
|
7959
8059
|
* to be charged.
|
|
7960
8060
|
*/
|
|
@@ -7982,7 +8082,6 @@ export class ItemStartUseAfterEvent {
|
|
|
7982
8082
|
}
|
|
7983
8083
|
|
|
7984
8084
|
/**
|
|
7985
|
-
* @beta
|
|
7986
8085
|
* Manages callbacks that are connected to the start of
|
|
7987
8086
|
* charging for a chargeable item.
|
|
7988
8087
|
*/
|
|
@@ -8010,7 +8109,6 @@ export class ItemStartUseAfterEventSignal {
|
|
|
8010
8109
|
}
|
|
8011
8110
|
|
|
8012
8111
|
/**
|
|
8013
|
-
* @beta
|
|
8014
8112
|
* Contains information related to an item being used on a
|
|
8015
8113
|
* block. This event fires when a player presses the the Use
|
|
8016
8114
|
* Item / Place Block button to successfully use an item or
|
|
@@ -8047,7 +8145,6 @@ export class ItemStartUseOnAfterEvent {
|
|
|
8047
8145
|
}
|
|
8048
8146
|
|
|
8049
8147
|
/**
|
|
8050
|
-
* @beta
|
|
8051
8148
|
* Manages callbacks that are connected to an item starting
|
|
8052
8149
|
* being used on a block event.
|
|
8053
8150
|
*/
|
|
@@ -8075,7 +8172,6 @@ export class ItemStartUseOnAfterEventSignal {
|
|
|
8075
8172
|
}
|
|
8076
8173
|
|
|
8077
8174
|
/**
|
|
8078
|
-
* @beta
|
|
8079
8175
|
* Contains information related to a chargeable item has
|
|
8080
8176
|
* finished an items use cycle, or when the player has released
|
|
8081
8177
|
* the use action with the item.
|
|
@@ -8104,7 +8200,6 @@ export class ItemStopUseAfterEvent {
|
|
|
8104
8200
|
}
|
|
8105
8201
|
|
|
8106
8202
|
/**
|
|
8107
|
-
* @beta
|
|
8108
8203
|
* Manages callbacks that are connected to the stopping of
|
|
8109
8204
|
* charging for an item that has a registered
|
|
8110
8205
|
* minecraft:chargeable component.
|
|
@@ -8133,7 +8228,6 @@ export class ItemStopUseAfterEventSignal {
|
|
|
8133
8228
|
}
|
|
8134
8229
|
|
|
8135
8230
|
/**
|
|
8136
|
-
* @beta
|
|
8137
8231
|
* Contains information related to an item that has stopped
|
|
8138
8232
|
* being used on a block. This event fires when a player
|
|
8139
8233
|
* successfully uses an item or places a block by pressing the
|
|
@@ -8165,7 +8259,6 @@ export class ItemStopUseOnAfterEvent {
|
|
|
8165
8259
|
}
|
|
8166
8260
|
|
|
8167
8261
|
/**
|
|
8168
|
-
* @beta
|
|
8169
8262
|
* Manages callbacks that are connected to an item stops used
|
|
8170
8263
|
* on a block event.
|
|
8171
8264
|
*/
|
|
@@ -8193,7 +8286,6 @@ export class ItemStopUseOnAfterEventSignal {
|
|
|
8193
8286
|
}
|
|
8194
8287
|
|
|
8195
8288
|
/**
|
|
8196
|
-
* @beta
|
|
8197
8289
|
* Represents the type of an item - for example, Wool.
|
|
8198
8290
|
*/
|
|
8199
8291
|
export class ItemType {
|
|
@@ -8229,7 +8321,6 @@ export class ItemTypes {
|
|
|
8229
8321
|
}
|
|
8230
8322
|
|
|
8231
8323
|
/**
|
|
8232
|
-
* @beta
|
|
8233
8324
|
* Contains information related to an item being used. This
|
|
8234
8325
|
* event fires when an item is successfully used by a player.
|
|
8235
8326
|
*/
|
|
@@ -8250,7 +8341,6 @@ export class ItemUseAfterEvent {
|
|
|
8250
8341
|
}
|
|
8251
8342
|
|
|
8252
8343
|
/**
|
|
8253
|
-
* @beta
|
|
8254
8344
|
* Manages callbacks that are connected to an item use event.
|
|
8255
8345
|
*/
|
|
8256
8346
|
export class ItemUseAfterEventSignal {
|
|
@@ -8275,7 +8365,6 @@ export class ItemUseAfterEventSignal {
|
|
|
8275
8365
|
}
|
|
8276
8366
|
|
|
8277
8367
|
/**
|
|
8278
|
-
* @beta
|
|
8279
8368
|
* Contains information related to an item being used.
|
|
8280
8369
|
*/
|
|
8281
8370
|
// @ts-ignore Class inheritance allowed for native defined classes
|
|
@@ -8290,7 +8379,6 @@ export class ItemUseBeforeEvent extends ItemUseAfterEvent {
|
|
|
8290
8379
|
}
|
|
8291
8380
|
|
|
8292
8381
|
/**
|
|
8293
|
-
* @beta
|
|
8294
8382
|
* Manages callbacks that fire before an item is used.
|
|
8295
8383
|
*/
|
|
8296
8384
|
export class ItemUseBeforeEventSignal {
|
|
@@ -8315,7 +8403,6 @@ export class ItemUseBeforeEventSignal {
|
|
|
8315
8403
|
}
|
|
8316
8404
|
|
|
8317
8405
|
/**
|
|
8318
|
-
* @beta
|
|
8319
8406
|
* Contains information related to an item being used on a
|
|
8320
8407
|
* block. This event fires when an item is successfully used on
|
|
8321
8408
|
* a block by a player.
|
|
@@ -8356,7 +8443,6 @@ export class ItemUseOnAfterEvent {
|
|
|
8356
8443
|
}
|
|
8357
8444
|
|
|
8358
8445
|
/**
|
|
8359
|
-
* @beta
|
|
8360
8446
|
* Manages callbacks that are connected to an item being used
|
|
8361
8447
|
* on a block event.
|
|
8362
8448
|
*/
|
|
@@ -8384,7 +8470,6 @@ export class ItemUseOnAfterEventSignal {
|
|
|
8384
8470
|
}
|
|
8385
8471
|
|
|
8386
8472
|
/**
|
|
8387
|
-
* @beta
|
|
8388
8473
|
* Contains information related to an item being used on a
|
|
8389
8474
|
* block.
|
|
8390
8475
|
*/
|
|
@@ -8400,7 +8485,6 @@ export class ItemUseOnBeforeEvent extends ItemUseOnAfterEvent {
|
|
|
8400
8485
|
}
|
|
8401
8486
|
|
|
8402
8487
|
/**
|
|
8403
|
-
* @beta
|
|
8404
8488
|
* Manages callbacks that fire before an item being used on a
|
|
8405
8489
|
* block event.
|
|
8406
8490
|
*/
|
|
@@ -8428,7 +8512,6 @@ export class ItemUseOnBeforeEventSignal {
|
|
|
8428
8512
|
}
|
|
8429
8513
|
|
|
8430
8514
|
/**
|
|
8431
|
-
* @beta
|
|
8432
8515
|
* Contains information related to changes to a lever
|
|
8433
8516
|
* activating or deactivating.
|
|
8434
8517
|
*/
|
|
@@ -8451,7 +8534,6 @@ export class LeverActionAfterEvent extends BlockEvent {
|
|
|
8451
8534
|
}
|
|
8452
8535
|
|
|
8453
8536
|
/**
|
|
8454
|
-
* @beta
|
|
8455
8537
|
* Manages callbacks that are connected to lever moves
|
|
8456
8538
|
* (activates or deactivates).
|
|
8457
8539
|
*/
|
|
@@ -8530,7 +8612,6 @@ export class MinecraftDimensionTypes {
|
|
|
8530
8612
|
}
|
|
8531
8613
|
|
|
8532
8614
|
/**
|
|
8533
|
-
* @beta
|
|
8534
8615
|
* Contains a set of additional variable values for further
|
|
8535
8616
|
* defining how rendering and animations function.
|
|
8536
8617
|
*/
|
|
@@ -8557,6 +8638,17 @@ export class MolangVariableMap {
|
|
|
8557
8638
|
* @throws This function can throw errors.
|
|
8558
8639
|
*/
|
|
8559
8640
|
setColorRGBA(variableName: string, color: RGBA): void;
|
|
8641
|
+
/**
|
|
8642
|
+
* @remarks
|
|
8643
|
+
* Sets a numeric (decimal) value within the Molang variable
|
|
8644
|
+
* map.
|
|
8645
|
+
*
|
|
8646
|
+
* @param variableName
|
|
8647
|
+
* Name of the float-based number to set.
|
|
8648
|
+
* @param number
|
|
8649
|
+
* Value for the Molang-based variable to set.
|
|
8650
|
+
* @throws This function can throw errors.
|
|
8651
|
+
*/
|
|
8560
8652
|
setFloat(variableName: string, number: number): void;
|
|
8561
8653
|
/**
|
|
8562
8654
|
* @remarks
|
|
@@ -8874,7 +8966,6 @@ export class Player extends Entity {
|
|
|
8874
8966
|
*/
|
|
8875
8967
|
readonly name: string;
|
|
8876
8968
|
/**
|
|
8877
|
-
* @beta
|
|
8878
8969
|
* @remarks
|
|
8879
8970
|
* Contains methods for manipulating the on-screen display of a
|
|
8880
8971
|
* Player.
|
|
@@ -8952,7 +9043,6 @@ export class Player extends Entity {
|
|
|
8952
9043
|
*/
|
|
8953
9044
|
getItemCooldown(itemCategory: string): number;
|
|
8954
9045
|
/**
|
|
8955
|
-
* @beta
|
|
8956
9046
|
* @remarks
|
|
8957
9047
|
* Gets the current spawn point of the player.
|
|
8958
9048
|
*
|
|
@@ -8976,7 +9066,6 @@ export class Player extends Entity {
|
|
|
8976
9066
|
*/
|
|
8977
9067
|
isOp(): boolean;
|
|
8978
9068
|
/**
|
|
8979
|
-
* @beta
|
|
8980
9069
|
* @remarks
|
|
8981
9070
|
* Plays a sound that only this particular player can hear.
|
|
8982
9071
|
*
|
|
@@ -9035,7 +9124,6 @@ export class Player extends Entity {
|
|
|
9035
9124
|
*/
|
|
9036
9125
|
resetLevel(): void;
|
|
9037
9126
|
/**
|
|
9038
|
-
* @beta
|
|
9039
9127
|
* @remarks
|
|
9040
9128
|
* Sends a message to the player.
|
|
9041
9129
|
*
|
|
@@ -9097,7 +9185,6 @@ export class Player extends Entity {
|
|
|
9097
9185
|
*/
|
|
9098
9186
|
setOp(isOp: boolean): void;
|
|
9099
9187
|
/**
|
|
9100
|
-
* @beta
|
|
9101
9188
|
* @remarks
|
|
9102
9189
|
* Sets the current starting spawn point for this particular
|
|
9103
9190
|
* player.
|
|
@@ -9105,6 +9192,10 @@ export class Player extends Entity {
|
|
|
9105
9192
|
* This function can't be called in read-only mode.
|
|
9106
9193
|
*
|
|
9107
9194
|
* @throws This function can throw errors.
|
|
9195
|
+
*
|
|
9196
|
+
* {@link Error}
|
|
9197
|
+
*
|
|
9198
|
+
* {@link LocationOutOfWorldBoundariesError}
|
|
9108
9199
|
*/
|
|
9109
9200
|
setSpawnPoint(spawnPoint?: DimensionLocation): void;
|
|
9110
9201
|
/**
|
|
@@ -9280,7 +9371,6 @@ export class PlayerIterator implements Iterable<Player> {
|
|
|
9280
9371
|
}
|
|
9281
9372
|
|
|
9282
9373
|
/**
|
|
9283
|
-
* @beta
|
|
9284
9374
|
* Contains information regarding a player that has joined.
|
|
9285
9375
|
* See the playerSpawn event for more detailed information that
|
|
9286
9376
|
* could be returned after the first time a player has spawned
|
|
@@ -9303,7 +9393,6 @@ export class PlayerJoinAfterEvent {
|
|
|
9303
9393
|
}
|
|
9304
9394
|
|
|
9305
9395
|
/**
|
|
9306
|
-
* @beta
|
|
9307
9396
|
* Manages callbacks that are connected to a player joining the
|
|
9308
9397
|
* world.
|
|
9309
9398
|
*/
|
|
@@ -9313,7 +9402,6 @@ export class PlayerJoinAfterEventSignal extends IPlayerJoinAfterEventSignal {
|
|
|
9313
9402
|
}
|
|
9314
9403
|
|
|
9315
9404
|
/**
|
|
9316
|
-
* @beta
|
|
9317
9405
|
* Contains information regarding a player that has left the
|
|
9318
9406
|
* world.
|
|
9319
9407
|
*/
|
|
@@ -9335,7 +9423,6 @@ export class PlayerLeaveAfterEvent {
|
|
|
9335
9423
|
}
|
|
9336
9424
|
|
|
9337
9425
|
/**
|
|
9338
|
-
* @beta
|
|
9339
9426
|
* Manages callbacks that are connected to a player leaving the
|
|
9340
9427
|
* world.
|
|
9341
9428
|
*/
|
|
@@ -9464,7 +9551,6 @@ export class PlayerPlaceBlockBeforeEventSignal {
|
|
|
9464
9551
|
}
|
|
9465
9552
|
|
|
9466
9553
|
/**
|
|
9467
|
-
* @beta
|
|
9468
9554
|
* An event that contains more information about a player
|
|
9469
9555
|
* spawning.
|
|
9470
9556
|
*/
|
|
@@ -9490,7 +9576,6 @@ export class PlayerSpawnAfterEvent {
|
|
|
9490
9576
|
}
|
|
9491
9577
|
|
|
9492
9578
|
/**
|
|
9493
|
-
* @beta
|
|
9494
9579
|
* Registers an event when a player is spawned (or re-spawned
|
|
9495
9580
|
* after death) and fully ready within the world.
|
|
9496
9581
|
*/
|
|
@@ -9500,7 +9585,6 @@ export class PlayerSpawnAfterEventSignal extends IPlayerSpawnAfterEventSignal {
|
|
|
9500
9585
|
}
|
|
9501
9586
|
|
|
9502
9587
|
/**
|
|
9503
|
-
* @beta
|
|
9504
9588
|
* Contains information related to changes to a pressure plate
|
|
9505
9589
|
* pop.
|
|
9506
9590
|
*/
|
|
@@ -9524,7 +9608,6 @@ export class PressurePlatePopAfterEvent extends BlockEvent {
|
|
|
9524
9608
|
}
|
|
9525
9609
|
|
|
9526
9610
|
/**
|
|
9527
|
-
* @beta
|
|
9528
9611
|
* Manages callbacks that are connected to when a pressure
|
|
9529
9612
|
* plate is popped.
|
|
9530
9613
|
*/
|
|
@@ -9552,7 +9635,6 @@ export class PressurePlatePopAfterEventSignal {
|
|
|
9552
9635
|
}
|
|
9553
9636
|
|
|
9554
9637
|
/**
|
|
9555
|
-
* @beta
|
|
9556
9638
|
* Contains information related to changes to a pressure plate
|
|
9557
9639
|
* push.
|
|
9558
9640
|
*/
|
|
@@ -9582,7 +9664,6 @@ export class PressurePlatePushAfterEvent extends BlockEvent {
|
|
|
9582
9664
|
}
|
|
9583
9665
|
|
|
9584
9666
|
/**
|
|
9585
|
-
* @beta
|
|
9586
9667
|
* Manages callbacks that are connected to when a pressure
|
|
9587
9668
|
* plate is pushed.
|
|
9588
9669
|
*/
|
|
@@ -9610,7 +9691,6 @@ export class PressurePlatePushAfterEventSignal {
|
|
|
9610
9691
|
}
|
|
9611
9692
|
|
|
9612
9693
|
/**
|
|
9613
|
-
* @beta
|
|
9614
9694
|
* Contains information related to a projectile hitting a
|
|
9615
9695
|
* block.
|
|
9616
9696
|
*/
|
|
@@ -9658,7 +9738,6 @@ export class ProjectileHitBlockAfterEvent {
|
|
|
9658
9738
|
}
|
|
9659
9739
|
|
|
9660
9740
|
/**
|
|
9661
|
-
* @beta
|
|
9662
9741
|
* Manages callbacks that are connected to when a projectile
|
|
9663
9742
|
* hits a block.
|
|
9664
9743
|
*/
|
|
@@ -9686,7 +9765,6 @@ export class ProjectileHitBlockAfterEventSignal {
|
|
|
9686
9765
|
}
|
|
9687
9766
|
|
|
9688
9767
|
/**
|
|
9689
|
-
* @beta
|
|
9690
9768
|
* Contains information related to a projectile hitting an
|
|
9691
9769
|
* entity.
|
|
9692
9770
|
*/
|
|
@@ -9734,7 +9812,6 @@ export class ProjectileHitEntityAfterEvent {
|
|
|
9734
9812
|
}
|
|
9735
9813
|
|
|
9736
9814
|
/**
|
|
9737
|
-
* @beta
|
|
9738
9815
|
* Manages callbacks that are connected to when a projectile
|
|
9739
9816
|
* hits an entity.
|
|
9740
9817
|
*/
|
|
@@ -9794,7 +9871,6 @@ export class PropertyRegistry {
|
|
|
9794
9871
|
}
|
|
9795
9872
|
|
|
9796
9873
|
/**
|
|
9797
|
-
* @beta
|
|
9798
9874
|
* Contains objectives and participants for the scoreboard.
|
|
9799
9875
|
*/
|
|
9800
9876
|
export class Scoreboard {
|
|
@@ -9872,7 +9948,6 @@ export class Scoreboard {
|
|
|
9872
9948
|
}
|
|
9873
9949
|
|
|
9874
9950
|
/**
|
|
9875
|
-
* @beta
|
|
9876
9951
|
* Contains an identity of the scoreboard item.
|
|
9877
9952
|
*/
|
|
9878
9953
|
export class ScoreboardIdentity {
|
|
@@ -9903,11 +9978,16 @@ export class ScoreboardIdentity {
|
|
|
9903
9978
|
* @throws This function can throw errors.
|
|
9904
9979
|
*/
|
|
9905
9980
|
getEntity(): Entity | undefined;
|
|
9981
|
+
/**
|
|
9982
|
+
* @remarks
|
|
9983
|
+
* Returns true if the ScoreboardIdentity reference is still
|
|
9984
|
+
* valid.
|
|
9985
|
+
*
|
|
9986
|
+
*/
|
|
9906
9987
|
isValid(): boolean;
|
|
9907
9988
|
}
|
|
9908
9989
|
|
|
9909
9990
|
/**
|
|
9910
|
-
* @beta
|
|
9911
9991
|
* Contains objectives and participants for the scoreboard.
|
|
9912
9992
|
*/
|
|
9913
9993
|
export class ScoreboardObjective {
|
|
@@ -9970,6 +10050,12 @@ export class ScoreboardObjective {
|
|
|
9970
10050
|
* @throws This function can throw errors.
|
|
9971
10051
|
*/
|
|
9972
10052
|
hasParticipant(participant: Entity | ScoreboardIdentity | string): boolean;
|
|
10053
|
+
/**
|
|
10054
|
+
* @remarks
|
|
10055
|
+
* Returns true if the ScoreboardObjective reference is still
|
|
10056
|
+
* valid.
|
|
10057
|
+
*
|
|
10058
|
+
*/
|
|
9973
10059
|
isValid(): boolean;
|
|
9974
10060
|
/**
|
|
9975
10061
|
* @remarks
|
|
@@ -9999,7 +10085,6 @@ export class ScoreboardObjective {
|
|
|
9999
10085
|
}
|
|
10000
10086
|
|
|
10001
10087
|
/**
|
|
10002
|
-
* @beta
|
|
10003
10088
|
* Contains a pair of a scoreboard participant and its
|
|
10004
10089
|
* respective score.
|
|
10005
10090
|
*/
|
|
@@ -10020,7 +10105,6 @@ export class ScoreboardScoreInfo {
|
|
|
10020
10105
|
}
|
|
10021
10106
|
|
|
10022
10107
|
/**
|
|
10023
|
-
* @beta
|
|
10024
10108
|
* Contains information about user interface elements that are
|
|
10025
10109
|
* showing up on the screen.
|
|
10026
10110
|
*/
|
|
@@ -10109,7 +10193,6 @@ export class ScreenDisplay {
|
|
|
10109
10193
|
}
|
|
10110
10194
|
|
|
10111
10195
|
/**
|
|
10112
|
-
* @beta
|
|
10113
10196
|
* Returns additional data about a /scriptevent command
|
|
10114
10197
|
* invocation.
|
|
10115
10198
|
*/
|
|
@@ -10158,7 +10241,6 @@ export class ScriptEventCommandMessageAfterEvent {
|
|
|
10158
10241
|
}
|
|
10159
10242
|
|
|
10160
10243
|
/**
|
|
10161
|
-
* @beta
|
|
10162
10244
|
* Allows for registering an event handler that responds to
|
|
10163
10245
|
* inbound /scriptevent commands.
|
|
10164
10246
|
*/
|
|
@@ -10257,7 +10339,6 @@ export class ServerMessageAfterEventSignal {
|
|
|
10257
10339
|
export class System {
|
|
10258
10340
|
private constructor();
|
|
10259
10341
|
/**
|
|
10260
|
-
* @beta
|
|
10261
10342
|
* @remarks
|
|
10262
10343
|
* Returns a collection of after-events for system-level
|
|
10263
10344
|
* operations.
|
|
@@ -10273,14 +10354,12 @@ export class System {
|
|
|
10273
10354
|
*/
|
|
10274
10355
|
readonly beforeEvents: SystemBeforeEvents;
|
|
10275
10356
|
/**
|
|
10276
|
-
* @beta
|
|
10277
10357
|
* @remarks
|
|
10278
10358
|
* Represents the current world tick of the server.
|
|
10279
10359
|
*
|
|
10280
10360
|
*/
|
|
10281
10361
|
readonly currentTick: number;
|
|
10282
10362
|
/**
|
|
10283
|
-
* @beta
|
|
10284
10363
|
* @remarks
|
|
10285
10364
|
* Cancels the execution of a function run that was previously
|
|
10286
10365
|
* scheduled via the `run` function.
|
|
@@ -10317,7 +10396,6 @@ export class System {
|
|
|
10317
10396
|
*/
|
|
10318
10397
|
run(callback: () => void): number;
|
|
10319
10398
|
/**
|
|
10320
|
-
* @beta
|
|
10321
10399
|
* @remarks
|
|
10322
10400
|
* Runs a set of code on an interval.
|
|
10323
10401
|
*
|
|
@@ -10340,7 +10418,6 @@ export class System {
|
|
|
10340
10418
|
*/
|
|
10341
10419
|
runInterval(callback: () => void, tickInterval?: number): number;
|
|
10342
10420
|
/**
|
|
10343
|
-
* @beta
|
|
10344
10421
|
* @remarks
|
|
10345
10422
|
* Runs a set of code at a future time specified by tickDelay.
|
|
10346
10423
|
*
|
|
@@ -10357,7 +10434,6 @@ export class System {
|
|
|
10357
10434
|
}
|
|
10358
10435
|
|
|
10359
10436
|
/**
|
|
10360
|
-
* @beta
|
|
10361
10437
|
* Provides a set of events that fire within the broader
|
|
10362
10438
|
* scripting system within Minecraft.
|
|
10363
10439
|
*/
|
|
@@ -10396,7 +10472,6 @@ export class SystemBeforeEvents {
|
|
|
10396
10472
|
}
|
|
10397
10473
|
|
|
10398
10474
|
/**
|
|
10399
|
-
* @beta
|
|
10400
10475
|
* Contains information related to changes to a target block
|
|
10401
10476
|
* hit.
|
|
10402
10477
|
*/
|
|
@@ -10430,7 +10505,6 @@ export class TargetBlockHitAfterEvent extends BlockEvent {
|
|
|
10430
10505
|
}
|
|
10431
10506
|
|
|
10432
10507
|
/**
|
|
10433
|
-
* @beta
|
|
10434
10508
|
* Manages callbacks that are connected to when a target block
|
|
10435
10509
|
* is hit.
|
|
10436
10510
|
*/
|
|
@@ -10477,7 +10551,6 @@ export class Trigger {
|
|
|
10477
10551
|
}
|
|
10478
10552
|
|
|
10479
10553
|
/**
|
|
10480
|
-
* @beta
|
|
10481
10554
|
* Contains information related to changes to a trip wire trip.
|
|
10482
10555
|
*/
|
|
10483
10556
|
// @ts-ignore Class inheritance allowed for native defined classes
|
|
@@ -10498,7 +10571,6 @@ export class TripWireTripAfterEvent extends BlockEvent {
|
|
|
10498
10571
|
}
|
|
10499
10572
|
|
|
10500
10573
|
/**
|
|
10501
|
-
* @beta
|
|
10502
10574
|
* Manages callbacks that are connected to when a trip wire is
|
|
10503
10575
|
* tripped.
|
|
10504
10576
|
*/
|
|
@@ -10818,7 +10890,6 @@ export class WeatherChangeAfterEventSignal {
|
|
|
10818
10890
|
export class World {
|
|
10819
10891
|
private constructor();
|
|
10820
10892
|
/**
|
|
10821
|
-
* @beta
|
|
10822
10893
|
* @remarks
|
|
10823
10894
|
* Contains a set of events that are applicable to the entirety
|
|
10824
10895
|
* of the world. Event callbacks are called in a deferred
|
|
@@ -10827,7 +10898,6 @@ export class World {
|
|
|
10827
10898
|
*/
|
|
10828
10899
|
readonly afterEvents: WorldAfterEvents;
|
|
10829
10900
|
/**
|
|
10830
|
-
* @beta
|
|
10831
10901
|
* @remarks
|
|
10832
10902
|
* Contains a set of events that are applicable to the entirety
|
|
10833
10903
|
* of the world. Event callbacks are called immediately. Event
|
|
@@ -10836,7 +10906,6 @@ export class World {
|
|
|
10836
10906
|
*/
|
|
10837
10907
|
readonly beforeEvents: WorldBeforeEvents;
|
|
10838
10908
|
/**
|
|
10839
|
-
* @beta
|
|
10840
10909
|
* @remarks
|
|
10841
10910
|
* Returns the general global scoreboard that applies to the
|
|
10842
10911
|
* world.
|
|
@@ -10858,7 +10927,6 @@ export class World {
|
|
|
10858
10927
|
*/
|
|
10859
10928
|
broadcastClientMessage(id: string, value: string): void;
|
|
10860
10929
|
/**
|
|
10861
|
-
* @beta
|
|
10862
10930
|
* @remarks
|
|
10863
10931
|
* Returns the absolute time since the start of the world.
|
|
10864
10932
|
*
|
|
@@ -10872,7 +10940,6 @@ export class World {
|
|
|
10872
10940
|
*/
|
|
10873
10941
|
getAllPlayers(): Player[];
|
|
10874
10942
|
/**
|
|
10875
|
-
* @beta
|
|
10876
10943
|
* @remarks
|
|
10877
10944
|
* Returns the current day.
|
|
10878
10945
|
*
|
|
@@ -10882,7 +10949,6 @@ export class World {
|
|
|
10882
10949
|
*/
|
|
10883
10950
|
getDay(): number;
|
|
10884
10951
|
/**
|
|
10885
|
-
* @beta
|
|
10886
10952
|
* @remarks
|
|
10887
10953
|
* Returns the default Overworld spawn location.
|
|
10888
10954
|
*
|
|
@@ -10993,7 +11059,6 @@ export class World {
|
|
|
10993
11059
|
*/
|
|
10994
11060
|
getMoonPhase(): MoonPhase;
|
|
10995
11061
|
/**
|
|
10996
|
-
* @beta
|
|
10997
11062
|
* @remarks
|
|
10998
11063
|
* Returns a set of players based on a set of conditions
|
|
10999
11064
|
* defined via the EntityQueryOptions set of filter criteria.
|
|
@@ -11008,7 +11073,6 @@ export class World {
|
|
|
11008
11073
|
*/
|
|
11009
11074
|
getPlayers(options?: EntityQueryOptions): Player[];
|
|
11010
11075
|
/**
|
|
11011
|
-
* @beta
|
|
11012
11076
|
* @remarks
|
|
11013
11077
|
* Returns the time of day.
|
|
11014
11078
|
*
|
|
@@ -11017,7 +11081,6 @@ export class World {
|
|
|
11017
11081
|
*/
|
|
11018
11082
|
getTimeOfDay(): number;
|
|
11019
11083
|
/**
|
|
11020
|
-
* @beta
|
|
11021
11084
|
* @remarks
|
|
11022
11085
|
* Plays a particular music track for all players.
|
|
11023
11086
|
*
|
|
@@ -11051,7 +11114,6 @@ export class World {
|
|
|
11051
11114
|
*/
|
|
11052
11115
|
playMusic(trackID: string, musicOptions?: MusicOptions): void;
|
|
11053
11116
|
/**
|
|
11054
|
-
* @beta
|
|
11055
11117
|
* @remarks
|
|
11056
11118
|
* Plays a sound for all players.
|
|
11057
11119
|
*
|
|
@@ -11089,13 +11151,14 @@ export class World {
|
|
|
11089
11151
|
*/
|
|
11090
11152
|
playSound(soundID: string, location: Vector3, soundOptions?: WorldSoundOptions): void;
|
|
11091
11153
|
/**
|
|
11092
|
-
* @beta
|
|
11093
11154
|
* @remarks
|
|
11094
11155
|
* Queues an additional music track for players. If a track is
|
|
11095
11156
|
* not playing, a music track will play.
|
|
11096
11157
|
*
|
|
11097
11158
|
* This function can't be called in read-only mode.
|
|
11098
11159
|
*
|
|
11160
|
+
* @param musicOptions
|
|
11161
|
+
* Additional options for the music track.
|
|
11099
11162
|
* @throws
|
|
11100
11163
|
* An error will be thrown if volume is less than 0.0.
|
|
11101
11164
|
* An error will be thrown if fade is less than 0.0.
|
|
@@ -11113,7 +11176,6 @@ export class World {
|
|
|
11113
11176
|
*/
|
|
11114
11177
|
removeDynamicProperty(identifier: string): boolean;
|
|
11115
11178
|
/**
|
|
11116
|
-
* @beta
|
|
11117
11179
|
* @remarks
|
|
11118
11180
|
* Sends a message to all players.
|
|
11119
11181
|
*
|
|
@@ -11152,7 +11214,6 @@ export class World {
|
|
|
11152
11214
|
*/
|
|
11153
11215
|
sendMessage(message: (RawMessage | string)[] | RawMessage | string): void;
|
|
11154
11216
|
/**
|
|
11155
|
-
* @beta
|
|
11156
11217
|
* @remarks
|
|
11157
11218
|
* Sets the world time.
|
|
11158
11219
|
*
|
|
@@ -11163,7 +11224,6 @@ export class World {
|
|
|
11163
11224
|
*/
|
|
11164
11225
|
setAbsoluteTime(absoluteTime: number): void;
|
|
11165
11226
|
/**
|
|
11166
|
-
* @beta
|
|
11167
11227
|
* @remarks
|
|
11168
11228
|
* Sets a default spawn location for all players.
|
|
11169
11229
|
*
|
|
@@ -11174,6 +11234,10 @@ export class World {
|
|
|
11174
11234
|
* within the overworld dimension.
|
|
11175
11235
|
* @throws
|
|
11176
11236
|
* Throws if the provided spawn location is out of bounds.
|
|
11237
|
+
*
|
|
11238
|
+
* {@link Error}
|
|
11239
|
+
*
|
|
11240
|
+
* {@link LocationOutOfWorldBoundariesError}
|
|
11177
11241
|
*/
|
|
11178
11242
|
setDefaultSpawnLocation(spawnLocation: Vector3): void;
|
|
11179
11243
|
/**
|
|
@@ -11245,7 +11309,6 @@ export class World {
|
|
|
11245
11309
|
*/
|
|
11246
11310
|
setDynamicProperty(identifier: string, value: boolean | number | string | Vector3): void;
|
|
11247
11311
|
/**
|
|
11248
|
-
* @beta
|
|
11249
11312
|
* @remarks
|
|
11250
11313
|
* Sets the time of day.
|
|
11251
11314
|
*
|
|
@@ -11259,7 +11322,6 @@ export class World {
|
|
|
11259
11322
|
*/
|
|
11260
11323
|
setTimeOfDay(timeOfDay: number | TimeOfDay): void;
|
|
11261
11324
|
/**
|
|
11262
|
-
* @beta
|
|
11263
11325
|
* @remarks
|
|
11264
11326
|
* Stops any music tracks from playing.
|
|
11265
11327
|
*
|
|
@@ -11270,7 +11332,6 @@ export class World {
|
|
|
11270
11332
|
}
|
|
11271
11333
|
|
|
11272
11334
|
/**
|
|
11273
|
-
* @beta
|
|
11274
11335
|
* Contains a set of events that are available across the scope
|
|
11275
11336
|
* of the World.
|
|
11276
11337
|
*/
|
|
@@ -11317,21 +11378,18 @@ export class WorldAfterEvents {
|
|
|
11317
11378
|
*/
|
|
11318
11379
|
readonly effectAdd: EffectAddAfterEventSignal;
|
|
11319
11380
|
/**
|
|
11320
|
-
* @beta
|
|
11321
11381
|
* @remarks
|
|
11322
11382
|
* This event fires when an entity dies.
|
|
11323
11383
|
*
|
|
11324
11384
|
*/
|
|
11325
11385
|
readonly entityDie: EntityDieAfterEventSignal;
|
|
11326
11386
|
/**
|
|
11327
|
-
* @beta
|
|
11328
11387
|
* @remarks
|
|
11329
11388
|
* This event fires when entity health changes in any degree.
|
|
11330
11389
|
*
|
|
11331
11390
|
*/
|
|
11332
11391
|
readonly entityHealthChanged: EntityHealthChangedAfterEventSignal;
|
|
11333
11392
|
/**
|
|
11334
|
-
* @beta
|
|
11335
11393
|
* @remarks
|
|
11336
11394
|
* This event fires when an entity hits (that is, melee
|
|
11337
11395
|
* attacks) a block.
|
|
@@ -11339,7 +11397,6 @@ export class WorldAfterEvents {
|
|
|
11339
11397
|
*/
|
|
11340
11398
|
readonly entityHitBlock: EntityHitBlockAfterEventSignal;
|
|
11341
11399
|
/**
|
|
11342
|
-
* @beta
|
|
11343
11400
|
* @remarks
|
|
11344
11401
|
* This event fires when an entity hits (that is, melee
|
|
11345
11402
|
* attacks) another entity.
|
|
@@ -11347,7 +11404,6 @@ export class WorldAfterEvents {
|
|
|
11347
11404
|
*/
|
|
11348
11405
|
readonly entityHitEntity: EntityHitEntityAfterEventSignal;
|
|
11349
11406
|
/**
|
|
11350
|
-
* @beta
|
|
11351
11407
|
* @remarks
|
|
11352
11408
|
* This event fires when an entity is hurt (takes damage).
|
|
11353
11409
|
*
|
|
@@ -11355,10 +11411,17 @@ export class WorldAfterEvents {
|
|
|
11355
11411
|
readonly entityHurt: EntityHurtAfterEventSignal;
|
|
11356
11412
|
/**
|
|
11357
11413
|
* @beta
|
|
11414
|
+
* @remarks
|
|
11415
|
+
* Fires when an entity is loaded.
|
|
11416
|
+
*
|
|
11358
11417
|
*/
|
|
11359
11418
|
readonly entityLoad: EntityLoadAfterEventSignal;
|
|
11360
11419
|
/**
|
|
11361
11420
|
* @beta
|
|
11421
|
+
* @remarks
|
|
11422
|
+
* Fires when an entity is removed (for example, potentially
|
|
11423
|
+
* unloaded, or removed after being killed).
|
|
11424
|
+
*
|
|
11362
11425
|
*/
|
|
11363
11426
|
readonly entityRemove: EntityRemoveAfterEventSignal;
|
|
11364
11427
|
/**
|
|
@@ -11376,7 +11439,6 @@ export class WorldAfterEvents {
|
|
|
11376
11439
|
*/
|
|
11377
11440
|
readonly explosion: ExplosionAfterEventSignal;
|
|
11378
11441
|
/**
|
|
11379
|
-
* @beta
|
|
11380
11442
|
* @remarks
|
|
11381
11443
|
* This event fires when a chargeable item completes charging.
|
|
11382
11444
|
*
|
|
@@ -11393,7 +11455,6 @@ export class WorldAfterEvents {
|
|
|
11393
11455
|
*/
|
|
11394
11456
|
readonly itemDefinitionEvent: ItemDefinitionAfterEventSignal;
|
|
11395
11457
|
/**
|
|
11396
|
-
* @beta
|
|
11397
11458
|
* @remarks
|
|
11398
11459
|
* This event fires when a chargeable item is released from
|
|
11399
11460
|
* charging.
|
|
@@ -11401,14 +11462,12 @@ export class WorldAfterEvents {
|
|
|
11401
11462
|
*/
|
|
11402
11463
|
readonly itemReleaseUse: ItemReleaseUseAfterEventSignal;
|
|
11403
11464
|
/**
|
|
11404
|
-
* @beta
|
|
11405
11465
|
* @remarks
|
|
11406
11466
|
* This event fires when a chargeable item starts charging.
|
|
11407
11467
|
*
|
|
11408
11468
|
*/
|
|
11409
11469
|
readonly itemStartUse: ItemStartUseAfterEventSignal;
|
|
11410
11470
|
/**
|
|
11411
|
-
* @beta
|
|
11412
11471
|
* @remarks
|
|
11413
11472
|
* This event fires when a player successfully uses an item or
|
|
11414
11473
|
* places a block by pressing the Use Item / Place Block
|
|
@@ -11419,14 +11478,12 @@ export class WorldAfterEvents {
|
|
|
11419
11478
|
*/
|
|
11420
11479
|
readonly itemStartUseOn: ItemStartUseOnAfterEventSignal;
|
|
11421
11480
|
/**
|
|
11422
|
-
* @beta
|
|
11423
11481
|
* @remarks
|
|
11424
11482
|
* This event fires when a chargeable item stops charging.
|
|
11425
11483
|
*
|
|
11426
11484
|
*/
|
|
11427
11485
|
readonly itemStopUse: ItemStopUseAfterEventSignal;
|
|
11428
11486
|
/**
|
|
11429
|
-
* @beta
|
|
11430
11487
|
* @remarks
|
|
11431
11488
|
* This event fires when a player releases the Use Item / Place
|
|
11432
11489
|
* Block button after successfully using an item. Note: This
|
|
@@ -11435,7 +11492,6 @@ export class WorldAfterEvents {
|
|
|
11435
11492
|
*/
|
|
11436
11493
|
readonly itemStopUseOn: ItemStopUseOnAfterEventSignal;
|
|
11437
11494
|
/**
|
|
11438
|
-
* @beta
|
|
11439
11495
|
* @remarks
|
|
11440
11496
|
* This event fires when an item is successfully used by a
|
|
11441
11497
|
* player.
|
|
@@ -11443,7 +11499,6 @@ export class WorldAfterEvents {
|
|
|
11443
11499
|
*/
|
|
11444
11500
|
readonly itemUse: ItemUseAfterEventSignal;
|
|
11445
11501
|
/**
|
|
11446
|
-
* @beta
|
|
11447
11502
|
* @remarks
|
|
11448
11503
|
* This event fires when an item is used on a block by a
|
|
11449
11504
|
* player.
|
|
@@ -11508,7 +11563,6 @@ export class WorldAfterEvents {
|
|
|
11508
11563
|
*/
|
|
11509
11564
|
readonly playerSpawn: PlayerSpawnAfterEventSignal;
|
|
11510
11565
|
/**
|
|
11511
|
-
* @beta
|
|
11512
11566
|
* @remarks
|
|
11513
11567
|
* A pressure plate has popped back up (i.e., there are no
|
|
11514
11568
|
* entities on the pressure plate.)
|
|
@@ -11516,7 +11570,6 @@ export class WorldAfterEvents {
|
|
|
11516
11570
|
*/
|
|
11517
11571
|
readonly pressurePlatePop: PressurePlatePopAfterEventSignal;
|
|
11518
11572
|
/**
|
|
11519
|
-
* @beta
|
|
11520
11573
|
* @remarks
|
|
11521
11574
|
* A pressure plate has pushed (at least one entity has moved
|
|
11522
11575
|
* onto a pressure plate.)
|
|
@@ -11524,28 +11577,24 @@ export class WorldAfterEvents {
|
|
|
11524
11577
|
*/
|
|
11525
11578
|
readonly pressurePlatePush: PressurePlatePushAfterEventSignal;
|
|
11526
11579
|
/**
|
|
11527
|
-
* @beta
|
|
11528
11580
|
* @remarks
|
|
11529
11581
|
* This event fires when a projectile hits a block.
|
|
11530
11582
|
*
|
|
11531
11583
|
*/
|
|
11532
11584
|
readonly projectileHitBlock: ProjectileHitBlockAfterEventSignal;
|
|
11533
11585
|
/**
|
|
11534
|
-
* @beta
|
|
11535
11586
|
* @remarks
|
|
11536
11587
|
* This event fires when a projectile hits an entity.
|
|
11537
11588
|
*
|
|
11538
11589
|
*/
|
|
11539
11590
|
readonly projectileHitEntity: ProjectileHitEntityAfterEventSignal;
|
|
11540
11591
|
/**
|
|
11541
|
-
* @beta
|
|
11542
11592
|
* @remarks
|
|
11543
11593
|
* A target block was hit.
|
|
11544
11594
|
*
|
|
11545
11595
|
*/
|
|
11546
11596
|
readonly targetBlockHit: TargetBlockHitAfterEventSignal;
|
|
11547
11597
|
/**
|
|
11548
|
-
* @beta
|
|
11549
11598
|
* @remarks
|
|
11550
11599
|
* A trip wire was tripped.
|
|
11551
11600
|
*
|
|
@@ -11571,7 +11620,6 @@ export class WorldAfterEvents {
|
|
|
11571
11620
|
}
|
|
11572
11621
|
|
|
11573
11622
|
/**
|
|
11574
|
-
* @beta
|
|
11575
11623
|
* A set of events that fire before an actual action occurs. In
|
|
11576
11624
|
* most cases, you can potentially cancel or modify the
|
|
11577
11625
|
* impending event. Note that in before events any APIs that
|
|
@@ -11599,6 +11647,10 @@ export class WorldBeforeEvents {
|
|
|
11599
11647
|
readonly dataDrivenEntityTriggerEvent: DataDrivenEntityTriggerBeforeEventSignal;
|
|
11600
11648
|
/**
|
|
11601
11649
|
* @beta
|
|
11650
|
+
* @remarks
|
|
11651
|
+
* Fires before an entity is removed from the world (for
|
|
11652
|
+
* example, unloaded or removed after being killed.)
|
|
11653
|
+
*
|
|
11602
11654
|
*/
|
|
11603
11655
|
readonly entityRemove: EntityRemoveBeforeEventSignal;
|
|
11604
11656
|
/**
|
|
@@ -11755,7 +11807,6 @@ export interface BlockFillOptions {
|
|
|
11755
11807
|
}
|
|
11756
11808
|
|
|
11757
11809
|
/**
|
|
11758
|
-
* @beta
|
|
11759
11810
|
* Contains more information for events where a block is hit.
|
|
11760
11811
|
*/
|
|
11761
11812
|
export interface BlockHitInformation {
|
|
@@ -11781,7 +11832,6 @@ export interface BlockHitInformation {
|
|
|
11781
11832
|
}
|
|
11782
11833
|
|
|
11783
11834
|
/**
|
|
11784
|
-
* @beta
|
|
11785
11835
|
* Contains information for block raycast hit results.
|
|
11786
11836
|
*/
|
|
11787
11837
|
export interface BlockRaycastHit {
|
|
@@ -11807,7 +11857,6 @@ export interface BlockRaycastHit {
|
|
|
11807
11857
|
}
|
|
11808
11858
|
|
|
11809
11859
|
/**
|
|
11810
|
-
* @beta
|
|
11811
11860
|
* Contains additional options for configuring a block raycast
|
|
11812
11861
|
* query.
|
|
11813
11862
|
*/
|
|
@@ -11918,26 +11967,64 @@ export interface BoundingBox {
|
|
|
11918
11967
|
|
|
11919
11968
|
/**
|
|
11920
11969
|
* @beta
|
|
11970
|
+
* Contains options associated with a camera ease operation.
|
|
11921
11971
|
*/
|
|
11922
11972
|
export interface CameraEaseOptions {
|
|
11973
|
+
/**
|
|
11974
|
+
* @remarks
|
|
11975
|
+
* Time for the ease operation.
|
|
11976
|
+
*
|
|
11977
|
+
*/
|
|
11923
11978
|
easeTime?: number;
|
|
11979
|
+
/**
|
|
11980
|
+
* @remarks
|
|
11981
|
+
* Type of ease operation to use.
|
|
11982
|
+
*
|
|
11983
|
+
*/
|
|
11924
11984
|
easeType?: EasingType;
|
|
11925
11985
|
}
|
|
11926
11986
|
|
|
11927
11987
|
/**
|
|
11928
11988
|
* @beta
|
|
11989
|
+
* Used to initiate a full-screen color fade.
|
|
11929
11990
|
*/
|
|
11930
11991
|
export interface CameraFadeOptions {
|
|
11992
|
+
/**
|
|
11993
|
+
* @remarks
|
|
11994
|
+
* Fade color to use.
|
|
11995
|
+
*
|
|
11996
|
+
*/
|
|
11931
11997
|
fadeColor?: RGB;
|
|
11998
|
+
/**
|
|
11999
|
+
* @remarks
|
|
12000
|
+
* Time in seconds for the fade-in, hold, and fade-out seconds.
|
|
12001
|
+
*
|
|
12002
|
+
*/
|
|
11932
12003
|
fadeTime?: CameraFadeTimeOptions;
|
|
11933
12004
|
}
|
|
11934
12005
|
|
|
11935
12006
|
/**
|
|
11936
12007
|
* @beta
|
|
12008
|
+
* Contains timings for a fade transition.
|
|
11937
12009
|
*/
|
|
11938
12010
|
export interface CameraFadeTimeOptions {
|
|
12011
|
+
/**
|
|
12012
|
+
* @remarks
|
|
12013
|
+
* Time, in seconds, for a fade-in.
|
|
12014
|
+
*
|
|
12015
|
+
*/
|
|
11939
12016
|
fadeInTime: number;
|
|
12017
|
+
/**
|
|
12018
|
+
* @remarks
|
|
12019
|
+
* Time, in seconds, for a fade-out.
|
|
12020
|
+
*
|
|
12021
|
+
*/
|
|
11940
12022
|
fadeOutTime: number;
|
|
12023
|
+
/**
|
|
12024
|
+
* @remarks
|
|
12025
|
+
* Time, in seconds, to hold the full screen color.
|
|
12026
|
+
*
|
|
12027
|
+
*/
|
|
11941
12028
|
holdTime: number;
|
|
11942
12029
|
}
|
|
11943
12030
|
|
|
@@ -11976,7 +12063,6 @@ export interface CompoundBlockVolumeItem {
|
|
|
11976
12063
|
}
|
|
11977
12064
|
|
|
11978
12065
|
/**
|
|
11979
|
-
* @beta
|
|
11980
12066
|
* An exact coordinate within the world, including its
|
|
11981
12067
|
* dimension and location.
|
|
11982
12068
|
*/
|
|
@@ -12008,7 +12094,6 @@ export interface DimensionLocation {
|
|
|
12008
12094
|
}
|
|
12009
12095
|
|
|
12010
12096
|
/**
|
|
12011
|
-
* @beta
|
|
12012
12097
|
* Additional options for when damage has been applied via a
|
|
12013
12098
|
* projectile.
|
|
12014
12099
|
*/
|
|
@@ -12028,7 +12113,6 @@ export interface EntityApplyDamageByProjectileOptions {
|
|
|
12028
12113
|
}
|
|
12029
12114
|
|
|
12030
12115
|
/**
|
|
12031
|
-
* @beta
|
|
12032
12116
|
* Additional descriptions and metadata for a damage event.
|
|
12033
12117
|
*/
|
|
12034
12118
|
export interface EntityApplyDamageOptions {
|
|
@@ -12047,7 +12131,6 @@ export interface EntityApplyDamageOptions {
|
|
|
12047
12131
|
}
|
|
12048
12132
|
|
|
12049
12133
|
/**
|
|
12050
|
-
* @beta
|
|
12051
12134
|
* Provides information about how damage has been applied to an
|
|
12052
12135
|
* entity.
|
|
12053
12136
|
*/
|
|
@@ -12103,7 +12186,6 @@ export interface EntityDataDrivenTriggerEventOptions {
|
|
|
12103
12186
|
}
|
|
12104
12187
|
|
|
12105
12188
|
/**
|
|
12106
|
-
* @beta
|
|
12107
12189
|
* Contains additional options for entity effects.
|
|
12108
12190
|
*/
|
|
12109
12191
|
export interface EntityEffectOptions {
|
|
@@ -12122,7 +12204,6 @@ export interface EntityEffectOptions {
|
|
|
12122
12204
|
}
|
|
12123
12205
|
|
|
12124
12206
|
/**
|
|
12125
|
-
* @beta
|
|
12126
12207
|
* Contains optional parameters for registering an entity
|
|
12127
12208
|
* event.
|
|
12128
12209
|
*/
|
|
@@ -12144,7 +12225,6 @@ export interface EntityEventOptions {
|
|
|
12144
12225
|
}
|
|
12145
12226
|
|
|
12146
12227
|
/**
|
|
12147
|
-
* @beta
|
|
12148
12228
|
* Contains additional information about an entity that was
|
|
12149
12229
|
* hit.
|
|
12150
12230
|
*/
|
|
@@ -12158,7 +12238,6 @@ export interface EntityHitInformation {
|
|
|
12158
12238
|
}
|
|
12159
12239
|
|
|
12160
12240
|
/**
|
|
12161
|
-
* @beta
|
|
12162
12241
|
* Contains options for selecting entities within an area.
|
|
12163
12242
|
*/
|
|
12164
12243
|
export interface EntityQueryOptions {
|
|
@@ -12329,7 +12408,6 @@ export interface EntityQueryOptions {
|
|
|
12329
12408
|
}
|
|
12330
12409
|
|
|
12331
12410
|
/**
|
|
12332
|
-
* @beta
|
|
12333
12411
|
* Contains additional options for filtering players based on
|
|
12334
12412
|
* their score for an objective.
|
|
12335
12413
|
*/
|
|
@@ -12364,7 +12442,6 @@ export interface EntityQueryScoreOptions {
|
|
|
12364
12442
|
}
|
|
12365
12443
|
|
|
12366
12444
|
/**
|
|
12367
|
-
* @beta
|
|
12368
12445
|
* Contains information for entity raycast hit results.
|
|
12369
12446
|
*/
|
|
12370
12447
|
export interface EntityRaycastHit {
|
|
@@ -12383,7 +12460,6 @@ export interface EntityRaycastHit {
|
|
|
12383
12460
|
}
|
|
12384
12461
|
|
|
12385
12462
|
/**
|
|
12386
|
-
* @beta
|
|
12387
12463
|
* Contains additional options for an entity raycast operation.
|
|
12388
12464
|
*/
|
|
12389
12465
|
export interface EntityRaycastOptions {
|
|
@@ -12430,7 +12506,6 @@ export interface ExplosionOptions {
|
|
|
12430
12506
|
}
|
|
12431
12507
|
|
|
12432
12508
|
/**
|
|
12433
|
-
* @beta
|
|
12434
12509
|
* Additional configuration options for {@link
|
|
12435
12510
|
* World.playMusic}/{@link World.queueMusic} methods.
|
|
12436
12511
|
*/
|
|
@@ -12509,7 +12584,6 @@ export interface PlayAnimationOptions {
|
|
|
12509
12584
|
}
|
|
12510
12585
|
|
|
12511
12586
|
/**
|
|
12512
|
-
* @beta
|
|
12513
12587
|
* Additional options for how a sound plays for a player.
|
|
12514
12588
|
*/
|
|
12515
12589
|
export interface PlayerSoundOptions {
|
|
@@ -12535,7 +12609,6 @@ export interface PlayerSoundOptions {
|
|
|
12535
12609
|
}
|
|
12536
12610
|
|
|
12537
12611
|
/**
|
|
12538
|
-
* @beta
|
|
12539
12612
|
* Defines a JSON structure that is used for more flexible.
|
|
12540
12613
|
*/
|
|
12541
12614
|
export interface RawMessage {
|
|
@@ -12577,7 +12650,6 @@ export interface RawMessage {
|
|
|
12577
12650
|
}
|
|
12578
12651
|
|
|
12579
12652
|
/**
|
|
12580
|
-
* @beta
|
|
12581
12653
|
* Provides a description of a score token to use within a raw
|
|
12582
12654
|
* message.
|
|
12583
12655
|
*/
|
|
@@ -12614,7 +12686,6 @@ export interface RawText {
|
|
|
12614
12686
|
}
|
|
12615
12687
|
|
|
12616
12688
|
/**
|
|
12617
|
-
* @beta
|
|
12618
12689
|
* Represents a fully customizable color within Minecraft.
|
|
12619
12690
|
*/
|
|
12620
12691
|
export interface RGB {
|
|
@@ -12642,7 +12713,6 @@ export interface RGB {
|
|
|
12642
12713
|
}
|
|
12643
12714
|
|
|
12644
12715
|
/**
|
|
12645
|
-
* @beta
|
|
12646
12716
|
* Represents a fully customizable color within Minecraft.
|
|
12647
12717
|
*/
|
|
12648
12718
|
export interface RGBA {
|
|
@@ -12677,7 +12747,6 @@ export interface RGBA {
|
|
|
12677
12747
|
}
|
|
12678
12748
|
|
|
12679
12749
|
/**
|
|
12680
|
-
* @beta
|
|
12681
12750
|
* Contains additional options for how a scoreboard should be
|
|
12682
12751
|
* displayed within its display slot.
|
|
12683
12752
|
*/
|
|
@@ -12739,7 +12808,6 @@ export interface ScriptCameraSetRotOptions {
|
|
|
12739
12808
|
}
|
|
12740
12809
|
|
|
12741
12810
|
/**
|
|
12742
|
-
* @beta
|
|
12743
12811
|
* Contains additional options for registering a script event
|
|
12744
12812
|
* event callback.
|
|
12745
12813
|
*/
|
|
@@ -12754,7 +12822,6 @@ export interface ScriptEventMessageFilterOptions {
|
|
|
12754
12822
|
}
|
|
12755
12823
|
|
|
12756
12824
|
/**
|
|
12757
|
-
* @beta
|
|
12758
12825
|
* Contains additional options for teleporting an entity.
|
|
12759
12826
|
*/
|
|
12760
12827
|
export interface TeleportOptions {
|
|
@@ -12794,7 +12861,6 @@ export interface TeleportOptions {
|
|
|
12794
12861
|
}
|
|
12795
12862
|
|
|
12796
12863
|
/**
|
|
12797
|
-
* @beta
|
|
12798
12864
|
* Contains additional options for displaying a title and
|
|
12799
12865
|
* optional subtitle.
|
|
12800
12866
|
*/
|
|
@@ -12833,7 +12899,6 @@ export interface TitleDisplayOptions {
|
|
|
12833
12899
|
}
|
|
12834
12900
|
|
|
12835
12901
|
/**
|
|
12836
|
-
* @beta
|
|
12837
12902
|
* Represents a two-directional vector.
|
|
12838
12903
|
*/
|
|
12839
12904
|
export interface Vector2 {
|
|
@@ -12852,7 +12917,6 @@ export interface Vector2 {
|
|
|
12852
12917
|
}
|
|
12853
12918
|
|
|
12854
12919
|
/**
|
|
12855
|
-
* @beta
|
|
12856
12920
|
* Contains a description of a vector.
|
|
12857
12921
|
*/
|
|
12858
12922
|
export interface Vector3 {
|
|
@@ -12877,7 +12941,6 @@ export interface Vector3 {
|
|
|
12877
12941
|
}
|
|
12878
12942
|
|
|
12879
12943
|
/**
|
|
12880
|
-
* @beta
|
|
12881
12944
|
* Contains additional options for a world-level playSound
|
|
12882
12945
|
* occurrence.
|
|
12883
12946
|
*/
|
|
@@ -12896,25 +12959,16 @@ export interface WorldSoundOptions {
|
|
|
12896
12959
|
volume?: number;
|
|
12897
12960
|
}
|
|
12898
12961
|
|
|
12899
|
-
/**
|
|
12900
|
-
* @beta
|
|
12901
|
-
*/
|
|
12902
12962
|
// @ts-ignore Class inheritance allowed for native defined classes
|
|
12903
12963
|
export class CommandError extends Error {
|
|
12904
12964
|
private constructor();
|
|
12905
12965
|
}
|
|
12906
12966
|
|
|
12907
|
-
/**
|
|
12908
|
-
* @beta
|
|
12909
|
-
*/
|
|
12910
12967
|
// @ts-ignore Class inheritance allowed for native defined classes
|
|
12911
12968
|
export class LocationInUnloadedChunkError extends Error {
|
|
12912
12969
|
private constructor();
|
|
12913
12970
|
}
|
|
12914
12971
|
|
|
12915
|
-
/**
|
|
12916
|
-
* @beta
|
|
12917
|
-
*/
|
|
12918
12972
|
// @ts-ignore Class inheritance allowed for native defined classes
|
|
12919
12973
|
export class LocationOutOfWorldBoundariesError extends Error {
|
|
12920
12974
|
private constructor();
|