@minecraft/server 1.3.0-rc.1.20.20-preview.20 → 1.3.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 +0 -2
- package/index.d.ts +22 -168
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -2,8 +2,6 @@
|
|
|
2
2
|
|
|
3
3
|
Contains many types related to manipulating a Minecraft world, including entities, blocks, dimensions, and more.
|
|
4
4
|
|
|
5
|
-
## **NOTE: This version of this module is still in pre-release. It may change or it may be removed in future releases.**
|
|
6
|
-
|
|
7
5
|
See full documentation for this module here:
|
|
8
6
|
|
|
9
7
|
https://learn.microsoft.com/en-us/minecraft/creator/scriptapi/@minecraft/server/@minecraft/server
|
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,14 +15,11 @@
|
|
|
16
15
|
* ```json
|
|
17
16
|
* {
|
|
18
17
|
* "module_name": "@minecraft/server",
|
|
19
|
-
* "version": "1.
|
|
18
|
+
* "version": "1.3.0"
|
|
20
19
|
* }
|
|
21
20
|
* ```
|
|
22
21
|
*
|
|
23
22
|
*/
|
|
24
|
-
/**
|
|
25
|
-
* @beta
|
|
26
|
-
*/
|
|
27
23
|
export enum EntityDamageCause {
|
|
28
24
|
anvil = 'anvil',
|
|
29
25
|
blockExplosion = 'blockExplosion',
|
|
@@ -59,12 +55,10 @@ export enum EntityDamageCause {
|
|
|
59
55
|
}
|
|
60
56
|
|
|
61
57
|
/**
|
|
62
|
-
* @beta
|
|
63
58
|
* Represents a game mode for the current world experience.
|
|
64
59
|
*/
|
|
65
60
|
export enum GameMode {
|
|
66
61
|
/**
|
|
67
|
-
* @beta
|
|
68
62
|
* @remarks
|
|
69
63
|
* World is in a more locked-down experience, where blocks may
|
|
70
64
|
* not be manipulated.
|
|
@@ -72,7 +66,6 @@ export enum GameMode {
|
|
|
72
66
|
*/
|
|
73
67
|
adventure = 'adventure',
|
|
74
68
|
/**
|
|
75
|
-
* @beta
|
|
76
69
|
* @remarks
|
|
77
70
|
* World is in a full creative mode. In creative mode, the
|
|
78
71
|
* player has all the resources available in the item selection
|
|
@@ -85,7 +78,6 @@ export enum GameMode {
|
|
|
85
78
|
*/
|
|
86
79
|
creative = 'creative',
|
|
87
80
|
/**
|
|
88
|
-
* @beta
|
|
89
81
|
* @remarks
|
|
90
82
|
* World is in spectator mode. In spectator mode, spectators
|
|
91
83
|
* are always flying and cannot become grounded. Spectators can
|
|
@@ -98,7 +90,6 @@ export enum GameMode {
|
|
|
98
90
|
*/
|
|
99
91
|
spectator = 'spectator',
|
|
100
92
|
/**
|
|
101
|
-
* @beta
|
|
102
93
|
* @remarks
|
|
103
94
|
* World is in a survival mode, where players can take damage
|
|
104
95
|
* and entities may not be peaceful. Survival mode is where the
|
|
@@ -111,26 +102,22 @@ export enum GameMode {
|
|
|
111
102
|
}
|
|
112
103
|
|
|
113
104
|
/**
|
|
114
|
-
* @beta
|
|
115
105
|
* Describes how an an item can be moved within a container.
|
|
116
106
|
*/
|
|
117
107
|
export enum ItemLockMode {
|
|
118
108
|
/**
|
|
119
|
-
* @beta
|
|
120
109
|
* @remarks
|
|
121
110
|
* The item cannot be dropped or crafted with.
|
|
122
111
|
*
|
|
123
112
|
*/
|
|
124
113
|
inventory = 'inventory',
|
|
125
114
|
/**
|
|
126
|
-
* @beta
|
|
127
115
|
* @remarks
|
|
128
116
|
* The item has no container restrictions.
|
|
129
117
|
*
|
|
130
118
|
*/
|
|
131
119
|
none = 'none',
|
|
132
120
|
/**
|
|
133
|
-
* @beta
|
|
134
121
|
* @remarks
|
|
135
122
|
* The item cannot be moved from its slot, dropped or crafted
|
|
136
123
|
* with.
|
|
@@ -140,7 +127,6 @@ export enum ItemLockMode {
|
|
|
140
127
|
}
|
|
141
128
|
|
|
142
129
|
/**
|
|
143
|
-
* @beta
|
|
144
130
|
* Represents a block in a dimension. A block represents a
|
|
145
131
|
* unique X, Y, and Z within a dimension and get/sets the state
|
|
146
132
|
* of the block at that location. This type was significantly
|
|
@@ -188,7 +174,6 @@ export class Block {
|
|
|
188
174
|
*/
|
|
189
175
|
readonly z: number;
|
|
190
176
|
/**
|
|
191
|
-
* @beta
|
|
192
177
|
* @remarks
|
|
193
178
|
* Gets additional configuration properties (a component) for
|
|
194
179
|
* specific capabilities of particular blocks - for example, an
|
|
@@ -219,14 +204,12 @@ export class Block {
|
|
|
219
204
|
}
|
|
220
205
|
|
|
221
206
|
/**
|
|
222
|
-
* @beta
|
|
223
207
|
* Base type for components associated with blocks.
|
|
224
208
|
*/
|
|
225
209
|
// @ts-ignore Class inheritance allowed for native defined classes
|
|
226
210
|
export class BlockComponent extends Component {
|
|
227
211
|
private constructor();
|
|
228
212
|
/**
|
|
229
|
-
* @beta
|
|
230
213
|
* @remarks
|
|
231
214
|
* Block instance that this component pertains to.
|
|
232
215
|
*
|
|
@@ -235,7 +218,6 @@ export class BlockComponent extends Component {
|
|
|
235
218
|
}
|
|
236
219
|
|
|
237
220
|
/**
|
|
238
|
-
* @beta
|
|
239
221
|
* Contains information regarding an event that impacts a
|
|
240
222
|
* specific block.
|
|
241
223
|
*/
|
|
@@ -257,7 +239,6 @@ export class BlockEvent {
|
|
|
257
239
|
}
|
|
258
240
|
|
|
259
241
|
/**
|
|
260
|
-
* @beta
|
|
261
242
|
* Represents the inventory of a block in the world. Used with
|
|
262
243
|
* blocks like chests.
|
|
263
244
|
*/
|
|
@@ -275,7 +256,6 @@ export class BlockInventoryComponent extends BlockComponent {
|
|
|
275
256
|
}
|
|
276
257
|
|
|
277
258
|
/**
|
|
278
|
-
* @beta
|
|
279
259
|
* Contains the combination of type {@link BlockType} and
|
|
280
260
|
* properties (also sometimes called block state) which
|
|
281
261
|
* describe a block (but does not belong to a specific {@link
|
|
@@ -347,7 +327,6 @@ export class BlockPermutation {
|
|
|
347
327
|
}
|
|
348
328
|
|
|
349
329
|
/**
|
|
350
|
-
* @beta
|
|
351
330
|
* Contains information related to changes to a button push.
|
|
352
331
|
*/
|
|
353
332
|
// @ts-ignore Class inheritance allowed for native defined classes
|
|
@@ -362,7 +341,6 @@ export class ButtonPushAfterEvent extends BlockEvent {
|
|
|
362
341
|
}
|
|
363
342
|
|
|
364
343
|
/**
|
|
365
|
-
* @beta
|
|
366
344
|
* Manages callbacks that are connected to when a button is
|
|
367
345
|
* pushed.
|
|
368
346
|
*/
|
|
@@ -387,7 +365,6 @@ export class CommandResult {
|
|
|
387
365
|
}
|
|
388
366
|
|
|
389
367
|
/**
|
|
390
|
-
* @beta
|
|
391
368
|
* Base class for downstream Component implementations.
|
|
392
369
|
*/
|
|
393
370
|
export class Component {
|
|
@@ -401,7 +378,6 @@ export class Component {
|
|
|
401
378
|
}
|
|
402
379
|
|
|
403
380
|
/**
|
|
404
|
-
* @beta
|
|
405
381
|
* Represents a container that can hold sets of items. Used
|
|
406
382
|
* with entities such as Players, Chest Minecarts, Llamas, and
|
|
407
383
|
* more.
|
|
@@ -581,7 +557,6 @@ export class Dimension {
|
|
|
581
557
|
*/
|
|
582
558
|
readonly id: string;
|
|
583
559
|
/**
|
|
584
|
-
* @beta
|
|
585
560
|
* @remarks
|
|
586
561
|
* Returns a block instance at the given location.
|
|
587
562
|
*
|
|
@@ -602,7 +577,6 @@ export class Dimension {
|
|
|
602
577
|
*/
|
|
603
578
|
getBlock(location: Vector3): Block | undefined;
|
|
604
579
|
/**
|
|
605
|
-
* @beta
|
|
606
580
|
* @remarks
|
|
607
581
|
* Returns a set of entities based on a set of conditions
|
|
608
582
|
* defined via the EntityQueryOptions set of filter criteria.
|
|
@@ -671,7 +645,6 @@ export class Dimension {
|
|
|
671
645
|
*/
|
|
672
646
|
getEntities(options?: EntityQueryOptions): Entity[];
|
|
673
647
|
/**
|
|
674
|
-
* @beta
|
|
675
648
|
* @remarks
|
|
676
649
|
* Returns a set of entities at a particular location.
|
|
677
650
|
*
|
|
@@ -682,7 +655,6 @@ export class Dimension {
|
|
|
682
655
|
*/
|
|
683
656
|
getEntitiesAtBlockLocation(location: Vector3): Entity[];
|
|
684
657
|
/**
|
|
685
|
-
* @beta
|
|
686
658
|
* @remarks
|
|
687
659
|
* Returns a set of players based on a set of conditions
|
|
688
660
|
* defined via the EntityQueryOptions set of filter criteria.
|
|
@@ -696,7 +668,6 @@ export class Dimension {
|
|
|
696
668
|
*/
|
|
697
669
|
getPlayers(options?: EntityQueryOptions): Player[];
|
|
698
670
|
/**
|
|
699
|
-
* @beta
|
|
700
671
|
* @remarks
|
|
701
672
|
* Runs a command synchronously using the context of the
|
|
702
673
|
* broader dimenion.
|
|
@@ -739,7 +710,6 @@ export class Dimension {
|
|
|
739
710
|
*/
|
|
740
711
|
runCommandAsync(commandString: string): Promise<CommandResult>;
|
|
741
712
|
/**
|
|
742
|
-
* @beta
|
|
743
713
|
* @remarks
|
|
744
714
|
* Creates a new entity (e.g., a mob) at the specified
|
|
745
715
|
* location.
|
|
@@ -796,7 +766,6 @@ export class Dimension {
|
|
|
796
766
|
*/
|
|
797
767
|
spawnEntity(identifier: string, location: Vector3): Entity;
|
|
798
768
|
/**
|
|
799
|
-
* @beta
|
|
800
769
|
* @remarks
|
|
801
770
|
* Creates a new item stack as an entity at the specified
|
|
802
771
|
* location.
|
|
@@ -810,38 +779,37 @@ export class Dimension {
|
|
|
810
779
|
* @throws This function can throw errors.
|
|
811
780
|
* @example itemStacks.ts
|
|
812
781
|
* ```typescript
|
|
813
|
-
*
|
|
782
|
+
* const overworld = mc.world.getDimension('overworld');
|
|
814
783
|
*
|
|
815
|
-
*
|
|
816
|
-
*
|
|
817
|
-
*
|
|
784
|
+
* const oneItemLoc = { x: targetLocation.x + targetLocation.y + 3, y: 2, z: targetLocation.z + 1 };
|
|
785
|
+
* const fiveItemsLoc = { x: targetLocation.x + 1, y: targetLocation.y + 2, z: targetLocation.z + 1 };
|
|
786
|
+
* const diamondPickaxeLoc = { x: targetLocation.x + 2, y: targetLocation.y + 2, z: targetLocation.z + 4 };
|
|
818
787
|
*
|
|
819
|
-
*
|
|
820
|
-
*
|
|
821
|
-
*
|
|
788
|
+
* const oneEmerald = new mc.ItemStack(mc.MinecraftItemTypes.Emerald, 1);
|
|
789
|
+
* const onePickaxe = new mc.ItemStack(mc.MinecraftItemTypes.DiamondPickaxe, 1);
|
|
790
|
+
* const fiveEmeralds = new mc.ItemStack(mc.MinecraftItemTypes.Emerald, 5);
|
|
822
791
|
*
|
|
823
|
-
*
|
|
824
|
-
*
|
|
792
|
+
* log(`Spawning an emerald at (${oneItemLoc.x}, ${oneItemLoc.y}, ${oneItemLoc.z})`);
|
|
793
|
+
* overworld.spawnItem(oneEmerald, oneItemLoc);
|
|
825
794
|
*
|
|
826
|
-
*
|
|
827
|
-
*
|
|
795
|
+
* log(`Spawning five emeralds at (${fiveItemsLoc.x}, ${fiveItemsLoc.y}, ${fiveItemsLoc.z})`);
|
|
796
|
+
* overworld.spawnItem(fiveEmeralds, fiveItemsLoc);
|
|
828
797
|
*
|
|
829
|
-
*
|
|
830
|
-
*
|
|
798
|
+
* log(`Spawning a diamond pickaxe at (${diamondPickaxeLoc.x}, ${diamondPickaxeLoc.y}, ${diamondPickaxeLoc.z})`);
|
|
799
|
+
* overworld.spawnItem(onePickaxe, diamondPickaxeLoc);
|
|
831
800
|
* ```
|
|
832
801
|
* @example spawnItem.ts
|
|
833
802
|
* ```typescript
|
|
834
|
-
*
|
|
803
|
+
* const featherItem = new mc.ItemStack(mc.MinecraftItemTypes.Feather, 1);
|
|
835
804
|
*
|
|
836
|
-
*
|
|
837
|
-
*
|
|
805
|
+
* overworld.spawnItem(featherItem, targetLocation);
|
|
806
|
+
* log(`New feather created at ${targetLocation.x}, ${targetLocation.y}, ${targetLocation.z}!`);
|
|
838
807
|
* ```
|
|
839
808
|
*/
|
|
840
809
|
spawnItem(itemStack: ItemStack, location: Vector3): Entity;
|
|
841
810
|
}
|
|
842
811
|
|
|
843
812
|
/**
|
|
844
|
-
* @beta
|
|
845
813
|
* Represents an effect - like poison - that has been added to
|
|
846
814
|
* an Entity.
|
|
847
815
|
*/
|
|
@@ -890,7 +858,6 @@ export class Effect {
|
|
|
890
858
|
}
|
|
891
859
|
|
|
892
860
|
/**
|
|
893
|
-
* @beta
|
|
894
861
|
* Represents a type of effect - like poison - that can be
|
|
895
862
|
* applied to an entity.
|
|
896
863
|
*/
|
|
@@ -913,7 +880,6 @@ export class EffectType {
|
|
|
913
880
|
export class Entity {
|
|
914
881
|
private constructor();
|
|
915
882
|
/**
|
|
916
|
-
* @beta
|
|
917
883
|
* @remarks
|
|
918
884
|
* Dimension that the entity is currently within.
|
|
919
885
|
*
|
|
@@ -933,7 +899,6 @@ export class Entity {
|
|
|
933
899
|
*/
|
|
934
900
|
readonly id: string;
|
|
935
901
|
/**
|
|
936
|
-
* @beta
|
|
937
902
|
* @remarks
|
|
938
903
|
* Current location of the entity.
|
|
939
904
|
*
|
|
@@ -941,7 +906,6 @@ export class Entity {
|
|
|
941
906
|
*/
|
|
942
907
|
readonly location: Vector3;
|
|
943
908
|
/**
|
|
944
|
-
* @beta
|
|
945
909
|
* @remarks
|
|
946
910
|
* Given name of the entity.
|
|
947
911
|
*
|
|
@@ -959,7 +923,6 @@ export class Entity {
|
|
|
959
923
|
*/
|
|
960
924
|
readonly typeId: string;
|
|
961
925
|
/**
|
|
962
|
-
* @beta
|
|
963
926
|
* @remarks
|
|
964
927
|
* Adds or updates an effect, like poison, to the entity.
|
|
965
928
|
*
|
|
@@ -1018,7 +981,6 @@ export class Entity {
|
|
|
1018
981
|
*/
|
|
1019
982
|
addEffect(effectType: EffectType | string, duration: number, options?: EntityEffectOptions): void;
|
|
1020
983
|
/**
|
|
1021
|
-
* @beta
|
|
1022
984
|
* @remarks
|
|
1023
985
|
* Adds a specified tag to an entity.
|
|
1024
986
|
*
|
|
@@ -1053,7 +1015,6 @@ export class Entity {
|
|
|
1053
1015
|
*/
|
|
1054
1016
|
addTag(tag: string): boolean;
|
|
1055
1017
|
/**
|
|
1056
|
-
* @beta
|
|
1057
1018
|
* @remarks
|
|
1058
1019
|
* Applies a set of damage to an entity.
|
|
1059
1020
|
*
|
|
@@ -1086,7 +1047,6 @@ export class Entity {
|
|
|
1086
1047
|
*/
|
|
1087
1048
|
applyDamage(amount: number, options?: EntityApplyDamageByProjectileOptions | EntityApplyDamageOptions): boolean;
|
|
1088
1049
|
/**
|
|
1089
|
-
* @beta
|
|
1090
1050
|
* @remarks
|
|
1091
1051
|
* Applies impulse vector to the current velocity of the
|
|
1092
1052
|
* entity.
|
|
@@ -1108,7 +1068,6 @@ export class Entity {
|
|
|
1108
1068
|
*/
|
|
1109
1069
|
applyImpulse(vector: Vector3): void;
|
|
1110
1070
|
/**
|
|
1111
|
-
* @beta
|
|
1112
1071
|
* @remarks
|
|
1113
1072
|
* Applies impulse vector to the current velocity of the
|
|
1114
1073
|
* entity.
|
|
@@ -1144,7 +1103,6 @@ export class Entity {
|
|
|
1144
1103
|
*/
|
|
1145
1104
|
applyKnockback(directionX: number, directionZ: number, horizontalStrength: number, verticalStrength: number): void;
|
|
1146
1105
|
/**
|
|
1147
|
-
* @beta
|
|
1148
1106
|
* @remarks
|
|
1149
1107
|
* Sets the current velocity of the Entity to zero. Note that
|
|
1150
1108
|
* this method may not have an impact on Players.
|
|
@@ -1164,7 +1122,6 @@ export class Entity {
|
|
|
1164
1122
|
*/
|
|
1165
1123
|
clearVelocity(): void;
|
|
1166
1124
|
/**
|
|
1167
|
-
* @beta
|
|
1168
1125
|
* @remarks
|
|
1169
1126
|
* Gets a component (that represents additional capabilities)
|
|
1170
1127
|
* for an entity.
|
|
@@ -1180,7 +1137,6 @@ export class Entity {
|
|
|
1180
1137
|
*/
|
|
1181
1138
|
getComponent(componentId: string): EntityComponent | undefined;
|
|
1182
1139
|
/**
|
|
1183
|
-
* @beta
|
|
1184
1140
|
* @remarks
|
|
1185
1141
|
* Returns all components that are both present on this entity
|
|
1186
1142
|
* and supported by the API.
|
|
@@ -1191,7 +1147,6 @@ export class Entity {
|
|
|
1191
1147
|
*/
|
|
1192
1148
|
getComponents(): EntityComponent[];
|
|
1193
1149
|
/**
|
|
1194
|
-
* @beta
|
|
1195
1150
|
* @remarks
|
|
1196
1151
|
* Returns the effect for the specified EffectType on the
|
|
1197
1152
|
* entity, undefined if the effect is not present, or throws an
|
|
@@ -1207,7 +1162,6 @@ export class Entity {
|
|
|
1207
1162
|
*/
|
|
1208
1163
|
getEffect(effectType: EffectType | string): Effect | undefined;
|
|
1209
1164
|
/**
|
|
1210
|
-
* @beta
|
|
1211
1165
|
* @remarks
|
|
1212
1166
|
* Returns a set of effects applied to this entity.
|
|
1213
1167
|
*
|
|
@@ -1217,7 +1171,6 @@ export class Entity {
|
|
|
1217
1171
|
*/
|
|
1218
1172
|
getEffects(): Effect[];
|
|
1219
1173
|
/**
|
|
1220
|
-
* @beta
|
|
1221
1174
|
* @remarks
|
|
1222
1175
|
* Returns the current location of the head component of this
|
|
1223
1176
|
* entity.
|
|
@@ -1229,7 +1182,6 @@ export class Entity {
|
|
|
1229
1182
|
*/
|
|
1230
1183
|
getHeadLocation(): Vector3;
|
|
1231
1184
|
/**
|
|
1232
|
-
* @beta
|
|
1233
1185
|
* @remarks
|
|
1234
1186
|
* Returns all tags associated with an entity.
|
|
1235
1187
|
*
|
|
@@ -1239,7 +1191,6 @@ export class Entity {
|
|
|
1239
1191
|
*/
|
|
1240
1192
|
getTags(): string[];
|
|
1241
1193
|
/**
|
|
1242
|
-
* @beta
|
|
1243
1194
|
* @remarks
|
|
1244
1195
|
* Returns the current velocity vector of the entity.
|
|
1245
1196
|
*
|
|
@@ -1259,7 +1210,6 @@ export class Entity {
|
|
|
1259
1210
|
*/
|
|
1260
1211
|
getVelocity(): Vector3;
|
|
1261
1212
|
/**
|
|
1262
|
-
* @beta
|
|
1263
1213
|
* @remarks
|
|
1264
1214
|
* Returns the current view direction of the entity.
|
|
1265
1215
|
*
|
|
@@ -1269,7 +1219,6 @@ export class Entity {
|
|
|
1269
1219
|
*/
|
|
1270
1220
|
getViewDirection(): Vector3;
|
|
1271
1221
|
/**
|
|
1272
|
-
* @beta
|
|
1273
1222
|
* @remarks
|
|
1274
1223
|
* Returns true if the specified component is present on this
|
|
1275
1224
|
* entity.
|
|
@@ -1284,7 +1233,6 @@ export class Entity {
|
|
|
1284
1233
|
*/
|
|
1285
1234
|
hasComponent(componentId: string): boolean;
|
|
1286
1235
|
/**
|
|
1287
|
-
* @beta
|
|
1288
1236
|
* @remarks
|
|
1289
1237
|
* Returns whether an entity has a particular tag.
|
|
1290
1238
|
*
|
|
@@ -1296,7 +1244,6 @@ export class Entity {
|
|
|
1296
1244
|
*/
|
|
1297
1245
|
hasTag(tag: string): boolean;
|
|
1298
1246
|
/**
|
|
1299
|
-
* @beta
|
|
1300
1247
|
* @remarks
|
|
1301
1248
|
* Kills this entity. The entity will drop loot as normal.
|
|
1302
1249
|
*
|
|
@@ -1328,7 +1275,6 @@ export class Entity {
|
|
|
1328
1275
|
*/
|
|
1329
1276
|
kill(): boolean;
|
|
1330
1277
|
/**
|
|
1331
|
-
* @beta
|
|
1332
1278
|
* @remarks
|
|
1333
1279
|
* Removes the specified EffectType on the entity, or returns
|
|
1334
1280
|
* false if the effect is not present.
|
|
@@ -1344,7 +1290,6 @@ export class Entity {
|
|
|
1344
1290
|
*/
|
|
1345
1291
|
removeEffect(effectType: EffectType | string): boolean;
|
|
1346
1292
|
/**
|
|
1347
|
-
* @beta
|
|
1348
1293
|
* @remarks
|
|
1349
1294
|
* Removes a specified tag from an entity.
|
|
1350
1295
|
*
|
|
@@ -1358,7 +1303,6 @@ export class Entity {
|
|
|
1358
1303
|
*/
|
|
1359
1304
|
removeTag(tag: string): boolean;
|
|
1360
1305
|
/**
|
|
1361
|
-
* @beta
|
|
1362
1306
|
* @remarks
|
|
1363
1307
|
* Runs a synchronous command on the entity.
|
|
1364
1308
|
*
|
|
@@ -1389,7 +1333,6 @@ export class Entity {
|
|
|
1389
1333
|
*/
|
|
1390
1334
|
runCommandAsync(commandString: string): Promise<CommandResult>;
|
|
1391
1335
|
/**
|
|
1392
|
-
* @beta
|
|
1393
1336
|
* @remarks
|
|
1394
1337
|
* Teleports the selected entity to a new location
|
|
1395
1338
|
*
|
|
@@ -1422,7 +1365,6 @@ export class Entity {
|
|
|
1422
1365
|
*/
|
|
1423
1366
|
teleport(location: Vector3, teleportOptions?: TeleportOptions): void;
|
|
1424
1367
|
/**
|
|
1425
|
-
* @beta
|
|
1426
1368
|
* @remarks
|
|
1427
1369
|
* Attempts to try a teleport, but may not complete the
|
|
1428
1370
|
* teleport operation (for example, if there are blocks at the
|
|
@@ -1444,7 +1386,6 @@ export class Entity {
|
|
|
1444
1386
|
}
|
|
1445
1387
|
|
|
1446
1388
|
/**
|
|
1447
|
-
* @beta
|
|
1448
1389
|
* This is a base abstract class for any entity component that
|
|
1449
1390
|
* centers around a number and can have a minimum, maximum, and
|
|
1450
1391
|
* default defined value.
|
|
@@ -1524,7 +1465,6 @@ export class EntityAttributeComponent extends EntityComponent {
|
|
|
1524
1465
|
}
|
|
1525
1466
|
|
|
1526
1467
|
/**
|
|
1527
|
-
* @beta
|
|
1528
1468
|
* Base class for a family of entity movement events.
|
|
1529
1469
|
*/
|
|
1530
1470
|
// @ts-ignore Class inheritance allowed for native defined classes
|
|
@@ -1534,7 +1474,6 @@ export class EntityBaseMovementComponent extends EntityComponent {
|
|
|
1534
1474
|
}
|
|
1535
1475
|
|
|
1536
1476
|
/**
|
|
1537
|
-
* @beta
|
|
1538
1477
|
* When added, this component signifies that the entity can
|
|
1539
1478
|
* climb up ladders.
|
|
1540
1479
|
*/
|
|
@@ -1545,7 +1484,6 @@ export class EntityCanClimbComponent extends EntityComponent {
|
|
|
1545
1484
|
}
|
|
1546
1485
|
|
|
1547
1486
|
/**
|
|
1548
|
-
* @beta
|
|
1549
1487
|
* When added, this component signifies that the entity can
|
|
1550
1488
|
* fly, and the pathfinder won't be restricted to paths where a
|
|
1551
1489
|
* solid block is required underneath it.
|
|
@@ -1557,7 +1495,6 @@ export class EntityCanFlyComponent extends EntityComponent {
|
|
|
1557
1495
|
}
|
|
1558
1496
|
|
|
1559
1497
|
/**
|
|
1560
|
-
* @beta
|
|
1561
1498
|
* When added, this component signifies that the entity can
|
|
1562
1499
|
* power jump like the horse does within Minecraft.
|
|
1563
1500
|
*/
|
|
@@ -1568,7 +1505,6 @@ export class EntityCanPowerJumpComponent extends EntityComponent {
|
|
|
1568
1505
|
}
|
|
1569
1506
|
|
|
1570
1507
|
/**
|
|
1571
|
-
* @beta
|
|
1572
1508
|
* Defines the entity's color. Only works on certain entities
|
|
1573
1509
|
* that have predefined color values (e.g., sheep, llama,
|
|
1574
1510
|
* shulker).
|
|
@@ -1588,7 +1524,6 @@ export class EntityColorComponent extends EntityComponent {
|
|
|
1588
1524
|
}
|
|
1589
1525
|
|
|
1590
1526
|
/**
|
|
1591
|
-
* @beta
|
|
1592
1527
|
* Base class for downstream entity components.
|
|
1593
1528
|
*/
|
|
1594
1529
|
// @ts-ignore Class inheritance allowed for native defined classes
|
|
@@ -1597,7 +1532,6 @@ export class EntityComponent extends Component {
|
|
|
1597
1532
|
}
|
|
1598
1533
|
|
|
1599
1534
|
/**
|
|
1600
|
-
* @beta
|
|
1601
1535
|
* When added, this component signifies that this entity
|
|
1602
1536
|
* doesn't take damage from fire.
|
|
1603
1537
|
*/
|
|
@@ -1608,7 +1542,6 @@ export class EntityFireImmuneComponent extends EntityComponent {
|
|
|
1608
1542
|
}
|
|
1609
1543
|
|
|
1610
1544
|
/**
|
|
1611
|
-
* @beta
|
|
1612
1545
|
* When added, this component signifies that this entity can
|
|
1613
1546
|
* float in liquid blocks.
|
|
1614
1547
|
*/
|
|
@@ -1619,7 +1552,6 @@ export class EntityFloatsInLiquidComponent extends EntityComponent {
|
|
|
1619
1552
|
}
|
|
1620
1553
|
|
|
1621
1554
|
/**
|
|
1622
|
-
* @beta
|
|
1623
1555
|
* Represents the flying speed of an entity.
|
|
1624
1556
|
*/
|
|
1625
1557
|
// @ts-ignore Class inheritance allowed for native defined classes
|
|
@@ -1635,7 +1567,6 @@ export class EntityFlyingSpeedComponent extends EntityComponent {
|
|
|
1635
1567
|
}
|
|
1636
1568
|
|
|
1637
1569
|
/**
|
|
1638
|
-
* @beta
|
|
1639
1570
|
* Defines how much friction affects this entity.
|
|
1640
1571
|
*/
|
|
1641
1572
|
// @ts-ignore Class inheritance allowed for native defined classes
|
|
@@ -1651,7 +1582,6 @@ export class EntityFrictionModifierComponent extends EntityComponent {
|
|
|
1651
1582
|
}
|
|
1652
1583
|
|
|
1653
1584
|
/**
|
|
1654
|
-
* @beta
|
|
1655
1585
|
* Sets the offset from the ground that the entity is actually
|
|
1656
1586
|
* at.
|
|
1657
1587
|
*/
|
|
@@ -1670,7 +1600,6 @@ export class EntityGroundOffsetComponent extends EntityComponent {
|
|
|
1670
1600
|
}
|
|
1671
1601
|
|
|
1672
1602
|
/**
|
|
1673
|
-
* @beta
|
|
1674
1603
|
* Defines the interactions with this entity for healing it.
|
|
1675
1604
|
*/
|
|
1676
1605
|
// @ts-ignore Class inheritance allowed for native defined classes
|
|
@@ -1697,7 +1626,6 @@ export class EntityHealableComponent extends EntityComponent {
|
|
|
1697
1626
|
}
|
|
1698
1627
|
|
|
1699
1628
|
/**
|
|
1700
|
-
* @beta
|
|
1701
1629
|
* Defines the health properties of an entity.
|
|
1702
1630
|
*/
|
|
1703
1631
|
// @ts-ignore Class inheritance allowed for native defined classes
|
|
@@ -1707,7 +1635,6 @@ export class EntityHealthComponent extends EntityAttributeComponent {
|
|
|
1707
1635
|
}
|
|
1708
1636
|
|
|
1709
1637
|
/**
|
|
1710
|
-
* @beta
|
|
1711
1638
|
* Defines this entity's inventory properties.
|
|
1712
1639
|
*/
|
|
1713
1640
|
// @ts-ignore Class inheritance allowed for native defined classes
|
|
@@ -1769,7 +1696,6 @@ export class EntityInventoryComponent extends EntityComponent {
|
|
|
1769
1696
|
}
|
|
1770
1697
|
|
|
1771
1698
|
/**
|
|
1772
|
-
* @beta
|
|
1773
1699
|
* When added, this component signifies that this entity is a
|
|
1774
1700
|
* baby.
|
|
1775
1701
|
*/
|
|
@@ -1780,7 +1706,6 @@ export class EntityIsBabyComponent extends EntityComponent {
|
|
|
1780
1706
|
}
|
|
1781
1707
|
|
|
1782
1708
|
/**
|
|
1783
|
-
* @beta
|
|
1784
1709
|
* When added, this component signifies that this entity is
|
|
1785
1710
|
* charged.
|
|
1786
1711
|
*/
|
|
@@ -1791,7 +1716,6 @@ export class EntityIsChargedComponent extends EntityComponent {
|
|
|
1791
1716
|
}
|
|
1792
1717
|
|
|
1793
1718
|
/**
|
|
1794
|
-
* @beta
|
|
1795
1719
|
* When added, this component signifies that this entity is
|
|
1796
1720
|
* currently carrying a chest.
|
|
1797
1721
|
*/
|
|
@@ -1802,7 +1726,6 @@ export class EntityIsChestedComponent extends EntityComponent {
|
|
|
1802
1726
|
}
|
|
1803
1727
|
|
|
1804
1728
|
/**
|
|
1805
|
-
* @beta
|
|
1806
1729
|
* When added, this component signifies that dyes can be used
|
|
1807
1730
|
* on this entity to change its color.
|
|
1808
1731
|
*/
|
|
@@ -1813,7 +1736,6 @@ export class EntityIsDyeableComponent extends EntityComponent {
|
|
|
1813
1736
|
}
|
|
1814
1737
|
|
|
1815
1738
|
/**
|
|
1816
|
-
* @beta
|
|
1817
1739
|
* When added, this component signifies that this entity can
|
|
1818
1740
|
* hide from hostile mobs while invisible.
|
|
1819
1741
|
*/
|
|
@@ -1824,7 +1746,6 @@ export class EntityIsHiddenWhenInvisibleComponent extends EntityComponent {
|
|
|
1824
1746
|
}
|
|
1825
1747
|
|
|
1826
1748
|
/**
|
|
1827
|
-
* @beta
|
|
1828
1749
|
* When added, this component signifies that this entity this
|
|
1829
1750
|
* currently on fire.
|
|
1830
1751
|
*/
|
|
@@ -1835,7 +1756,6 @@ export class EntityIsIgnitedComponent extends EntityComponent {
|
|
|
1835
1756
|
}
|
|
1836
1757
|
|
|
1837
1758
|
/**
|
|
1838
|
-
* @beta
|
|
1839
1759
|
* When added, this component signifies that this entity is an
|
|
1840
1760
|
* illager captain.
|
|
1841
1761
|
*/
|
|
@@ -1846,7 +1766,6 @@ export class EntityIsIllagerCaptainComponent extends EntityComponent {
|
|
|
1846
1766
|
}
|
|
1847
1767
|
|
|
1848
1768
|
/**
|
|
1849
|
-
* @beta
|
|
1850
1769
|
* When added, this component signifies that this entity is
|
|
1851
1770
|
* currently saddled.
|
|
1852
1771
|
*/
|
|
@@ -1857,7 +1776,6 @@ export class EntityIsSaddledComponent extends EntityComponent {
|
|
|
1857
1776
|
}
|
|
1858
1777
|
|
|
1859
1778
|
/**
|
|
1860
|
-
* @beta
|
|
1861
1779
|
* When added, this component signifies that this entity is
|
|
1862
1780
|
* currently shaking.
|
|
1863
1781
|
*/
|
|
@@ -1868,7 +1786,6 @@ export class EntityIsShakingComponent extends EntityComponent {
|
|
|
1868
1786
|
}
|
|
1869
1787
|
|
|
1870
1788
|
/**
|
|
1871
|
-
* @beta
|
|
1872
1789
|
* When added, this component signifies that this entity is
|
|
1873
1790
|
* currently sheared.
|
|
1874
1791
|
*/
|
|
@@ -1879,7 +1796,6 @@ export class EntityIsShearedComponent extends EntityComponent {
|
|
|
1879
1796
|
}
|
|
1880
1797
|
|
|
1881
1798
|
/**
|
|
1882
|
-
* @beta
|
|
1883
1799
|
* When added, this component signifies that this entity can be
|
|
1884
1800
|
* stacked.
|
|
1885
1801
|
*/
|
|
@@ -1890,7 +1806,6 @@ export class EntityIsStackableComponent extends EntityComponent {
|
|
|
1890
1806
|
}
|
|
1891
1807
|
|
|
1892
1808
|
/**
|
|
1893
|
-
* @beta
|
|
1894
1809
|
* When added, this component signifies that this entity is
|
|
1895
1810
|
* currently stunned.
|
|
1896
1811
|
*/
|
|
@@ -1901,7 +1816,6 @@ export class EntityIsStunnedComponent extends EntityComponent {
|
|
|
1901
1816
|
}
|
|
1902
1817
|
|
|
1903
1818
|
/**
|
|
1904
|
-
* @beta
|
|
1905
1819
|
* When added, this component signifies that this entity is
|
|
1906
1820
|
* currently tamed.
|
|
1907
1821
|
*/
|
|
@@ -1912,7 +1826,6 @@ export class EntityIsTamedComponent extends EntityComponent {
|
|
|
1912
1826
|
}
|
|
1913
1827
|
|
|
1914
1828
|
/**
|
|
1915
|
-
* @beta
|
|
1916
1829
|
* If added onto the entity, this indicates that the entity
|
|
1917
1830
|
* represents a free-floating item in the world. Lets you
|
|
1918
1831
|
* retrieve the actual item stack contents via the itemStack
|
|
@@ -1932,7 +1845,6 @@ export class EntityItemComponent extends EntityComponent {
|
|
|
1932
1845
|
}
|
|
1933
1846
|
|
|
1934
1847
|
/**
|
|
1935
|
-
* @beta
|
|
1936
1848
|
* Additional variant value. Can be used to further
|
|
1937
1849
|
* differentiate variants.
|
|
1938
1850
|
*/
|
|
@@ -1951,7 +1863,6 @@ export class EntityMarkVariantComponent extends EntityComponent {
|
|
|
1951
1863
|
}
|
|
1952
1864
|
|
|
1953
1865
|
/**
|
|
1954
|
-
* @beta
|
|
1955
1866
|
* When added, this movement control allows the mob to swim in
|
|
1956
1867
|
* water and walk on land.
|
|
1957
1868
|
*/
|
|
@@ -1962,7 +1873,6 @@ export class EntityMovementAmphibiousComponent extends EntityBaseMovementCompone
|
|
|
1962
1873
|
}
|
|
1963
1874
|
|
|
1964
1875
|
/**
|
|
1965
|
-
* @beta
|
|
1966
1876
|
* This component accents the movement of an entity.
|
|
1967
1877
|
*/
|
|
1968
1878
|
// @ts-ignore Class inheritance allowed for native defined classes
|
|
@@ -1972,7 +1882,6 @@ export class EntityMovementBasicComponent extends EntityBaseMovementComponent {
|
|
|
1972
1882
|
}
|
|
1973
1883
|
|
|
1974
1884
|
/**
|
|
1975
|
-
* @beta
|
|
1976
1885
|
* When added, this move control causes the mob to fly.
|
|
1977
1886
|
*/
|
|
1978
1887
|
// @ts-ignore Class inheritance allowed for native defined classes
|
|
@@ -1982,7 +1891,6 @@ export class EntityMovementFlyComponent extends EntityBaseMovementComponent {
|
|
|
1982
1891
|
}
|
|
1983
1892
|
|
|
1984
1893
|
/**
|
|
1985
|
-
* @beta
|
|
1986
1894
|
* When added, this move control allows a mob to fly, swim,
|
|
1987
1895
|
* climb, etc.
|
|
1988
1896
|
*/
|
|
@@ -1993,7 +1901,6 @@ export class EntityMovementGenericComponent extends EntityBaseMovementComponent
|
|
|
1993
1901
|
}
|
|
1994
1902
|
|
|
1995
1903
|
/**
|
|
1996
|
-
* @beta
|
|
1997
1904
|
* When added, this move control causes the mob to hover.
|
|
1998
1905
|
*/
|
|
1999
1906
|
// @ts-ignore Class inheritance allowed for native defined classes
|
|
@@ -2003,7 +1910,6 @@ export class EntityMovementHoverComponent extends EntityBaseMovementComponent {
|
|
|
2003
1910
|
}
|
|
2004
1911
|
|
|
2005
1912
|
/**
|
|
2006
|
-
* @beta
|
|
2007
1913
|
* Move control that causes the mob to jump as it moves with a
|
|
2008
1914
|
* specified delay between jumps.
|
|
2009
1915
|
*/
|
|
@@ -2014,7 +1920,6 @@ export class EntityMovementJumpComponent extends EntityBaseMovementComponent {
|
|
|
2014
1920
|
}
|
|
2015
1921
|
|
|
2016
1922
|
/**
|
|
2017
|
-
* @beta
|
|
2018
1923
|
* When added, this move control causes the mob to hop as it
|
|
2019
1924
|
* moves.
|
|
2020
1925
|
*/
|
|
@@ -2025,7 +1930,6 @@ export class EntityMovementSkipComponent extends EntityBaseMovementComponent {
|
|
|
2025
1930
|
}
|
|
2026
1931
|
|
|
2027
1932
|
/**
|
|
2028
|
-
* @beta
|
|
2029
1933
|
* Sets the distance through which the entity can push through.
|
|
2030
1934
|
*/
|
|
2031
1935
|
// @ts-ignore Class inheritance allowed for native defined classes
|
|
@@ -2043,7 +1947,6 @@ export class EntityPushThroughComponent extends EntityComponent {
|
|
|
2043
1947
|
}
|
|
2044
1948
|
|
|
2045
1949
|
/**
|
|
2046
|
-
* @beta
|
|
2047
1950
|
* Sets the entity's visual size.
|
|
2048
1951
|
*/
|
|
2049
1952
|
// @ts-ignore Class inheritance allowed for native defined classes
|
|
@@ -2061,7 +1964,6 @@ export class EntityScaleComponent extends EntityComponent {
|
|
|
2061
1964
|
}
|
|
2062
1965
|
|
|
2063
1966
|
/**
|
|
2064
|
-
* @beta
|
|
2065
1967
|
* Skin Id value. Can be used to differentiate skins, such as
|
|
2066
1968
|
* base skins for villagers.
|
|
2067
1969
|
*/
|
|
@@ -2078,7 +1980,6 @@ export class EntitySkinIdComponent extends EntityComponent {
|
|
|
2078
1980
|
}
|
|
2079
1981
|
|
|
2080
1982
|
/**
|
|
2081
|
-
* @beta
|
|
2082
1983
|
* Used to differentiate the component group of a variant of an
|
|
2083
1984
|
* entity from others. (e.g. ocelot, villager).
|
|
2084
1985
|
*/
|
|
@@ -2097,7 +1998,6 @@ export class EntityVariantComponent extends EntityComponent {
|
|
|
2097
1998
|
}
|
|
2098
1999
|
|
|
2099
2000
|
/**
|
|
2100
|
-
* @beta
|
|
2101
2001
|
* When added, this component signifies that this entity wants
|
|
2102
2002
|
* to become a jockey.
|
|
2103
2003
|
*/
|
|
@@ -2108,7 +2008,6 @@ export class EntityWantsJockeyComponent extends EntityComponent {
|
|
|
2108
2008
|
}
|
|
2109
2009
|
|
|
2110
2010
|
/**
|
|
2111
|
-
* @beta
|
|
2112
2011
|
* As part of the Healable component, represents a specific
|
|
2113
2012
|
* item that can be fed to an entity to cause health effects.
|
|
2114
2013
|
*/
|
|
@@ -2140,7 +2039,6 @@ export class FeedItem {
|
|
|
2140
2039
|
}
|
|
2141
2040
|
|
|
2142
2041
|
/**
|
|
2143
|
-
* @beta
|
|
2144
2042
|
* Represents an effect that is applied as a result of a food
|
|
2145
2043
|
* item being fed to an entity.
|
|
2146
2044
|
*/
|
|
@@ -2177,7 +2075,6 @@ export class FeedItemEffect {
|
|
|
2177
2075
|
}
|
|
2178
2076
|
|
|
2179
2077
|
/**
|
|
2180
|
-
* @beta
|
|
2181
2078
|
* Provides an adaptable interface for callers to subscribe to
|
|
2182
2079
|
* an event that fires when a button is pushed.
|
|
2183
2080
|
*/
|
|
@@ -2199,7 +2096,6 @@ export class IButtonPushAfterEventSignal {
|
|
|
2199
2096
|
}
|
|
2200
2097
|
|
|
2201
2098
|
/**
|
|
2202
|
-
* @beta
|
|
2203
2099
|
* Provides an adaptable interface for callers to subscribe to
|
|
2204
2100
|
* an event that fires after a lever is used.
|
|
2205
2101
|
*/
|
|
@@ -2221,7 +2117,6 @@ export class ILeverActionAfterEventSignal {
|
|
|
2221
2117
|
}
|
|
2222
2118
|
|
|
2223
2119
|
/**
|
|
2224
|
-
* @beta
|
|
2225
2120
|
* Provides an adaptable interface for callers to subscribe to
|
|
2226
2121
|
* an event that fires after a player joins a world.
|
|
2227
2122
|
*/
|
|
@@ -2243,7 +2138,6 @@ export class IPlayerJoinAfterEventSignal {
|
|
|
2243
2138
|
}
|
|
2244
2139
|
|
|
2245
2140
|
/**
|
|
2246
|
-
* @beta
|
|
2247
2141
|
* Provides an adaptable interface for callers to subscribe to
|
|
2248
2142
|
* an event that fires after a player leaves a world.
|
|
2249
2143
|
*/
|
|
@@ -2265,7 +2159,6 @@ export class IPlayerLeaveAfterEventSignal {
|
|
|
2265
2159
|
}
|
|
2266
2160
|
|
|
2267
2161
|
/**
|
|
2268
|
-
* @beta
|
|
2269
2162
|
* Provides an adaptable interface for callers to subscribe to
|
|
2270
2163
|
* an event that fires after a player spawns.
|
|
2271
2164
|
*/
|
|
@@ -2287,7 +2180,6 @@ export class IPlayerSpawnAfterEventSignal {
|
|
|
2287
2180
|
}
|
|
2288
2181
|
|
|
2289
2182
|
/**
|
|
2290
|
-
* @beta
|
|
2291
2183
|
* Base class for item components.
|
|
2292
2184
|
*/
|
|
2293
2185
|
// @ts-ignore Class inheritance allowed for native defined classes
|
|
@@ -2296,12 +2188,10 @@ export class ItemComponent extends Component {
|
|
|
2296
2188
|
}
|
|
2297
2189
|
|
|
2298
2190
|
/**
|
|
2299
|
-
* @beta
|
|
2300
2191
|
* Defines a collection of items.
|
|
2301
2192
|
*/
|
|
2302
2193
|
export class ItemStack {
|
|
2303
2194
|
/**
|
|
2304
|
-
* @beta
|
|
2305
2195
|
* @remarks
|
|
2306
2196
|
* Number of the items in the stack. Valid values range between
|
|
2307
2197
|
* 1-255. The provided value will be clamped to the item's
|
|
@@ -2320,14 +2210,12 @@ export class ItemStack {
|
|
|
2320
2210
|
*/
|
|
2321
2211
|
readonly isStackable: boolean;
|
|
2322
2212
|
/**
|
|
2323
|
-
* @beta
|
|
2324
2213
|
* @remarks
|
|
2325
2214
|
* Gets or sets whether the item is kept on death.
|
|
2326
2215
|
*
|
|
2327
2216
|
*/
|
|
2328
2217
|
readonly keepOnDeath: boolean;
|
|
2329
2218
|
/**
|
|
2330
|
-
* @beta
|
|
2331
2219
|
* @remarks
|
|
2332
2220
|
* Gets or sets the item's lock mode. The default value is
|
|
2333
2221
|
* `ItemLockMode.none`.
|
|
@@ -2343,7 +2231,6 @@ export class ItemStack {
|
|
|
2343
2231
|
*/
|
|
2344
2232
|
readonly maxAmount: number;
|
|
2345
2233
|
/**
|
|
2346
|
-
* @beta
|
|
2347
2234
|
* @remarks
|
|
2348
2235
|
* Given name of this stack of items. The name tag is displayed
|
|
2349
2236
|
* when hovering over the item. Setting the name tag to an
|
|
@@ -2373,9 +2260,9 @@ export class ItemStack {
|
|
|
2373
2260
|
* world.
|
|
2374
2261
|
*
|
|
2375
2262
|
* @param itemType
|
|
2376
|
-
* Type of item to create. See the {@link
|
|
2377
|
-
* enumeration for
|
|
2378
|
-
* experiences.
|
|
2263
|
+
* Type of item to create. See the {@link
|
|
2264
|
+
* @minecraft/vanilla-data.MinecraftItemTypes} enumeration for
|
|
2265
|
+
* a list of standard item types in Minecraft experiences.
|
|
2379
2266
|
* @param amount
|
|
2380
2267
|
* Number of items to place in the stack, between 1-255. The
|
|
2381
2268
|
* provided value will be clamped to the item's maximum stack
|
|
@@ -2436,7 +2323,6 @@ export class ItemStack {
|
|
|
2436
2323
|
}
|
|
2437
2324
|
|
|
2438
2325
|
/**
|
|
2439
|
-
* @beta
|
|
2440
2326
|
* Represents the type of an item - for example, Wool.
|
|
2441
2327
|
*/
|
|
2442
2328
|
export class ItemType {
|
|
@@ -2451,7 +2337,6 @@ export class ItemType {
|
|
|
2451
2337
|
}
|
|
2452
2338
|
|
|
2453
2339
|
/**
|
|
2454
|
-
* @beta
|
|
2455
2340
|
* Contains information related to changes to a lever
|
|
2456
2341
|
* activating or deactivating.
|
|
2457
2342
|
*/
|
|
@@ -2474,7 +2359,6 @@ export class LeverActionAfterEvent extends BlockEvent {
|
|
|
2474
2359
|
}
|
|
2475
2360
|
|
|
2476
2361
|
/**
|
|
2477
|
-
* @beta
|
|
2478
2362
|
* Manages callbacks that are connected to lever moves
|
|
2479
2363
|
* (activates or deactivates).
|
|
2480
2364
|
*/
|
|
@@ -2484,6 +2368,8 @@ export class LeverActionAfterEventSignal extends ILeverActionAfterEventSignal {
|
|
|
2484
2368
|
}
|
|
2485
2369
|
|
|
2486
2370
|
/**
|
|
2371
|
+
* DEPRECATED
|
|
2372
|
+
* Use @minecraft/vanilla-data.MinecraftDimensionTypes
|
|
2487
2373
|
* A collection of default Minecraft dimension types.
|
|
2488
2374
|
*/
|
|
2489
2375
|
export class MinecraftDimensionTypes {
|
|
@@ -2537,7 +2423,6 @@ export class Player extends Entity {
|
|
|
2537
2423
|
*/
|
|
2538
2424
|
readonly name: string;
|
|
2539
2425
|
/**
|
|
2540
|
-
* @beta
|
|
2541
2426
|
* @remarks
|
|
2542
2427
|
* Plays a sound that only this particular player can hear.
|
|
2543
2428
|
*
|
|
@@ -2575,7 +2460,6 @@ export class Player extends Entity {
|
|
|
2575
2460
|
*/
|
|
2576
2461
|
playSound(soundID: string, soundOptions?: PlayerSoundOptions): void;
|
|
2577
2462
|
/**
|
|
2578
|
-
* @beta
|
|
2579
2463
|
* @remarks
|
|
2580
2464
|
* Sends a message to the player.
|
|
2581
2465
|
*
|
|
@@ -2628,7 +2512,6 @@ export class Player extends Entity {
|
|
|
2628
2512
|
}
|
|
2629
2513
|
|
|
2630
2514
|
/**
|
|
2631
|
-
* @beta
|
|
2632
2515
|
* Contains information regarding a player that has joined.
|
|
2633
2516
|
* See the playerSpawn event for more detailed information that
|
|
2634
2517
|
* could be returned after the first time a player has spawned
|
|
@@ -2651,7 +2534,6 @@ export class PlayerJoinAfterEvent {
|
|
|
2651
2534
|
}
|
|
2652
2535
|
|
|
2653
2536
|
/**
|
|
2654
|
-
* @beta
|
|
2655
2537
|
* Manages callbacks that are connected to a player joining the
|
|
2656
2538
|
* world.
|
|
2657
2539
|
*/
|
|
@@ -2661,7 +2543,6 @@ export class PlayerJoinAfterEventSignal extends IPlayerJoinAfterEventSignal {
|
|
|
2661
2543
|
}
|
|
2662
2544
|
|
|
2663
2545
|
/**
|
|
2664
|
-
* @beta
|
|
2665
2546
|
* Contains information regarding a player that has left the
|
|
2666
2547
|
* world.
|
|
2667
2548
|
*/
|
|
@@ -2683,7 +2564,6 @@ export class PlayerLeaveAfterEvent {
|
|
|
2683
2564
|
}
|
|
2684
2565
|
|
|
2685
2566
|
/**
|
|
2686
|
-
* @beta
|
|
2687
2567
|
* Manages callbacks that are connected to a player leaving the
|
|
2688
2568
|
* world.
|
|
2689
2569
|
*/
|
|
@@ -2693,7 +2573,6 @@ export class PlayerLeaveAfterEventSignal extends IPlayerLeaveAfterEventSignal {
|
|
|
2693
2573
|
}
|
|
2694
2574
|
|
|
2695
2575
|
/**
|
|
2696
|
-
* @beta
|
|
2697
2576
|
* An event that contains more information about a player
|
|
2698
2577
|
* spawning.
|
|
2699
2578
|
*/
|
|
@@ -2719,7 +2598,6 @@ export class PlayerSpawnAfterEvent {
|
|
|
2719
2598
|
}
|
|
2720
2599
|
|
|
2721
2600
|
/**
|
|
2722
|
-
* @beta
|
|
2723
2601
|
* Registers an event when a player is spawned (or re-spawned
|
|
2724
2602
|
* after death) and fully ready within the world.
|
|
2725
2603
|
*/
|
|
@@ -2734,14 +2612,12 @@ export class PlayerSpawnAfterEventSignal extends IPlayerSpawnAfterEventSignal {
|
|
|
2734
2612
|
export class System {
|
|
2735
2613
|
private constructor();
|
|
2736
2614
|
/**
|
|
2737
|
-
* @beta
|
|
2738
2615
|
* @remarks
|
|
2739
2616
|
* Represents the current world tick of the server.
|
|
2740
2617
|
*
|
|
2741
2618
|
*/
|
|
2742
2619
|
readonly currentTick: number;
|
|
2743
2620
|
/**
|
|
2744
|
-
* @beta
|
|
2745
2621
|
* @remarks
|
|
2746
2622
|
* Cancels the execution of a function run that was previously
|
|
2747
2623
|
* scheduled via the `run` function.
|
|
@@ -2778,7 +2654,6 @@ export class System {
|
|
|
2778
2654
|
*/
|
|
2779
2655
|
run(callback: () => void): number;
|
|
2780
2656
|
/**
|
|
2781
|
-
* @beta
|
|
2782
2657
|
* @remarks
|
|
2783
2658
|
* Runs a set of code on an interval.
|
|
2784
2659
|
*
|
|
@@ -2801,7 +2676,6 @@ export class System {
|
|
|
2801
2676
|
*/
|
|
2802
2677
|
runInterval(callback: () => void, tickInterval?: number): number;
|
|
2803
2678
|
/**
|
|
2804
|
-
* @beta
|
|
2805
2679
|
* @remarks
|
|
2806
2680
|
* Runs a set of code at a future time specified by tickDelay.
|
|
2807
2681
|
*
|
|
@@ -2844,7 +2718,6 @@ export class World {
|
|
|
2844
2718
|
*/
|
|
2845
2719
|
getDimension(dimensionId: string): Dimension;
|
|
2846
2720
|
/**
|
|
2847
|
-
* @beta
|
|
2848
2721
|
* @remarks
|
|
2849
2722
|
* Returns a set of players based on a set of conditions
|
|
2850
2723
|
* defined via the EntityQueryOptions set of filter criteria.
|
|
@@ -2859,7 +2732,6 @@ export class World {
|
|
|
2859
2732
|
*/
|
|
2860
2733
|
getPlayers(options?: EntityQueryOptions): Player[];
|
|
2861
2734
|
/**
|
|
2862
|
-
* @beta
|
|
2863
2735
|
* @remarks
|
|
2864
2736
|
* Plays a particular music track for all players.
|
|
2865
2737
|
*
|
|
@@ -2893,7 +2765,6 @@ export class World {
|
|
|
2893
2765
|
*/
|
|
2894
2766
|
playMusic(trackID: string, musicOptions?: MusicOptions): void;
|
|
2895
2767
|
/**
|
|
2896
|
-
* @beta
|
|
2897
2768
|
* @remarks
|
|
2898
2769
|
* Plays a sound for all players.
|
|
2899
2770
|
*
|
|
@@ -2931,7 +2802,6 @@ export class World {
|
|
|
2931
2802
|
*/
|
|
2932
2803
|
playSound(soundID: string, location: Vector3, soundOptions?: WorldSoundOptions): void;
|
|
2933
2804
|
/**
|
|
2934
|
-
* @beta
|
|
2935
2805
|
* @remarks
|
|
2936
2806
|
* Queues an additional music track for players. If a track is
|
|
2937
2807
|
* not playing, a music track will play.
|
|
@@ -2945,7 +2815,6 @@ export class World {
|
|
|
2945
2815
|
*/
|
|
2946
2816
|
queueMusic(trackID: string, musicOptions?: MusicOptions): void;
|
|
2947
2817
|
/**
|
|
2948
|
-
* @beta
|
|
2949
2818
|
* @remarks
|
|
2950
2819
|
* Sends a message to all players.
|
|
2951
2820
|
*
|
|
@@ -2984,7 +2853,6 @@ export class World {
|
|
|
2984
2853
|
*/
|
|
2985
2854
|
sendMessage(message: (RawMessage | string)[] | RawMessage | string): void;
|
|
2986
2855
|
/**
|
|
2987
|
-
* @beta
|
|
2988
2856
|
* @remarks
|
|
2989
2857
|
* Stops any music tracks from playing.
|
|
2990
2858
|
*
|
|
@@ -2995,7 +2863,6 @@ export class World {
|
|
|
2995
2863
|
}
|
|
2996
2864
|
|
|
2997
2865
|
/**
|
|
2998
|
-
* @beta
|
|
2999
2866
|
* Contains a set of events that are available across the scope
|
|
3000
2867
|
* of the World.
|
|
3001
2868
|
*/
|
|
@@ -3033,7 +2900,6 @@ export class WorldAfterEvents {
|
|
|
3033
2900
|
}
|
|
3034
2901
|
|
|
3035
2902
|
/**
|
|
3036
|
-
* @beta
|
|
3037
2903
|
* Additional options for when damage has been applied via a
|
|
3038
2904
|
* projectile.
|
|
3039
2905
|
*/
|
|
@@ -3053,7 +2919,6 @@ export interface EntityApplyDamageByProjectileOptions {
|
|
|
3053
2919
|
}
|
|
3054
2920
|
|
|
3055
2921
|
/**
|
|
3056
|
-
* @beta
|
|
3057
2922
|
* Additional descriptions and metadata for a damage event.
|
|
3058
2923
|
*/
|
|
3059
2924
|
export interface EntityApplyDamageOptions {
|
|
@@ -3072,7 +2937,6 @@ export interface EntityApplyDamageOptions {
|
|
|
3072
2937
|
}
|
|
3073
2938
|
|
|
3074
2939
|
/**
|
|
3075
|
-
* @beta
|
|
3076
2940
|
* Contains additional options for entity effects.
|
|
3077
2941
|
*/
|
|
3078
2942
|
export interface EntityEffectOptions {
|
|
@@ -3091,7 +2955,6 @@ export interface EntityEffectOptions {
|
|
|
3091
2955
|
}
|
|
3092
2956
|
|
|
3093
2957
|
/**
|
|
3094
|
-
* @beta
|
|
3095
2958
|
* Contains options for selecting entities within an area.
|
|
3096
2959
|
*/
|
|
3097
2960
|
export interface EntityQueryOptions {
|
|
@@ -3254,7 +3117,6 @@ export interface EntityQueryOptions {
|
|
|
3254
3117
|
}
|
|
3255
3118
|
|
|
3256
3119
|
/**
|
|
3257
|
-
* @beta
|
|
3258
3120
|
* Contains additional options for filtering players based on
|
|
3259
3121
|
* their score for an objective.
|
|
3260
3122
|
*/
|
|
@@ -3289,7 +3151,6 @@ export interface EntityQueryScoreOptions {
|
|
|
3289
3151
|
}
|
|
3290
3152
|
|
|
3291
3153
|
/**
|
|
3292
|
-
* @beta
|
|
3293
3154
|
* Additional configuration options for {@link
|
|
3294
3155
|
* World.playMusic}/{@link World.queueMusic} methods.
|
|
3295
3156
|
*/
|
|
@@ -3315,7 +3176,6 @@ export interface MusicOptions {
|
|
|
3315
3176
|
}
|
|
3316
3177
|
|
|
3317
3178
|
/**
|
|
3318
|
-
* @beta
|
|
3319
3179
|
* Additional options for how a sound plays for a player.
|
|
3320
3180
|
*/
|
|
3321
3181
|
export interface PlayerSoundOptions {
|
|
@@ -3341,7 +3201,6 @@ export interface PlayerSoundOptions {
|
|
|
3341
3201
|
}
|
|
3342
3202
|
|
|
3343
3203
|
/**
|
|
3344
|
-
* @beta
|
|
3345
3204
|
* Defines a JSON structure that is used for more flexible
|
|
3346
3205
|
*/
|
|
3347
3206
|
export interface RawMessage {
|
|
@@ -3371,7 +3230,6 @@ export interface RawMessage {
|
|
|
3371
3230
|
}
|
|
3372
3231
|
|
|
3373
3232
|
/**
|
|
3374
|
-
* @beta
|
|
3375
3233
|
* Provides a description of a score token to use within a raw
|
|
3376
3234
|
* message.
|
|
3377
3235
|
*/
|
|
@@ -3391,7 +3249,6 @@ export interface RawMessageScore {
|
|
|
3391
3249
|
}
|
|
3392
3250
|
|
|
3393
3251
|
/**
|
|
3394
|
-
* @beta
|
|
3395
3252
|
* Contains additional options for teleporting an entity.
|
|
3396
3253
|
*/
|
|
3397
3254
|
export interface TeleportOptions {
|
|
@@ -3431,7 +3288,6 @@ export interface TeleportOptions {
|
|
|
3431
3288
|
}
|
|
3432
3289
|
|
|
3433
3290
|
/**
|
|
3434
|
-
* @beta
|
|
3435
3291
|
* Represents a two-directional vector.
|
|
3436
3292
|
*/
|
|
3437
3293
|
export interface Vector2 {
|
|
@@ -3450,7 +3306,6 @@ export interface Vector2 {
|
|
|
3450
3306
|
}
|
|
3451
3307
|
|
|
3452
3308
|
/**
|
|
3453
|
-
* @beta
|
|
3454
3309
|
* Contains a description of a vector.
|
|
3455
3310
|
*/
|
|
3456
3311
|
export interface Vector3 {
|
|
@@ -3475,7 +3330,6 @@ export interface Vector3 {
|
|
|
3475
3330
|
}
|
|
3476
3331
|
|
|
3477
3332
|
/**
|
|
3478
|
-
* @beta
|
|
3479
3333
|
* Contains additional options for a world-level playSound
|
|
3480
3334
|
* occurrence.
|
|
3481
3335
|
*/
|