@minecraft/server 1.4.0-rc.1.20.40-preview.20 → 1.4.0
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 +78 -279
- 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,53 +15,46 @@
|
|
|
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
|
*
|
|
23
22
|
*/
|
|
24
23
|
/**
|
|
25
|
-
* @beta
|
|
26
24
|
* A general purpose relative direction enumeration.
|
|
27
25
|
*/
|
|
28
26
|
export enum Direction {
|
|
29
27
|
/**
|
|
30
|
-
* @beta
|
|
31
28
|
* @remarks
|
|
32
29
|
* Returns the block beneath (y - 1) of this item.
|
|
33
30
|
*
|
|
34
31
|
*/
|
|
35
32
|
Down = 'Down',
|
|
36
33
|
/**
|
|
37
|
-
* @beta
|
|
38
34
|
* @remarks
|
|
39
35
|
* Returns the block to the east (x + 1) of this item.
|
|
40
36
|
*
|
|
41
37
|
*/
|
|
42
38
|
East = 'East',
|
|
43
39
|
/**
|
|
44
|
-
* @beta
|
|
45
40
|
* @remarks
|
|
46
41
|
* Returns the block to the east (z + 1) of this item.
|
|
47
42
|
*
|
|
48
43
|
*/
|
|
49
44
|
North = 'North',
|
|
50
45
|
/**
|
|
51
|
-
* @beta
|
|
52
46
|
* @remarks
|
|
53
47
|
* Returns the block to the south (z - 1) of this item.
|
|
54
48
|
*
|
|
55
49
|
*/
|
|
56
50
|
South = 'South',
|
|
57
51
|
/**
|
|
58
|
-
* @beta
|
|
59
52
|
* @remarks
|
|
60
53
|
* Returns the block above (y + 1) of this item.
|
|
61
54
|
*
|
|
62
55
|
*/
|
|
63
56
|
Up = 'Up',
|
|
64
57
|
/**
|
|
65
|
-
* @beta
|
|
66
58
|
* @remarks
|
|
67
59
|
* Returns the block to the west (x - 1) of this item.
|
|
68
60
|
*
|
|
@@ -71,17 +63,29 @@ export enum Direction {
|
|
|
71
63
|
}
|
|
72
64
|
|
|
73
65
|
/**
|
|
74
|
-
*
|
|
66
|
+
* Specifies a mechanism for displaying scores on a scoreboard.
|
|
75
67
|
*/
|
|
76
68
|
export enum DisplaySlotId {
|
|
69
|
+
/**
|
|
70
|
+
* @remarks
|
|
71
|
+
* Displays the score below the player's name.
|
|
72
|
+
*
|
|
73
|
+
*/
|
|
77
74
|
BelowName = 'BelowName',
|
|
75
|
+
/**
|
|
76
|
+
* @remarks
|
|
77
|
+
* Displays the score as a list on the pause screen.
|
|
78
|
+
*
|
|
79
|
+
*/
|
|
78
80
|
List = 'List',
|
|
81
|
+
/**
|
|
82
|
+
* @remarks
|
|
83
|
+
* Displays the score on the side of the player's screen.
|
|
84
|
+
*
|
|
85
|
+
*/
|
|
79
86
|
Sidebar = 'Sidebar',
|
|
80
87
|
}
|
|
81
88
|
|
|
82
|
-
/**
|
|
83
|
-
* @beta
|
|
84
|
-
*/
|
|
85
89
|
export enum EntityDamageCause {
|
|
86
90
|
anvil = 'anvil',
|
|
87
91
|
blockExplosion = 'blockExplosion',
|
|
@@ -117,12 +121,10 @@ export enum EntityDamageCause {
|
|
|
117
121
|
}
|
|
118
122
|
|
|
119
123
|
/**
|
|
120
|
-
* @beta
|
|
121
124
|
* Represents a game mode for the current world experience.
|
|
122
125
|
*/
|
|
123
126
|
export enum GameMode {
|
|
124
127
|
/**
|
|
125
|
-
* @beta
|
|
126
128
|
* @remarks
|
|
127
129
|
* World is in a more locked-down experience, where blocks may
|
|
128
130
|
* not be manipulated.
|
|
@@ -130,7 +132,6 @@ export enum GameMode {
|
|
|
130
132
|
*/
|
|
131
133
|
adventure = 'adventure',
|
|
132
134
|
/**
|
|
133
|
-
* @beta
|
|
134
135
|
* @remarks
|
|
135
136
|
* World is in a full creative mode. In creative mode, the
|
|
136
137
|
* player has all the resources available in the item selection
|
|
@@ -143,7 +144,6 @@ export enum GameMode {
|
|
|
143
144
|
*/
|
|
144
145
|
creative = 'creative',
|
|
145
146
|
/**
|
|
146
|
-
* @beta
|
|
147
147
|
* @remarks
|
|
148
148
|
* World is in spectator mode. In spectator mode, spectators
|
|
149
149
|
* are always flying and cannot become grounded. Spectators can
|
|
@@ -156,7 +156,6 @@ export enum GameMode {
|
|
|
156
156
|
*/
|
|
157
157
|
spectator = 'spectator',
|
|
158
158
|
/**
|
|
159
|
-
* @beta
|
|
160
159
|
* @remarks
|
|
161
160
|
* World is in a survival mode, where players can take damage
|
|
162
161
|
* and entities may not be peaceful. Survival mode is where the
|
|
@@ -169,26 +168,22 @@ export enum GameMode {
|
|
|
169
168
|
}
|
|
170
169
|
|
|
171
170
|
/**
|
|
172
|
-
* @beta
|
|
173
171
|
* Describes how an an item can be moved within a container.
|
|
174
172
|
*/
|
|
175
173
|
export enum ItemLockMode {
|
|
176
174
|
/**
|
|
177
|
-
* @beta
|
|
178
175
|
* @remarks
|
|
179
176
|
* The item cannot be dropped or crafted with.
|
|
180
177
|
*
|
|
181
178
|
*/
|
|
182
179
|
inventory = 'inventory',
|
|
183
180
|
/**
|
|
184
|
-
* @beta
|
|
185
181
|
* @remarks
|
|
186
182
|
* The item has no container restrictions.
|
|
187
183
|
*
|
|
188
184
|
*/
|
|
189
185
|
none = 'none',
|
|
190
186
|
/**
|
|
191
|
-
* @beta
|
|
192
187
|
* @remarks
|
|
193
188
|
* The item cannot be moved from its slot, dropped or crafted
|
|
194
189
|
* with.
|
|
@@ -198,13 +193,11 @@ export enum ItemLockMode {
|
|
|
198
193
|
}
|
|
199
194
|
|
|
200
195
|
/**
|
|
201
|
-
* @beta
|
|
202
196
|
* Used for specifying a sort order for how to display an
|
|
203
197
|
* objective and its list of participants.
|
|
204
198
|
*/
|
|
205
199
|
export enum ObjectiveSortOrder {
|
|
206
200
|
/**
|
|
207
|
-
* @beta
|
|
208
201
|
* @remarks
|
|
209
202
|
* Objective participant list is displayed in ascending (e.g.,
|
|
210
203
|
* A-Z) order.
|
|
@@ -212,7 +205,6 @@ export enum ObjectiveSortOrder {
|
|
|
212
205
|
*/
|
|
213
206
|
Ascending = 0,
|
|
214
207
|
/**
|
|
215
|
-
* @beta
|
|
216
208
|
* @remarks
|
|
217
209
|
* Objective participant list is displayed in descending (e.g.,
|
|
218
210
|
* Z-A) order.
|
|
@@ -222,19 +214,16 @@ export enum ObjectiveSortOrder {
|
|
|
222
214
|
}
|
|
223
215
|
|
|
224
216
|
/**
|
|
225
|
-
* @beta
|
|
226
217
|
* Contains objectives and participants for the scoreboard.
|
|
227
218
|
*/
|
|
228
219
|
export enum ScoreboardIdentityType {
|
|
229
220
|
/**
|
|
230
|
-
* @beta
|
|
231
221
|
* @remarks
|
|
232
222
|
* This scoreboard participant is tied to an entity.
|
|
233
223
|
*
|
|
234
224
|
*/
|
|
235
225
|
Entity = 'Entity',
|
|
236
226
|
/**
|
|
237
|
-
* @beta
|
|
238
227
|
* @remarks
|
|
239
228
|
* This scoreboard participant is tied to a pseudo player
|
|
240
229
|
* entity - typically this is used to store scores as data or
|
|
@@ -243,7 +232,6 @@ export enum ScoreboardIdentityType {
|
|
|
243
232
|
*/
|
|
244
233
|
FakePlayer = 'FakePlayer',
|
|
245
234
|
/**
|
|
246
|
-
* @beta
|
|
247
235
|
* @remarks
|
|
248
236
|
* This scoreboard participant is tied to a player.
|
|
249
237
|
*
|
|
@@ -252,12 +240,10 @@ export enum ScoreboardIdentityType {
|
|
|
252
240
|
}
|
|
253
241
|
|
|
254
242
|
/**
|
|
255
|
-
* @beta
|
|
256
243
|
* Describes where the script event originated from.
|
|
257
244
|
*/
|
|
258
245
|
export enum ScriptEventSource {
|
|
259
246
|
/**
|
|
260
|
-
* @beta
|
|
261
247
|
* @remarks
|
|
262
248
|
* The script event originated from a Block such as a Command
|
|
263
249
|
* Block.
|
|
@@ -265,7 +251,6 @@ export enum ScriptEventSource {
|
|
|
265
251
|
*/
|
|
266
252
|
Block = 'Block',
|
|
267
253
|
/**
|
|
268
|
-
* @beta
|
|
269
254
|
* @remarks
|
|
270
255
|
* The script event originated from an Entity such as a Player,
|
|
271
256
|
* Command Block Minecart or Animation Controller.
|
|
@@ -273,14 +258,12 @@ export enum ScriptEventSource {
|
|
|
273
258
|
*/
|
|
274
259
|
Entity = 'Entity',
|
|
275
260
|
/**
|
|
276
|
-
* @beta
|
|
277
261
|
* @remarks
|
|
278
262
|
* The script event originated from an NPC dialogue.
|
|
279
263
|
*
|
|
280
264
|
*/
|
|
281
265
|
NPCDialogue = 'NPCDialogue',
|
|
282
266
|
/**
|
|
283
|
-
* @beta
|
|
284
267
|
* @remarks
|
|
285
268
|
* The script event originated from the server, such as from a
|
|
286
269
|
* runCommand API call or a dedicated server console.
|
|
@@ -290,7 +273,6 @@ export enum ScriptEventSource {
|
|
|
290
273
|
}
|
|
291
274
|
|
|
292
275
|
/**
|
|
293
|
-
* @beta
|
|
294
276
|
* Provides numeric values for common periods in the Minecraft
|
|
295
277
|
* day.
|
|
296
278
|
*/
|
|
@@ -304,7 +286,6 @@ export enum TimeOfDay {
|
|
|
304
286
|
}
|
|
305
287
|
|
|
306
288
|
/**
|
|
307
|
-
* @beta
|
|
308
289
|
* Represents a block in a dimension. A block represents a
|
|
309
290
|
* unique X, Y, and Z within a dimension and get/sets the state
|
|
310
291
|
* of the block at that location. This type was significantly
|
|
@@ -331,6 +312,10 @@ export class Block {
|
|
|
331
312
|
* block.
|
|
332
313
|
*
|
|
333
314
|
* @throws This property can throw when used.
|
|
315
|
+
*
|
|
316
|
+
* {@link LocationInUnloadedChunkError}
|
|
317
|
+
*
|
|
318
|
+
* {@link LocationOutOfWorldBoundariesError}
|
|
334
319
|
*/
|
|
335
320
|
readonly permutation: BlockPermutation;
|
|
336
321
|
/**
|
|
@@ -352,7 +337,6 @@ export class Block {
|
|
|
352
337
|
*/
|
|
353
338
|
readonly z: number;
|
|
354
339
|
/**
|
|
355
|
-
* @beta
|
|
356
340
|
* @remarks
|
|
357
341
|
* Gets additional configuration properties (a component) for
|
|
358
342
|
* specific capabilities of particular blocks - for example, an
|
|
@@ -365,10 +349,13 @@ export class Block {
|
|
|
365
349
|
* Returns the component object if it is present on the
|
|
366
350
|
* particular block.
|
|
367
351
|
* @throws This function can throw errors.
|
|
352
|
+
*
|
|
353
|
+
* {@link LocationInUnloadedChunkError}
|
|
354
|
+
*
|
|
355
|
+
* {@link LocationOutOfWorldBoundariesError}
|
|
368
356
|
*/
|
|
369
357
|
getComponent(componentName: string): BlockComponent | undefined;
|
|
370
358
|
/**
|
|
371
|
-
* @beta
|
|
372
359
|
* @remarks
|
|
373
360
|
* Returns true if this reference to a block is still valid
|
|
374
361
|
* (for example, if the block is unloaded, references to that
|
|
@@ -389,19 +376,21 @@ export class Block {
|
|
|
389
376
|
* Permutation that contains a set of property states for the
|
|
390
377
|
* Block.
|
|
391
378
|
* @throws This function can throw errors.
|
|
379
|
+
*
|
|
380
|
+
* {@link LocationInUnloadedChunkError}
|
|
381
|
+
*
|
|
382
|
+
* {@link LocationOutOfWorldBoundariesError}
|
|
392
383
|
*/
|
|
393
384
|
setPermutation(permutation: BlockPermutation): void;
|
|
394
385
|
}
|
|
395
386
|
|
|
396
387
|
/**
|
|
397
|
-
* @beta
|
|
398
388
|
* Base type for components associated with blocks.
|
|
399
389
|
*/
|
|
400
390
|
// @ts-ignore Class inheritance allowed for native defined classes
|
|
401
391
|
export class BlockComponent extends Component {
|
|
402
392
|
private constructor();
|
|
403
393
|
/**
|
|
404
|
-
* @beta
|
|
405
394
|
* @remarks
|
|
406
395
|
* Block instance that this component pertains to.
|
|
407
396
|
*
|
|
@@ -410,7 +399,6 @@ export class BlockComponent extends Component {
|
|
|
410
399
|
}
|
|
411
400
|
|
|
412
401
|
/**
|
|
413
|
-
* @beta
|
|
414
402
|
* Contains information regarding an event that impacts a
|
|
415
403
|
* specific block.
|
|
416
404
|
*/
|
|
@@ -432,7 +420,6 @@ export class BlockEvent {
|
|
|
432
420
|
}
|
|
433
421
|
|
|
434
422
|
/**
|
|
435
|
-
* @beta
|
|
436
423
|
* Represents the inventory of a block in the world. Used with
|
|
437
424
|
* blocks like chests.
|
|
438
425
|
*/
|
|
@@ -450,7 +437,6 @@ export class BlockInventoryComponent extends BlockComponent {
|
|
|
450
437
|
}
|
|
451
438
|
|
|
452
439
|
/**
|
|
453
|
-
* @beta
|
|
454
440
|
* Contains the combination of type {@link BlockType} and
|
|
455
441
|
* properties (also sometimes called block state) which
|
|
456
442
|
* describe a block (but does not belong to a specific {@link
|
|
@@ -522,7 +508,6 @@ export class BlockPermutation {
|
|
|
522
508
|
}
|
|
523
509
|
|
|
524
510
|
/**
|
|
525
|
-
* @beta
|
|
526
511
|
* Contains information related to changes to a button push.
|
|
527
512
|
*/
|
|
528
513
|
// @ts-ignore Class inheritance allowed for native defined classes
|
|
@@ -537,7 +522,6 @@ export class ButtonPushAfterEvent extends BlockEvent {
|
|
|
537
522
|
}
|
|
538
523
|
|
|
539
524
|
/**
|
|
540
|
-
* @beta
|
|
541
525
|
* Manages callbacks that are connected to when a button is
|
|
542
526
|
* pushed.
|
|
543
527
|
*/
|
|
@@ -562,7 +546,6 @@ export class CommandResult {
|
|
|
562
546
|
}
|
|
563
547
|
|
|
564
548
|
/**
|
|
565
|
-
* @beta
|
|
566
549
|
* Base class for downstream Component implementations.
|
|
567
550
|
*/
|
|
568
551
|
export class Component {
|
|
@@ -574,7 +557,6 @@ export class Component {
|
|
|
574
557
|
*/
|
|
575
558
|
readonly typeId: string;
|
|
576
559
|
/**
|
|
577
|
-
* @beta
|
|
578
560
|
* @remarks
|
|
579
561
|
* Returns whether the component is valid. A component is
|
|
580
562
|
* considered valid if its owner is valid, in addition to any
|
|
@@ -588,7 +570,6 @@ export class Component {
|
|
|
588
570
|
}
|
|
589
571
|
|
|
590
572
|
/**
|
|
591
|
-
* @beta
|
|
592
573
|
* Represents a container that can hold sets of items. Used
|
|
593
574
|
* with entities such as Players, Chest Minecarts, Llamas, and
|
|
594
575
|
* more.
|
|
@@ -660,7 +641,6 @@ export class Container {
|
|
|
660
641
|
*/
|
|
661
642
|
getItem(slot: number): ItemStack | undefined;
|
|
662
643
|
/**
|
|
663
|
-
* @beta
|
|
664
644
|
* @remarks
|
|
665
645
|
* Returns whether a container object (or the entity or block
|
|
666
646
|
* that this container is associated with) is still available
|
|
@@ -776,7 +756,6 @@ export class Dimension {
|
|
|
776
756
|
*/
|
|
777
757
|
readonly id: string;
|
|
778
758
|
/**
|
|
779
|
-
* @beta
|
|
780
759
|
* @remarks
|
|
781
760
|
* Returns a block instance at the given location.
|
|
782
761
|
*
|
|
@@ -794,10 +773,13 @@ export class Dimension {
|
|
|
794
773
|
* trying to interact with a position outside of dimension
|
|
795
774
|
* height range
|
|
796
775
|
*
|
|
776
|
+
*
|
|
777
|
+
* {@link LocationInUnloadedChunkError}
|
|
778
|
+
*
|
|
779
|
+
* {@link LocationOutOfWorldBoundariesError}
|
|
797
780
|
*/
|
|
798
781
|
getBlock(location: Vector3): Block | undefined;
|
|
799
782
|
/**
|
|
800
|
-
* @beta
|
|
801
783
|
* @remarks
|
|
802
784
|
* Gets the first block that intersects with a vector emanating
|
|
803
785
|
* from a location.
|
|
@@ -811,7 +793,6 @@ export class Dimension {
|
|
|
811
793
|
*/
|
|
812
794
|
getBlockFromRay(location: Vector3, direction: Vector3, options?: BlockRaycastOptions): BlockRaycastHit | undefined;
|
|
813
795
|
/**
|
|
814
|
-
* @beta
|
|
815
796
|
* @remarks
|
|
816
797
|
* Returns a set of entities based on a set of conditions
|
|
817
798
|
* defined via the EntityQueryOptions set of filter criteria.
|
|
@@ -880,7 +861,6 @@ export class Dimension {
|
|
|
880
861
|
*/
|
|
881
862
|
getEntities(options?: EntityQueryOptions): Entity[];
|
|
882
863
|
/**
|
|
883
|
-
* @beta
|
|
884
864
|
* @remarks
|
|
885
865
|
* Returns a set of entities at a particular location.
|
|
886
866
|
*
|
|
@@ -891,7 +871,6 @@ export class Dimension {
|
|
|
891
871
|
*/
|
|
892
872
|
getEntitiesAtBlockLocation(location: Vector3): Entity[];
|
|
893
873
|
/**
|
|
894
|
-
* @beta
|
|
895
874
|
* @remarks
|
|
896
875
|
* Gets entities that intersect with a specified vector
|
|
897
876
|
* emanating from a location.
|
|
@@ -901,7 +880,6 @@ export class Dimension {
|
|
|
901
880
|
*/
|
|
902
881
|
getEntitiesFromRay(location: Vector3, direction: Vector3, options?: EntityRaycastOptions): EntityRaycastHit[];
|
|
903
882
|
/**
|
|
904
|
-
* @beta
|
|
905
883
|
* @remarks
|
|
906
884
|
* Returns a set of players based on a set of conditions
|
|
907
885
|
* defined via the EntityQueryOptions set of filter criteria.
|
|
@@ -915,7 +893,6 @@ export class Dimension {
|
|
|
915
893
|
*/
|
|
916
894
|
getPlayers(options?: EntityQueryOptions): Player[];
|
|
917
895
|
/**
|
|
918
|
-
* @beta
|
|
919
896
|
* @remarks
|
|
920
897
|
* Runs a command synchronously using the context of the
|
|
921
898
|
* broader dimenion.
|
|
@@ -934,6 +911,8 @@ export class Dimension {
|
|
|
934
911
|
* command. Note that in many cases, if the command does not
|
|
935
912
|
* operate (e.g., a target selector found no matches), this
|
|
936
913
|
* method will not throw an exception.
|
|
914
|
+
*
|
|
915
|
+
* {@link CommandError}
|
|
937
916
|
*/
|
|
938
917
|
runCommand(commandString: string): CommandResult;
|
|
939
918
|
/**
|
|
@@ -958,7 +937,6 @@ export class Dimension {
|
|
|
958
937
|
*/
|
|
959
938
|
runCommandAsync(commandString: string): Promise<CommandResult>;
|
|
960
939
|
/**
|
|
961
|
-
* @beta
|
|
962
940
|
* @remarks
|
|
963
941
|
* Creates a new entity (e.g., a mob) at the specified
|
|
964
942
|
* location.
|
|
@@ -973,6 +951,10 @@ export class Dimension {
|
|
|
973
951
|
* @returns
|
|
974
952
|
* Newly created entity at the specified location.
|
|
975
953
|
* @throws This function can throw errors.
|
|
954
|
+
*
|
|
955
|
+
* {@link LocationInUnloadedChunkError}
|
|
956
|
+
*
|
|
957
|
+
* {@link LocationOutOfWorldBoundariesError}
|
|
976
958
|
* @example createOldHorse.ts
|
|
977
959
|
* ```typescript
|
|
978
960
|
* const overworld = mc.world.getDimension("overworld");
|
|
@@ -1015,7 +997,6 @@ export class Dimension {
|
|
|
1015
997
|
*/
|
|
1016
998
|
spawnEntity(identifier: string, location: Vector3): Entity;
|
|
1017
999
|
/**
|
|
1018
|
-
* @beta
|
|
1019
1000
|
* @remarks
|
|
1020
1001
|
* Creates a new item stack as an entity at the specified
|
|
1021
1002
|
* location.
|
|
@@ -1027,6 +1008,10 @@ export class Dimension {
|
|
|
1027
1008
|
* @returns
|
|
1028
1009
|
* Newly created item stack entity at the specified location.
|
|
1029
1010
|
* @throws This function can throw errors.
|
|
1011
|
+
*
|
|
1012
|
+
* {@link LocationInUnloadedChunkError}
|
|
1013
|
+
*
|
|
1014
|
+
* {@link LocationOutOfWorldBoundariesError}
|
|
1030
1015
|
* @example itemStacks.ts
|
|
1031
1016
|
* ```typescript
|
|
1032
1017
|
* const overworld = mc.world.getDimension('overworld');
|
|
@@ -1060,7 +1045,6 @@ export class Dimension {
|
|
|
1060
1045
|
}
|
|
1061
1046
|
|
|
1062
1047
|
/**
|
|
1063
|
-
* @beta
|
|
1064
1048
|
* Represents an effect - like poison - that has been added to
|
|
1065
1049
|
* an Entity.
|
|
1066
1050
|
*/
|
|
@@ -1109,7 +1093,6 @@ export class Effect {
|
|
|
1109
1093
|
}
|
|
1110
1094
|
|
|
1111
1095
|
/**
|
|
1112
|
-
* @beta
|
|
1113
1096
|
* Represents a type of effect - like poison - that can be
|
|
1114
1097
|
* applied to an entity.
|
|
1115
1098
|
*/
|
|
@@ -1132,7 +1115,6 @@ export class EffectType {
|
|
|
1132
1115
|
export class Entity {
|
|
1133
1116
|
private constructor();
|
|
1134
1117
|
/**
|
|
1135
|
-
* @beta
|
|
1136
1118
|
* @remarks
|
|
1137
1119
|
* Dimension that the entity is currently within.
|
|
1138
1120
|
*
|
|
@@ -1151,7 +1133,6 @@ export class Entity {
|
|
|
1151
1133
|
*/
|
|
1152
1134
|
readonly id: string;
|
|
1153
1135
|
/**
|
|
1154
|
-
* @beta
|
|
1155
1136
|
* @remarks
|
|
1156
1137
|
* Current location of the entity.
|
|
1157
1138
|
*
|
|
@@ -1159,7 +1140,6 @@ export class Entity {
|
|
|
1159
1140
|
*/
|
|
1160
1141
|
readonly location: Vector3;
|
|
1161
1142
|
/**
|
|
1162
|
-
* @beta
|
|
1163
1143
|
* @remarks
|
|
1164
1144
|
* Given name of the entity.
|
|
1165
1145
|
*
|
|
@@ -1168,7 +1148,6 @@ export class Entity {
|
|
|
1168
1148
|
*/
|
|
1169
1149
|
nameTag: string;
|
|
1170
1150
|
/**
|
|
1171
|
-
* @beta
|
|
1172
1151
|
* @remarks
|
|
1173
1152
|
* Returns a scoreboard identity that represents this entity.
|
|
1174
1153
|
* Will remain valid when the entity is killed.
|
|
@@ -1184,7 +1163,6 @@ export class Entity {
|
|
|
1184
1163
|
*/
|
|
1185
1164
|
readonly typeId: string;
|
|
1186
1165
|
/**
|
|
1187
|
-
* @beta
|
|
1188
1166
|
* @remarks
|
|
1189
1167
|
* Adds or updates an effect, like poison, to the entity.
|
|
1190
1168
|
*
|
|
@@ -1243,7 +1221,6 @@ export class Entity {
|
|
|
1243
1221
|
*/
|
|
1244
1222
|
addEffect(effectType: EffectType | string, duration: number, options?: EntityEffectOptions): void;
|
|
1245
1223
|
/**
|
|
1246
|
-
* @beta
|
|
1247
1224
|
* @remarks
|
|
1248
1225
|
* Adds a specified tag to an entity.
|
|
1249
1226
|
*
|
|
@@ -1278,7 +1255,6 @@ export class Entity {
|
|
|
1278
1255
|
*/
|
|
1279
1256
|
addTag(tag: string): boolean;
|
|
1280
1257
|
/**
|
|
1281
|
-
* @beta
|
|
1282
1258
|
* @remarks
|
|
1283
1259
|
* Applies a set of damage to an entity.
|
|
1284
1260
|
*
|
|
@@ -1311,7 +1287,6 @@ export class Entity {
|
|
|
1311
1287
|
*/
|
|
1312
1288
|
applyDamage(amount: number, options?: EntityApplyDamageByProjectileOptions | EntityApplyDamageOptions): boolean;
|
|
1313
1289
|
/**
|
|
1314
|
-
* @beta
|
|
1315
1290
|
* @remarks
|
|
1316
1291
|
* Applies impulse vector to the current velocity of the
|
|
1317
1292
|
* entity.
|
|
@@ -1333,7 +1308,6 @@ export class Entity {
|
|
|
1333
1308
|
*/
|
|
1334
1309
|
applyImpulse(vector: Vector3): void;
|
|
1335
1310
|
/**
|
|
1336
|
-
* @beta
|
|
1337
1311
|
* @remarks
|
|
1338
1312
|
* Applies impulse vector to the current velocity of the
|
|
1339
1313
|
* entity.
|
|
@@ -1369,7 +1343,6 @@ export class Entity {
|
|
|
1369
1343
|
*/
|
|
1370
1344
|
applyKnockback(directionX: number, directionZ: number, horizontalStrength: number, verticalStrength: number): void;
|
|
1371
1345
|
/**
|
|
1372
|
-
* @beta
|
|
1373
1346
|
* @remarks
|
|
1374
1347
|
* Sets the current velocity of the Entity to zero. Note that
|
|
1375
1348
|
* this method may not have an impact on Players.
|
|
@@ -1389,7 +1362,6 @@ export class Entity {
|
|
|
1389
1362
|
*/
|
|
1390
1363
|
clearVelocity(): void;
|
|
1391
1364
|
/**
|
|
1392
|
-
* @beta
|
|
1393
1365
|
* @remarks
|
|
1394
1366
|
* Returns the first intersecting block from the direction that
|
|
1395
1367
|
* this entity is looking at.
|
|
@@ -1403,7 +1375,6 @@ export class Entity {
|
|
|
1403
1375
|
*/
|
|
1404
1376
|
getBlockFromViewDirection(options?: BlockRaycastOptions): BlockRaycastHit | undefined;
|
|
1405
1377
|
/**
|
|
1406
|
-
* @beta
|
|
1407
1378
|
* @remarks
|
|
1408
1379
|
* Gets a component (that represents additional capabilities)
|
|
1409
1380
|
* for an entity.
|
|
@@ -1419,7 +1390,6 @@ export class Entity {
|
|
|
1419
1390
|
*/
|
|
1420
1391
|
getComponent(componentId: string): EntityComponent | undefined;
|
|
1421
1392
|
/**
|
|
1422
|
-
* @beta
|
|
1423
1393
|
* @remarks
|
|
1424
1394
|
* Returns all components that are both present on this entity
|
|
1425
1395
|
* and supported by the API.
|
|
@@ -1430,7 +1400,6 @@ export class Entity {
|
|
|
1430
1400
|
*/
|
|
1431
1401
|
getComponents(): EntityComponent[];
|
|
1432
1402
|
/**
|
|
1433
|
-
* @beta
|
|
1434
1403
|
* @remarks
|
|
1435
1404
|
* Returns the effect for the specified EffectType on the
|
|
1436
1405
|
* entity, undefined if the effect is not present, or throws an
|
|
@@ -1446,7 +1415,6 @@ export class Entity {
|
|
|
1446
1415
|
*/
|
|
1447
1416
|
getEffect(effectType: EffectType | string): Effect | undefined;
|
|
1448
1417
|
/**
|
|
1449
|
-
* @beta
|
|
1450
1418
|
* @remarks
|
|
1451
1419
|
* Returns a set of effects applied to this entity.
|
|
1452
1420
|
*
|
|
@@ -1456,7 +1424,6 @@ export class Entity {
|
|
|
1456
1424
|
*/
|
|
1457
1425
|
getEffects(): Effect[];
|
|
1458
1426
|
/**
|
|
1459
|
-
* @beta
|
|
1460
1427
|
* @remarks
|
|
1461
1428
|
* Gets the entities that this entity is looking at by
|
|
1462
1429
|
* performing a ray cast from the view of this entity.
|
|
@@ -1470,7 +1437,6 @@ export class Entity {
|
|
|
1470
1437
|
*/
|
|
1471
1438
|
getEntitiesFromViewDirection(options?: EntityRaycastOptions): EntityRaycastHit[];
|
|
1472
1439
|
/**
|
|
1473
|
-
* @beta
|
|
1474
1440
|
* @remarks
|
|
1475
1441
|
* Returns the current location of the head component of this
|
|
1476
1442
|
* entity.
|
|
@@ -1482,7 +1448,6 @@ export class Entity {
|
|
|
1482
1448
|
*/
|
|
1483
1449
|
getHeadLocation(): Vector3;
|
|
1484
1450
|
/**
|
|
1485
|
-
* @beta
|
|
1486
1451
|
* @remarks
|
|
1487
1452
|
* Returns all tags associated with an entity.
|
|
1488
1453
|
*
|
|
@@ -1492,7 +1457,6 @@ export class Entity {
|
|
|
1492
1457
|
*/
|
|
1493
1458
|
getTags(): string[];
|
|
1494
1459
|
/**
|
|
1495
|
-
* @beta
|
|
1496
1460
|
* @remarks
|
|
1497
1461
|
* Returns the current velocity vector of the entity.
|
|
1498
1462
|
*
|
|
@@ -1512,7 +1476,6 @@ export class Entity {
|
|
|
1512
1476
|
*/
|
|
1513
1477
|
getVelocity(): Vector3;
|
|
1514
1478
|
/**
|
|
1515
|
-
* @beta
|
|
1516
1479
|
* @remarks
|
|
1517
1480
|
* Returns the current view direction of the entity.
|
|
1518
1481
|
*
|
|
@@ -1522,7 +1485,6 @@ export class Entity {
|
|
|
1522
1485
|
*/
|
|
1523
1486
|
getViewDirection(): Vector3;
|
|
1524
1487
|
/**
|
|
1525
|
-
* @beta
|
|
1526
1488
|
* @remarks
|
|
1527
1489
|
* Returns true if the specified component is present on this
|
|
1528
1490
|
* entity.
|
|
@@ -1537,7 +1499,6 @@ export class Entity {
|
|
|
1537
1499
|
*/
|
|
1538
1500
|
hasComponent(componentId: string): boolean;
|
|
1539
1501
|
/**
|
|
1540
|
-
* @beta
|
|
1541
1502
|
* @remarks
|
|
1542
1503
|
* Returns whether an entity has a particular tag.
|
|
1543
1504
|
*
|
|
@@ -1549,7 +1510,6 @@ export class Entity {
|
|
|
1549
1510
|
*/
|
|
1550
1511
|
hasTag(tag: string): boolean;
|
|
1551
1512
|
/**
|
|
1552
|
-
* @beta
|
|
1553
1513
|
* @remarks
|
|
1554
1514
|
* Returns whether the entity can be manipulated by script. A
|
|
1555
1515
|
* Player is considered valid when it's EntityLifetimeState is
|
|
@@ -1560,7 +1520,6 @@ export class Entity {
|
|
|
1560
1520
|
*/
|
|
1561
1521
|
isValid(): boolean;
|
|
1562
1522
|
/**
|
|
1563
|
-
* @beta
|
|
1564
1523
|
* @remarks
|
|
1565
1524
|
* Kills this entity. The entity will drop loot as normal.
|
|
1566
1525
|
*
|
|
@@ -1592,7 +1551,6 @@ export class Entity {
|
|
|
1592
1551
|
*/
|
|
1593
1552
|
kill(): boolean;
|
|
1594
1553
|
/**
|
|
1595
|
-
* @beta
|
|
1596
1554
|
* @remarks
|
|
1597
1555
|
* Removes the specified EffectType on the entity, or returns
|
|
1598
1556
|
* false if the effect is not present.
|
|
@@ -1608,7 +1566,6 @@ export class Entity {
|
|
|
1608
1566
|
*/
|
|
1609
1567
|
removeEffect(effectType: EffectType | string): boolean;
|
|
1610
1568
|
/**
|
|
1611
|
-
* @beta
|
|
1612
1569
|
* @remarks
|
|
1613
1570
|
* Removes a specified tag from an entity.
|
|
1614
1571
|
*
|
|
@@ -1622,7 +1579,6 @@ export class Entity {
|
|
|
1622
1579
|
*/
|
|
1623
1580
|
removeTag(tag: string): boolean;
|
|
1624
1581
|
/**
|
|
1625
|
-
* @beta
|
|
1626
1582
|
* @remarks
|
|
1627
1583
|
* Runs a synchronous command on the entity.
|
|
1628
1584
|
*
|
|
@@ -1635,6 +1591,10 @@ export class Entity {
|
|
|
1635
1591
|
* A command result containing whether the command was
|
|
1636
1592
|
* successful.
|
|
1637
1593
|
* @throws This function can throw errors.
|
|
1594
|
+
*
|
|
1595
|
+
* {@link CommandError}
|
|
1596
|
+
*
|
|
1597
|
+
* {@link Error}
|
|
1638
1598
|
*/
|
|
1639
1599
|
runCommand(commandString: string): CommandResult;
|
|
1640
1600
|
/**
|
|
@@ -1653,7 +1613,6 @@ export class Entity {
|
|
|
1653
1613
|
*/
|
|
1654
1614
|
runCommandAsync(commandString: string): Promise<CommandResult>;
|
|
1655
1615
|
/**
|
|
1656
|
-
* @beta
|
|
1657
1616
|
* @remarks
|
|
1658
1617
|
* Teleports the selected entity to a new location
|
|
1659
1618
|
*
|
|
@@ -1686,7 +1645,6 @@ export class Entity {
|
|
|
1686
1645
|
*/
|
|
1687
1646
|
teleport(location: Vector3, teleportOptions?: TeleportOptions): void;
|
|
1688
1647
|
/**
|
|
1689
|
-
* @beta
|
|
1690
1648
|
* @remarks
|
|
1691
1649
|
* Attempts to try a teleport, but may not complete the
|
|
1692
1650
|
* teleport operation (for example, if there are blocks at the
|
|
@@ -1708,7 +1666,6 @@ export class Entity {
|
|
|
1708
1666
|
}
|
|
1709
1667
|
|
|
1710
1668
|
/**
|
|
1711
|
-
* @beta
|
|
1712
1669
|
* This is a base abstract class for any entity component that
|
|
1713
1670
|
* centers around a number and can have a minimum, maximum, and
|
|
1714
1671
|
* default defined value.
|
|
@@ -1788,7 +1745,6 @@ export class EntityAttributeComponent extends EntityComponent {
|
|
|
1788
1745
|
}
|
|
1789
1746
|
|
|
1790
1747
|
/**
|
|
1791
|
-
* @beta
|
|
1792
1748
|
* Base class for a family of entity movement events.
|
|
1793
1749
|
*/
|
|
1794
1750
|
// @ts-ignore Class inheritance allowed for native defined classes
|
|
@@ -1804,7 +1760,6 @@ export class EntityBaseMovementComponent extends EntityComponent {
|
|
|
1804
1760
|
}
|
|
1805
1761
|
|
|
1806
1762
|
/**
|
|
1807
|
-
* @beta
|
|
1808
1763
|
* When added, this component signifies that the entity can
|
|
1809
1764
|
* climb up ladders.
|
|
1810
1765
|
*/
|
|
@@ -1815,7 +1770,6 @@ export class EntityCanClimbComponent extends EntityComponent {
|
|
|
1815
1770
|
}
|
|
1816
1771
|
|
|
1817
1772
|
/**
|
|
1818
|
-
* @beta
|
|
1819
1773
|
* When added, this component signifies that the entity can
|
|
1820
1774
|
* fly, and the pathfinder won't be restricted to paths where a
|
|
1821
1775
|
* solid block is required underneath it.
|
|
@@ -1827,7 +1781,6 @@ export class EntityCanFlyComponent extends EntityComponent {
|
|
|
1827
1781
|
}
|
|
1828
1782
|
|
|
1829
1783
|
/**
|
|
1830
|
-
* @beta
|
|
1831
1784
|
* When added, this component signifies that the entity can
|
|
1832
1785
|
* power jump like the horse does within Minecraft.
|
|
1833
1786
|
*/
|
|
@@ -1838,7 +1791,6 @@ export class EntityCanPowerJumpComponent extends EntityComponent {
|
|
|
1838
1791
|
}
|
|
1839
1792
|
|
|
1840
1793
|
/**
|
|
1841
|
-
* @beta
|
|
1842
1794
|
* Defines the entity's color. Only works on certain entities
|
|
1843
1795
|
* that have predefined color values (e.g., sheep, llama,
|
|
1844
1796
|
* shulker).
|
|
@@ -1858,7 +1810,6 @@ export class EntityColorComponent extends EntityComponent {
|
|
|
1858
1810
|
}
|
|
1859
1811
|
|
|
1860
1812
|
/**
|
|
1861
|
-
* @beta
|
|
1862
1813
|
* Base class for downstream entity components.
|
|
1863
1814
|
*/
|
|
1864
1815
|
// @ts-ignore Class inheritance allowed for native defined classes
|
|
@@ -1867,7 +1818,6 @@ export class EntityComponent extends Component {
|
|
|
1867
1818
|
}
|
|
1868
1819
|
|
|
1869
1820
|
/**
|
|
1870
|
-
* @beta
|
|
1871
1821
|
* Contains data related to the death of an entity in the game.
|
|
1872
1822
|
*/
|
|
1873
1823
|
export class EntityDieAfterEvent {
|
|
@@ -1888,7 +1838,6 @@ export class EntityDieAfterEvent {
|
|
|
1888
1838
|
}
|
|
1889
1839
|
|
|
1890
1840
|
/**
|
|
1891
|
-
* @beta
|
|
1892
1841
|
* Supports registering for an event that fires after an entity
|
|
1893
1842
|
* has died.
|
|
1894
1843
|
*/
|
|
@@ -1926,7 +1875,6 @@ export class EntityDieAfterEventSignal {
|
|
|
1926
1875
|
}
|
|
1927
1876
|
|
|
1928
1877
|
/**
|
|
1929
|
-
* @beta
|
|
1930
1878
|
* When added, this component signifies that this entity
|
|
1931
1879
|
* doesn't take damage from fire.
|
|
1932
1880
|
*/
|
|
@@ -1937,7 +1885,6 @@ export class EntityFireImmuneComponent extends EntityComponent {
|
|
|
1937
1885
|
}
|
|
1938
1886
|
|
|
1939
1887
|
/**
|
|
1940
|
-
* @beta
|
|
1941
1888
|
* When added, this component signifies that this entity can
|
|
1942
1889
|
* float in liquid blocks.
|
|
1943
1890
|
*/
|
|
@@ -1948,7 +1895,6 @@ export class EntityFloatsInLiquidComponent extends EntityComponent {
|
|
|
1948
1895
|
}
|
|
1949
1896
|
|
|
1950
1897
|
/**
|
|
1951
|
-
* @beta
|
|
1952
1898
|
* Represents the flying speed of an entity.
|
|
1953
1899
|
*/
|
|
1954
1900
|
// @ts-ignore Class inheritance allowed for native defined classes
|
|
@@ -1966,7 +1912,6 @@ export class EntityFlyingSpeedComponent extends EntityComponent {
|
|
|
1966
1912
|
}
|
|
1967
1913
|
|
|
1968
1914
|
/**
|
|
1969
|
-
* @beta
|
|
1970
1915
|
* Defines how much friction affects this entity.
|
|
1971
1916
|
*/
|
|
1972
1917
|
// @ts-ignore Class inheritance allowed for native defined classes
|
|
@@ -1985,7 +1930,6 @@ export class EntityFrictionModifierComponent extends EntityComponent {
|
|
|
1985
1930
|
}
|
|
1986
1931
|
|
|
1987
1932
|
/**
|
|
1988
|
-
* @beta
|
|
1989
1933
|
* Sets the offset from the ground that the entity is actually
|
|
1990
1934
|
* at.
|
|
1991
1935
|
*/
|
|
@@ -1994,7 +1938,9 @@ export class EntityGroundOffsetComponent extends EntityComponent {
|
|
|
1994
1938
|
private constructor();
|
|
1995
1939
|
/**
|
|
1996
1940
|
* @remarks
|
|
1997
|
-
* Value of this particular ground offset.
|
|
1941
|
+
* Value of this particular ground offset. Note that this value
|
|
1942
|
+
* is effectively read only; setting the ground offset value
|
|
1943
|
+
* will not have an impact on the related entity.
|
|
1998
1944
|
*
|
|
1999
1945
|
* This property can't be edited in read-only mode.
|
|
2000
1946
|
*
|
|
@@ -2004,7 +1950,6 @@ export class EntityGroundOffsetComponent extends EntityComponent {
|
|
|
2004
1950
|
}
|
|
2005
1951
|
|
|
2006
1952
|
/**
|
|
2007
|
-
* @beta
|
|
2008
1953
|
* Defines the interactions with this entity for healing it.
|
|
2009
1954
|
*/
|
|
2010
1955
|
// @ts-ignore Class inheritance allowed for native defined classes
|
|
@@ -2031,7 +1976,6 @@ export class EntityHealableComponent extends EntityComponent {
|
|
|
2031
1976
|
}
|
|
2032
1977
|
|
|
2033
1978
|
/**
|
|
2034
|
-
* @beta
|
|
2035
1979
|
* Contains information related to an entity when its health
|
|
2036
1980
|
* changes. Warning: don't change the health of an entity in
|
|
2037
1981
|
* this event, or it will cause an infinite loop!
|
|
@@ -2059,7 +2003,6 @@ export class EntityHealthChangedAfterEvent {
|
|
|
2059
2003
|
}
|
|
2060
2004
|
|
|
2061
2005
|
/**
|
|
2062
|
-
* @beta
|
|
2063
2006
|
* Manages callbacks that are connected to when the health of
|
|
2064
2007
|
* an entity changes.
|
|
2065
2008
|
*/
|
|
@@ -2090,7 +2033,6 @@ export class EntityHealthChangedAfterEventSignal {
|
|
|
2090
2033
|
}
|
|
2091
2034
|
|
|
2092
2035
|
/**
|
|
2093
|
-
* @beta
|
|
2094
2036
|
* Defines the health properties of an entity.
|
|
2095
2037
|
*/
|
|
2096
2038
|
// @ts-ignore Class inheritance allowed for native defined classes
|
|
@@ -2100,7 +2042,6 @@ export class EntityHealthComponent extends EntityAttributeComponent {
|
|
|
2100
2042
|
}
|
|
2101
2043
|
|
|
2102
2044
|
/**
|
|
2103
|
-
* @beta
|
|
2104
2045
|
* Contains information related to an entity hitting a block.
|
|
2105
2046
|
*/
|
|
2106
2047
|
export class EntityHitBlockAfterEvent {
|
|
@@ -2126,7 +2067,6 @@ export class EntityHitBlockAfterEvent {
|
|
|
2126
2067
|
}
|
|
2127
2068
|
|
|
2128
2069
|
/**
|
|
2129
|
-
* @beta
|
|
2130
2070
|
* Manages callbacks that are connected to when an entity hits
|
|
2131
2071
|
* a block.
|
|
2132
2072
|
*/
|
|
@@ -2157,7 +2097,6 @@ export class EntityHitBlockAfterEventSignal {
|
|
|
2157
2097
|
}
|
|
2158
2098
|
|
|
2159
2099
|
/**
|
|
2160
|
-
* @beta
|
|
2161
2100
|
* Contains information related to an entity hitting (melee
|
|
2162
2101
|
* attacking) another entity.
|
|
2163
2102
|
*/
|
|
@@ -2178,7 +2117,6 @@ export class EntityHitEntityAfterEvent {
|
|
|
2178
2117
|
}
|
|
2179
2118
|
|
|
2180
2119
|
/**
|
|
2181
|
-
* @beta
|
|
2182
2120
|
* Manages callbacks that are connected to when an entity makes
|
|
2183
2121
|
* a melee attack on another entity.
|
|
2184
2122
|
*/
|
|
@@ -2209,7 +2147,6 @@ export class EntityHitEntityAfterEventSignal {
|
|
|
2209
2147
|
}
|
|
2210
2148
|
|
|
2211
2149
|
/**
|
|
2212
|
-
* @beta
|
|
2213
2150
|
* Contains information related to an entity getting hurt.
|
|
2214
2151
|
*/
|
|
2215
2152
|
export class EntityHurtAfterEvent {
|
|
@@ -2236,7 +2173,6 @@ export class EntityHurtAfterEvent {
|
|
|
2236
2173
|
}
|
|
2237
2174
|
|
|
2238
2175
|
/**
|
|
2239
|
-
* @beta
|
|
2240
2176
|
* Manages callbacks that are connected to when an entity is
|
|
2241
2177
|
* hurt.
|
|
2242
2178
|
*/
|
|
@@ -2265,7 +2201,6 @@ export class EntityHurtAfterEventSignal {
|
|
|
2265
2201
|
}
|
|
2266
2202
|
|
|
2267
2203
|
/**
|
|
2268
|
-
* @beta
|
|
2269
2204
|
* Defines this entity's inventory properties.
|
|
2270
2205
|
*/
|
|
2271
2206
|
// @ts-ignore Class inheritance allowed for native defined classes
|
|
@@ -2327,7 +2262,6 @@ export class EntityInventoryComponent extends EntityComponent {
|
|
|
2327
2262
|
}
|
|
2328
2263
|
|
|
2329
2264
|
/**
|
|
2330
|
-
* @beta
|
|
2331
2265
|
* When added, this component signifies that this entity is a
|
|
2332
2266
|
* baby.
|
|
2333
2267
|
*/
|
|
@@ -2338,7 +2272,6 @@ export class EntityIsBabyComponent extends EntityComponent {
|
|
|
2338
2272
|
}
|
|
2339
2273
|
|
|
2340
2274
|
/**
|
|
2341
|
-
* @beta
|
|
2342
2275
|
* When added, this component signifies that this entity is
|
|
2343
2276
|
* charged.
|
|
2344
2277
|
*/
|
|
@@ -2349,7 +2282,6 @@ export class EntityIsChargedComponent extends EntityComponent {
|
|
|
2349
2282
|
}
|
|
2350
2283
|
|
|
2351
2284
|
/**
|
|
2352
|
-
* @beta
|
|
2353
2285
|
* When added, this component signifies that this entity is
|
|
2354
2286
|
* currently carrying a chest.
|
|
2355
2287
|
*/
|
|
@@ -2360,7 +2292,6 @@ export class EntityIsChestedComponent extends EntityComponent {
|
|
|
2360
2292
|
}
|
|
2361
2293
|
|
|
2362
2294
|
/**
|
|
2363
|
-
* @beta
|
|
2364
2295
|
* When added, this component signifies that dyes can be used
|
|
2365
2296
|
* on this entity to change its color.
|
|
2366
2297
|
*/
|
|
@@ -2371,7 +2302,6 @@ export class EntityIsDyeableComponent extends EntityComponent {
|
|
|
2371
2302
|
}
|
|
2372
2303
|
|
|
2373
2304
|
/**
|
|
2374
|
-
* @beta
|
|
2375
2305
|
* When added, this component signifies that this entity can
|
|
2376
2306
|
* hide from hostile mobs while invisible.
|
|
2377
2307
|
*/
|
|
@@ -2382,7 +2312,6 @@ export class EntityIsHiddenWhenInvisibleComponent extends EntityComponent {
|
|
|
2382
2312
|
}
|
|
2383
2313
|
|
|
2384
2314
|
/**
|
|
2385
|
-
* @beta
|
|
2386
2315
|
* When added, this component signifies that this entity this
|
|
2387
2316
|
* currently on fire.
|
|
2388
2317
|
*/
|
|
@@ -2393,7 +2322,6 @@ export class EntityIsIgnitedComponent extends EntityComponent {
|
|
|
2393
2322
|
}
|
|
2394
2323
|
|
|
2395
2324
|
/**
|
|
2396
|
-
* @beta
|
|
2397
2325
|
* When added, this component signifies that this entity is an
|
|
2398
2326
|
* illager captain.
|
|
2399
2327
|
*/
|
|
@@ -2404,7 +2332,6 @@ export class EntityIsIllagerCaptainComponent extends EntityComponent {
|
|
|
2404
2332
|
}
|
|
2405
2333
|
|
|
2406
2334
|
/**
|
|
2407
|
-
* @beta
|
|
2408
2335
|
* When added, this component signifies that this entity is
|
|
2409
2336
|
* currently saddled.
|
|
2410
2337
|
*/
|
|
@@ -2415,7 +2342,6 @@ export class EntityIsSaddledComponent extends EntityComponent {
|
|
|
2415
2342
|
}
|
|
2416
2343
|
|
|
2417
2344
|
/**
|
|
2418
|
-
* @beta
|
|
2419
2345
|
* When added, this component signifies that this entity is
|
|
2420
2346
|
* currently shaking.
|
|
2421
2347
|
*/
|
|
@@ -2426,7 +2352,6 @@ export class EntityIsShakingComponent extends EntityComponent {
|
|
|
2426
2352
|
}
|
|
2427
2353
|
|
|
2428
2354
|
/**
|
|
2429
|
-
* @beta
|
|
2430
2355
|
* When added, this component signifies that this entity is
|
|
2431
2356
|
* currently sheared.
|
|
2432
2357
|
*/
|
|
@@ -2437,7 +2362,6 @@ export class EntityIsShearedComponent extends EntityComponent {
|
|
|
2437
2362
|
}
|
|
2438
2363
|
|
|
2439
2364
|
/**
|
|
2440
|
-
* @beta
|
|
2441
2365
|
* When added, this component signifies that this entity can be
|
|
2442
2366
|
* stacked.
|
|
2443
2367
|
*/
|
|
@@ -2448,7 +2372,6 @@ export class EntityIsStackableComponent extends EntityComponent {
|
|
|
2448
2372
|
}
|
|
2449
2373
|
|
|
2450
2374
|
/**
|
|
2451
|
-
* @beta
|
|
2452
2375
|
* When added, this component signifies that this entity is
|
|
2453
2376
|
* currently stunned.
|
|
2454
2377
|
*/
|
|
@@ -2459,7 +2382,6 @@ export class EntityIsStunnedComponent extends EntityComponent {
|
|
|
2459
2382
|
}
|
|
2460
2383
|
|
|
2461
2384
|
/**
|
|
2462
|
-
* @beta
|
|
2463
2385
|
* When added, this component signifies that this entity is
|
|
2464
2386
|
* currently tamed.
|
|
2465
2387
|
*/
|
|
@@ -2470,7 +2392,6 @@ export class EntityIsTamedComponent extends EntityComponent {
|
|
|
2470
2392
|
}
|
|
2471
2393
|
|
|
2472
2394
|
/**
|
|
2473
|
-
* @beta
|
|
2474
2395
|
* If added onto the entity, this indicates that the entity
|
|
2475
2396
|
* represents a free-floating item in the world. Lets you
|
|
2476
2397
|
* retrieve the actual item stack contents via the itemStack
|
|
@@ -2490,7 +2411,6 @@ export class EntityItemComponent extends EntityComponent {
|
|
|
2490
2411
|
}
|
|
2491
2412
|
|
|
2492
2413
|
/**
|
|
2493
|
-
* @beta
|
|
2494
2414
|
* Additional variant value. Can be used to further
|
|
2495
2415
|
* differentiate variants.
|
|
2496
2416
|
*/
|
|
@@ -2509,7 +2429,6 @@ export class EntityMarkVariantComponent extends EntityComponent {
|
|
|
2509
2429
|
}
|
|
2510
2430
|
|
|
2511
2431
|
/**
|
|
2512
|
-
* @beta
|
|
2513
2432
|
* When added, this movement control allows the mob to swim in
|
|
2514
2433
|
* water and walk on land.
|
|
2515
2434
|
*/
|
|
@@ -2520,7 +2439,6 @@ export class EntityMovementAmphibiousComponent extends EntityBaseMovementCompone
|
|
|
2520
2439
|
}
|
|
2521
2440
|
|
|
2522
2441
|
/**
|
|
2523
|
-
* @beta
|
|
2524
2442
|
* This component accents the movement of an entity.
|
|
2525
2443
|
*/
|
|
2526
2444
|
// @ts-ignore Class inheritance allowed for native defined classes
|
|
@@ -2530,7 +2448,6 @@ export class EntityMovementBasicComponent extends EntityBaseMovementComponent {
|
|
|
2530
2448
|
}
|
|
2531
2449
|
|
|
2532
2450
|
/**
|
|
2533
|
-
* @beta
|
|
2534
2451
|
* When added, this move control causes the mob to fly.
|
|
2535
2452
|
*/
|
|
2536
2453
|
// @ts-ignore Class inheritance allowed for native defined classes
|
|
@@ -2540,7 +2457,6 @@ export class EntityMovementFlyComponent extends EntityBaseMovementComponent {
|
|
|
2540
2457
|
}
|
|
2541
2458
|
|
|
2542
2459
|
/**
|
|
2543
|
-
* @beta
|
|
2544
2460
|
* When added, this move control allows a mob to fly, swim,
|
|
2545
2461
|
* climb, etc.
|
|
2546
2462
|
*/
|
|
@@ -2551,7 +2467,6 @@ export class EntityMovementGenericComponent extends EntityBaseMovementComponent
|
|
|
2551
2467
|
}
|
|
2552
2468
|
|
|
2553
2469
|
/**
|
|
2554
|
-
* @beta
|
|
2555
2470
|
* When added, this move control causes the mob to hover.
|
|
2556
2471
|
*/
|
|
2557
2472
|
// @ts-ignore Class inheritance allowed for native defined classes
|
|
@@ -2561,7 +2476,6 @@ export class EntityMovementHoverComponent extends EntityBaseMovementComponent {
|
|
|
2561
2476
|
}
|
|
2562
2477
|
|
|
2563
2478
|
/**
|
|
2564
|
-
* @beta
|
|
2565
2479
|
* Move control that causes the mob to jump as it moves with a
|
|
2566
2480
|
* specified delay between jumps.
|
|
2567
2481
|
*/
|
|
@@ -2572,7 +2486,6 @@ export class EntityMovementJumpComponent extends EntityBaseMovementComponent {
|
|
|
2572
2486
|
}
|
|
2573
2487
|
|
|
2574
2488
|
/**
|
|
2575
|
-
* @beta
|
|
2576
2489
|
* When added, this move control causes the mob to hop as it
|
|
2577
2490
|
* moves.
|
|
2578
2491
|
*/
|
|
@@ -2583,7 +2496,6 @@ export class EntityMovementSkipComponent extends EntityBaseMovementComponent {
|
|
|
2583
2496
|
}
|
|
2584
2497
|
|
|
2585
2498
|
/**
|
|
2586
|
-
* @beta
|
|
2587
2499
|
* Sets the distance through which the entity can push through.
|
|
2588
2500
|
*/
|
|
2589
2501
|
// @ts-ignore Class inheritance allowed for native defined classes
|
|
@@ -2601,7 +2513,6 @@ export class EntityPushThroughComponent extends EntityComponent {
|
|
|
2601
2513
|
}
|
|
2602
2514
|
|
|
2603
2515
|
/**
|
|
2604
|
-
* @beta
|
|
2605
2516
|
* Sets the entity's visual size.
|
|
2606
2517
|
*/
|
|
2607
2518
|
// @ts-ignore Class inheritance allowed for native defined classes
|
|
@@ -2619,7 +2530,6 @@ export class EntityScaleComponent extends EntityComponent {
|
|
|
2619
2530
|
}
|
|
2620
2531
|
|
|
2621
2532
|
/**
|
|
2622
|
-
* @beta
|
|
2623
2533
|
* Skin Id value. Can be used to differentiate skins, such as
|
|
2624
2534
|
* base skins for villagers.
|
|
2625
2535
|
*/
|
|
@@ -2638,7 +2548,6 @@ export class EntitySkinIdComponent extends EntityComponent {
|
|
|
2638
2548
|
}
|
|
2639
2549
|
|
|
2640
2550
|
/**
|
|
2641
|
-
* @beta
|
|
2642
2551
|
* Used to differentiate the component group of a variant of an
|
|
2643
2552
|
* entity from others. (e.g. ocelot, villager).
|
|
2644
2553
|
*/
|
|
@@ -2657,7 +2566,6 @@ export class EntityVariantComponent extends EntityComponent {
|
|
|
2657
2566
|
}
|
|
2658
2567
|
|
|
2659
2568
|
/**
|
|
2660
|
-
* @beta
|
|
2661
2569
|
* When added, this component signifies that this entity wants
|
|
2662
2570
|
* to become a jockey.
|
|
2663
2571
|
*/
|
|
@@ -2668,7 +2576,6 @@ export class EntityWantsJockeyComponent extends EntityComponent {
|
|
|
2668
2576
|
}
|
|
2669
2577
|
|
|
2670
2578
|
/**
|
|
2671
|
-
* @beta
|
|
2672
2579
|
* As part of the Healable component, represents a specific
|
|
2673
2580
|
* item that can be fed to an entity to cause health effects.
|
|
2674
2581
|
*/
|
|
@@ -2700,7 +2607,6 @@ export class FeedItem {
|
|
|
2700
2607
|
}
|
|
2701
2608
|
|
|
2702
2609
|
/**
|
|
2703
|
-
* @beta
|
|
2704
2610
|
* Represents an effect that is applied as a result of a food
|
|
2705
2611
|
* item being fed to an entity.
|
|
2706
2612
|
*/
|
|
@@ -2737,7 +2643,6 @@ export class FeedItemEffect {
|
|
|
2737
2643
|
}
|
|
2738
2644
|
|
|
2739
2645
|
/**
|
|
2740
|
-
* @beta
|
|
2741
2646
|
* Provides an adaptable interface for callers to subscribe to
|
|
2742
2647
|
* an event that fires when a button is pushed.
|
|
2743
2648
|
*/
|
|
@@ -2759,7 +2664,6 @@ export class IButtonPushAfterEventSignal {
|
|
|
2759
2664
|
}
|
|
2760
2665
|
|
|
2761
2666
|
/**
|
|
2762
|
-
* @beta
|
|
2763
2667
|
* Provides an adaptable interface for callers to subscribe to
|
|
2764
2668
|
* an event that fires after a lever is used.
|
|
2765
2669
|
*/
|
|
@@ -2781,7 +2685,6 @@ export class ILeverActionAfterEventSignal {
|
|
|
2781
2685
|
}
|
|
2782
2686
|
|
|
2783
2687
|
/**
|
|
2784
|
-
* @beta
|
|
2785
2688
|
* Provides an adaptable interface for callers to subscribe to
|
|
2786
2689
|
* an event that fires after a player joins a world.
|
|
2787
2690
|
*/
|
|
@@ -2803,7 +2706,6 @@ export class IPlayerJoinAfterEventSignal {
|
|
|
2803
2706
|
}
|
|
2804
2707
|
|
|
2805
2708
|
/**
|
|
2806
|
-
* @beta
|
|
2807
2709
|
* Provides an adaptable interface for callers to subscribe to
|
|
2808
2710
|
* an event that fires after a player leaves a world.
|
|
2809
2711
|
*/
|
|
@@ -2825,7 +2727,6 @@ export class IPlayerLeaveAfterEventSignal {
|
|
|
2825
2727
|
}
|
|
2826
2728
|
|
|
2827
2729
|
/**
|
|
2828
|
-
* @beta
|
|
2829
2730
|
* Provides an adaptable interface for callers to subscribe to
|
|
2830
2731
|
* an event that fires after a player spawns.
|
|
2831
2732
|
*/
|
|
@@ -2847,7 +2748,6 @@ export class IPlayerSpawnAfterEventSignal {
|
|
|
2847
2748
|
}
|
|
2848
2749
|
|
|
2849
2750
|
/**
|
|
2850
|
-
* @beta
|
|
2851
2751
|
* Contains information related to a chargeable item completing
|
|
2852
2752
|
* being charged.
|
|
2853
2753
|
*/
|
|
@@ -2875,7 +2775,6 @@ export class ItemCompleteUseAfterEvent {
|
|
|
2875
2775
|
}
|
|
2876
2776
|
|
|
2877
2777
|
/**
|
|
2878
|
-
* @beta
|
|
2879
2778
|
* Manages callbacks that are connected to the completion of
|
|
2880
2779
|
* charging for a chargeable item.
|
|
2881
2780
|
*/
|
|
@@ -2903,7 +2802,6 @@ export class ItemCompleteUseAfterEventSignal {
|
|
|
2903
2802
|
}
|
|
2904
2803
|
|
|
2905
2804
|
/**
|
|
2906
|
-
* @beta
|
|
2907
2805
|
* Base class for item components.
|
|
2908
2806
|
*/
|
|
2909
2807
|
// @ts-ignore Class inheritance allowed for native defined classes
|
|
@@ -2912,7 +2810,6 @@ export class ItemComponent extends Component {
|
|
|
2912
2810
|
}
|
|
2913
2811
|
|
|
2914
2812
|
/**
|
|
2915
|
-
* @beta
|
|
2916
2813
|
* Contains information related to a chargeable item when the
|
|
2917
2814
|
* player has finished using the item and released the build
|
|
2918
2815
|
* action.
|
|
@@ -2941,7 +2838,6 @@ export class ItemReleaseUseAfterEvent {
|
|
|
2941
2838
|
}
|
|
2942
2839
|
|
|
2943
2840
|
/**
|
|
2944
|
-
* @beta
|
|
2945
2841
|
* Manages callbacks that are connected to the releasing of
|
|
2946
2842
|
* charging for a chargeable item.
|
|
2947
2843
|
*/
|
|
@@ -2969,7 +2865,6 @@ export class ItemReleaseUseAfterEventSignal {
|
|
|
2969
2865
|
}
|
|
2970
2866
|
|
|
2971
2867
|
/**
|
|
2972
|
-
* @beta
|
|
2973
2868
|
* Defines a collection of items.
|
|
2974
2869
|
*/
|
|
2975
2870
|
export class ItemStack {
|
|
@@ -3049,7 +2944,6 @@ export class ItemStack {
|
|
|
3049
2944
|
*/
|
|
3050
2945
|
getComponents(): ItemComponent[];
|
|
3051
2946
|
/**
|
|
3052
|
-
* @beta
|
|
3053
2947
|
* @remarks
|
|
3054
2948
|
* Returns the lore value - a secondary display string - for an
|
|
3055
2949
|
* ItemStack.
|
|
@@ -3086,7 +2980,6 @@ export class ItemStack {
|
|
|
3086
2980
|
*/
|
|
3087
2981
|
isStackableWith(itemStack: ItemStack): boolean;
|
|
3088
2982
|
/**
|
|
3089
|
-
* @beta
|
|
3090
2983
|
* @remarks
|
|
3091
2984
|
* Sets the lore value - a secondary display string - for an
|
|
3092
2985
|
* ItemStack. The lore list is cleared if set to an empty
|
|
@@ -3129,7 +3022,6 @@ export class ItemStack {
|
|
|
3129
3022
|
}
|
|
3130
3023
|
|
|
3131
3024
|
/**
|
|
3132
|
-
* @beta
|
|
3133
3025
|
* Contains information related to a chargeable item starting
|
|
3134
3026
|
* to be charged.
|
|
3135
3027
|
*/
|
|
@@ -3157,7 +3049,6 @@ export class ItemStartUseAfterEvent {
|
|
|
3157
3049
|
}
|
|
3158
3050
|
|
|
3159
3051
|
/**
|
|
3160
|
-
* @beta
|
|
3161
3052
|
* Manages callbacks that are connected to the start of
|
|
3162
3053
|
* charging for a chargeable item.
|
|
3163
3054
|
*/
|
|
@@ -3185,7 +3076,6 @@ export class ItemStartUseAfterEventSignal {
|
|
|
3185
3076
|
}
|
|
3186
3077
|
|
|
3187
3078
|
/**
|
|
3188
|
-
* @beta
|
|
3189
3079
|
* Contains information related to an item being used on a
|
|
3190
3080
|
* block. This event fires when a player presses the the Use
|
|
3191
3081
|
* Item / Place Block button to successfully use an item or
|
|
@@ -3222,7 +3112,6 @@ export class ItemStartUseOnAfterEvent {
|
|
|
3222
3112
|
}
|
|
3223
3113
|
|
|
3224
3114
|
/**
|
|
3225
|
-
* @beta
|
|
3226
3115
|
* Manages callbacks that are connected to an item starting
|
|
3227
3116
|
* being used on a block event.
|
|
3228
3117
|
*/
|
|
@@ -3250,7 +3139,6 @@ export class ItemStartUseOnAfterEventSignal {
|
|
|
3250
3139
|
}
|
|
3251
3140
|
|
|
3252
3141
|
/**
|
|
3253
|
-
* @beta
|
|
3254
3142
|
* Contains information related to a chargeable item has
|
|
3255
3143
|
* finished an items use cycle, or when the player has released
|
|
3256
3144
|
* the use action with the item.
|
|
@@ -3279,7 +3167,6 @@ export class ItemStopUseAfterEvent {
|
|
|
3279
3167
|
}
|
|
3280
3168
|
|
|
3281
3169
|
/**
|
|
3282
|
-
* @beta
|
|
3283
3170
|
* Manages callbacks that are connected to the stopping of
|
|
3284
3171
|
* charging for an item that has a registered
|
|
3285
3172
|
* minecraft:chargeable component.
|
|
@@ -3308,7 +3195,6 @@ export class ItemStopUseAfterEventSignal {
|
|
|
3308
3195
|
}
|
|
3309
3196
|
|
|
3310
3197
|
/**
|
|
3311
|
-
* @beta
|
|
3312
3198
|
* Contains information related to an item that has stopped
|
|
3313
3199
|
* being used on a block. This event fires when a player
|
|
3314
3200
|
* successfully uses an item or places a block by pressing the
|
|
@@ -3340,7 +3226,6 @@ export class ItemStopUseOnAfterEvent {
|
|
|
3340
3226
|
}
|
|
3341
3227
|
|
|
3342
3228
|
/**
|
|
3343
|
-
* @beta
|
|
3344
3229
|
* Manages callbacks that are connected to an item stops used
|
|
3345
3230
|
* on a block event.
|
|
3346
3231
|
*/
|
|
@@ -3368,7 +3253,6 @@ export class ItemStopUseOnAfterEventSignal {
|
|
|
3368
3253
|
}
|
|
3369
3254
|
|
|
3370
3255
|
/**
|
|
3371
|
-
* @beta
|
|
3372
3256
|
* Represents the type of an item - for example, Wool.
|
|
3373
3257
|
*/
|
|
3374
3258
|
export class ItemType {
|
|
@@ -3383,7 +3267,6 @@ export class ItemType {
|
|
|
3383
3267
|
}
|
|
3384
3268
|
|
|
3385
3269
|
/**
|
|
3386
|
-
* @beta
|
|
3387
3270
|
* Contains information related to an item being used. This
|
|
3388
3271
|
* event fires when an item is successfully used by a player.
|
|
3389
3272
|
*/
|
|
@@ -3404,7 +3287,6 @@ export class ItemUseAfterEvent {
|
|
|
3404
3287
|
}
|
|
3405
3288
|
|
|
3406
3289
|
/**
|
|
3407
|
-
* @beta
|
|
3408
3290
|
* Manages callbacks that are connected to an item use event.
|
|
3409
3291
|
*/
|
|
3410
3292
|
export class ItemUseAfterEventSignal {
|
|
@@ -3429,7 +3311,6 @@ export class ItemUseAfterEventSignal {
|
|
|
3429
3311
|
}
|
|
3430
3312
|
|
|
3431
3313
|
/**
|
|
3432
|
-
* @beta
|
|
3433
3314
|
* Contains information related to an item being used.
|
|
3434
3315
|
*/
|
|
3435
3316
|
// @ts-ignore Class inheritance allowed for native defined classes
|
|
@@ -3444,7 +3325,6 @@ export class ItemUseBeforeEvent extends ItemUseAfterEvent {
|
|
|
3444
3325
|
}
|
|
3445
3326
|
|
|
3446
3327
|
/**
|
|
3447
|
-
* @beta
|
|
3448
3328
|
* Manages callbacks that fire before an item is used.
|
|
3449
3329
|
*/
|
|
3450
3330
|
export class ItemUseBeforeEventSignal {
|
|
@@ -3469,7 +3349,6 @@ export class ItemUseBeforeEventSignal {
|
|
|
3469
3349
|
}
|
|
3470
3350
|
|
|
3471
3351
|
/**
|
|
3472
|
-
* @beta
|
|
3473
3352
|
* Contains information related to an item being used on a
|
|
3474
3353
|
* block. This event fires when an item is successfully used on
|
|
3475
3354
|
* a block by a player.
|
|
@@ -3510,7 +3389,6 @@ export class ItemUseOnAfterEvent {
|
|
|
3510
3389
|
}
|
|
3511
3390
|
|
|
3512
3391
|
/**
|
|
3513
|
-
* @beta
|
|
3514
3392
|
* Manages callbacks that are connected to an item being used
|
|
3515
3393
|
* on a block event.
|
|
3516
3394
|
*/
|
|
@@ -3538,7 +3416,6 @@ export class ItemUseOnAfterEventSignal {
|
|
|
3538
3416
|
}
|
|
3539
3417
|
|
|
3540
3418
|
/**
|
|
3541
|
-
* @beta
|
|
3542
3419
|
* Contains information related to an item being used on a
|
|
3543
3420
|
* block.
|
|
3544
3421
|
*/
|
|
@@ -3554,7 +3431,6 @@ export class ItemUseOnBeforeEvent extends ItemUseOnAfterEvent {
|
|
|
3554
3431
|
}
|
|
3555
3432
|
|
|
3556
3433
|
/**
|
|
3557
|
-
* @beta
|
|
3558
3434
|
* Manages callbacks that fire before an item being used on a
|
|
3559
3435
|
* block event.
|
|
3560
3436
|
*/
|
|
@@ -3582,7 +3458,6 @@ export class ItemUseOnBeforeEventSignal {
|
|
|
3582
3458
|
}
|
|
3583
3459
|
|
|
3584
3460
|
/**
|
|
3585
|
-
* @beta
|
|
3586
3461
|
* Contains information related to changes to a lever
|
|
3587
3462
|
* activating or deactivating.
|
|
3588
3463
|
*/
|
|
@@ -3605,7 +3480,6 @@ export class LeverActionAfterEvent extends BlockEvent {
|
|
|
3605
3480
|
}
|
|
3606
3481
|
|
|
3607
3482
|
/**
|
|
3608
|
-
* @beta
|
|
3609
3483
|
* Manages callbacks that are connected to lever moves
|
|
3610
3484
|
* (activates or deactivates).
|
|
3611
3485
|
*/
|
|
@@ -3670,7 +3544,6 @@ export class Player extends Entity {
|
|
|
3670
3544
|
*/
|
|
3671
3545
|
readonly name: string;
|
|
3672
3546
|
/**
|
|
3673
|
-
* @beta
|
|
3674
3547
|
* @remarks
|
|
3675
3548
|
* Contains methods for manipulating the on-screen display of a
|
|
3676
3549
|
* Player.
|
|
@@ -3679,7 +3552,6 @@ export class Player extends Entity {
|
|
|
3679
3552
|
*/
|
|
3680
3553
|
readonly onScreenDisplay: ScreenDisplay;
|
|
3681
3554
|
/**
|
|
3682
|
-
* @beta
|
|
3683
3555
|
* @remarks
|
|
3684
3556
|
* Gets the current spawn point of the player.
|
|
3685
3557
|
*
|
|
@@ -3687,12 +3559,13 @@ export class Player extends Entity {
|
|
|
3687
3559
|
*/
|
|
3688
3560
|
getSpawnPoint(): DimensionLocation | undefined;
|
|
3689
3561
|
/**
|
|
3690
|
-
* @beta
|
|
3691
3562
|
* @remarks
|
|
3692
3563
|
* Plays a sound that only this particular player can hear.
|
|
3693
3564
|
*
|
|
3694
3565
|
* This function can't be called in read-only mode.
|
|
3695
3566
|
*
|
|
3567
|
+
* @param soundID
|
|
3568
|
+
* Identifier of the sound to play.
|
|
3696
3569
|
* @param soundOptions
|
|
3697
3570
|
* Additional optional options for the sound.
|
|
3698
3571
|
* @throws This function can throw errors.
|
|
@@ -3721,9 +3594,8 @@ export class Player extends Entity {
|
|
|
3721
3594
|
* players[0].playSound("bucket.fill_water", playerSoundOptions);
|
|
3722
3595
|
* ```
|
|
3723
3596
|
*/
|
|
3724
|
-
playSound(
|
|
3597
|
+
playSound(soundID: string, soundOptions?: PlayerSoundOptions): void;
|
|
3725
3598
|
/**
|
|
3726
|
-
* @beta
|
|
3727
3599
|
* @remarks
|
|
3728
3600
|
* Sends a message to the player.
|
|
3729
3601
|
*
|
|
@@ -3774,7 +3646,6 @@ export class Player extends Entity {
|
|
|
3774
3646
|
*/
|
|
3775
3647
|
sendMessage(message: (RawMessage | string)[] | RawMessage | string): void;
|
|
3776
3648
|
/**
|
|
3777
|
-
* @beta
|
|
3778
3649
|
* @remarks
|
|
3779
3650
|
* Sets the current starting spawn point for this particular
|
|
3780
3651
|
* player.
|
|
@@ -3782,12 +3653,15 @@ export class Player extends Entity {
|
|
|
3782
3653
|
* This function can't be called in read-only mode.
|
|
3783
3654
|
*
|
|
3784
3655
|
* @throws This function can throw errors.
|
|
3656
|
+
*
|
|
3657
|
+
* {@link Error}
|
|
3658
|
+
*
|
|
3659
|
+
* {@link LocationOutOfWorldBoundariesError}
|
|
3785
3660
|
*/
|
|
3786
3661
|
setSpawnPoint(spawnPoint?: DimensionLocation): void;
|
|
3787
3662
|
}
|
|
3788
3663
|
|
|
3789
3664
|
/**
|
|
3790
|
-
* @beta
|
|
3791
3665
|
* Contains information regarding a player that has joined.
|
|
3792
3666
|
* See the playerSpawn event for more detailed information that
|
|
3793
3667
|
* could be returned after the first time a player has spawned
|
|
@@ -3810,7 +3684,6 @@ export class PlayerJoinAfterEvent {
|
|
|
3810
3684
|
}
|
|
3811
3685
|
|
|
3812
3686
|
/**
|
|
3813
|
-
* @beta
|
|
3814
3687
|
* Manages callbacks that are connected to a player joining the
|
|
3815
3688
|
* world.
|
|
3816
3689
|
*/
|
|
@@ -3820,7 +3693,6 @@ export class PlayerJoinAfterEventSignal extends IPlayerJoinAfterEventSignal {
|
|
|
3820
3693
|
}
|
|
3821
3694
|
|
|
3822
3695
|
/**
|
|
3823
|
-
* @beta
|
|
3824
3696
|
* Contains information regarding a player that has left the
|
|
3825
3697
|
* world.
|
|
3826
3698
|
*/
|
|
@@ -3842,7 +3714,6 @@ export class PlayerLeaveAfterEvent {
|
|
|
3842
3714
|
}
|
|
3843
3715
|
|
|
3844
3716
|
/**
|
|
3845
|
-
* @beta
|
|
3846
3717
|
* Manages callbacks that are connected to a player leaving the
|
|
3847
3718
|
* world.
|
|
3848
3719
|
*/
|
|
@@ -3852,7 +3723,6 @@ export class PlayerLeaveAfterEventSignal extends IPlayerLeaveAfterEventSignal {
|
|
|
3852
3723
|
}
|
|
3853
3724
|
|
|
3854
3725
|
/**
|
|
3855
|
-
* @beta
|
|
3856
3726
|
* An event that contains more information about a player
|
|
3857
3727
|
* spawning.
|
|
3858
3728
|
*/
|
|
@@ -3878,7 +3748,6 @@ export class PlayerSpawnAfterEvent {
|
|
|
3878
3748
|
}
|
|
3879
3749
|
|
|
3880
3750
|
/**
|
|
3881
|
-
* @beta
|
|
3882
3751
|
* Registers an event when a player is spawned (or re-spawned
|
|
3883
3752
|
* after death) and fully ready within the world.
|
|
3884
3753
|
*/
|
|
@@ -3888,7 +3757,6 @@ export class PlayerSpawnAfterEventSignal extends IPlayerSpawnAfterEventSignal {
|
|
|
3888
3757
|
}
|
|
3889
3758
|
|
|
3890
3759
|
/**
|
|
3891
|
-
* @beta
|
|
3892
3760
|
* Contains information related to changes to a pressure plate
|
|
3893
3761
|
* pop.
|
|
3894
3762
|
*/
|
|
@@ -3912,7 +3780,6 @@ export class PressurePlatePopAfterEvent extends BlockEvent {
|
|
|
3912
3780
|
}
|
|
3913
3781
|
|
|
3914
3782
|
/**
|
|
3915
|
-
* @beta
|
|
3916
3783
|
* Manages callbacks that are connected to when a pressure
|
|
3917
3784
|
* plate is popped.
|
|
3918
3785
|
*/
|
|
@@ -3940,7 +3807,6 @@ export class PressurePlatePopAfterEventSignal {
|
|
|
3940
3807
|
}
|
|
3941
3808
|
|
|
3942
3809
|
/**
|
|
3943
|
-
* @beta
|
|
3944
3810
|
* Contains information related to changes to a pressure plate
|
|
3945
3811
|
* push.
|
|
3946
3812
|
*/
|
|
@@ -3970,7 +3836,6 @@ export class PressurePlatePushAfterEvent extends BlockEvent {
|
|
|
3970
3836
|
}
|
|
3971
3837
|
|
|
3972
3838
|
/**
|
|
3973
|
-
* @beta
|
|
3974
3839
|
* Manages callbacks that are connected to when a pressure
|
|
3975
3840
|
* plate is pushed.
|
|
3976
3841
|
*/
|
|
@@ -3998,7 +3863,6 @@ export class PressurePlatePushAfterEventSignal {
|
|
|
3998
3863
|
}
|
|
3999
3864
|
|
|
4000
3865
|
/**
|
|
4001
|
-
* @beta
|
|
4002
3866
|
* Contains objectives and participants for the scoreboard.
|
|
4003
3867
|
*/
|
|
4004
3868
|
export class Scoreboard {
|
|
@@ -4076,7 +3940,6 @@ export class Scoreboard {
|
|
|
4076
3940
|
}
|
|
4077
3941
|
|
|
4078
3942
|
/**
|
|
4079
|
-
* @beta
|
|
4080
3943
|
* Contains an identity of the scoreboard item.
|
|
4081
3944
|
*/
|
|
4082
3945
|
export class ScoreboardIdentity {
|
|
@@ -4107,11 +3970,16 @@ export class ScoreboardIdentity {
|
|
|
4107
3970
|
* @throws This function can throw errors.
|
|
4108
3971
|
*/
|
|
4109
3972
|
getEntity(): Entity | undefined;
|
|
3973
|
+
/**
|
|
3974
|
+
* @remarks
|
|
3975
|
+
* Returns true if the ScoreboardIdentity reference is still
|
|
3976
|
+
* valid.
|
|
3977
|
+
*
|
|
3978
|
+
*/
|
|
4110
3979
|
isValid(): boolean;
|
|
4111
3980
|
}
|
|
4112
3981
|
|
|
4113
3982
|
/**
|
|
4114
|
-
* @beta
|
|
4115
3983
|
* Contains objectives and participants for the scoreboard.
|
|
4116
3984
|
*/
|
|
4117
3985
|
export class ScoreboardObjective {
|
|
@@ -4174,6 +4042,12 @@ export class ScoreboardObjective {
|
|
|
4174
4042
|
* @throws This function can throw errors.
|
|
4175
4043
|
*/
|
|
4176
4044
|
hasParticipant(participant: Entity | ScoreboardIdentity | string): boolean;
|
|
4045
|
+
/**
|
|
4046
|
+
* @remarks
|
|
4047
|
+
* Returns true if the ScoreboardObjective reference is still
|
|
4048
|
+
* valid.
|
|
4049
|
+
*
|
|
4050
|
+
*/
|
|
4177
4051
|
isValid(): boolean;
|
|
4178
4052
|
/**
|
|
4179
4053
|
* @remarks
|
|
@@ -4203,7 +4077,6 @@ export class ScoreboardObjective {
|
|
|
4203
4077
|
}
|
|
4204
4078
|
|
|
4205
4079
|
/**
|
|
4206
|
-
* @beta
|
|
4207
4080
|
* Contains a pair of a scoreboard participant and its
|
|
4208
4081
|
* respective score.
|
|
4209
4082
|
*/
|
|
@@ -4224,7 +4097,6 @@ export class ScoreboardScoreInfo {
|
|
|
4224
4097
|
}
|
|
4225
4098
|
|
|
4226
4099
|
/**
|
|
4227
|
-
* @beta
|
|
4228
4100
|
* Contains information about user interface elements that are
|
|
4229
4101
|
* showing up on the screen.
|
|
4230
4102
|
*/
|
|
@@ -4313,7 +4185,6 @@ export class ScreenDisplay {
|
|
|
4313
4185
|
}
|
|
4314
4186
|
|
|
4315
4187
|
/**
|
|
4316
|
-
* @beta
|
|
4317
4188
|
* Returns additional data about a /scriptevent command
|
|
4318
4189
|
* invocation.
|
|
4319
4190
|
*/
|
|
@@ -4362,7 +4233,6 @@ export class ScriptEventCommandMessageAfterEvent {
|
|
|
4362
4233
|
}
|
|
4363
4234
|
|
|
4364
4235
|
/**
|
|
4365
|
-
* @beta
|
|
4366
4236
|
* Allows for registering an event handler that responds to
|
|
4367
4237
|
* inbound /scriptevent commands.
|
|
4368
4238
|
*/
|
|
@@ -4396,7 +4266,6 @@ export class ScriptEventCommandMessageAfterEventSignal {
|
|
|
4396
4266
|
export class System {
|
|
4397
4267
|
private constructor();
|
|
4398
4268
|
/**
|
|
4399
|
-
* @beta
|
|
4400
4269
|
* @remarks
|
|
4401
4270
|
* Returns a collection of after-events for system-level
|
|
4402
4271
|
* operations.
|
|
@@ -4404,14 +4273,12 @@ export class System {
|
|
|
4404
4273
|
*/
|
|
4405
4274
|
readonly afterEvents: SystemAfterEvents;
|
|
4406
4275
|
/**
|
|
4407
|
-
* @beta
|
|
4408
4276
|
* @remarks
|
|
4409
4277
|
* Represents the current world tick of the server.
|
|
4410
4278
|
*
|
|
4411
4279
|
*/
|
|
4412
4280
|
readonly currentTick: number;
|
|
4413
4281
|
/**
|
|
4414
|
-
* @beta
|
|
4415
4282
|
* @remarks
|
|
4416
4283
|
* Cancels the execution of a function run that was previously
|
|
4417
4284
|
* scheduled via the `run` function.
|
|
@@ -4448,7 +4315,6 @@ export class System {
|
|
|
4448
4315
|
*/
|
|
4449
4316
|
run(callback: () => void): number;
|
|
4450
4317
|
/**
|
|
4451
|
-
* @beta
|
|
4452
4318
|
* @remarks
|
|
4453
4319
|
* Runs a set of code on an interval.
|
|
4454
4320
|
*
|
|
@@ -4471,7 +4337,6 @@ export class System {
|
|
|
4471
4337
|
*/
|
|
4472
4338
|
runInterval(callback: () => void, tickInterval?: number): number;
|
|
4473
4339
|
/**
|
|
4474
|
-
* @beta
|
|
4475
4340
|
* @remarks
|
|
4476
4341
|
* Runs a set of code at a future time specified by tickDelay.
|
|
4477
4342
|
*
|
|
@@ -4488,7 +4353,6 @@ export class System {
|
|
|
4488
4353
|
}
|
|
4489
4354
|
|
|
4490
4355
|
/**
|
|
4491
|
-
* @beta
|
|
4492
4356
|
* Provides a set of events that fire within the broader
|
|
4493
4357
|
* scripting system within Minecraft.
|
|
4494
4358
|
*/
|
|
@@ -4505,7 +4369,6 @@ export class SystemAfterEvents {
|
|
|
4505
4369
|
}
|
|
4506
4370
|
|
|
4507
4371
|
/**
|
|
4508
|
-
* @beta
|
|
4509
4372
|
* Contains information related to changes to a target block
|
|
4510
4373
|
* hit.
|
|
4511
4374
|
*/
|
|
@@ -4539,7 +4402,6 @@ export class TargetBlockHitAfterEvent extends BlockEvent {
|
|
|
4539
4402
|
}
|
|
4540
4403
|
|
|
4541
4404
|
/**
|
|
4542
|
-
* @beta
|
|
4543
4405
|
* Manages callbacks that are connected to when a target block
|
|
4544
4406
|
* is hit.
|
|
4545
4407
|
*/
|
|
@@ -4567,7 +4429,6 @@ export class TargetBlockHitAfterEventSignal {
|
|
|
4567
4429
|
}
|
|
4568
4430
|
|
|
4569
4431
|
/**
|
|
4570
|
-
* @beta
|
|
4571
4432
|
* Contains information related to changes to a trip wire trip.
|
|
4572
4433
|
*/
|
|
4573
4434
|
// @ts-ignore Class inheritance allowed for native defined classes
|
|
@@ -4588,7 +4449,6 @@ export class TripWireTripAfterEvent extends BlockEvent {
|
|
|
4588
4449
|
}
|
|
4589
4450
|
|
|
4590
4451
|
/**
|
|
4591
|
-
* @beta
|
|
4592
4452
|
* Manages callbacks that are connected to when a trip wire is
|
|
4593
4453
|
* tripped.
|
|
4594
4454
|
*/
|
|
@@ -4622,7 +4482,6 @@ export class TripWireTripAfterEventSignal {
|
|
|
4622
4482
|
export class World {
|
|
4623
4483
|
private constructor();
|
|
4624
4484
|
/**
|
|
4625
|
-
* @beta
|
|
4626
4485
|
* @remarks
|
|
4627
4486
|
* Contains a set of events that are applicable to the entirety
|
|
4628
4487
|
* of the world. Event callbacks are called in a deferred
|
|
@@ -4631,7 +4490,6 @@ export class World {
|
|
|
4631
4490
|
*/
|
|
4632
4491
|
readonly afterEvents: WorldAfterEvents;
|
|
4633
4492
|
/**
|
|
4634
|
-
* @beta
|
|
4635
4493
|
* @remarks
|
|
4636
4494
|
* Contains a set of events that are applicable to the entirety
|
|
4637
4495
|
* of the world. Event callbacks are called immediately. Event
|
|
@@ -4640,7 +4498,6 @@ export class World {
|
|
|
4640
4498
|
*/
|
|
4641
4499
|
readonly beforeEvents: WorldBeforeEvents;
|
|
4642
4500
|
/**
|
|
4643
|
-
* @beta
|
|
4644
4501
|
* @remarks
|
|
4645
4502
|
* Returns the general global scoreboard that applies to the
|
|
4646
4503
|
* world.
|
|
@@ -4648,7 +4505,6 @@ export class World {
|
|
|
4648
4505
|
*/
|
|
4649
4506
|
readonly scoreboard: Scoreboard;
|
|
4650
4507
|
/**
|
|
4651
|
-
* @beta
|
|
4652
4508
|
* @remarks
|
|
4653
4509
|
* Returns the absolute time since the start of the world.
|
|
4654
4510
|
*
|
|
@@ -4662,7 +4518,6 @@ export class World {
|
|
|
4662
4518
|
*/
|
|
4663
4519
|
getAllPlayers(): Player[];
|
|
4664
4520
|
/**
|
|
4665
|
-
* @beta
|
|
4666
4521
|
* @remarks
|
|
4667
4522
|
* Returns the current day.
|
|
4668
4523
|
*
|
|
@@ -4672,7 +4527,6 @@ export class World {
|
|
|
4672
4527
|
*/
|
|
4673
4528
|
getDay(): number;
|
|
4674
4529
|
/**
|
|
4675
|
-
* @beta
|
|
4676
4530
|
* @remarks
|
|
4677
4531
|
* Returns the default Overworld spawn location.
|
|
4678
4532
|
*
|
|
@@ -4696,7 +4550,6 @@ export class World {
|
|
|
4696
4550
|
*/
|
|
4697
4551
|
getDimension(dimensionId: string): Dimension;
|
|
4698
4552
|
/**
|
|
4699
|
-
* @beta
|
|
4700
4553
|
* @remarks
|
|
4701
4554
|
* Returns a set of players based on a set of conditions
|
|
4702
4555
|
* defined via the EntityQueryOptions set of filter criteria.
|
|
@@ -4711,7 +4564,6 @@ export class World {
|
|
|
4711
4564
|
*/
|
|
4712
4565
|
getPlayers(options?: EntityQueryOptions): Player[];
|
|
4713
4566
|
/**
|
|
4714
|
-
* @beta
|
|
4715
4567
|
* @remarks
|
|
4716
4568
|
* Returns the time of day.
|
|
4717
4569
|
*
|
|
@@ -4720,7 +4572,6 @@ export class World {
|
|
|
4720
4572
|
*/
|
|
4721
4573
|
getTimeOfDay(): number;
|
|
4722
4574
|
/**
|
|
4723
|
-
* @beta
|
|
4724
4575
|
* @remarks
|
|
4725
4576
|
* Plays a particular music track for all players.
|
|
4726
4577
|
*
|
|
@@ -4752,9 +4603,8 @@ export class World {
|
|
|
4752
4603
|
* players[0].playSound("bucket.fill_water", playerSoundOptions);
|
|
4753
4604
|
* ```
|
|
4754
4605
|
*/
|
|
4755
|
-
playMusic(
|
|
4606
|
+
playMusic(trackID: string, musicOptions?: MusicOptions): void;
|
|
4756
4607
|
/**
|
|
4757
|
-
* @beta
|
|
4758
4608
|
* @remarks
|
|
4759
4609
|
* Plays a sound for all players.
|
|
4760
4610
|
*
|
|
@@ -4790,23 +4640,23 @@ export class World {
|
|
|
4790
4640
|
* players[0].playSound("bucket.fill_water", playerSoundOptions);
|
|
4791
4641
|
* ```
|
|
4792
4642
|
*/
|
|
4793
|
-
playSound(
|
|
4643
|
+
playSound(soundID: string, location: Vector3, soundOptions?: WorldSoundOptions): void;
|
|
4794
4644
|
/**
|
|
4795
|
-
* @beta
|
|
4796
4645
|
* @remarks
|
|
4797
4646
|
* Queues an additional music track for players. If a track is
|
|
4798
4647
|
* not playing, a music track will play.
|
|
4799
4648
|
*
|
|
4800
4649
|
* This function can't be called in read-only mode.
|
|
4801
4650
|
*
|
|
4651
|
+
* @param musicOptions
|
|
4652
|
+
* Additional options for the music track.
|
|
4802
4653
|
* @throws
|
|
4803
4654
|
* An error will be thrown if volume is less than 0.0.
|
|
4804
4655
|
* An error will be thrown if fade is less than 0.0.
|
|
4805
4656
|
*
|
|
4806
4657
|
*/
|
|
4807
|
-
queueMusic(
|
|
4658
|
+
queueMusic(trackID: string, musicOptions?: MusicOptions): void;
|
|
4808
4659
|
/**
|
|
4809
|
-
* @beta
|
|
4810
4660
|
* @remarks
|
|
4811
4661
|
* Sends a message to all players.
|
|
4812
4662
|
*
|
|
@@ -4845,7 +4695,6 @@ export class World {
|
|
|
4845
4695
|
*/
|
|
4846
4696
|
sendMessage(message: (RawMessage | string)[] | RawMessage | string): void;
|
|
4847
4697
|
/**
|
|
4848
|
-
* @beta
|
|
4849
4698
|
* @remarks
|
|
4850
4699
|
* Sets the world time.
|
|
4851
4700
|
*
|
|
@@ -4856,7 +4705,6 @@ export class World {
|
|
|
4856
4705
|
*/
|
|
4857
4706
|
setAbsoluteTime(absoluteTime: number): void;
|
|
4858
4707
|
/**
|
|
4859
|
-
* @beta
|
|
4860
4708
|
* @remarks
|
|
4861
4709
|
* Sets a default spawn location for all players.
|
|
4862
4710
|
*
|
|
@@ -4867,10 +4715,13 @@ export class World {
|
|
|
4867
4715
|
* within the overworld dimension.
|
|
4868
4716
|
* @throws
|
|
4869
4717
|
* Throws if the provided spawn location is out of bounds.
|
|
4718
|
+
*
|
|
4719
|
+
* {@link Error}
|
|
4720
|
+
*
|
|
4721
|
+
* {@link LocationOutOfWorldBoundariesError}
|
|
4870
4722
|
*/
|
|
4871
4723
|
setDefaultSpawnLocation(spawnLocation: Vector3): void;
|
|
4872
4724
|
/**
|
|
4873
|
-
* @beta
|
|
4874
4725
|
* @remarks
|
|
4875
4726
|
* Sets the time of day.
|
|
4876
4727
|
*
|
|
@@ -4884,7 +4735,6 @@ export class World {
|
|
|
4884
4735
|
*/
|
|
4885
4736
|
setTimeOfDay(timeOfDay: number | TimeOfDay): void;
|
|
4886
4737
|
/**
|
|
4887
|
-
* @beta
|
|
4888
4738
|
* @remarks
|
|
4889
4739
|
* Stops any music tracks from playing.
|
|
4890
4740
|
*
|
|
@@ -4895,7 +4745,6 @@ export class World {
|
|
|
4895
4745
|
}
|
|
4896
4746
|
|
|
4897
4747
|
/**
|
|
4898
|
-
* @beta
|
|
4899
4748
|
* Contains a set of events that are available across the scope
|
|
4900
4749
|
* of the World.
|
|
4901
4750
|
*/
|
|
@@ -4908,21 +4757,18 @@ export class WorldAfterEvents {
|
|
|
4908
4757
|
*/
|
|
4909
4758
|
readonly buttonPush: ButtonPushAfterEventSignal;
|
|
4910
4759
|
/**
|
|
4911
|
-
* @beta
|
|
4912
4760
|
* @remarks
|
|
4913
4761
|
* This event fires when an entity dies.
|
|
4914
4762
|
*
|
|
4915
4763
|
*/
|
|
4916
4764
|
readonly entityDie: EntityDieAfterEventSignal;
|
|
4917
4765
|
/**
|
|
4918
|
-
* @beta
|
|
4919
4766
|
* @remarks
|
|
4920
4767
|
* This event fires when entity health changes in any degree.
|
|
4921
4768
|
*
|
|
4922
4769
|
*/
|
|
4923
4770
|
readonly entityHealthChanged: EntityHealthChangedAfterEventSignal;
|
|
4924
4771
|
/**
|
|
4925
|
-
* @beta
|
|
4926
4772
|
* @remarks
|
|
4927
4773
|
* This event fires when an entity hits (that is, melee
|
|
4928
4774
|
* attacks) a block.
|
|
@@ -4930,7 +4776,6 @@ export class WorldAfterEvents {
|
|
|
4930
4776
|
*/
|
|
4931
4777
|
readonly entityHitBlock: EntityHitBlockAfterEventSignal;
|
|
4932
4778
|
/**
|
|
4933
|
-
* @beta
|
|
4934
4779
|
* @remarks
|
|
4935
4780
|
* This event fires when an entity hits (that is, melee
|
|
4936
4781
|
* attacks) another entity.
|
|
@@ -4938,21 +4783,18 @@ export class WorldAfterEvents {
|
|
|
4938
4783
|
*/
|
|
4939
4784
|
readonly entityHitEntity: EntityHitEntityAfterEventSignal;
|
|
4940
4785
|
/**
|
|
4941
|
-
* @beta
|
|
4942
4786
|
* @remarks
|
|
4943
4787
|
* This event fires when an entity is hurt (takes damage).
|
|
4944
4788
|
*
|
|
4945
4789
|
*/
|
|
4946
4790
|
readonly entityHurt: EntityHurtAfterEventSignal;
|
|
4947
4791
|
/**
|
|
4948
|
-
* @beta
|
|
4949
4792
|
* @remarks
|
|
4950
4793
|
* This event fires when a chargeable item completes charging.
|
|
4951
4794
|
*
|
|
4952
4795
|
*/
|
|
4953
4796
|
readonly itemCompleteUse: ItemCompleteUseAfterEventSignal;
|
|
4954
4797
|
/**
|
|
4955
|
-
* @beta
|
|
4956
4798
|
* @remarks
|
|
4957
4799
|
* This event fires when a chargeable item is released from
|
|
4958
4800
|
* charging.
|
|
@@ -4960,14 +4802,12 @@ export class WorldAfterEvents {
|
|
|
4960
4802
|
*/
|
|
4961
4803
|
readonly itemReleaseUse: ItemReleaseUseAfterEventSignal;
|
|
4962
4804
|
/**
|
|
4963
|
-
* @beta
|
|
4964
4805
|
* @remarks
|
|
4965
4806
|
* This event fires when a chargeable item starts charging.
|
|
4966
4807
|
*
|
|
4967
4808
|
*/
|
|
4968
4809
|
readonly itemStartUse: ItemStartUseAfterEventSignal;
|
|
4969
4810
|
/**
|
|
4970
|
-
* @beta
|
|
4971
4811
|
* @remarks
|
|
4972
4812
|
* This event fires when a player successfully uses an item or
|
|
4973
4813
|
* places a block by pressing the Use Item / Place Block
|
|
@@ -4978,14 +4818,12 @@ export class WorldAfterEvents {
|
|
|
4978
4818
|
*/
|
|
4979
4819
|
readonly itemStartUseOn: ItemStartUseOnAfterEventSignal;
|
|
4980
4820
|
/**
|
|
4981
|
-
* @beta
|
|
4982
4821
|
* @remarks
|
|
4983
4822
|
* This event fires when a chargeable item stops charging.
|
|
4984
4823
|
*
|
|
4985
4824
|
*/
|
|
4986
4825
|
readonly itemStopUse: ItemStopUseAfterEventSignal;
|
|
4987
4826
|
/**
|
|
4988
|
-
* @beta
|
|
4989
4827
|
* @remarks
|
|
4990
4828
|
* This event fires when a player releases the Use Item / Place
|
|
4991
4829
|
* Block button after successfully using an item. Note: This
|
|
@@ -4994,7 +4832,6 @@ export class WorldAfterEvents {
|
|
|
4994
4832
|
*/
|
|
4995
4833
|
readonly itemStopUseOn: ItemStopUseOnAfterEventSignal;
|
|
4996
4834
|
/**
|
|
4997
|
-
* @beta
|
|
4998
4835
|
* @remarks
|
|
4999
4836
|
* This event fires when an item is successfully used by a
|
|
5000
4837
|
* player.
|
|
@@ -5002,7 +4839,6 @@ export class WorldAfterEvents {
|
|
|
5002
4839
|
*/
|
|
5003
4840
|
readonly itemUse: ItemUseAfterEventSignal;
|
|
5004
4841
|
/**
|
|
5005
|
-
* @beta
|
|
5006
4842
|
* @remarks
|
|
5007
4843
|
* This event fires when an item is used on a block by a
|
|
5008
4844
|
* player.
|
|
@@ -5038,7 +4874,6 @@ export class WorldAfterEvents {
|
|
|
5038
4874
|
*/
|
|
5039
4875
|
readonly playerSpawn: PlayerSpawnAfterEventSignal;
|
|
5040
4876
|
/**
|
|
5041
|
-
* @beta
|
|
5042
4877
|
* @remarks
|
|
5043
4878
|
* A pressure plate has popped back up (i.e., there are no
|
|
5044
4879
|
* entities on the pressure plate.)
|
|
@@ -5046,7 +4881,6 @@ export class WorldAfterEvents {
|
|
|
5046
4881
|
*/
|
|
5047
4882
|
readonly pressurePlatePop: PressurePlatePopAfterEventSignal;
|
|
5048
4883
|
/**
|
|
5049
|
-
* @beta
|
|
5050
4884
|
* @remarks
|
|
5051
4885
|
* A pressure plate has pushed (at least one entity has moved
|
|
5052
4886
|
* onto a pressure plate.)
|
|
@@ -5054,14 +4888,12 @@ export class WorldAfterEvents {
|
|
|
5054
4888
|
*/
|
|
5055
4889
|
readonly pressurePlatePush: PressurePlatePushAfterEventSignal;
|
|
5056
4890
|
/**
|
|
5057
|
-
* @beta
|
|
5058
4891
|
* @remarks
|
|
5059
4892
|
* A target block was hit.
|
|
5060
4893
|
*
|
|
5061
4894
|
*/
|
|
5062
4895
|
readonly targetBlockHit: TargetBlockHitAfterEventSignal;
|
|
5063
4896
|
/**
|
|
5064
|
-
* @beta
|
|
5065
4897
|
* @remarks
|
|
5066
4898
|
* A trip wire was tripped.
|
|
5067
4899
|
*
|
|
@@ -5070,7 +4902,6 @@ export class WorldAfterEvents {
|
|
|
5070
4902
|
}
|
|
5071
4903
|
|
|
5072
4904
|
/**
|
|
5073
|
-
* @beta
|
|
5074
4905
|
* A set of events that fire before an actual action occurs. In
|
|
5075
4906
|
* most cases, you can potentially cancel or modify the
|
|
5076
4907
|
* impending event. Note that in before events any APIs that
|
|
@@ -5096,7 +4927,6 @@ export class WorldBeforeEvents {
|
|
|
5096
4927
|
}
|
|
5097
4928
|
|
|
5098
4929
|
/**
|
|
5099
|
-
* @beta
|
|
5100
4930
|
* Contains information for block raycast hit results.
|
|
5101
4931
|
*/
|
|
5102
4932
|
export interface BlockRaycastHit {
|
|
@@ -5122,7 +4952,6 @@ export interface BlockRaycastHit {
|
|
|
5122
4952
|
}
|
|
5123
4953
|
|
|
5124
4954
|
/**
|
|
5125
|
-
* @beta
|
|
5126
4955
|
* Contains additional options for configuring a block raycast
|
|
5127
4956
|
* query.
|
|
5128
4957
|
*/
|
|
@@ -5150,7 +4979,6 @@ export interface BlockRaycastOptions {
|
|
|
5150
4979
|
}
|
|
5151
4980
|
|
|
5152
4981
|
/**
|
|
5153
|
-
* @beta
|
|
5154
4982
|
* An exact coordinate within the world, including its
|
|
5155
4983
|
* dimension and location.
|
|
5156
4984
|
*/
|
|
@@ -5182,7 +5010,6 @@ export interface DimensionLocation {
|
|
|
5182
5010
|
}
|
|
5183
5011
|
|
|
5184
5012
|
/**
|
|
5185
|
-
* @beta
|
|
5186
5013
|
* Additional options for when damage has been applied via a
|
|
5187
5014
|
* projectile.
|
|
5188
5015
|
*/
|
|
@@ -5202,7 +5029,6 @@ export interface EntityApplyDamageByProjectileOptions {
|
|
|
5202
5029
|
}
|
|
5203
5030
|
|
|
5204
5031
|
/**
|
|
5205
|
-
* @beta
|
|
5206
5032
|
* Additional descriptions and metadata for a damage event.
|
|
5207
5033
|
*/
|
|
5208
5034
|
export interface EntityApplyDamageOptions {
|
|
@@ -5221,7 +5047,6 @@ export interface EntityApplyDamageOptions {
|
|
|
5221
5047
|
}
|
|
5222
5048
|
|
|
5223
5049
|
/**
|
|
5224
|
-
* @beta
|
|
5225
5050
|
* Provides information about how damage has been applied to an
|
|
5226
5051
|
* entity.
|
|
5227
5052
|
*/
|
|
@@ -5247,7 +5072,6 @@ export interface EntityDamageSource {
|
|
|
5247
5072
|
}
|
|
5248
5073
|
|
|
5249
5074
|
/**
|
|
5250
|
-
* @beta
|
|
5251
5075
|
* Contains additional options for entity effects.
|
|
5252
5076
|
*/
|
|
5253
5077
|
export interface EntityEffectOptions {
|
|
@@ -5266,7 +5090,6 @@ export interface EntityEffectOptions {
|
|
|
5266
5090
|
}
|
|
5267
5091
|
|
|
5268
5092
|
/**
|
|
5269
|
-
* @beta
|
|
5270
5093
|
* Contains optional parameters for registering an entity
|
|
5271
5094
|
* event.
|
|
5272
5095
|
*/
|
|
@@ -5288,7 +5111,6 @@ export interface EntityEventOptions {
|
|
|
5288
5111
|
}
|
|
5289
5112
|
|
|
5290
5113
|
/**
|
|
5291
|
-
* @beta
|
|
5292
5114
|
* Contains options for selecting entities within an area.
|
|
5293
5115
|
*/
|
|
5294
5116
|
export interface EntityQueryOptions {
|
|
@@ -5451,7 +5273,6 @@ export interface EntityQueryOptions {
|
|
|
5451
5273
|
}
|
|
5452
5274
|
|
|
5453
5275
|
/**
|
|
5454
|
-
* @beta
|
|
5455
5276
|
* Contains additional options for filtering players based on
|
|
5456
5277
|
* their score for an objective.
|
|
5457
5278
|
*/
|
|
@@ -5486,7 +5307,6 @@ export interface EntityQueryScoreOptions {
|
|
|
5486
5307
|
}
|
|
5487
5308
|
|
|
5488
5309
|
/**
|
|
5489
|
-
* @beta
|
|
5490
5310
|
* Contains information for entity raycast hit results.
|
|
5491
5311
|
*/
|
|
5492
5312
|
export interface EntityRaycastHit {
|
|
@@ -5505,7 +5325,6 @@ export interface EntityRaycastHit {
|
|
|
5505
5325
|
}
|
|
5506
5326
|
|
|
5507
5327
|
/**
|
|
5508
|
-
* @beta
|
|
5509
5328
|
* Contains additional options for an entity raycast operation.
|
|
5510
5329
|
*/
|
|
5511
5330
|
export interface EntityRaycastOptions {
|
|
@@ -5518,7 +5337,6 @@ export interface EntityRaycastOptions {
|
|
|
5518
5337
|
}
|
|
5519
5338
|
|
|
5520
5339
|
/**
|
|
5521
|
-
* @beta
|
|
5522
5340
|
* Additional configuration options for {@link
|
|
5523
5341
|
* World.playMusic}/{@link World.queueMusic} methods.
|
|
5524
5342
|
*/
|
|
@@ -5544,7 +5362,6 @@ export interface MusicOptions {
|
|
|
5544
5362
|
}
|
|
5545
5363
|
|
|
5546
5364
|
/**
|
|
5547
|
-
* @beta
|
|
5548
5365
|
* Additional options for how a sound plays for a player.
|
|
5549
5366
|
*/
|
|
5550
5367
|
export interface PlayerSoundOptions {
|
|
@@ -5570,7 +5387,6 @@ export interface PlayerSoundOptions {
|
|
|
5570
5387
|
}
|
|
5571
5388
|
|
|
5572
5389
|
/**
|
|
5573
|
-
* @beta
|
|
5574
5390
|
* Defines a JSON structure that is used for more flexible.
|
|
5575
5391
|
*/
|
|
5576
5392
|
export interface RawMessage {
|
|
@@ -5612,7 +5428,6 @@ export interface RawMessage {
|
|
|
5612
5428
|
}
|
|
5613
5429
|
|
|
5614
5430
|
/**
|
|
5615
|
-
* @beta
|
|
5616
5431
|
* Provides a description of a score token to use within a raw
|
|
5617
5432
|
* message.
|
|
5618
5433
|
*/
|
|
@@ -5632,7 +5447,6 @@ export interface RawMessageScore {
|
|
|
5632
5447
|
}
|
|
5633
5448
|
|
|
5634
5449
|
/**
|
|
5635
|
-
* @beta
|
|
5636
5450
|
* Contains additional options for how a scoreboard should be
|
|
5637
5451
|
* displayed within its display slot.
|
|
5638
5452
|
*/
|
|
@@ -5652,7 +5466,6 @@ export interface ScoreboardObjectiveDisplayOptions {
|
|
|
5652
5466
|
}
|
|
5653
5467
|
|
|
5654
5468
|
/**
|
|
5655
|
-
* @beta
|
|
5656
5469
|
* Contains additional options for registering a script event
|
|
5657
5470
|
* event callback.
|
|
5658
5471
|
*/
|
|
@@ -5667,7 +5480,6 @@ export interface ScriptEventMessageFilterOptions {
|
|
|
5667
5480
|
}
|
|
5668
5481
|
|
|
5669
5482
|
/**
|
|
5670
|
-
* @beta
|
|
5671
5483
|
* Contains additional options for teleporting an entity.
|
|
5672
5484
|
*/
|
|
5673
5485
|
export interface TeleportOptions {
|
|
@@ -5707,7 +5519,6 @@ export interface TeleportOptions {
|
|
|
5707
5519
|
}
|
|
5708
5520
|
|
|
5709
5521
|
/**
|
|
5710
|
-
* @beta
|
|
5711
5522
|
* Contains additional options for displaying a title and
|
|
5712
5523
|
* optional subtitle.
|
|
5713
5524
|
*/
|
|
@@ -5746,7 +5557,6 @@ export interface TitleDisplayOptions {
|
|
|
5746
5557
|
}
|
|
5747
5558
|
|
|
5748
5559
|
/**
|
|
5749
|
-
* @beta
|
|
5750
5560
|
* Represents a two-directional vector.
|
|
5751
5561
|
*/
|
|
5752
5562
|
export interface Vector2 {
|
|
@@ -5765,7 +5575,6 @@ export interface Vector2 {
|
|
|
5765
5575
|
}
|
|
5766
5576
|
|
|
5767
5577
|
/**
|
|
5768
|
-
* @beta
|
|
5769
5578
|
* Contains a description of a vector.
|
|
5770
5579
|
*/
|
|
5771
5580
|
export interface Vector3 {
|
|
@@ -5790,7 +5599,6 @@ export interface Vector3 {
|
|
|
5790
5599
|
}
|
|
5791
5600
|
|
|
5792
5601
|
/**
|
|
5793
|
-
* @beta
|
|
5794
5602
|
* Contains additional options for a world-level playSound
|
|
5795
5603
|
* occurrence.
|
|
5796
5604
|
*/
|
|
@@ -5809,25 +5617,16 @@ export interface WorldSoundOptions {
|
|
|
5809
5617
|
volume?: number;
|
|
5810
5618
|
}
|
|
5811
5619
|
|
|
5812
|
-
/**
|
|
5813
|
-
* @beta
|
|
5814
|
-
*/
|
|
5815
5620
|
// @ts-ignore Class inheritance allowed for native defined classes
|
|
5816
5621
|
export class CommandError extends Error {
|
|
5817
5622
|
private constructor();
|
|
5818
5623
|
}
|
|
5819
5624
|
|
|
5820
|
-
/**
|
|
5821
|
-
* @beta
|
|
5822
|
-
*/
|
|
5823
5625
|
// @ts-ignore Class inheritance allowed for native defined classes
|
|
5824
5626
|
export class LocationInUnloadedChunkError extends Error {
|
|
5825
5627
|
private constructor();
|
|
5826
5628
|
}
|
|
5827
5629
|
|
|
5828
|
-
/**
|
|
5829
|
-
* @beta
|
|
5830
|
-
*/
|
|
5831
5630
|
// @ts-ignore Class inheritance allowed for native defined classes
|
|
5832
5631
|
export class LocationOutOfWorldBoundariesError extends Error {
|
|
5833
5632
|
private constructor();
|