@minecraft/server 1.4.0-rc.1.20.40-preview.21 → 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 +45 -316
- 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,26 +63,22 @@ export enum Direction {
|
|
|
71
63
|
}
|
|
72
64
|
|
|
73
65
|
/**
|
|
74
|
-
* @beta
|
|
75
66
|
* Specifies a mechanism for displaying scores on a scoreboard.
|
|
76
67
|
*/
|
|
77
68
|
export enum DisplaySlotId {
|
|
78
69
|
/**
|
|
79
|
-
* @beta
|
|
80
70
|
* @remarks
|
|
81
71
|
* Displays the score below the player's name.
|
|
82
72
|
*
|
|
83
73
|
*/
|
|
84
74
|
BelowName = 'BelowName',
|
|
85
75
|
/**
|
|
86
|
-
* @beta
|
|
87
76
|
* @remarks
|
|
88
77
|
* Displays the score as a list on the pause screen.
|
|
89
78
|
*
|
|
90
79
|
*/
|
|
91
80
|
List = 'List',
|
|
92
81
|
/**
|
|
93
|
-
* @beta
|
|
94
82
|
* @remarks
|
|
95
83
|
* Displays the score on the side of the player's screen.
|
|
96
84
|
*
|
|
@@ -98,9 +86,6 @@ export enum DisplaySlotId {
|
|
|
98
86
|
Sidebar = 'Sidebar',
|
|
99
87
|
}
|
|
100
88
|
|
|
101
|
-
/**
|
|
102
|
-
* @beta
|
|
103
|
-
*/
|
|
104
89
|
export enum EntityDamageCause {
|
|
105
90
|
anvil = 'anvil',
|
|
106
91
|
blockExplosion = 'blockExplosion',
|
|
@@ -136,12 +121,10 @@ export enum EntityDamageCause {
|
|
|
136
121
|
}
|
|
137
122
|
|
|
138
123
|
/**
|
|
139
|
-
* @beta
|
|
140
124
|
* Represents a game mode for the current world experience.
|
|
141
125
|
*/
|
|
142
126
|
export enum GameMode {
|
|
143
127
|
/**
|
|
144
|
-
* @beta
|
|
145
128
|
* @remarks
|
|
146
129
|
* World is in a more locked-down experience, where blocks may
|
|
147
130
|
* not be manipulated.
|
|
@@ -149,7 +132,6 @@ export enum GameMode {
|
|
|
149
132
|
*/
|
|
150
133
|
adventure = 'adventure',
|
|
151
134
|
/**
|
|
152
|
-
* @beta
|
|
153
135
|
* @remarks
|
|
154
136
|
* World is in a full creative mode. In creative mode, the
|
|
155
137
|
* player has all the resources available in the item selection
|
|
@@ -162,7 +144,6 @@ export enum GameMode {
|
|
|
162
144
|
*/
|
|
163
145
|
creative = 'creative',
|
|
164
146
|
/**
|
|
165
|
-
* @beta
|
|
166
147
|
* @remarks
|
|
167
148
|
* World is in spectator mode. In spectator mode, spectators
|
|
168
149
|
* are always flying and cannot become grounded. Spectators can
|
|
@@ -175,7 +156,6 @@ export enum GameMode {
|
|
|
175
156
|
*/
|
|
176
157
|
spectator = 'spectator',
|
|
177
158
|
/**
|
|
178
|
-
* @beta
|
|
179
159
|
* @remarks
|
|
180
160
|
* World is in a survival mode, where players can take damage
|
|
181
161
|
* and entities may not be peaceful. Survival mode is where the
|
|
@@ -188,26 +168,22 @@ export enum GameMode {
|
|
|
188
168
|
}
|
|
189
169
|
|
|
190
170
|
/**
|
|
191
|
-
* @beta
|
|
192
171
|
* Describes how an an item can be moved within a container.
|
|
193
172
|
*/
|
|
194
173
|
export enum ItemLockMode {
|
|
195
174
|
/**
|
|
196
|
-
* @beta
|
|
197
175
|
* @remarks
|
|
198
176
|
* The item cannot be dropped or crafted with.
|
|
199
177
|
*
|
|
200
178
|
*/
|
|
201
179
|
inventory = 'inventory',
|
|
202
180
|
/**
|
|
203
|
-
* @beta
|
|
204
181
|
* @remarks
|
|
205
182
|
* The item has no container restrictions.
|
|
206
183
|
*
|
|
207
184
|
*/
|
|
208
185
|
none = 'none',
|
|
209
186
|
/**
|
|
210
|
-
* @beta
|
|
211
187
|
* @remarks
|
|
212
188
|
* The item cannot be moved from its slot, dropped or crafted
|
|
213
189
|
* with.
|
|
@@ -217,13 +193,11 @@ export enum ItemLockMode {
|
|
|
217
193
|
}
|
|
218
194
|
|
|
219
195
|
/**
|
|
220
|
-
* @beta
|
|
221
196
|
* Used for specifying a sort order for how to display an
|
|
222
197
|
* objective and its list of participants.
|
|
223
198
|
*/
|
|
224
199
|
export enum ObjectiveSortOrder {
|
|
225
200
|
/**
|
|
226
|
-
* @beta
|
|
227
201
|
* @remarks
|
|
228
202
|
* Objective participant list is displayed in ascending (e.g.,
|
|
229
203
|
* A-Z) order.
|
|
@@ -231,7 +205,6 @@ export enum ObjectiveSortOrder {
|
|
|
231
205
|
*/
|
|
232
206
|
Ascending = 0,
|
|
233
207
|
/**
|
|
234
|
-
* @beta
|
|
235
208
|
* @remarks
|
|
236
209
|
* Objective participant list is displayed in descending (e.g.,
|
|
237
210
|
* Z-A) order.
|
|
@@ -241,19 +214,16 @@ export enum ObjectiveSortOrder {
|
|
|
241
214
|
}
|
|
242
215
|
|
|
243
216
|
/**
|
|
244
|
-
* @beta
|
|
245
217
|
* Contains objectives and participants for the scoreboard.
|
|
246
218
|
*/
|
|
247
219
|
export enum ScoreboardIdentityType {
|
|
248
220
|
/**
|
|
249
|
-
* @beta
|
|
250
221
|
* @remarks
|
|
251
222
|
* This scoreboard participant is tied to an entity.
|
|
252
223
|
*
|
|
253
224
|
*/
|
|
254
225
|
Entity = 'Entity',
|
|
255
226
|
/**
|
|
256
|
-
* @beta
|
|
257
227
|
* @remarks
|
|
258
228
|
* This scoreboard participant is tied to a pseudo player
|
|
259
229
|
* entity - typically this is used to store scores as data or
|
|
@@ -262,7 +232,6 @@ export enum ScoreboardIdentityType {
|
|
|
262
232
|
*/
|
|
263
233
|
FakePlayer = 'FakePlayer',
|
|
264
234
|
/**
|
|
265
|
-
* @beta
|
|
266
235
|
* @remarks
|
|
267
236
|
* This scoreboard participant is tied to a player.
|
|
268
237
|
*
|
|
@@ -271,12 +240,10 @@ export enum ScoreboardIdentityType {
|
|
|
271
240
|
}
|
|
272
241
|
|
|
273
242
|
/**
|
|
274
|
-
* @beta
|
|
275
243
|
* Describes where the script event originated from.
|
|
276
244
|
*/
|
|
277
245
|
export enum ScriptEventSource {
|
|
278
246
|
/**
|
|
279
|
-
* @beta
|
|
280
247
|
* @remarks
|
|
281
248
|
* The script event originated from a Block such as a Command
|
|
282
249
|
* Block.
|
|
@@ -284,7 +251,6 @@ export enum ScriptEventSource {
|
|
|
284
251
|
*/
|
|
285
252
|
Block = 'Block',
|
|
286
253
|
/**
|
|
287
|
-
* @beta
|
|
288
254
|
* @remarks
|
|
289
255
|
* The script event originated from an Entity such as a Player,
|
|
290
256
|
* Command Block Minecart or Animation Controller.
|
|
@@ -292,14 +258,12 @@ export enum ScriptEventSource {
|
|
|
292
258
|
*/
|
|
293
259
|
Entity = 'Entity',
|
|
294
260
|
/**
|
|
295
|
-
* @beta
|
|
296
261
|
* @remarks
|
|
297
262
|
* The script event originated from an NPC dialogue.
|
|
298
263
|
*
|
|
299
264
|
*/
|
|
300
265
|
NPCDialogue = 'NPCDialogue',
|
|
301
266
|
/**
|
|
302
|
-
* @beta
|
|
303
267
|
* @remarks
|
|
304
268
|
* The script event originated from the server, such as from a
|
|
305
269
|
* runCommand API call or a dedicated server console.
|
|
@@ -309,7 +273,6 @@ export enum ScriptEventSource {
|
|
|
309
273
|
}
|
|
310
274
|
|
|
311
275
|
/**
|
|
312
|
-
* @beta
|
|
313
276
|
* Provides numeric values for common periods in the Minecraft
|
|
314
277
|
* day.
|
|
315
278
|
*/
|
|
@@ -323,7 +286,6 @@ export enum TimeOfDay {
|
|
|
323
286
|
}
|
|
324
287
|
|
|
325
288
|
/**
|
|
326
|
-
* @beta
|
|
327
289
|
* Represents a block in a dimension. A block represents a
|
|
328
290
|
* unique X, Y, and Z within a dimension and get/sets the state
|
|
329
291
|
* of the block at that location. This type was significantly
|
|
@@ -350,6 +312,10 @@ export class Block {
|
|
|
350
312
|
* block.
|
|
351
313
|
*
|
|
352
314
|
* @throws This property can throw when used.
|
|
315
|
+
*
|
|
316
|
+
* {@link LocationInUnloadedChunkError}
|
|
317
|
+
*
|
|
318
|
+
* {@link LocationOutOfWorldBoundariesError}
|
|
353
319
|
*/
|
|
354
320
|
readonly permutation: BlockPermutation;
|
|
355
321
|
/**
|
|
@@ -371,7 +337,6 @@ export class Block {
|
|
|
371
337
|
*/
|
|
372
338
|
readonly z: number;
|
|
373
339
|
/**
|
|
374
|
-
* @beta
|
|
375
340
|
* @remarks
|
|
376
341
|
* Gets additional configuration properties (a component) for
|
|
377
342
|
* specific capabilities of particular blocks - for example, an
|
|
@@ -384,10 +349,13 @@ export class Block {
|
|
|
384
349
|
* Returns the component object if it is present on the
|
|
385
350
|
* particular block.
|
|
386
351
|
* @throws This function can throw errors.
|
|
352
|
+
*
|
|
353
|
+
* {@link LocationInUnloadedChunkError}
|
|
354
|
+
*
|
|
355
|
+
* {@link LocationOutOfWorldBoundariesError}
|
|
387
356
|
*/
|
|
388
357
|
getComponent(componentName: string): BlockComponent | undefined;
|
|
389
358
|
/**
|
|
390
|
-
* @beta
|
|
391
359
|
* @remarks
|
|
392
360
|
* Returns true if this reference to a block is still valid
|
|
393
361
|
* (for example, if the block is unloaded, references to that
|
|
@@ -408,19 +376,21 @@ export class Block {
|
|
|
408
376
|
* Permutation that contains a set of property states for the
|
|
409
377
|
* Block.
|
|
410
378
|
* @throws This function can throw errors.
|
|
379
|
+
*
|
|
380
|
+
* {@link LocationInUnloadedChunkError}
|
|
381
|
+
*
|
|
382
|
+
* {@link LocationOutOfWorldBoundariesError}
|
|
411
383
|
*/
|
|
412
384
|
setPermutation(permutation: BlockPermutation): void;
|
|
413
385
|
}
|
|
414
386
|
|
|
415
387
|
/**
|
|
416
|
-
* @beta
|
|
417
388
|
* Base type for components associated with blocks.
|
|
418
389
|
*/
|
|
419
390
|
// @ts-ignore Class inheritance allowed for native defined classes
|
|
420
391
|
export class BlockComponent extends Component {
|
|
421
392
|
private constructor();
|
|
422
393
|
/**
|
|
423
|
-
* @beta
|
|
424
394
|
* @remarks
|
|
425
395
|
* Block instance that this component pertains to.
|
|
426
396
|
*
|
|
@@ -429,7 +399,6 @@ export class BlockComponent extends Component {
|
|
|
429
399
|
}
|
|
430
400
|
|
|
431
401
|
/**
|
|
432
|
-
* @beta
|
|
433
402
|
* Contains information regarding an event that impacts a
|
|
434
403
|
* specific block.
|
|
435
404
|
*/
|
|
@@ -451,7 +420,6 @@ export class BlockEvent {
|
|
|
451
420
|
}
|
|
452
421
|
|
|
453
422
|
/**
|
|
454
|
-
* @beta
|
|
455
423
|
* Represents the inventory of a block in the world. Used with
|
|
456
424
|
* blocks like chests.
|
|
457
425
|
*/
|
|
@@ -469,7 +437,6 @@ export class BlockInventoryComponent extends BlockComponent {
|
|
|
469
437
|
}
|
|
470
438
|
|
|
471
439
|
/**
|
|
472
|
-
* @beta
|
|
473
440
|
* Contains the combination of type {@link BlockType} and
|
|
474
441
|
* properties (also sometimes called block state) which
|
|
475
442
|
* describe a block (but does not belong to a specific {@link
|
|
@@ -541,7 +508,6 @@ export class BlockPermutation {
|
|
|
541
508
|
}
|
|
542
509
|
|
|
543
510
|
/**
|
|
544
|
-
* @beta
|
|
545
511
|
* Contains information related to changes to a button push.
|
|
546
512
|
*/
|
|
547
513
|
// @ts-ignore Class inheritance allowed for native defined classes
|
|
@@ -556,7 +522,6 @@ export class ButtonPushAfterEvent extends BlockEvent {
|
|
|
556
522
|
}
|
|
557
523
|
|
|
558
524
|
/**
|
|
559
|
-
* @beta
|
|
560
525
|
* Manages callbacks that are connected to when a button is
|
|
561
526
|
* pushed.
|
|
562
527
|
*/
|
|
@@ -581,7 +546,6 @@ export class CommandResult {
|
|
|
581
546
|
}
|
|
582
547
|
|
|
583
548
|
/**
|
|
584
|
-
* @beta
|
|
585
549
|
* Base class for downstream Component implementations.
|
|
586
550
|
*/
|
|
587
551
|
export class Component {
|
|
@@ -593,7 +557,6 @@ export class Component {
|
|
|
593
557
|
*/
|
|
594
558
|
readonly typeId: string;
|
|
595
559
|
/**
|
|
596
|
-
* @beta
|
|
597
560
|
* @remarks
|
|
598
561
|
* Returns whether the component is valid. A component is
|
|
599
562
|
* considered valid if its owner is valid, in addition to any
|
|
@@ -607,7 +570,6 @@ export class Component {
|
|
|
607
570
|
}
|
|
608
571
|
|
|
609
572
|
/**
|
|
610
|
-
* @beta
|
|
611
573
|
* Represents a container that can hold sets of items. Used
|
|
612
574
|
* with entities such as Players, Chest Minecarts, Llamas, and
|
|
613
575
|
* more.
|
|
@@ -679,7 +641,6 @@ export class Container {
|
|
|
679
641
|
*/
|
|
680
642
|
getItem(slot: number): ItemStack | undefined;
|
|
681
643
|
/**
|
|
682
|
-
* @beta
|
|
683
644
|
* @remarks
|
|
684
645
|
* Returns whether a container object (or the entity or block
|
|
685
646
|
* that this container is associated with) is still available
|
|
@@ -795,7 +756,6 @@ export class Dimension {
|
|
|
795
756
|
*/
|
|
796
757
|
readonly id: string;
|
|
797
758
|
/**
|
|
798
|
-
* @beta
|
|
799
759
|
* @remarks
|
|
800
760
|
* Returns a block instance at the given location.
|
|
801
761
|
*
|
|
@@ -813,10 +773,13 @@ export class Dimension {
|
|
|
813
773
|
* trying to interact with a position outside of dimension
|
|
814
774
|
* height range
|
|
815
775
|
*
|
|
776
|
+
*
|
|
777
|
+
* {@link LocationInUnloadedChunkError}
|
|
778
|
+
*
|
|
779
|
+
* {@link LocationOutOfWorldBoundariesError}
|
|
816
780
|
*/
|
|
817
781
|
getBlock(location: Vector3): Block | undefined;
|
|
818
782
|
/**
|
|
819
|
-
* @beta
|
|
820
783
|
* @remarks
|
|
821
784
|
* Gets the first block that intersects with a vector emanating
|
|
822
785
|
* from a location.
|
|
@@ -830,7 +793,6 @@ export class Dimension {
|
|
|
830
793
|
*/
|
|
831
794
|
getBlockFromRay(location: Vector3, direction: Vector3, options?: BlockRaycastOptions): BlockRaycastHit | undefined;
|
|
832
795
|
/**
|
|
833
|
-
* @beta
|
|
834
796
|
* @remarks
|
|
835
797
|
* Returns a set of entities based on a set of conditions
|
|
836
798
|
* defined via the EntityQueryOptions set of filter criteria.
|
|
@@ -899,7 +861,6 @@ export class Dimension {
|
|
|
899
861
|
*/
|
|
900
862
|
getEntities(options?: EntityQueryOptions): Entity[];
|
|
901
863
|
/**
|
|
902
|
-
* @beta
|
|
903
864
|
* @remarks
|
|
904
865
|
* Returns a set of entities at a particular location.
|
|
905
866
|
*
|
|
@@ -910,7 +871,6 @@ export class Dimension {
|
|
|
910
871
|
*/
|
|
911
872
|
getEntitiesAtBlockLocation(location: Vector3): Entity[];
|
|
912
873
|
/**
|
|
913
|
-
* @beta
|
|
914
874
|
* @remarks
|
|
915
875
|
* Gets entities that intersect with a specified vector
|
|
916
876
|
* emanating from a location.
|
|
@@ -920,7 +880,6 @@ export class Dimension {
|
|
|
920
880
|
*/
|
|
921
881
|
getEntitiesFromRay(location: Vector3, direction: Vector3, options?: EntityRaycastOptions): EntityRaycastHit[];
|
|
922
882
|
/**
|
|
923
|
-
* @beta
|
|
924
883
|
* @remarks
|
|
925
884
|
* Returns a set of players based on a set of conditions
|
|
926
885
|
* defined via the EntityQueryOptions set of filter criteria.
|
|
@@ -934,7 +893,6 @@ export class Dimension {
|
|
|
934
893
|
*/
|
|
935
894
|
getPlayers(options?: EntityQueryOptions): Player[];
|
|
936
895
|
/**
|
|
937
|
-
* @beta
|
|
938
896
|
* @remarks
|
|
939
897
|
* Runs a command synchronously using the context of the
|
|
940
898
|
* broader dimenion.
|
|
@@ -953,6 +911,8 @@ export class Dimension {
|
|
|
953
911
|
* command. Note that in many cases, if the command does not
|
|
954
912
|
* operate (e.g., a target selector found no matches), this
|
|
955
913
|
* method will not throw an exception.
|
|
914
|
+
*
|
|
915
|
+
* {@link CommandError}
|
|
956
916
|
*/
|
|
957
917
|
runCommand(commandString: string): CommandResult;
|
|
958
918
|
/**
|
|
@@ -977,7 +937,6 @@ export class Dimension {
|
|
|
977
937
|
*/
|
|
978
938
|
runCommandAsync(commandString: string): Promise<CommandResult>;
|
|
979
939
|
/**
|
|
980
|
-
* @beta
|
|
981
940
|
* @remarks
|
|
982
941
|
* Creates a new entity (e.g., a mob) at the specified
|
|
983
942
|
* location.
|
|
@@ -992,6 +951,10 @@ export class Dimension {
|
|
|
992
951
|
* @returns
|
|
993
952
|
* Newly created entity at the specified location.
|
|
994
953
|
* @throws This function can throw errors.
|
|
954
|
+
*
|
|
955
|
+
* {@link LocationInUnloadedChunkError}
|
|
956
|
+
*
|
|
957
|
+
* {@link LocationOutOfWorldBoundariesError}
|
|
995
958
|
* @example createOldHorse.ts
|
|
996
959
|
* ```typescript
|
|
997
960
|
* const overworld = mc.world.getDimension("overworld");
|
|
@@ -1034,7 +997,6 @@ export class Dimension {
|
|
|
1034
997
|
*/
|
|
1035
998
|
spawnEntity(identifier: string, location: Vector3): Entity;
|
|
1036
999
|
/**
|
|
1037
|
-
* @beta
|
|
1038
1000
|
* @remarks
|
|
1039
1001
|
* Creates a new item stack as an entity at the specified
|
|
1040
1002
|
* location.
|
|
@@ -1046,6 +1008,10 @@ export class Dimension {
|
|
|
1046
1008
|
* @returns
|
|
1047
1009
|
* Newly created item stack entity at the specified location.
|
|
1048
1010
|
* @throws This function can throw errors.
|
|
1011
|
+
*
|
|
1012
|
+
* {@link LocationInUnloadedChunkError}
|
|
1013
|
+
*
|
|
1014
|
+
* {@link LocationOutOfWorldBoundariesError}
|
|
1049
1015
|
* @example itemStacks.ts
|
|
1050
1016
|
* ```typescript
|
|
1051
1017
|
* const overworld = mc.world.getDimension('overworld');
|
|
@@ -1079,7 +1045,6 @@ export class Dimension {
|
|
|
1079
1045
|
}
|
|
1080
1046
|
|
|
1081
1047
|
/**
|
|
1082
|
-
* @beta
|
|
1083
1048
|
* Represents an effect - like poison - that has been added to
|
|
1084
1049
|
* an Entity.
|
|
1085
1050
|
*/
|
|
@@ -1128,7 +1093,6 @@ export class Effect {
|
|
|
1128
1093
|
}
|
|
1129
1094
|
|
|
1130
1095
|
/**
|
|
1131
|
-
* @beta
|
|
1132
1096
|
* Represents a type of effect - like poison - that can be
|
|
1133
1097
|
* applied to an entity.
|
|
1134
1098
|
*/
|
|
@@ -1151,7 +1115,6 @@ export class EffectType {
|
|
|
1151
1115
|
export class Entity {
|
|
1152
1116
|
private constructor();
|
|
1153
1117
|
/**
|
|
1154
|
-
* @beta
|
|
1155
1118
|
* @remarks
|
|
1156
1119
|
* Dimension that the entity is currently within.
|
|
1157
1120
|
*
|
|
@@ -1170,7 +1133,6 @@ export class Entity {
|
|
|
1170
1133
|
*/
|
|
1171
1134
|
readonly id: string;
|
|
1172
1135
|
/**
|
|
1173
|
-
* @beta
|
|
1174
1136
|
* @remarks
|
|
1175
1137
|
* Current location of the entity.
|
|
1176
1138
|
*
|
|
@@ -1178,7 +1140,6 @@ export class Entity {
|
|
|
1178
1140
|
*/
|
|
1179
1141
|
readonly location: Vector3;
|
|
1180
1142
|
/**
|
|
1181
|
-
* @beta
|
|
1182
1143
|
* @remarks
|
|
1183
1144
|
* Given name of the entity.
|
|
1184
1145
|
*
|
|
@@ -1187,7 +1148,6 @@ export class Entity {
|
|
|
1187
1148
|
*/
|
|
1188
1149
|
nameTag: string;
|
|
1189
1150
|
/**
|
|
1190
|
-
* @beta
|
|
1191
1151
|
* @remarks
|
|
1192
1152
|
* Returns a scoreboard identity that represents this entity.
|
|
1193
1153
|
* Will remain valid when the entity is killed.
|
|
@@ -1203,7 +1163,6 @@ export class Entity {
|
|
|
1203
1163
|
*/
|
|
1204
1164
|
readonly typeId: string;
|
|
1205
1165
|
/**
|
|
1206
|
-
* @beta
|
|
1207
1166
|
* @remarks
|
|
1208
1167
|
* Adds or updates an effect, like poison, to the entity.
|
|
1209
1168
|
*
|
|
@@ -1262,7 +1221,6 @@ export class Entity {
|
|
|
1262
1221
|
*/
|
|
1263
1222
|
addEffect(effectType: EffectType | string, duration: number, options?: EntityEffectOptions): void;
|
|
1264
1223
|
/**
|
|
1265
|
-
* @beta
|
|
1266
1224
|
* @remarks
|
|
1267
1225
|
* Adds a specified tag to an entity.
|
|
1268
1226
|
*
|
|
@@ -1297,7 +1255,6 @@ export class Entity {
|
|
|
1297
1255
|
*/
|
|
1298
1256
|
addTag(tag: string): boolean;
|
|
1299
1257
|
/**
|
|
1300
|
-
* @beta
|
|
1301
1258
|
* @remarks
|
|
1302
1259
|
* Applies a set of damage to an entity.
|
|
1303
1260
|
*
|
|
@@ -1330,7 +1287,6 @@ export class Entity {
|
|
|
1330
1287
|
*/
|
|
1331
1288
|
applyDamage(amount: number, options?: EntityApplyDamageByProjectileOptions | EntityApplyDamageOptions): boolean;
|
|
1332
1289
|
/**
|
|
1333
|
-
* @beta
|
|
1334
1290
|
* @remarks
|
|
1335
1291
|
* Applies impulse vector to the current velocity of the
|
|
1336
1292
|
* entity.
|
|
@@ -1352,7 +1308,6 @@ export class Entity {
|
|
|
1352
1308
|
*/
|
|
1353
1309
|
applyImpulse(vector: Vector3): void;
|
|
1354
1310
|
/**
|
|
1355
|
-
* @beta
|
|
1356
1311
|
* @remarks
|
|
1357
1312
|
* Applies impulse vector to the current velocity of the
|
|
1358
1313
|
* entity.
|
|
@@ -1388,7 +1343,6 @@ export class Entity {
|
|
|
1388
1343
|
*/
|
|
1389
1344
|
applyKnockback(directionX: number, directionZ: number, horizontalStrength: number, verticalStrength: number): void;
|
|
1390
1345
|
/**
|
|
1391
|
-
* @beta
|
|
1392
1346
|
* @remarks
|
|
1393
1347
|
* Sets the current velocity of the Entity to zero. Note that
|
|
1394
1348
|
* this method may not have an impact on Players.
|
|
@@ -1408,7 +1362,6 @@ export class Entity {
|
|
|
1408
1362
|
*/
|
|
1409
1363
|
clearVelocity(): void;
|
|
1410
1364
|
/**
|
|
1411
|
-
* @beta
|
|
1412
1365
|
* @remarks
|
|
1413
1366
|
* Returns the first intersecting block from the direction that
|
|
1414
1367
|
* this entity is looking at.
|
|
@@ -1422,7 +1375,6 @@ export class Entity {
|
|
|
1422
1375
|
*/
|
|
1423
1376
|
getBlockFromViewDirection(options?: BlockRaycastOptions): BlockRaycastHit | undefined;
|
|
1424
1377
|
/**
|
|
1425
|
-
* @beta
|
|
1426
1378
|
* @remarks
|
|
1427
1379
|
* Gets a component (that represents additional capabilities)
|
|
1428
1380
|
* for an entity.
|
|
@@ -1438,7 +1390,6 @@ export class Entity {
|
|
|
1438
1390
|
*/
|
|
1439
1391
|
getComponent(componentId: string): EntityComponent | undefined;
|
|
1440
1392
|
/**
|
|
1441
|
-
* @beta
|
|
1442
1393
|
* @remarks
|
|
1443
1394
|
* Returns all components that are both present on this entity
|
|
1444
1395
|
* and supported by the API.
|
|
@@ -1449,7 +1400,6 @@ export class Entity {
|
|
|
1449
1400
|
*/
|
|
1450
1401
|
getComponents(): EntityComponent[];
|
|
1451
1402
|
/**
|
|
1452
|
-
* @beta
|
|
1453
1403
|
* @remarks
|
|
1454
1404
|
* Returns the effect for the specified EffectType on the
|
|
1455
1405
|
* entity, undefined if the effect is not present, or throws an
|
|
@@ -1465,7 +1415,6 @@ export class Entity {
|
|
|
1465
1415
|
*/
|
|
1466
1416
|
getEffect(effectType: EffectType | string): Effect | undefined;
|
|
1467
1417
|
/**
|
|
1468
|
-
* @beta
|
|
1469
1418
|
* @remarks
|
|
1470
1419
|
* Returns a set of effects applied to this entity.
|
|
1471
1420
|
*
|
|
@@ -1475,7 +1424,6 @@ export class Entity {
|
|
|
1475
1424
|
*/
|
|
1476
1425
|
getEffects(): Effect[];
|
|
1477
1426
|
/**
|
|
1478
|
-
* @beta
|
|
1479
1427
|
* @remarks
|
|
1480
1428
|
* Gets the entities that this entity is looking at by
|
|
1481
1429
|
* performing a ray cast from the view of this entity.
|
|
@@ -1489,7 +1437,6 @@ export class Entity {
|
|
|
1489
1437
|
*/
|
|
1490
1438
|
getEntitiesFromViewDirection(options?: EntityRaycastOptions): EntityRaycastHit[];
|
|
1491
1439
|
/**
|
|
1492
|
-
* @beta
|
|
1493
1440
|
* @remarks
|
|
1494
1441
|
* Returns the current location of the head component of this
|
|
1495
1442
|
* entity.
|
|
@@ -1501,7 +1448,6 @@ export class Entity {
|
|
|
1501
1448
|
*/
|
|
1502
1449
|
getHeadLocation(): Vector3;
|
|
1503
1450
|
/**
|
|
1504
|
-
* @beta
|
|
1505
1451
|
* @remarks
|
|
1506
1452
|
* Returns all tags associated with an entity.
|
|
1507
1453
|
*
|
|
@@ -1511,7 +1457,6 @@ export class Entity {
|
|
|
1511
1457
|
*/
|
|
1512
1458
|
getTags(): string[];
|
|
1513
1459
|
/**
|
|
1514
|
-
* @beta
|
|
1515
1460
|
* @remarks
|
|
1516
1461
|
* Returns the current velocity vector of the entity.
|
|
1517
1462
|
*
|
|
@@ -1531,7 +1476,6 @@ export class Entity {
|
|
|
1531
1476
|
*/
|
|
1532
1477
|
getVelocity(): Vector3;
|
|
1533
1478
|
/**
|
|
1534
|
-
* @beta
|
|
1535
1479
|
* @remarks
|
|
1536
1480
|
* Returns the current view direction of the entity.
|
|
1537
1481
|
*
|
|
@@ -1541,7 +1485,6 @@ export class Entity {
|
|
|
1541
1485
|
*/
|
|
1542
1486
|
getViewDirection(): Vector3;
|
|
1543
1487
|
/**
|
|
1544
|
-
* @beta
|
|
1545
1488
|
* @remarks
|
|
1546
1489
|
* Returns true if the specified component is present on this
|
|
1547
1490
|
* entity.
|
|
@@ -1556,7 +1499,6 @@ export class Entity {
|
|
|
1556
1499
|
*/
|
|
1557
1500
|
hasComponent(componentId: string): boolean;
|
|
1558
1501
|
/**
|
|
1559
|
-
* @beta
|
|
1560
1502
|
* @remarks
|
|
1561
1503
|
* Returns whether an entity has a particular tag.
|
|
1562
1504
|
*
|
|
@@ -1568,7 +1510,6 @@ export class Entity {
|
|
|
1568
1510
|
*/
|
|
1569
1511
|
hasTag(tag: string): boolean;
|
|
1570
1512
|
/**
|
|
1571
|
-
* @beta
|
|
1572
1513
|
* @remarks
|
|
1573
1514
|
* Returns whether the entity can be manipulated by script. A
|
|
1574
1515
|
* Player is considered valid when it's EntityLifetimeState is
|
|
@@ -1579,7 +1520,6 @@ export class Entity {
|
|
|
1579
1520
|
*/
|
|
1580
1521
|
isValid(): boolean;
|
|
1581
1522
|
/**
|
|
1582
|
-
* @beta
|
|
1583
1523
|
* @remarks
|
|
1584
1524
|
* Kills this entity. The entity will drop loot as normal.
|
|
1585
1525
|
*
|
|
@@ -1611,7 +1551,6 @@ export class Entity {
|
|
|
1611
1551
|
*/
|
|
1612
1552
|
kill(): boolean;
|
|
1613
1553
|
/**
|
|
1614
|
-
* @beta
|
|
1615
1554
|
* @remarks
|
|
1616
1555
|
* Removes the specified EffectType on the entity, or returns
|
|
1617
1556
|
* false if the effect is not present.
|
|
@@ -1627,7 +1566,6 @@ export class Entity {
|
|
|
1627
1566
|
*/
|
|
1628
1567
|
removeEffect(effectType: EffectType | string): boolean;
|
|
1629
1568
|
/**
|
|
1630
|
-
* @beta
|
|
1631
1569
|
* @remarks
|
|
1632
1570
|
* Removes a specified tag from an entity.
|
|
1633
1571
|
*
|
|
@@ -1641,7 +1579,6 @@ export class Entity {
|
|
|
1641
1579
|
*/
|
|
1642
1580
|
removeTag(tag: string): boolean;
|
|
1643
1581
|
/**
|
|
1644
|
-
* @beta
|
|
1645
1582
|
* @remarks
|
|
1646
1583
|
* Runs a synchronous command on the entity.
|
|
1647
1584
|
*
|
|
@@ -1654,6 +1591,10 @@ export class Entity {
|
|
|
1654
1591
|
* A command result containing whether the command was
|
|
1655
1592
|
* successful.
|
|
1656
1593
|
* @throws This function can throw errors.
|
|
1594
|
+
*
|
|
1595
|
+
* {@link CommandError}
|
|
1596
|
+
*
|
|
1597
|
+
* {@link Error}
|
|
1657
1598
|
*/
|
|
1658
1599
|
runCommand(commandString: string): CommandResult;
|
|
1659
1600
|
/**
|
|
@@ -1672,7 +1613,6 @@ export class Entity {
|
|
|
1672
1613
|
*/
|
|
1673
1614
|
runCommandAsync(commandString: string): Promise<CommandResult>;
|
|
1674
1615
|
/**
|
|
1675
|
-
* @beta
|
|
1676
1616
|
* @remarks
|
|
1677
1617
|
* Teleports the selected entity to a new location
|
|
1678
1618
|
*
|
|
@@ -1705,7 +1645,6 @@ export class Entity {
|
|
|
1705
1645
|
*/
|
|
1706
1646
|
teleport(location: Vector3, teleportOptions?: TeleportOptions): void;
|
|
1707
1647
|
/**
|
|
1708
|
-
* @beta
|
|
1709
1648
|
* @remarks
|
|
1710
1649
|
* Attempts to try a teleport, but may not complete the
|
|
1711
1650
|
* teleport operation (for example, if there are blocks at the
|
|
@@ -1727,7 +1666,6 @@ export class Entity {
|
|
|
1727
1666
|
}
|
|
1728
1667
|
|
|
1729
1668
|
/**
|
|
1730
|
-
* @beta
|
|
1731
1669
|
* This is a base abstract class for any entity component that
|
|
1732
1670
|
* centers around a number and can have a minimum, maximum, and
|
|
1733
1671
|
* default defined value.
|
|
@@ -1807,7 +1745,6 @@ export class EntityAttributeComponent extends EntityComponent {
|
|
|
1807
1745
|
}
|
|
1808
1746
|
|
|
1809
1747
|
/**
|
|
1810
|
-
* @beta
|
|
1811
1748
|
* Base class for a family of entity movement events.
|
|
1812
1749
|
*/
|
|
1813
1750
|
// @ts-ignore Class inheritance allowed for native defined classes
|
|
@@ -1823,7 +1760,6 @@ export class EntityBaseMovementComponent extends EntityComponent {
|
|
|
1823
1760
|
}
|
|
1824
1761
|
|
|
1825
1762
|
/**
|
|
1826
|
-
* @beta
|
|
1827
1763
|
* When added, this component signifies that the entity can
|
|
1828
1764
|
* climb up ladders.
|
|
1829
1765
|
*/
|
|
@@ -1834,7 +1770,6 @@ export class EntityCanClimbComponent extends EntityComponent {
|
|
|
1834
1770
|
}
|
|
1835
1771
|
|
|
1836
1772
|
/**
|
|
1837
|
-
* @beta
|
|
1838
1773
|
* When added, this component signifies that the entity can
|
|
1839
1774
|
* fly, and the pathfinder won't be restricted to paths where a
|
|
1840
1775
|
* solid block is required underneath it.
|
|
@@ -1846,7 +1781,6 @@ export class EntityCanFlyComponent extends EntityComponent {
|
|
|
1846
1781
|
}
|
|
1847
1782
|
|
|
1848
1783
|
/**
|
|
1849
|
-
* @beta
|
|
1850
1784
|
* When added, this component signifies that the entity can
|
|
1851
1785
|
* power jump like the horse does within Minecraft.
|
|
1852
1786
|
*/
|
|
@@ -1857,7 +1791,6 @@ export class EntityCanPowerJumpComponent extends EntityComponent {
|
|
|
1857
1791
|
}
|
|
1858
1792
|
|
|
1859
1793
|
/**
|
|
1860
|
-
* @beta
|
|
1861
1794
|
* Defines the entity's color. Only works on certain entities
|
|
1862
1795
|
* that have predefined color values (e.g., sheep, llama,
|
|
1863
1796
|
* shulker).
|
|
@@ -1877,7 +1810,6 @@ export class EntityColorComponent extends EntityComponent {
|
|
|
1877
1810
|
}
|
|
1878
1811
|
|
|
1879
1812
|
/**
|
|
1880
|
-
* @beta
|
|
1881
1813
|
* Base class for downstream entity components.
|
|
1882
1814
|
*/
|
|
1883
1815
|
// @ts-ignore Class inheritance allowed for native defined classes
|
|
@@ -1886,7 +1818,6 @@ export class EntityComponent extends Component {
|
|
|
1886
1818
|
}
|
|
1887
1819
|
|
|
1888
1820
|
/**
|
|
1889
|
-
* @beta
|
|
1890
1821
|
* Contains data related to the death of an entity in the game.
|
|
1891
1822
|
*/
|
|
1892
1823
|
export class EntityDieAfterEvent {
|
|
@@ -1907,7 +1838,6 @@ export class EntityDieAfterEvent {
|
|
|
1907
1838
|
}
|
|
1908
1839
|
|
|
1909
1840
|
/**
|
|
1910
|
-
* @beta
|
|
1911
1841
|
* Supports registering for an event that fires after an entity
|
|
1912
1842
|
* has died.
|
|
1913
1843
|
*/
|
|
@@ -1945,7 +1875,6 @@ export class EntityDieAfterEventSignal {
|
|
|
1945
1875
|
}
|
|
1946
1876
|
|
|
1947
1877
|
/**
|
|
1948
|
-
* @beta
|
|
1949
1878
|
* When added, this component signifies that this entity
|
|
1950
1879
|
* doesn't take damage from fire.
|
|
1951
1880
|
*/
|
|
@@ -1956,7 +1885,6 @@ export class EntityFireImmuneComponent extends EntityComponent {
|
|
|
1956
1885
|
}
|
|
1957
1886
|
|
|
1958
1887
|
/**
|
|
1959
|
-
* @beta
|
|
1960
1888
|
* When added, this component signifies that this entity can
|
|
1961
1889
|
* float in liquid blocks.
|
|
1962
1890
|
*/
|
|
@@ -1967,7 +1895,6 @@ export class EntityFloatsInLiquidComponent extends EntityComponent {
|
|
|
1967
1895
|
}
|
|
1968
1896
|
|
|
1969
1897
|
/**
|
|
1970
|
-
* @beta
|
|
1971
1898
|
* Represents the flying speed of an entity.
|
|
1972
1899
|
*/
|
|
1973
1900
|
// @ts-ignore Class inheritance allowed for native defined classes
|
|
@@ -1985,7 +1912,6 @@ export class EntityFlyingSpeedComponent extends EntityComponent {
|
|
|
1985
1912
|
}
|
|
1986
1913
|
|
|
1987
1914
|
/**
|
|
1988
|
-
* @beta
|
|
1989
1915
|
* Defines how much friction affects this entity.
|
|
1990
1916
|
*/
|
|
1991
1917
|
// @ts-ignore Class inheritance allowed for native defined classes
|
|
@@ -2004,7 +1930,6 @@ export class EntityFrictionModifierComponent extends EntityComponent {
|
|
|
2004
1930
|
}
|
|
2005
1931
|
|
|
2006
1932
|
/**
|
|
2007
|
-
* @beta
|
|
2008
1933
|
* Sets the offset from the ground that the entity is actually
|
|
2009
1934
|
* at.
|
|
2010
1935
|
*/
|
|
@@ -2025,7 +1950,6 @@ export class EntityGroundOffsetComponent extends EntityComponent {
|
|
|
2025
1950
|
}
|
|
2026
1951
|
|
|
2027
1952
|
/**
|
|
2028
|
-
* @beta
|
|
2029
1953
|
* Defines the interactions with this entity for healing it.
|
|
2030
1954
|
*/
|
|
2031
1955
|
// @ts-ignore Class inheritance allowed for native defined classes
|
|
@@ -2052,7 +1976,6 @@ export class EntityHealableComponent extends EntityComponent {
|
|
|
2052
1976
|
}
|
|
2053
1977
|
|
|
2054
1978
|
/**
|
|
2055
|
-
* @beta
|
|
2056
1979
|
* Contains information related to an entity when its health
|
|
2057
1980
|
* changes. Warning: don't change the health of an entity in
|
|
2058
1981
|
* this event, or it will cause an infinite loop!
|
|
@@ -2080,7 +2003,6 @@ export class EntityHealthChangedAfterEvent {
|
|
|
2080
2003
|
}
|
|
2081
2004
|
|
|
2082
2005
|
/**
|
|
2083
|
-
* @beta
|
|
2084
2006
|
* Manages callbacks that are connected to when the health of
|
|
2085
2007
|
* an entity changes.
|
|
2086
2008
|
*/
|
|
@@ -2111,7 +2033,6 @@ export class EntityHealthChangedAfterEventSignal {
|
|
|
2111
2033
|
}
|
|
2112
2034
|
|
|
2113
2035
|
/**
|
|
2114
|
-
* @beta
|
|
2115
2036
|
* Defines the health properties of an entity.
|
|
2116
2037
|
*/
|
|
2117
2038
|
// @ts-ignore Class inheritance allowed for native defined classes
|
|
@@ -2121,7 +2042,6 @@ export class EntityHealthComponent extends EntityAttributeComponent {
|
|
|
2121
2042
|
}
|
|
2122
2043
|
|
|
2123
2044
|
/**
|
|
2124
|
-
* @beta
|
|
2125
2045
|
* Contains information related to an entity hitting a block.
|
|
2126
2046
|
*/
|
|
2127
2047
|
export class EntityHitBlockAfterEvent {
|
|
@@ -2147,7 +2067,6 @@ export class EntityHitBlockAfterEvent {
|
|
|
2147
2067
|
}
|
|
2148
2068
|
|
|
2149
2069
|
/**
|
|
2150
|
-
* @beta
|
|
2151
2070
|
* Manages callbacks that are connected to when an entity hits
|
|
2152
2071
|
* a block.
|
|
2153
2072
|
*/
|
|
@@ -2178,7 +2097,6 @@ export class EntityHitBlockAfterEventSignal {
|
|
|
2178
2097
|
}
|
|
2179
2098
|
|
|
2180
2099
|
/**
|
|
2181
|
-
* @beta
|
|
2182
2100
|
* Contains information related to an entity hitting (melee
|
|
2183
2101
|
* attacking) another entity.
|
|
2184
2102
|
*/
|
|
@@ -2199,7 +2117,6 @@ export class EntityHitEntityAfterEvent {
|
|
|
2199
2117
|
}
|
|
2200
2118
|
|
|
2201
2119
|
/**
|
|
2202
|
-
* @beta
|
|
2203
2120
|
* Manages callbacks that are connected to when an entity makes
|
|
2204
2121
|
* a melee attack on another entity.
|
|
2205
2122
|
*/
|
|
@@ -2230,7 +2147,6 @@ export class EntityHitEntityAfterEventSignal {
|
|
|
2230
2147
|
}
|
|
2231
2148
|
|
|
2232
2149
|
/**
|
|
2233
|
-
* @beta
|
|
2234
2150
|
* Contains information related to an entity getting hurt.
|
|
2235
2151
|
*/
|
|
2236
2152
|
export class EntityHurtAfterEvent {
|
|
@@ -2257,7 +2173,6 @@ export class EntityHurtAfterEvent {
|
|
|
2257
2173
|
}
|
|
2258
2174
|
|
|
2259
2175
|
/**
|
|
2260
|
-
* @beta
|
|
2261
2176
|
* Manages callbacks that are connected to when an entity is
|
|
2262
2177
|
* hurt.
|
|
2263
2178
|
*/
|
|
@@ -2286,7 +2201,6 @@ export class EntityHurtAfterEventSignal {
|
|
|
2286
2201
|
}
|
|
2287
2202
|
|
|
2288
2203
|
/**
|
|
2289
|
-
* @beta
|
|
2290
2204
|
* Defines this entity's inventory properties.
|
|
2291
2205
|
*/
|
|
2292
2206
|
// @ts-ignore Class inheritance allowed for native defined classes
|
|
@@ -2348,7 +2262,6 @@ export class EntityInventoryComponent extends EntityComponent {
|
|
|
2348
2262
|
}
|
|
2349
2263
|
|
|
2350
2264
|
/**
|
|
2351
|
-
* @beta
|
|
2352
2265
|
* When added, this component signifies that this entity is a
|
|
2353
2266
|
* baby.
|
|
2354
2267
|
*/
|
|
@@ -2359,7 +2272,6 @@ export class EntityIsBabyComponent extends EntityComponent {
|
|
|
2359
2272
|
}
|
|
2360
2273
|
|
|
2361
2274
|
/**
|
|
2362
|
-
* @beta
|
|
2363
2275
|
* When added, this component signifies that this entity is
|
|
2364
2276
|
* charged.
|
|
2365
2277
|
*/
|
|
@@ -2370,7 +2282,6 @@ export class EntityIsChargedComponent extends EntityComponent {
|
|
|
2370
2282
|
}
|
|
2371
2283
|
|
|
2372
2284
|
/**
|
|
2373
|
-
* @beta
|
|
2374
2285
|
* When added, this component signifies that this entity is
|
|
2375
2286
|
* currently carrying a chest.
|
|
2376
2287
|
*/
|
|
@@ -2381,7 +2292,6 @@ export class EntityIsChestedComponent extends EntityComponent {
|
|
|
2381
2292
|
}
|
|
2382
2293
|
|
|
2383
2294
|
/**
|
|
2384
|
-
* @beta
|
|
2385
2295
|
* When added, this component signifies that dyes can be used
|
|
2386
2296
|
* on this entity to change its color.
|
|
2387
2297
|
*/
|
|
@@ -2392,7 +2302,6 @@ export class EntityIsDyeableComponent extends EntityComponent {
|
|
|
2392
2302
|
}
|
|
2393
2303
|
|
|
2394
2304
|
/**
|
|
2395
|
-
* @beta
|
|
2396
2305
|
* When added, this component signifies that this entity can
|
|
2397
2306
|
* hide from hostile mobs while invisible.
|
|
2398
2307
|
*/
|
|
@@ -2403,7 +2312,6 @@ export class EntityIsHiddenWhenInvisibleComponent extends EntityComponent {
|
|
|
2403
2312
|
}
|
|
2404
2313
|
|
|
2405
2314
|
/**
|
|
2406
|
-
* @beta
|
|
2407
2315
|
* When added, this component signifies that this entity this
|
|
2408
2316
|
* currently on fire.
|
|
2409
2317
|
*/
|
|
@@ -2414,7 +2322,6 @@ export class EntityIsIgnitedComponent extends EntityComponent {
|
|
|
2414
2322
|
}
|
|
2415
2323
|
|
|
2416
2324
|
/**
|
|
2417
|
-
* @beta
|
|
2418
2325
|
* When added, this component signifies that this entity is an
|
|
2419
2326
|
* illager captain.
|
|
2420
2327
|
*/
|
|
@@ -2425,7 +2332,6 @@ export class EntityIsIllagerCaptainComponent extends EntityComponent {
|
|
|
2425
2332
|
}
|
|
2426
2333
|
|
|
2427
2334
|
/**
|
|
2428
|
-
* @beta
|
|
2429
2335
|
* When added, this component signifies that this entity is
|
|
2430
2336
|
* currently saddled.
|
|
2431
2337
|
*/
|
|
@@ -2436,7 +2342,6 @@ export class EntityIsSaddledComponent extends EntityComponent {
|
|
|
2436
2342
|
}
|
|
2437
2343
|
|
|
2438
2344
|
/**
|
|
2439
|
-
* @beta
|
|
2440
2345
|
* When added, this component signifies that this entity is
|
|
2441
2346
|
* currently shaking.
|
|
2442
2347
|
*/
|
|
@@ -2447,7 +2352,6 @@ export class EntityIsShakingComponent extends EntityComponent {
|
|
|
2447
2352
|
}
|
|
2448
2353
|
|
|
2449
2354
|
/**
|
|
2450
|
-
* @beta
|
|
2451
2355
|
* When added, this component signifies that this entity is
|
|
2452
2356
|
* currently sheared.
|
|
2453
2357
|
*/
|
|
@@ -2458,7 +2362,6 @@ export class EntityIsShearedComponent extends EntityComponent {
|
|
|
2458
2362
|
}
|
|
2459
2363
|
|
|
2460
2364
|
/**
|
|
2461
|
-
* @beta
|
|
2462
2365
|
* When added, this component signifies that this entity can be
|
|
2463
2366
|
* stacked.
|
|
2464
2367
|
*/
|
|
@@ -2469,7 +2372,6 @@ export class EntityIsStackableComponent extends EntityComponent {
|
|
|
2469
2372
|
}
|
|
2470
2373
|
|
|
2471
2374
|
/**
|
|
2472
|
-
* @beta
|
|
2473
2375
|
* When added, this component signifies that this entity is
|
|
2474
2376
|
* currently stunned.
|
|
2475
2377
|
*/
|
|
@@ -2480,7 +2382,6 @@ export class EntityIsStunnedComponent extends EntityComponent {
|
|
|
2480
2382
|
}
|
|
2481
2383
|
|
|
2482
2384
|
/**
|
|
2483
|
-
* @beta
|
|
2484
2385
|
* When added, this component signifies that this entity is
|
|
2485
2386
|
* currently tamed.
|
|
2486
2387
|
*/
|
|
@@ -2491,7 +2392,6 @@ export class EntityIsTamedComponent extends EntityComponent {
|
|
|
2491
2392
|
}
|
|
2492
2393
|
|
|
2493
2394
|
/**
|
|
2494
|
-
* @beta
|
|
2495
2395
|
* If added onto the entity, this indicates that the entity
|
|
2496
2396
|
* represents a free-floating item in the world. Lets you
|
|
2497
2397
|
* retrieve the actual item stack contents via the itemStack
|
|
@@ -2511,7 +2411,6 @@ export class EntityItemComponent extends EntityComponent {
|
|
|
2511
2411
|
}
|
|
2512
2412
|
|
|
2513
2413
|
/**
|
|
2514
|
-
* @beta
|
|
2515
2414
|
* Additional variant value. Can be used to further
|
|
2516
2415
|
* differentiate variants.
|
|
2517
2416
|
*/
|
|
@@ -2530,7 +2429,6 @@ export class EntityMarkVariantComponent extends EntityComponent {
|
|
|
2530
2429
|
}
|
|
2531
2430
|
|
|
2532
2431
|
/**
|
|
2533
|
-
* @beta
|
|
2534
2432
|
* When added, this movement control allows the mob to swim in
|
|
2535
2433
|
* water and walk on land.
|
|
2536
2434
|
*/
|
|
@@ -2541,7 +2439,6 @@ export class EntityMovementAmphibiousComponent extends EntityBaseMovementCompone
|
|
|
2541
2439
|
}
|
|
2542
2440
|
|
|
2543
2441
|
/**
|
|
2544
|
-
* @beta
|
|
2545
2442
|
* This component accents the movement of an entity.
|
|
2546
2443
|
*/
|
|
2547
2444
|
// @ts-ignore Class inheritance allowed for native defined classes
|
|
@@ -2551,7 +2448,6 @@ export class EntityMovementBasicComponent extends EntityBaseMovementComponent {
|
|
|
2551
2448
|
}
|
|
2552
2449
|
|
|
2553
2450
|
/**
|
|
2554
|
-
* @beta
|
|
2555
2451
|
* When added, this move control causes the mob to fly.
|
|
2556
2452
|
*/
|
|
2557
2453
|
// @ts-ignore Class inheritance allowed for native defined classes
|
|
@@ -2561,7 +2457,6 @@ export class EntityMovementFlyComponent extends EntityBaseMovementComponent {
|
|
|
2561
2457
|
}
|
|
2562
2458
|
|
|
2563
2459
|
/**
|
|
2564
|
-
* @beta
|
|
2565
2460
|
* When added, this move control allows a mob to fly, swim,
|
|
2566
2461
|
* climb, etc.
|
|
2567
2462
|
*/
|
|
@@ -2572,7 +2467,6 @@ export class EntityMovementGenericComponent extends EntityBaseMovementComponent
|
|
|
2572
2467
|
}
|
|
2573
2468
|
|
|
2574
2469
|
/**
|
|
2575
|
-
* @beta
|
|
2576
2470
|
* When added, this move control causes the mob to hover.
|
|
2577
2471
|
*/
|
|
2578
2472
|
// @ts-ignore Class inheritance allowed for native defined classes
|
|
@@ -2582,7 +2476,6 @@ export class EntityMovementHoverComponent extends EntityBaseMovementComponent {
|
|
|
2582
2476
|
}
|
|
2583
2477
|
|
|
2584
2478
|
/**
|
|
2585
|
-
* @beta
|
|
2586
2479
|
* Move control that causes the mob to jump as it moves with a
|
|
2587
2480
|
* specified delay between jumps.
|
|
2588
2481
|
*/
|
|
@@ -2593,7 +2486,6 @@ export class EntityMovementJumpComponent extends EntityBaseMovementComponent {
|
|
|
2593
2486
|
}
|
|
2594
2487
|
|
|
2595
2488
|
/**
|
|
2596
|
-
* @beta
|
|
2597
2489
|
* When added, this move control causes the mob to hop as it
|
|
2598
2490
|
* moves.
|
|
2599
2491
|
*/
|
|
@@ -2604,7 +2496,6 @@ export class EntityMovementSkipComponent extends EntityBaseMovementComponent {
|
|
|
2604
2496
|
}
|
|
2605
2497
|
|
|
2606
2498
|
/**
|
|
2607
|
-
* @beta
|
|
2608
2499
|
* Sets the distance through which the entity can push through.
|
|
2609
2500
|
*/
|
|
2610
2501
|
// @ts-ignore Class inheritance allowed for native defined classes
|
|
@@ -2622,7 +2513,6 @@ export class EntityPushThroughComponent extends EntityComponent {
|
|
|
2622
2513
|
}
|
|
2623
2514
|
|
|
2624
2515
|
/**
|
|
2625
|
-
* @beta
|
|
2626
2516
|
* Sets the entity's visual size.
|
|
2627
2517
|
*/
|
|
2628
2518
|
// @ts-ignore Class inheritance allowed for native defined classes
|
|
@@ -2640,7 +2530,6 @@ export class EntityScaleComponent extends EntityComponent {
|
|
|
2640
2530
|
}
|
|
2641
2531
|
|
|
2642
2532
|
/**
|
|
2643
|
-
* @beta
|
|
2644
2533
|
* Skin Id value. Can be used to differentiate skins, such as
|
|
2645
2534
|
* base skins for villagers.
|
|
2646
2535
|
*/
|
|
@@ -2659,7 +2548,6 @@ export class EntitySkinIdComponent extends EntityComponent {
|
|
|
2659
2548
|
}
|
|
2660
2549
|
|
|
2661
2550
|
/**
|
|
2662
|
-
* @beta
|
|
2663
2551
|
* Used to differentiate the component group of a variant of an
|
|
2664
2552
|
* entity from others. (e.g. ocelot, villager).
|
|
2665
2553
|
*/
|
|
@@ -2678,7 +2566,6 @@ export class EntityVariantComponent extends EntityComponent {
|
|
|
2678
2566
|
}
|
|
2679
2567
|
|
|
2680
2568
|
/**
|
|
2681
|
-
* @beta
|
|
2682
2569
|
* When added, this component signifies that this entity wants
|
|
2683
2570
|
* to become a jockey.
|
|
2684
2571
|
*/
|
|
@@ -2689,7 +2576,6 @@ export class EntityWantsJockeyComponent extends EntityComponent {
|
|
|
2689
2576
|
}
|
|
2690
2577
|
|
|
2691
2578
|
/**
|
|
2692
|
-
* @beta
|
|
2693
2579
|
* As part of the Healable component, represents a specific
|
|
2694
2580
|
* item that can be fed to an entity to cause health effects.
|
|
2695
2581
|
*/
|
|
@@ -2721,7 +2607,6 @@ export class FeedItem {
|
|
|
2721
2607
|
}
|
|
2722
2608
|
|
|
2723
2609
|
/**
|
|
2724
|
-
* @beta
|
|
2725
2610
|
* Represents an effect that is applied as a result of a food
|
|
2726
2611
|
* item being fed to an entity.
|
|
2727
2612
|
*/
|
|
@@ -2758,7 +2643,6 @@ export class FeedItemEffect {
|
|
|
2758
2643
|
}
|
|
2759
2644
|
|
|
2760
2645
|
/**
|
|
2761
|
-
* @beta
|
|
2762
2646
|
* Provides an adaptable interface for callers to subscribe to
|
|
2763
2647
|
* an event that fires when a button is pushed.
|
|
2764
2648
|
*/
|
|
@@ -2780,7 +2664,6 @@ export class IButtonPushAfterEventSignal {
|
|
|
2780
2664
|
}
|
|
2781
2665
|
|
|
2782
2666
|
/**
|
|
2783
|
-
* @beta
|
|
2784
2667
|
* Provides an adaptable interface for callers to subscribe to
|
|
2785
2668
|
* an event that fires after a lever is used.
|
|
2786
2669
|
*/
|
|
@@ -2802,7 +2685,6 @@ export class ILeverActionAfterEventSignal {
|
|
|
2802
2685
|
}
|
|
2803
2686
|
|
|
2804
2687
|
/**
|
|
2805
|
-
* @beta
|
|
2806
2688
|
* Provides an adaptable interface for callers to subscribe to
|
|
2807
2689
|
* an event that fires after a player joins a world.
|
|
2808
2690
|
*/
|
|
@@ -2824,7 +2706,6 @@ export class IPlayerJoinAfterEventSignal {
|
|
|
2824
2706
|
}
|
|
2825
2707
|
|
|
2826
2708
|
/**
|
|
2827
|
-
* @beta
|
|
2828
2709
|
* Provides an adaptable interface for callers to subscribe to
|
|
2829
2710
|
* an event that fires after a player leaves a world.
|
|
2830
2711
|
*/
|
|
@@ -2846,7 +2727,6 @@ export class IPlayerLeaveAfterEventSignal {
|
|
|
2846
2727
|
}
|
|
2847
2728
|
|
|
2848
2729
|
/**
|
|
2849
|
-
* @beta
|
|
2850
2730
|
* Provides an adaptable interface for callers to subscribe to
|
|
2851
2731
|
* an event that fires after a player spawns.
|
|
2852
2732
|
*/
|
|
@@ -2868,7 +2748,6 @@ export class IPlayerSpawnAfterEventSignal {
|
|
|
2868
2748
|
}
|
|
2869
2749
|
|
|
2870
2750
|
/**
|
|
2871
|
-
* @beta
|
|
2872
2751
|
* Contains information related to a chargeable item completing
|
|
2873
2752
|
* being charged.
|
|
2874
2753
|
*/
|
|
@@ -2896,7 +2775,6 @@ export class ItemCompleteUseAfterEvent {
|
|
|
2896
2775
|
}
|
|
2897
2776
|
|
|
2898
2777
|
/**
|
|
2899
|
-
* @beta
|
|
2900
2778
|
* Manages callbacks that are connected to the completion of
|
|
2901
2779
|
* charging for a chargeable item.
|
|
2902
2780
|
*/
|
|
@@ -2924,7 +2802,6 @@ export class ItemCompleteUseAfterEventSignal {
|
|
|
2924
2802
|
}
|
|
2925
2803
|
|
|
2926
2804
|
/**
|
|
2927
|
-
* @beta
|
|
2928
2805
|
* Base class for item components.
|
|
2929
2806
|
*/
|
|
2930
2807
|
// @ts-ignore Class inheritance allowed for native defined classes
|
|
@@ -2933,7 +2810,6 @@ export class ItemComponent extends Component {
|
|
|
2933
2810
|
}
|
|
2934
2811
|
|
|
2935
2812
|
/**
|
|
2936
|
-
* @beta
|
|
2937
2813
|
* Contains information related to a chargeable item when the
|
|
2938
2814
|
* player has finished using the item and released the build
|
|
2939
2815
|
* action.
|
|
@@ -2962,7 +2838,6 @@ export class ItemReleaseUseAfterEvent {
|
|
|
2962
2838
|
}
|
|
2963
2839
|
|
|
2964
2840
|
/**
|
|
2965
|
-
* @beta
|
|
2966
2841
|
* Manages callbacks that are connected to the releasing of
|
|
2967
2842
|
* charging for a chargeable item.
|
|
2968
2843
|
*/
|
|
@@ -2990,20 +2865,9 @@ export class ItemReleaseUseAfterEventSignal {
|
|
|
2990
2865
|
}
|
|
2991
2866
|
|
|
2992
2867
|
/**
|
|
2993
|
-
* @beta
|
|
2994
2868
|
* Defines a collection of items.
|
|
2995
2869
|
*/
|
|
2996
2870
|
export class ItemStack {
|
|
2997
|
-
/**
|
|
2998
|
-
* @remarks
|
|
2999
|
-
* Number of the items in the stack. Valid values range between
|
|
3000
|
-
* 1-255. The provided value will be clamped to the item's
|
|
3001
|
-
* maximum stack size.
|
|
3002
|
-
*
|
|
3003
|
-
* @throws
|
|
3004
|
-
* Throws if the value is outside the range of 1-255.
|
|
3005
|
-
*/
|
|
3006
|
-
readonly amount: number;
|
|
3007
2871
|
/**
|
|
3008
2872
|
* @remarks
|
|
3009
2873
|
* Returns whether the item is stackable. An item is considered
|
|
@@ -3012,19 +2876,6 @@ export class ItemStack {
|
|
|
3012
2876
|
*
|
|
3013
2877
|
*/
|
|
3014
2878
|
readonly isStackable: boolean;
|
|
3015
|
-
/**
|
|
3016
|
-
* @remarks
|
|
3017
|
-
* Gets or sets whether the item is kept on death.
|
|
3018
|
-
*
|
|
3019
|
-
*/
|
|
3020
|
-
readonly keepOnDeath: boolean;
|
|
3021
|
-
/**
|
|
3022
|
-
* @remarks
|
|
3023
|
-
* Gets or sets the item's lock mode. The default value is
|
|
3024
|
-
* `ItemLockMode.none`.
|
|
3025
|
-
*
|
|
3026
|
-
*/
|
|
3027
|
-
readonly lockMode: ItemLockMode;
|
|
3028
2879
|
/**
|
|
3029
2880
|
* @remarks
|
|
3030
2881
|
* The maximum stack size. This value varies depending on the
|
|
@@ -3033,16 +2884,6 @@ export class ItemStack {
|
|
|
3033
2884
|
*
|
|
3034
2885
|
*/
|
|
3035
2886
|
readonly maxAmount: number;
|
|
3036
|
-
/**
|
|
3037
|
-
* @remarks
|
|
3038
|
-
* Given name of this stack of items. The name tag is displayed
|
|
3039
|
-
* when hovering over the item. Setting the name tag to an
|
|
3040
|
-
* empty string or `undefined` will remove the name tag.
|
|
3041
|
-
*
|
|
3042
|
-
* @throws
|
|
3043
|
-
* Throws if the length exceeds 255 characters.
|
|
3044
|
-
*/
|
|
3045
|
-
readonly nameTag?: string;
|
|
3046
2887
|
/**
|
|
3047
2888
|
* @remarks
|
|
3048
2889
|
* The type of the item.
|
|
@@ -3103,7 +2944,6 @@ export class ItemStack {
|
|
|
3103
2944
|
*/
|
|
3104
2945
|
getComponents(): ItemComponent[];
|
|
3105
2946
|
/**
|
|
3106
|
-
* @beta
|
|
3107
2947
|
* @remarks
|
|
3108
2948
|
* Returns the lore value - a secondary display string - for an
|
|
3109
2949
|
* ItemStack.
|
|
@@ -3140,7 +2980,6 @@ export class ItemStack {
|
|
|
3140
2980
|
*/
|
|
3141
2981
|
isStackableWith(itemStack: ItemStack): boolean;
|
|
3142
2982
|
/**
|
|
3143
|
-
* @beta
|
|
3144
2983
|
* @remarks
|
|
3145
2984
|
* Sets the lore value - a secondary display string - for an
|
|
3146
2985
|
* ItemStack. The lore list is cleared if set to an empty
|
|
@@ -3183,7 +3022,6 @@ export class ItemStack {
|
|
|
3183
3022
|
}
|
|
3184
3023
|
|
|
3185
3024
|
/**
|
|
3186
|
-
* @beta
|
|
3187
3025
|
* Contains information related to a chargeable item starting
|
|
3188
3026
|
* to be charged.
|
|
3189
3027
|
*/
|
|
@@ -3211,7 +3049,6 @@ export class ItemStartUseAfterEvent {
|
|
|
3211
3049
|
}
|
|
3212
3050
|
|
|
3213
3051
|
/**
|
|
3214
|
-
* @beta
|
|
3215
3052
|
* Manages callbacks that are connected to the start of
|
|
3216
3053
|
* charging for a chargeable item.
|
|
3217
3054
|
*/
|
|
@@ -3239,7 +3076,6 @@ export class ItemStartUseAfterEventSignal {
|
|
|
3239
3076
|
}
|
|
3240
3077
|
|
|
3241
3078
|
/**
|
|
3242
|
-
* @beta
|
|
3243
3079
|
* Contains information related to an item being used on a
|
|
3244
3080
|
* block. This event fires when a player presses the the Use
|
|
3245
3081
|
* Item / Place Block button to successfully use an item or
|
|
@@ -3276,7 +3112,6 @@ export class ItemStartUseOnAfterEvent {
|
|
|
3276
3112
|
}
|
|
3277
3113
|
|
|
3278
3114
|
/**
|
|
3279
|
-
* @beta
|
|
3280
3115
|
* Manages callbacks that are connected to an item starting
|
|
3281
3116
|
* being used on a block event.
|
|
3282
3117
|
*/
|
|
@@ -3304,7 +3139,6 @@ export class ItemStartUseOnAfterEventSignal {
|
|
|
3304
3139
|
}
|
|
3305
3140
|
|
|
3306
3141
|
/**
|
|
3307
|
-
* @beta
|
|
3308
3142
|
* Contains information related to a chargeable item has
|
|
3309
3143
|
* finished an items use cycle, or when the player has released
|
|
3310
3144
|
* the use action with the item.
|
|
@@ -3333,7 +3167,6 @@ export class ItemStopUseAfterEvent {
|
|
|
3333
3167
|
}
|
|
3334
3168
|
|
|
3335
3169
|
/**
|
|
3336
|
-
* @beta
|
|
3337
3170
|
* Manages callbacks that are connected to the stopping of
|
|
3338
3171
|
* charging for an item that has a registered
|
|
3339
3172
|
* minecraft:chargeable component.
|
|
@@ -3362,7 +3195,6 @@ export class ItemStopUseAfterEventSignal {
|
|
|
3362
3195
|
}
|
|
3363
3196
|
|
|
3364
3197
|
/**
|
|
3365
|
-
* @beta
|
|
3366
3198
|
* Contains information related to an item that has stopped
|
|
3367
3199
|
* being used on a block. This event fires when a player
|
|
3368
3200
|
* successfully uses an item or places a block by pressing the
|
|
@@ -3394,7 +3226,6 @@ export class ItemStopUseOnAfterEvent {
|
|
|
3394
3226
|
}
|
|
3395
3227
|
|
|
3396
3228
|
/**
|
|
3397
|
-
* @beta
|
|
3398
3229
|
* Manages callbacks that are connected to an item stops used
|
|
3399
3230
|
* on a block event.
|
|
3400
3231
|
*/
|
|
@@ -3422,7 +3253,6 @@ export class ItemStopUseOnAfterEventSignal {
|
|
|
3422
3253
|
}
|
|
3423
3254
|
|
|
3424
3255
|
/**
|
|
3425
|
-
* @beta
|
|
3426
3256
|
* Represents the type of an item - for example, Wool.
|
|
3427
3257
|
*/
|
|
3428
3258
|
export class ItemType {
|
|
@@ -3437,7 +3267,6 @@ export class ItemType {
|
|
|
3437
3267
|
}
|
|
3438
3268
|
|
|
3439
3269
|
/**
|
|
3440
|
-
* @beta
|
|
3441
3270
|
* Contains information related to an item being used. This
|
|
3442
3271
|
* event fires when an item is successfully used by a player.
|
|
3443
3272
|
*/
|
|
@@ -3458,7 +3287,6 @@ export class ItemUseAfterEvent {
|
|
|
3458
3287
|
}
|
|
3459
3288
|
|
|
3460
3289
|
/**
|
|
3461
|
-
* @beta
|
|
3462
3290
|
* Manages callbacks that are connected to an item use event.
|
|
3463
3291
|
*/
|
|
3464
3292
|
export class ItemUseAfterEventSignal {
|
|
@@ -3483,7 +3311,6 @@ export class ItemUseAfterEventSignal {
|
|
|
3483
3311
|
}
|
|
3484
3312
|
|
|
3485
3313
|
/**
|
|
3486
|
-
* @beta
|
|
3487
3314
|
* Contains information related to an item being used.
|
|
3488
3315
|
*/
|
|
3489
3316
|
// @ts-ignore Class inheritance allowed for native defined classes
|
|
@@ -3498,7 +3325,6 @@ export class ItemUseBeforeEvent extends ItemUseAfterEvent {
|
|
|
3498
3325
|
}
|
|
3499
3326
|
|
|
3500
3327
|
/**
|
|
3501
|
-
* @beta
|
|
3502
3328
|
* Manages callbacks that fire before an item is used.
|
|
3503
3329
|
*/
|
|
3504
3330
|
export class ItemUseBeforeEventSignal {
|
|
@@ -3523,7 +3349,6 @@ export class ItemUseBeforeEventSignal {
|
|
|
3523
3349
|
}
|
|
3524
3350
|
|
|
3525
3351
|
/**
|
|
3526
|
-
* @beta
|
|
3527
3352
|
* Contains information related to an item being used on a
|
|
3528
3353
|
* block. This event fires when an item is successfully used on
|
|
3529
3354
|
* a block by a player.
|
|
@@ -3564,7 +3389,6 @@ export class ItemUseOnAfterEvent {
|
|
|
3564
3389
|
}
|
|
3565
3390
|
|
|
3566
3391
|
/**
|
|
3567
|
-
* @beta
|
|
3568
3392
|
* Manages callbacks that are connected to an item being used
|
|
3569
3393
|
* on a block event.
|
|
3570
3394
|
*/
|
|
@@ -3592,7 +3416,6 @@ export class ItemUseOnAfterEventSignal {
|
|
|
3592
3416
|
}
|
|
3593
3417
|
|
|
3594
3418
|
/**
|
|
3595
|
-
* @beta
|
|
3596
3419
|
* Contains information related to an item being used on a
|
|
3597
3420
|
* block.
|
|
3598
3421
|
*/
|
|
@@ -3608,7 +3431,6 @@ export class ItemUseOnBeforeEvent extends ItemUseOnAfterEvent {
|
|
|
3608
3431
|
}
|
|
3609
3432
|
|
|
3610
3433
|
/**
|
|
3611
|
-
* @beta
|
|
3612
3434
|
* Manages callbacks that fire before an item being used on a
|
|
3613
3435
|
* block event.
|
|
3614
3436
|
*/
|
|
@@ -3636,7 +3458,6 @@ export class ItemUseOnBeforeEventSignal {
|
|
|
3636
3458
|
}
|
|
3637
3459
|
|
|
3638
3460
|
/**
|
|
3639
|
-
* @beta
|
|
3640
3461
|
* Contains information related to changes to a lever
|
|
3641
3462
|
* activating or deactivating.
|
|
3642
3463
|
*/
|
|
@@ -3659,7 +3480,6 @@ export class LeverActionAfterEvent extends BlockEvent {
|
|
|
3659
3480
|
}
|
|
3660
3481
|
|
|
3661
3482
|
/**
|
|
3662
|
-
* @beta
|
|
3663
3483
|
* Manages callbacks that are connected to lever moves
|
|
3664
3484
|
* (activates or deactivates).
|
|
3665
3485
|
*/
|
|
@@ -3724,7 +3544,6 @@ export class Player extends Entity {
|
|
|
3724
3544
|
*/
|
|
3725
3545
|
readonly name: string;
|
|
3726
3546
|
/**
|
|
3727
|
-
* @beta
|
|
3728
3547
|
* @remarks
|
|
3729
3548
|
* Contains methods for manipulating the on-screen display of a
|
|
3730
3549
|
* Player.
|
|
@@ -3733,7 +3552,6 @@ export class Player extends Entity {
|
|
|
3733
3552
|
*/
|
|
3734
3553
|
readonly onScreenDisplay: ScreenDisplay;
|
|
3735
3554
|
/**
|
|
3736
|
-
* @beta
|
|
3737
3555
|
* @remarks
|
|
3738
3556
|
* Gets the current spawn point of the player.
|
|
3739
3557
|
*
|
|
@@ -3741,12 +3559,13 @@ export class Player extends Entity {
|
|
|
3741
3559
|
*/
|
|
3742
3560
|
getSpawnPoint(): DimensionLocation | undefined;
|
|
3743
3561
|
/**
|
|
3744
|
-
* @beta
|
|
3745
3562
|
* @remarks
|
|
3746
3563
|
* Plays a sound that only this particular player can hear.
|
|
3747
3564
|
*
|
|
3748
3565
|
* This function can't be called in read-only mode.
|
|
3749
3566
|
*
|
|
3567
|
+
* @param soundID
|
|
3568
|
+
* Identifier of the sound to play.
|
|
3750
3569
|
* @param soundOptions
|
|
3751
3570
|
* Additional optional options for the sound.
|
|
3752
3571
|
* @throws This function can throw errors.
|
|
@@ -3775,9 +3594,8 @@ export class Player extends Entity {
|
|
|
3775
3594
|
* players[0].playSound("bucket.fill_water", playerSoundOptions);
|
|
3776
3595
|
* ```
|
|
3777
3596
|
*/
|
|
3778
|
-
playSound(
|
|
3597
|
+
playSound(soundID: string, soundOptions?: PlayerSoundOptions): void;
|
|
3779
3598
|
/**
|
|
3780
|
-
* @beta
|
|
3781
3599
|
* @remarks
|
|
3782
3600
|
* Sends a message to the player.
|
|
3783
3601
|
*
|
|
@@ -3828,7 +3646,6 @@ export class Player extends Entity {
|
|
|
3828
3646
|
*/
|
|
3829
3647
|
sendMessage(message: (RawMessage | string)[] | RawMessage | string): void;
|
|
3830
3648
|
/**
|
|
3831
|
-
* @beta
|
|
3832
3649
|
* @remarks
|
|
3833
3650
|
* Sets the current starting spawn point for this particular
|
|
3834
3651
|
* player.
|
|
@@ -3836,12 +3653,15 @@ export class Player extends Entity {
|
|
|
3836
3653
|
* This function can't be called in read-only mode.
|
|
3837
3654
|
*
|
|
3838
3655
|
* @throws This function can throw errors.
|
|
3656
|
+
*
|
|
3657
|
+
* {@link Error}
|
|
3658
|
+
*
|
|
3659
|
+
* {@link LocationOutOfWorldBoundariesError}
|
|
3839
3660
|
*/
|
|
3840
3661
|
setSpawnPoint(spawnPoint?: DimensionLocation): void;
|
|
3841
3662
|
}
|
|
3842
3663
|
|
|
3843
3664
|
/**
|
|
3844
|
-
* @beta
|
|
3845
3665
|
* Contains information regarding a player that has joined.
|
|
3846
3666
|
* See the playerSpawn event for more detailed information that
|
|
3847
3667
|
* could be returned after the first time a player has spawned
|
|
@@ -3864,7 +3684,6 @@ export class PlayerJoinAfterEvent {
|
|
|
3864
3684
|
}
|
|
3865
3685
|
|
|
3866
3686
|
/**
|
|
3867
|
-
* @beta
|
|
3868
3687
|
* Manages callbacks that are connected to a player joining the
|
|
3869
3688
|
* world.
|
|
3870
3689
|
*/
|
|
@@ -3874,7 +3693,6 @@ export class PlayerJoinAfterEventSignal extends IPlayerJoinAfterEventSignal {
|
|
|
3874
3693
|
}
|
|
3875
3694
|
|
|
3876
3695
|
/**
|
|
3877
|
-
* @beta
|
|
3878
3696
|
* Contains information regarding a player that has left the
|
|
3879
3697
|
* world.
|
|
3880
3698
|
*/
|
|
@@ -3896,7 +3714,6 @@ export class PlayerLeaveAfterEvent {
|
|
|
3896
3714
|
}
|
|
3897
3715
|
|
|
3898
3716
|
/**
|
|
3899
|
-
* @beta
|
|
3900
3717
|
* Manages callbacks that are connected to a player leaving the
|
|
3901
3718
|
* world.
|
|
3902
3719
|
*/
|
|
@@ -3906,7 +3723,6 @@ export class PlayerLeaveAfterEventSignal extends IPlayerLeaveAfterEventSignal {
|
|
|
3906
3723
|
}
|
|
3907
3724
|
|
|
3908
3725
|
/**
|
|
3909
|
-
* @beta
|
|
3910
3726
|
* An event that contains more information about a player
|
|
3911
3727
|
* spawning.
|
|
3912
3728
|
*/
|
|
@@ -3932,7 +3748,6 @@ export class PlayerSpawnAfterEvent {
|
|
|
3932
3748
|
}
|
|
3933
3749
|
|
|
3934
3750
|
/**
|
|
3935
|
-
* @beta
|
|
3936
3751
|
* Registers an event when a player is spawned (or re-spawned
|
|
3937
3752
|
* after death) and fully ready within the world.
|
|
3938
3753
|
*/
|
|
@@ -3942,7 +3757,6 @@ export class PlayerSpawnAfterEventSignal extends IPlayerSpawnAfterEventSignal {
|
|
|
3942
3757
|
}
|
|
3943
3758
|
|
|
3944
3759
|
/**
|
|
3945
|
-
* @beta
|
|
3946
3760
|
* Contains information related to changes to a pressure plate
|
|
3947
3761
|
* pop.
|
|
3948
3762
|
*/
|
|
@@ -3966,7 +3780,6 @@ export class PressurePlatePopAfterEvent extends BlockEvent {
|
|
|
3966
3780
|
}
|
|
3967
3781
|
|
|
3968
3782
|
/**
|
|
3969
|
-
* @beta
|
|
3970
3783
|
* Manages callbacks that are connected to when a pressure
|
|
3971
3784
|
* plate is popped.
|
|
3972
3785
|
*/
|
|
@@ -3994,7 +3807,6 @@ export class PressurePlatePopAfterEventSignal {
|
|
|
3994
3807
|
}
|
|
3995
3808
|
|
|
3996
3809
|
/**
|
|
3997
|
-
* @beta
|
|
3998
3810
|
* Contains information related to changes to a pressure plate
|
|
3999
3811
|
* push.
|
|
4000
3812
|
*/
|
|
@@ -4024,7 +3836,6 @@ export class PressurePlatePushAfterEvent extends BlockEvent {
|
|
|
4024
3836
|
}
|
|
4025
3837
|
|
|
4026
3838
|
/**
|
|
4027
|
-
* @beta
|
|
4028
3839
|
* Manages callbacks that are connected to when a pressure
|
|
4029
3840
|
* plate is pushed.
|
|
4030
3841
|
*/
|
|
@@ -4052,7 +3863,6 @@ export class PressurePlatePushAfterEventSignal {
|
|
|
4052
3863
|
}
|
|
4053
3864
|
|
|
4054
3865
|
/**
|
|
4055
|
-
* @beta
|
|
4056
3866
|
* Contains objectives and participants for the scoreboard.
|
|
4057
3867
|
*/
|
|
4058
3868
|
export class Scoreboard {
|
|
@@ -4130,7 +3940,6 @@ export class Scoreboard {
|
|
|
4130
3940
|
}
|
|
4131
3941
|
|
|
4132
3942
|
/**
|
|
4133
|
-
* @beta
|
|
4134
3943
|
* Contains an identity of the scoreboard item.
|
|
4135
3944
|
*/
|
|
4136
3945
|
export class ScoreboardIdentity {
|
|
@@ -4171,7 +3980,6 @@ export class ScoreboardIdentity {
|
|
|
4171
3980
|
}
|
|
4172
3981
|
|
|
4173
3982
|
/**
|
|
4174
|
-
* @beta
|
|
4175
3983
|
* Contains objectives and participants for the scoreboard.
|
|
4176
3984
|
*/
|
|
4177
3985
|
export class ScoreboardObjective {
|
|
@@ -4269,7 +4077,6 @@ export class ScoreboardObjective {
|
|
|
4269
4077
|
}
|
|
4270
4078
|
|
|
4271
4079
|
/**
|
|
4272
|
-
* @beta
|
|
4273
4080
|
* Contains a pair of a scoreboard participant and its
|
|
4274
4081
|
* respective score.
|
|
4275
4082
|
*/
|
|
@@ -4290,7 +4097,6 @@ export class ScoreboardScoreInfo {
|
|
|
4290
4097
|
}
|
|
4291
4098
|
|
|
4292
4099
|
/**
|
|
4293
|
-
* @beta
|
|
4294
4100
|
* Contains information about user interface elements that are
|
|
4295
4101
|
* showing up on the screen.
|
|
4296
4102
|
*/
|
|
@@ -4379,7 +4185,6 @@ export class ScreenDisplay {
|
|
|
4379
4185
|
}
|
|
4380
4186
|
|
|
4381
4187
|
/**
|
|
4382
|
-
* @beta
|
|
4383
4188
|
* Returns additional data about a /scriptevent command
|
|
4384
4189
|
* invocation.
|
|
4385
4190
|
*/
|
|
@@ -4428,7 +4233,6 @@ export class ScriptEventCommandMessageAfterEvent {
|
|
|
4428
4233
|
}
|
|
4429
4234
|
|
|
4430
4235
|
/**
|
|
4431
|
-
* @beta
|
|
4432
4236
|
* Allows for registering an event handler that responds to
|
|
4433
4237
|
* inbound /scriptevent commands.
|
|
4434
4238
|
*/
|
|
@@ -4462,7 +4266,6 @@ export class ScriptEventCommandMessageAfterEventSignal {
|
|
|
4462
4266
|
export class System {
|
|
4463
4267
|
private constructor();
|
|
4464
4268
|
/**
|
|
4465
|
-
* @beta
|
|
4466
4269
|
* @remarks
|
|
4467
4270
|
* Returns a collection of after-events for system-level
|
|
4468
4271
|
* operations.
|
|
@@ -4470,14 +4273,12 @@ export class System {
|
|
|
4470
4273
|
*/
|
|
4471
4274
|
readonly afterEvents: SystemAfterEvents;
|
|
4472
4275
|
/**
|
|
4473
|
-
* @beta
|
|
4474
4276
|
* @remarks
|
|
4475
4277
|
* Represents the current world tick of the server.
|
|
4476
4278
|
*
|
|
4477
4279
|
*/
|
|
4478
4280
|
readonly currentTick: number;
|
|
4479
4281
|
/**
|
|
4480
|
-
* @beta
|
|
4481
4282
|
* @remarks
|
|
4482
4283
|
* Cancels the execution of a function run that was previously
|
|
4483
4284
|
* scheduled via the `run` function.
|
|
@@ -4514,7 +4315,6 @@ export class System {
|
|
|
4514
4315
|
*/
|
|
4515
4316
|
run(callback: () => void): number;
|
|
4516
4317
|
/**
|
|
4517
|
-
* @beta
|
|
4518
4318
|
* @remarks
|
|
4519
4319
|
* Runs a set of code on an interval.
|
|
4520
4320
|
*
|
|
@@ -4537,7 +4337,6 @@ export class System {
|
|
|
4537
4337
|
*/
|
|
4538
4338
|
runInterval(callback: () => void, tickInterval?: number): number;
|
|
4539
4339
|
/**
|
|
4540
|
-
* @beta
|
|
4541
4340
|
* @remarks
|
|
4542
4341
|
* Runs a set of code at a future time specified by tickDelay.
|
|
4543
4342
|
*
|
|
@@ -4554,7 +4353,6 @@ export class System {
|
|
|
4554
4353
|
}
|
|
4555
4354
|
|
|
4556
4355
|
/**
|
|
4557
|
-
* @beta
|
|
4558
4356
|
* Provides a set of events that fire within the broader
|
|
4559
4357
|
* scripting system within Minecraft.
|
|
4560
4358
|
*/
|
|
@@ -4571,7 +4369,6 @@ export class SystemAfterEvents {
|
|
|
4571
4369
|
}
|
|
4572
4370
|
|
|
4573
4371
|
/**
|
|
4574
|
-
* @beta
|
|
4575
4372
|
* Contains information related to changes to a target block
|
|
4576
4373
|
* hit.
|
|
4577
4374
|
*/
|
|
@@ -4605,7 +4402,6 @@ export class TargetBlockHitAfterEvent extends BlockEvent {
|
|
|
4605
4402
|
}
|
|
4606
4403
|
|
|
4607
4404
|
/**
|
|
4608
|
-
* @beta
|
|
4609
4405
|
* Manages callbacks that are connected to when a target block
|
|
4610
4406
|
* is hit.
|
|
4611
4407
|
*/
|
|
@@ -4633,7 +4429,6 @@ export class TargetBlockHitAfterEventSignal {
|
|
|
4633
4429
|
}
|
|
4634
4430
|
|
|
4635
4431
|
/**
|
|
4636
|
-
* @beta
|
|
4637
4432
|
* Contains information related to changes to a trip wire trip.
|
|
4638
4433
|
*/
|
|
4639
4434
|
// @ts-ignore Class inheritance allowed for native defined classes
|
|
@@ -4654,7 +4449,6 @@ export class TripWireTripAfterEvent extends BlockEvent {
|
|
|
4654
4449
|
}
|
|
4655
4450
|
|
|
4656
4451
|
/**
|
|
4657
|
-
* @beta
|
|
4658
4452
|
* Manages callbacks that are connected to when a trip wire is
|
|
4659
4453
|
* tripped.
|
|
4660
4454
|
*/
|
|
@@ -4688,7 +4482,6 @@ export class TripWireTripAfterEventSignal {
|
|
|
4688
4482
|
export class World {
|
|
4689
4483
|
private constructor();
|
|
4690
4484
|
/**
|
|
4691
|
-
* @beta
|
|
4692
4485
|
* @remarks
|
|
4693
4486
|
* Contains a set of events that are applicable to the entirety
|
|
4694
4487
|
* of the world. Event callbacks are called in a deferred
|
|
@@ -4697,7 +4490,6 @@ export class World {
|
|
|
4697
4490
|
*/
|
|
4698
4491
|
readonly afterEvents: WorldAfterEvents;
|
|
4699
4492
|
/**
|
|
4700
|
-
* @beta
|
|
4701
4493
|
* @remarks
|
|
4702
4494
|
* Contains a set of events that are applicable to the entirety
|
|
4703
4495
|
* of the world. Event callbacks are called immediately. Event
|
|
@@ -4706,7 +4498,6 @@ export class World {
|
|
|
4706
4498
|
*/
|
|
4707
4499
|
readonly beforeEvents: WorldBeforeEvents;
|
|
4708
4500
|
/**
|
|
4709
|
-
* @beta
|
|
4710
4501
|
* @remarks
|
|
4711
4502
|
* Returns the general global scoreboard that applies to the
|
|
4712
4503
|
* world.
|
|
@@ -4714,7 +4505,6 @@ export class World {
|
|
|
4714
4505
|
*/
|
|
4715
4506
|
readonly scoreboard: Scoreboard;
|
|
4716
4507
|
/**
|
|
4717
|
-
* @beta
|
|
4718
4508
|
* @remarks
|
|
4719
4509
|
* Returns the absolute time since the start of the world.
|
|
4720
4510
|
*
|
|
@@ -4728,7 +4518,6 @@ export class World {
|
|
|
4728
4518
|
*/
|
|
4729
4519
|
getAllPlayers(): Player[];
|
|
4730
4520
|
/**
|
|
4731
|
-
* @beta
|
|
4732
4521
|
* @remarks
|
|
4733
4522
|
* Returns the current day.
|
|
4734
4523
|
*
|
|
@@ -4738,7 +4527,6 @@ export class World {
|
|
|
4738
4527
|
*/
|
|
4739
4528
|
getDay(): number;
|
|
4740
4529
|
/**
|
|
4741
|
-
* @beta
|
|
4742
4530
|
* @remarks
|
|
4743
4531
|
* Returns the default Overworld spawn location.
|
|
4744
4532
|
*
|
|
@@ -4762,7 +4550,6 @@ export class World {
|
|
|
4762
4550
|
*/
|
|
4763
4551
|
getDimension(dimensionId: string): Dimension;
|
|
4764
4552
|
/**
|
|
4765
|
-
* @beta
|
|
4766
4553
|
* @remarks
|
|
4767
4554
|
* Returns a set of players based on a set of conditions
|
|
4768
4555
|
* defined via the EntityQueryOptions set of filter criteria.
|
|
@@ -4777,7 +4564,6 @@ export class World {
|
|
|
4777
4564
|
*/
|
|
4778
4565
|
getPlayers(options?: EntityQueryOptions): Player[];
|
|
4779
4566
|
/**
|
|
4780
|
-
* @beta
|
|
4781
4567
|
* @remarks
|
|
4782
4568
|
* Returns the time of day.
|
|
4783
4569
|
*
|
|
@@ -4786,7 +4572,6 @@ export class World {
|
|
|
4786
4572
|
*/
|
|
4787
4573
|
getTimeOfDay(): number;
|
|
4788
4574
|
/**
|
|
4789
|
-
* @beta
|
|
4790
4575
|
* @remarks
|
|
4791
4576
|
* Plays a particular music track for all players.
|
|
4792
4577
|
*
|
|
@@ -4818,9 +4603,8 @@ export class World {
|
|
|
4818
4603
|
* players[0].playSound("bucket.fill_water", playerSoundOptions);
|
|
4819
4604
|
* ```
|
|
4820
4605
|
*/
|
|
4821
|
-
playMusic(
|
|
4606
|
+
playMusic(trackID: string, musicOptions?: MusicOptions): void;
|
|
4822
4607
|
/**
|
|
4823
|
-
* @beta
|
|
4824
4608
|
* @remarks
|
|
4825
4609
|
* Plays a sound for all players.
|
|
4826
4610
|
*
|
|
@@ -4856,17 +4640,14 @@ export class World {
|
|
|
4856
4640
|
* players[0].playSound("bucket.fill_water", playerSoundOptions);
|
|
4857
4641
|
* ```
|
|
4858
4642
|
*/
|
|
4859
|
-
playSound(
|
|
4643
|
+
playSound(soundID: string, location: Vector3, soundOptions?: WorldSoundOptions): void;
|
|
4860
4644
|
/**
|
|
4861
|
-
* @beta
|
|
4862
4645
|
* @remarks
|
|
4863
4646
|
* Queues an additional music track for players. If a track is
|
|
4864
4647
|
* not playing, a music track will play.
|
|
4865
4648
|
*
|
|
4866
4649
|
* This function can't be called in read-only mode.
|
|
4867
4650
|
*
|
|
4868
|
-
* @param trackId
|
|
4869
|
-
* Identifier of the music track to play.
|
|
4870
4651
|
* @param musicOptions
|
|
4871
4652
|
* Additional options for the music track.
|
|
4872
4653
|
* @throws
|
|
@@ -4874,9 +4655,8 @@ export class World {
|
|
|
4874
4655
|
* An error will be thrown if fade is less than 0.0.
|
|
4875
4656
|
*
|
|
4876
4657
|
*/
|
|
4877
|
-
queueMusic(
|
|
4658
|
+
queueMusic(trackID: string, musicOptions?: MusicOptions): void;
|
|
4878
4659
|
/**
|
|
4879
|
-
* @beta
|
|
4880
4660
|
* @remarks
|
|
4881
4661
|
* Sends a message to all players.
|
|
4882
4662
|
*
|
|
@@ -4915,7 +4695,6 @@ export class World {
|
|
|
4915
4695
|
*/
|
|
4916
4696
|
sendMessage(message: (RawMessage | string)[] | RawMessage | string): void;
|
|
4917
4697
|
/**
|
|
4918
|
-
* @beta
|
|
4919
4698
|
* @remarks
|
|
4920
4699
|
* Sets the world time.
|
|
4921
4700
|
*
|
|
@@ -4926,7 +4705,6 @@ export class World {
|
|
|
4926
4705
|
*/
|
|
4927
4706
|
setAbsoluteTime(absoluteTime: number): void;
|
|
4928
4707
|
/**
|
|
4929
|
-
* @beta
|
|
4930
4708
|
* @remarks
|
|
4931
4709
|
* Sets a default spawn location for all players.
|
|
4932
4710
|
*
|
|
@@ -4937,10 +4715,13 @@ export class World {
|
|
|
4937
4715
|
* within the overworld dimension.
|
|
4938
4716
|
* @throws
|
|
4939
4717
|
* Throws if the provided spawn location is out of bounds.
|
|
4718
|
+
*
|
|
4719
|
+
* {@link Error}
|
|
4720
|
+
*
|
|
4721
|
+
* {@link LocationOutOfWorldBoundariesError}
|
|
4940
4722
|
*/
|
|
4941
4723
|
setDefaultSpawnLocation(spawnLocation: Vector3): void;
|
|
4942
4724
|
/**
|
|
4943
|
-
* @beta
|
|
4944
4725
|
* @remarks
|
|
4945
4726
|
* Sets the time of day.
|
|
4946
4727
|
*
|
|
@@ -4954,7 +4735,6 @@ export class World {
|
|
|
4954
4735
|
*/
|
|
4955
4736
|
setTimeOfDay(timeOfDay: number | TimeOfDay): void;
|
|
4956
4737
|
/**
|
|
4957
|
-
* @beta
|
|
4958
4738
|
* @remarks
|
|
4959
4739
|
* Stops any music tracks from playing.
|
|
4960
4740
|
*
|
|
@@ -4965,7 +4745,6 @@ export class World {
|
|
|
4965
4745
|
}
|
|
4966
4746
|
|
|
4967
4747
|
/**
|
|
4968
|
-
* @beta
|
|
4969
4748
|
* Contains a set of events that are available across the scope
|
|
4970
4749
|
* of the World.
|
|
4971
4750
|
*/
|
|
@@ -4978,21 +4757,18 @@ export class WorldAfterEvents {
|
|
|
4978
4757
|
*/
|
|
4979
4758
|
readonly buttonPush: ButtonPushAfterEventSignal;
|
|
4980
4759
|
/**
|
|
4981
|
-
* @beta
|
|
4982
4760
|
* @remarks
|
|
4983
4761
|
* This event fires when an entity dies.
|
|
4984
4762
|
*
|
|
4985
4763
|
*/
|
|
4986
4764
|
readonly entityDie: EntityDieAfterEventSignal;
|
|
4987
4765
|
/**
|
|
4988
|
-
* @beta
|
|
4989
4766
|
* @remarks
|
|
4990
4767
|
* This event fires when entity health changes in any degree.
|
|
4991
4768
|
*
|
|
4992
4769
|
*/
|
|
4993
4770
|
readonly entityHealthChanged: EntityHealthChangedAfterEventSignal;
|
|
4994
4771
|
/**
|
|
4995
|
-
* @beta
|
|
4996
4772
|
* @remarks
|
|
4997
4773
|
* This event fires when an entity hits (that is, melee
|
|
4998
4774
|
* attacks) a block.
|
|
@@ -5000,7 +4776,6 @@ export class WorldAfterEvents {
|
|
|
5000
4776
|
*/
|
|
5001
4777
|
readonly entityHitBlock: EntityHitBlockAfterEventSignal;
|
|
5002
4778
|
/**
|
|
5003
|
-
* @beta
|
|
5004
4779
|
* @remarks
|
|
5005
4780
|
* This event fires when an entity hits (that is, melee
|
|
5006
4781
|
* attacks) another entity.
|
|
@@ -5008,21 +4783,18 @@ export class WorldAfterEvents {
|
|
|
5008
4783
|
*/
|
|
5009
4784
|
readonly entityHitEntity: EntityHitEntityAfterEventSignal;
|
|
5010
4785
|
/**
|
|
5011
|
-
* @beta
|
|
5012
4786
|
* @remarks
|
|
5013
4787
|
* This event fires when an entity is hurt (takes damage).
|
|
5014
4788
|
*
|
|
5015
4789
|
*/
|
|
5016
4790
|
readonly entityHurt: EntityHurtAfterEventSignal;
|
|
5017
4791
|
/**
|
|
5018
|
-
* @beta
|
|
5019
4792
|
* @remarks
|
|
5020
4793
|
* This event fires when a chargeable item completes charging.
|
|
5021
4794
|
*
|
|
5022
4795
|
*/
|
|
5023
4796
|
readonly itemCompleteUse: ItemCompleteUseAfterEventSignal;
|
|
5024
4797
|
/**
|
|
5025
|
-
* @beta
|
|
5026
4798
|
* @remarks
|
|
5027
4799
|
* This event fires when a chargeable item is released from
|
|
5028
4800
|
* charging.
|
|
@@ -5030,14 +4802,12 @@ export class WorldAfterEvents {
|
|
|
5030
4802
|
*/
|
|
5031
4803
|
readonly itemReleaseUse: ItemReleaseUseAfterEventSignal;
|
|
5032
4804
|
/**
|
|
5033
|
-
* @beta
|
|
5034
4805
|
* @remarks
|
|
5035
4806
|
* This event fires when a chargeable item starts charging.
|
|
5036
4807
|
*
|
|
5037
4808
|
*/
|
|
5038
4809
|
readonly itemStartUse: ItemStartUseAfterEventSignal;
|
|
5039
4810
|
/**
|
|
5040
|
-
* @beta
|
|
5041
4811
|
* @remarks
|
|
5042
4812
|
* This event fires when a player successfully uses an item or
|
|
5043
4813
|
* places a block by pressing the Use Item / Place Block
|
|
@@ -5048,14 +4818,12 @@ export class WorldAfterEvents {
|
|
|
5048
4818
|
*/
|
|
5049
4819
|
readonly itemStartUseOn: ItemStartUseOnAfterEventSignal;
|
|
5050
4820
|
/**
|
|
5051
|
-
* @beta
|
|
5052
4821
|
* @remarks
|
|
5053
4822
|
* This event fires when a chargeable item stops charging.
|
|
5054
4823
|
*
|
|
5055
4824
|
*/
|
|
5056
4825
|
readonly itemStopUse: ItemStopUseAfterEventSignal;
|
|
5057
4826
|
/**
|
|
5058
|
-
* @beta
|
|
5059
4827
|
* @remarks
|
|
5060
4828
|
* This event fires when a player releases the Use Item / Place
|
|
5061
4829
|
* Block button after successfully using an item. Note: This
|
|
@@ -5064,7 +4832,6 @@ export class WorldAfterEvents {
|
|
|
5064
4832
|
*/
|
|
5065
4833
|
readonly itemStopUseOn: ItemStopUseOnAfterEventSignal;
|
|
5066
4834
|
/**
|
|
5067
|
-
* @beta
|
|
5068
4835
|
* @remarks
|
|
5069
4836
|
* This event fires when an item is successfully used by a
|
|
5070
4837
|
* player.
|
|
@@ -5072,7 +4839,6 @@ export class WorldAfterEvents {
|
|
|
5072
4839
|
*/
|
|
5073
4840
|
readonly itemUse: ItemUseAfterEventSignal;
|
|
5074
4841
|
/**
|
|
5075
|
-
* @beta
|
|
5076
4842
|
* @remarks
|
|
5077
4843
|
* This event fires when an item is used on a block by a
|
|
5078
4844
|
* player.
|
|
@@ -5108,7 +4874,6 @@ export class WorldAfterEvents {
|
|
|
5108
4874
|
*/
|
|
5109
4875
|
readonly playerSpawn: PlayerSpawnAfterEventSignal;
|
|
5110
4876
|
/**
|
|
5111
|
-
* @beta
|
|
5112
4877
|
* @remarks
|
|
5113
4878
|
* A pressure plate has popped back up (i.e., there are no
|
|
5114
4879
|
* entities on the pressure plate.)
|
|
@@ -5116,7 +4881,6 @@ export class WorldAfterEvents {
|
|
|
5116
4881
|
*/
|
|
5117
4882
|
readonly pressurePlatePop: PressurePlatePopAfterEventSignal;
|
|
5118
4883
|
/**
|
|
5119
|
-
* @beta
|
|
5120
4884
|
* @remarks
|
|
5121
4885
|
* A pressure plate has pushed (at least one entity has moved
|
|
5122
4886
|
* onto a pressure plate.)
|
|
@@ -5124,14 +4888,12 @@ export class WorldAfterEvents {
|
|
|
5124
4888
|
*/
|
|
5125
4889
|
readonly pressurePlatePush: PressurePlatePushAfterEventSignal;
|
|
5126
4890
|
/**
|
|
5127
|
-
* @beta
|
|
5128
4891
|
* @remarks
|
|
5129
4892
|
* A target block was hit.
|
|
5130
4893
|
*
|
|
5131
4894
|
*/
|
|
5132
4895
|
readonly targetBlockHit: TargetBlockHitAfterEventSignal;
|
|
5133
4896
|
/**
|
|
5134
|
-
* @beta
|
|
5135
4897
|
* @remarks
|
|
5136
4898
|
* A trip wire was tripped.
|
|
5137
4899
|
*
|
|
@@ -5140,7 +4902,6 @@ export class WorldAfterEvents {
|
|
|
5140
4902
|
}
|
|
5141
4903
|
|
|
5142
4904
|
/**
|
|
5143
|
-
* @beta
|
|
5144
4905
|
* A set of events that fire before an actual action occurs. In
|
|
5145
4906
|
* most cases, you can potentially cancel or modify the
|
|
5146
4907
|
* impending event. Note that in before events any APIs that
|
|
@@ -5166,7 +4927,6 @@ export class WorldBeforeEvents {
|
|
|
5166
4927
|
}
|
|
5167
4928
|
|
|
5168
4929
|
/**
|
|
5169
|
-
* @beta
|
|
5170
4930
|
* Contains information for block raycast hit results.
|
|
5171
4931
|
*/
|
|
5172
4932
|
export interface BlockRaycastHit {
|
|
@@ -5192,7 +4952,6 @@ export interface BlockRaycastHit {
|
|
|
5192
4952
|
}
|
|
5193
4953
|
|
|
5194
4954
|
/**
|
|
5195
|
-
* @beta
|
|
5196
4955
|
* Contains additional options for configuring a block raycast
|
|
5197
4956
|
* query.
|
|
5198
4957
|
*/
|
|
@@ -5220,7 +4979,6 @@ export interface BlockRaycastOptions {
|
|
|
5220
4979
|
}
|
|
5221
4980
|
|
|
5222
4981
|
/**
|
|
5223
|
-
* @beta
|
|
5224
4982
|
* An exact coordinate within the world, including its
|
|
5225
4983
|
* dimension and location.
|
|
5226
4984
|
*/
|
|
@@ -5252,7 +5010,6 @@ export interface DimensionLocation {
|
|
|
5252
5010
|
}
|
|
5253
5011
|
|
|
5254
5012
|
/**
|
|
5255
|
-
* @beta
|
|
5256
5013
|
* Additional options for when damage has been applied via a
|
|
5257
5014
|
* projectile.
|
|
5258
5015
|
*/
|
|
@@ -5272,7 +5029,6 @@ export interface EntityApplyDamageByProjectileOptions {
|
|
|
5272
5029
|
}
|
|
5273
5030
|
|
|
5274
5031
|
/**
|
|
5275
|
-
* @beta
|
|
5276
5032
|
* Additional descriptions and metadata for a damage event.
|
|
5277
5033
|
*/
|
|
5278
5034
|
export interface EntityApplyDamageOptions {
|
|
@@ -5291,7 +5047,6 @@ export interface EntityApplyDamageOptions {
|
|
|
5291
5047
|
}
|
|
5292
5048
|
|
|
5293
5049
|
/**
|
|
5294
|
-
* @beta
|
|
5295
5050
|
* Provides information about how damage has been applied to an
|
|
5296
5051
|
* entity.
|
|
5297
5052
|
*/
|
|
@@ -5317,7 +5072,6 @@ export interface EntityDamageSource {
|
|
|
5317
5072
|
}
|
|
5318
5073
|
|
|
5319
5074
|
/**
|
|
5320
|
-
* @beta
|
|
5321
5075
|
* Contains additional options for entity effects.
|
|
5322
5076
|
*/
|
|
5323
5077
|
export interface EntityEffectOptions {
|
|
@@ -5336,7 +5090,6 @@ export interface EntityEffectOptions {
|
|
|
5336
5090
|
}
|
|
5337
5091
|
|
|
5338
5092
|
/**
|
|
5339
|
-
* @beta
|
|
5340
5093
|
* Contains optional parameters for registering an entity
|
|
5341
5094
|
* event.
|
|
5342
5095
|
*/
|
|
@@ -5358,7 +5111,6 @@ export interface EntityEventOptions {
|
|
|
5358
5111
|
}
|
|
5359
5112
|
|
|
5360
5113
|
/**
|
|
5361
|
-
* @beta
|
|
5362
5114
|
* Contains options for selecting entities within an area.
|
|
5363
5115
|
*/
|
|
5364
5116
|
export interface EntityQueryOptions {
|
|
@@ -5521,7 +5273,6 @@ export interface EntityQueryOptions {
|
|
|
5521
5273
|
}
|
|
5522
5274
|
|
|
5523
5275
|
/**
|
|
5524
|
-
* @beta
|
|
5525
5276
|
* Contains additional options for filtering players based on
|
|
5526
5277
|
* their score for an objective.
|
|
5527
5278
|
*/
|
|
@@ -5556,7 +5307,6 @@ export interface EntityQueryScoreOptions {
|
|
|
5556
5307
|
}
|
|
5557
5308
|
|
|
5558
5309
|
/**
|
|
5559
|
-
* @beta
|
|
5560
5310
|
* Contains information for entity raycast hit results.
|
|
5561
5311
|
*/
|
|
5562
5312
|
export interface EntityRaycastHit {
|
|
@@ -5575,7 +5325,6 @@ export interface EntityRaycastHit {
|
|
|
5575
5325
|
}
|
|
5576
5326
|
|
|
5577
5327
|
/**
|
|
5578
|
-
* @beta
|
|
5579
5328
|
* Contains additional options for an entity raycast operation.
|
|
5580
5329
|
*/
|
|
5581
5330
|
export interface EntityRaycastOptions {
|
|
@@ -5588,7 +5337,6 @@ export interface EntityRaycastOptions {
|
|
|
5588
5337
|
}
|
|
5589
5338
|
|
|
5590
5339
|
/**
|
|
5591
|
-
* @beta
|
|
5592
5340
|
* Additional configuration options for {@link
|
|
5593
5341
|
* World.playMusic}/{@link World.queueMusic} methods.
|
|
5594
5342
|
*/
|
|
@@ -5614,7 +5362,6 @@ export interface MusicOptions {
|
|
|
5614
5362
|
}
|
|
5615
5363
|
|
|
5616
5364
|
/**
|
|
5617
|
-
* @beta
|
|
5618
5365
|
* Additional options for how a sound plays for a player.
|
|
5619
5366
|
*/
|
|
5620
5367
|
export interface PlayerSoundOptions {
|
|
@@ -5640,7 +5387,6 @@ export interface PlayerSoundOptions {
|
|
|
5640
5387
|
}
|
|
5641
5388
|
|
|
5642
5389
|
/**
|
|
5643
|
-
* @beta
|
|
5644
5390
|
* Defines a JSON structure that is used for more flexible.
|
|
5645
5391
|
*/
|
|
5646
5392
|
export interface RawMessage {
|
|
@@ -5682,7 +5428,6 @@ export interface RawMessage {
|
|
|
5682
5428
|
}
|
|
5683
5429
|
|
|
5684
5430
|
/**
|
|
5685
|
-
* @beta
|
|
5686
5431
|
* Provides a description of a score token to use within a raw
|
|
5687
5432
|
* message.
|
|
5688
5433
|
*/
|
|
@@ -5702,7 +5447,6 @@ export interface RawMessageScore {
|
|
|
5702
5447
|
}
|
|
5703
5448
|
|
|
5704
5449
|
/**
|
|
5705
|
-
* @beta
|
|
5706
5450
|
* Contains additional options for how a scoreboard should be
|
|
5707
5451
|
* displayed within its display slot.
|
|
5708
5452
|
*/
|
|
@@ -5722,7 +5466,6 @@ export interface ScoreboardObjectiveDisplayOptions {
|
|
|
5722
5466
|
}
|
|
5723
5467
|
|
|
5724
5468
|
/**
|
|
5725
|
-
* @beta
|
|
5726
5469
|
* Contains additional options for registering a script event
|
|
5727
5470
|
* event callback.
|
|
5728
5471
|
*/
|
|
@@ -5737,7 +5480,6 @@ export interface ScriptEventMessageFilterOptions {
|
|
|
5737
5480
|
}
|
|
5738
5481
|
|
|
5739
5482
|
/**
|
|
5740
|
-
* @beta
|
|
5741
5483
|
* Contains additional options for teleporting an entity.
|
|
5742
5484
|
*/
|
|
5743
5485
|
export interface TeleportOptions {
|
|
@@ -5777,7 +5519,6 @@ export interface TeleportOptions {
|
|
|
5777
5519
|
}
|
|
5778
5520
|
|
|
5779
5521
|
/**
|
|
5780
|
-
* @beta
|
|
5781
5522
|
* Contains additional options for displaying a title and
|
|
5782
5523
|
* optional subtitle.
|
|
5783
5524
|
*/
|
|
@@ -5816,7 +5557,6 @@ export interface TitleDisplayOptions {
|
|
|
5816
5557
|
}
|
|
5817
5558
|
|
|
5818
5559
|
/**
|
|
5819
|
-
* @beta
|
|
5820
5560
|
* Represents a two-directional vector.
|
|
5821
5561
|
*/
|
|
5822
5562
|
export interface Vector2 {
|
|
@@ -5835,7 +5575,6 @@ export interface Vector2 {
|
|
|
5835
5575
|
}
|
|
5836
5576
|
|
|
5837
5577
|
/**
|
|
5838
|
-
* @beta
|
|
5839
5578
|
* Contains a description of a vector.
|
|
5840
5579
|
*/
|
|
5841
5580
|
export interface Vector3 {
|
|
@@ -5860,7 +5599,6 @@ export interface Vector3 {
|
|
|
5860
5599
|
}
|
|
5861
5600
|
|
|
5862
5601
|
/**
|
|
5863
|
-
* @beta
|
|
5864
5602
|
* Contains additional options for a world-level playSound
|
|
5865
5603
|
* occurrence.
|
|
5866
5604
|
*/
|
|
@@ -5879,25 +5617,16 @@ export interface WorldSoundOptions {
|
|
|
5879
5617
|
volume?: number;
|
|
5880
5618
|
}
|
|
5881
5619
|
|
|
5882
|
-
/**
|
|
5883
|
-
* @beta
|
|
5884
|
-
*/
|
|
5885
5620
|
// @ts-ignore Class inheritance allowed for native defined classes
|
|
5886
5621
|
export class CommandError extends Error {
|
|
5887
5622
|
private constructor();
|
|
5888
5623
|
}
|
|
5889
5624
|
|
|
5890
|
-
/**
|
|
5891
|
-
* @beta
|
|
5892
|
-
*/
|
|
5893
5625
|
// @ts-ignore Class inheritance allowed for native defined classes
|
|
5894
5626
|
export class LocationInUnloadedChunkError extends Error {
|
|
5895
5627
|
private constructor();
|
|
5896
5628
|
}
|
|
5897
5629
|
|
|
5898
|
-
/**
|
|
5899
|
-
* @beta
|
|
5900
|
-
*/
|
|
5901
5630
|
// @ts-ignore Class inheritance allowed for native defined classes
|
|
5902
5631
|
export class LocationOutOfWorldBoundariesError extends Error {
|
|
5903
5632
|
private constructor();
|