@minecraft/server 1.1.0-beta.1.19.60-preview.26 → 1.1.0-beta.1.19.70-preview.21
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/index.d.ts +310 -649
- package/package.json +1 -1
- package/tests.ts +47 -41
package/index.d.ts
CHANGED
|
@@ -16,7 +16,7 @@
|
|
|
16
16
|
* ```json
|
|
17
17
|
* {
|
|
18
18
|
* "module_name": "@minecraft/server",
|
|
19
|
-
* "version": "1.1.0-internal.1.19.
|
|
19
|
+
* "version": "1.1.0-internal.1.19.70-preview.21"
|
|
20
20
|
* }
|
|
21
21
|
* ```
|
|
22
22
|
*
|
|
@@ -285,10 +285,8 @@ export class BeforeChatEvent {
|
|
|
285
285
|
* players (i.e., is not broadcast.)
|
|
286
286
|
*/
|
|
287
287
|
sendToTargets: boolean;
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
*/
|
|
291
|
-
targets: Player[];
|
|
288
|
+
getTargets(): Player[];
|
|
289
|
+
setTargets(players: Player[]): void;
|
|
292
290
|
}
|
|
293
291
|
/**
|
|
294
292
|
* @beta
|
|
@@ -333,11 +331,8 @@ export class BeforeDataDrivenEntityTriggerEvent {
|
|
|
333
331
|
* Name of the data driven event being triggered.
|
|
334
332
|
*/
|
|
335
333
|
readonly id: string;
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
* are the effect of this triggered event.
|
|
339
|
-
*/
|
|
340
|
-
modifiers: DefinitionModifier[];
|
|
334
|
+
getModifiers(): DefinitionModifier[];
|
|
335
|
+
setModifiers(modifiers: DefinitionModifier[]): void;
|
|
341
336
|
}
|
|
342
337
|
/**
|
|
343
338
|
* @beta
|
|
@@ -382,16 +377,12 @@ export class BeforeExplosionEvent {
|
|
|
382
377
|
* Dimension where the explosion has occurred.
|
|
383
378
|
*/
|
|
384
379
|
readonly dimension: Dimension;
|
|
385
|
-
/**
|
|
386
|
-
* A collection of blocks impacted by this explosion event.
|
|
387
|
-
* Note that this property can be updated to change the set of
|
|
388
|
-
* blocks impacted.
|
|
389
|
-
*/
|
|
390
|
-
impactedBlocks: BlockLocation[];
|
|
391
380
|
/**
|
|
392
381
|
* Optional source of the explosion.
|
|
393
382
|
*/
|
|
394
383
|
readonly source: Entity;
|
|
384
|
+
getImpactedBlocks(): Vector3[];
|
|
385
|
+
setImpactedBlocks(blocks: Vector3[]): void;
|
|
395
386
|
}
|
|
396
387
|
/**
|
|
397
388
|
* @beta
|
|
@@ -518,10 +509,6 @@ export class BeforeItemUseOnEvent {
|
|
|
518
509
|
* The face of the block that an item is being used on.
|
|
519
510
|
*/
|
|
520
511
|
readonly blockFace: Direction;
|
|
521
|
-
/**
|
|
522
|
-
* Location of the block being impacted.
|
|
523
|
-
*/
|
|
524
|
-
readonly blockLocation: BlockLocation;
|
|
525
512
|
/**
|
|
526
513
|
* If set to true, this will cancel the item use behavior.
|
|
527
514
|
*/
|
|
@@ -544,6 +531,7 @@ export class BeforeItemUseOnEvent {
|
|
|
544
531
|
* Returns the source entity that triggered this item event.
|
|
545
532
|
*/
|
|
546
533
|
readonly source: Entity;
|
|
534
|
+
getBlockLocation(): Vector3;
|
|
547
535
|
}
|
|
548
536
|
/**
|
|
549
537
|
* @beta
|
|
@@ -686,8 +674,9 @@ export class Block {
|
|
|
686
674
|
isWaterlogged: boolean;
|
|
687
675
|
/**
|
|
688
676
|
* Coordinates of the specified block.
|
|
677
|
+
* @throws This property can throw when used.
|
|
689
678
|
*/
|
|
690
|
-
readonly location:
|
|
679
|
+
readonly location: Vector3;
|
|
691
680
|
/**
|
|
692
681
|
* Additional block configuration data that describes the
|
|
693
682
|
* block.
|
|
@@ -775,10 +764,10 @@ export class Block {
|
|
|
775
764
|
* @throws This function can throw errors.
|
|
776
765
|
* @example check_block_tags.js
|
|
777
766
|
* ```typescript
|
|
778
|
-
* import { world
|
|
767
|
+
* import { world } from "@minecraft/server";
|
|
779
768
|
*
|
|
780
769
|
* // Fetch the block
|
|
781
|
-
* const block = world.getDimension("overworld").getBlock(
|
|
770
|
+
* const block = world.getDimension("overworld").getBlock({ x: 1, y: 2, z: 3 });
|
|
782
771
|
*
|
|
783
772
|
* console.log(`Block is dirt: ${block.hasTag("dirt")}`);
|
|
784
773
|
* console.log(`Block is wood: ${block.hasTag("wood")}`);
|
|
@@ -787,6 +776,9 @@ export class Block {
|
|
|
787
776
|
* ```
|
|
788
777
|
*/
|
|
789
778
|
hasTag(tag: string): boolean;
|
|
779
|
+
isAir(): boolean;
|
|
780
|
+
isLiquid(): boolean;
|
|
781
|
+
isSolid(): boolean;
|
|
790
782
|
/**
|
|
791
783
|
* @remarks
|
|
792
784
|
* Sets the block in the dimension to the state of the
|
|
@@ -976,29 +968,6 @@ export class BlockExplodeEventSignal {
|
|
|
976
968
|
*/
|
|
977
969
|
unsubscribe(callback: (arg: BlockExplodeEvent) => void): void;
|
|
978
970
|
}
|
|
979
|
-
/**
|
|
980
|
-
* @beta
|
|
981
|
-
* Contains more information for events where a block is hit.
|
|
982
|
-
*/
|
|
983
|
-
export class BlockHitInformation {
|
|
984
|
-
protected constructor();
|
|
985
|
-
/**
|
|
986
|
-
* Block that was hit.
|
|
987
|
-
*/
|
|
988
|
-
readonly block: Block;
|
|
989
|
-
/**
|
|
990
|
-
* Face of the block that was hit.
|
|
991
|
-
*/
|
|
992
|
-
readonly face: Direction;
|
|
993
|
-
/**
|
|
994
|
-
* X coordinate on the face that was hit.
|
|
995
|
-
*/
|
|
996
|
-
readonly faceLocationX: number;
|
|
997
|
-
/**
|
|
998
|
-
* Y coordinate on the face that was hit.
|
|
999
|
-
*/
|
|
1000
|
-
readonly faceLocationY: number;
|
|
1001
|
-
}
|
|
1002
971
|
/**
|
|
1003
972
|
* @beta
|
|
1004
973
|
* Represents the inventory of a block in the world. Used with
|
|
@@ -1011,10 +980,6 @@ export class BlockInventoryComponent extends BlockComponent {
|
|
|
1011
980
|
* @throws This property can throw when used.
|
|
1012
981
|
*/
|
|
1013
982
|
readonly container: BlockInventoryComponentContainer;
|
|
1014
|
-
/**
|
|
1015
|
-
* Coordinates of the specified block.
|
|
1016
|
-
*/
|
|
1017
|
-
readonly location: BlockLocation;
|
|
1018
983
|
/**
|
|
1019
984
|
* Identifier of this component. Should always be
|
|
1020
985
|
* minecraft:inventory.
|
|
@@ -1152,10 +1117,6 @@ export class BlockLavaContainerComponent extends BlockComponent {
|
|
|
1152
1117
|
* FluidContainer.maxFillLevel (6).
|
|
1153
1118
|
*/
|
|
1154
1119
|
fillLevel: number;
|
|
1155
|
-
/**
|
|
1156
|
-
* Source location of the block.
|
|
1157
|
-
*/
|
|
1158
|
-
readonly location: BlockLocation;
|
|
1159
1120
|
/**
|
|
1160
1121
|
* Identifier of this component. Should always be
|
|
1161
1122
|
* minecraft:lavaContainer.
|
|
@@ -1167,85 +1128,6 @@ export class BlockLavaContainerComponent extends BlockComponent {
|
|
|
1167
1128
|
*/
|
|
1168
1129
|
static readonly componentId = 'minecraft:lavaContainer';
|
|
1169
1130
|
}
|
|
1170
|
-
/**
|
|
1171
|
-
* @beta
|
|
1172
|
-
* Contains the integer X, Y, Z coordinates for a block. For
|
|
1173
|
-
* decimal locations useful for entities, items, and more, see
|
|
1174
|
-
* {@link Location}.
|
|
1175
|
-
*/
|
|
1176
|
-
export class BlockLocation {
|
|
1177
|
-
/**
|
|
1178
|
-
* The X coordinate.
|
|
1179
|
-
*/
|
|
1180
|
-
x: number;
|
|
1181
|
-
/**
|
|
1182
|
-
* The integer-based Y position.
|
|
1183
|
-
*/
|
|
1184
|
-
y: number;
|
|
1185
|
-
/**
|
|
1186
|
-
* The integer-based Z position.
|
|
1187
|
-
*/
|
|
1188
|
-
z: number;
|
|
1189
|
-
/**
|
|
1190
|
-
* @remarks
|
|
1191
|
-
* Creates a new instance of an abstract block location.
|
|
1192
|
-
* @param x
|
|
1193
|
-
* X position of the block location. This number should be an
|
|
1194
|
-
* integer.
|
|
1195
|
-
* @param y
|
|
1196
|
-
* Y position of the block location. This number should be an
|
|
1197
|
-
* integer.
|
|
1198
|
-
* @param z
|
|
1199
|
-
* Z position of the block location. This number should be an
|
|
1200
|
-
* integer.
|
|
1201
|
-
*/
|
|
1202
|
-
constructor(x: number, y: number, z: number);
|
|
1203
|
-
/**
|
|
1204
|
-
* @remarks
|
|
1205
|
-
* Returns a BlockLocation for a block above this BlockLocation
|
|
1206
|
-
* (that is, y + 1).
|
|
1207
|
-
*/
|
|
1208
|
-
above(): BlockLocation;
|
|
1209
|
-
/**
|
|
1210
|
-
* @remarks
|
|
1211
|
-
* Returns an array of block locations representing all blocks
|
|
1212
|
-
* in the volume (cuboid) between this location and another
|
|
1213
|
-
* location.
|
|
1214
|
-
* @param other
|
|
1215
|
-
* Additional BlockLocation used to determine the set of
|
|
1216
|
-
* locations in between this location and another point.
|
|
1217
|
-
* @returns
|
|
1218
|
-
* Array of block locations representing the volume between
|
|
1219
|
-
* this location and another, inclusive of the start and end
|
|
1220
|
-
* points.
|
|
1221
|
-
*/
|
|
1222
|
-
blocksBetween(other: BlockLocation): BlockLocation[];
|
|
1223
|
-
/**
|
|
1224
|
-
* @remarks
|
|
1225
|
-
* Compares this BlockLocation and another BlockLocation to one
|
|
1226
|
-
* another.
|
|
1227
|
-
* @param other
|
|
1228
|
-
* Other block location to compare this BlockLocation to.
|
|
1229
|
-
* @returns
|
|
1230
|
-
* True if the two block locations are equal.
|
|
1231
|
-
*/
|
|
1232
|
-
equals(other: BlockLocation): boolean;
|
|
1233
|
-
/**
|
|
1234
|
-
* @remarks
|
|
1235
|
-
* Returns a block location using a position relative to this
|
|
1236
|
-
* block location
|
|
1237
|
-
* @param x
|
|
1238
|
-
* X offset relative to this BlockLocation.
|
|
1239
|
-
* @param y
|
|
1240
|
-
* Y offset relative to this BlockLocation.
|
|
1241
|
-
* @param z
|
|
1242
|
-
* Z offset relative to this BlockLocation.
|
|
1243
|
-
* @returns
|
|
1244
|
-
* BlockLocation that is positioned relative to this
|
|
1245
|
-
* BlockLocation.
|
|
1246
|
-
*/
|
|
1247
|
-
offset(x: number, y: number, z: number): BlockLocation;
|
|
1248
|
-
}
|
|
1249
1131
|
/**
|
|
1250
1132
|
* @beta
|
|
1251
1133
|
* Contains the combination of type {@link BlockType} and
|
|
@@ -1296,10 +1178,10 @@ export class BlockPermutation {
|
|
|
1296
1178
|
* Returns `true` if the permutation has the tag, else `false`.
|
|
1297
1179
|
* @example check_block_tags.js
|
|
1298
1180
|
* ```typescript
|
|
1299
|
-
* import { world
|
|
1181
|
+
* import { world } from "@minecraft/server";
|
|
1300
1182
|
*
|
|
1301
1183
|
* // Fetch the block
|
|
1302
|
-
* const block = world.getDimension("overworld").getBlock(
|
|
1184
|
+
* const block = world.getDimension("overworld").getBlock({ x: 1, y: 2, z: 3 });
|
|
1303
1185
|
* const blockPerm = block.getPermutation();
|
|
1304
1186
|
*
|
|
1305
1187
|
* console.log(`Block is dirt: ${blockPerm.hasTag("dirt")}`);
|
|
@@ -1317,12 +1199,6 @@ export class BlockPermutation {
|
|
|
1317
1199
|
*/
|
|
1318
1200
|
export class BlockPistonComponent extends BlockComponent {
|
|
1319
1201
|
protected constructor();
|
|
1320
|
-
/**
|
|
1321
|
-
* A set of locations for blocks that are impacted by the
|
|
1322
|
-
* activation of this piston.
|
|
1323
|
-
* @throws This property can throw when used.
|
|
1324
|
-
*/
|
|
1325
|
-
readonly attachedBlocks: BlockLocation[];
|
|
1326
1202
|
/**
|
|
1327
1203
|
* Whether the piston is fully expanded.
|
|
1328
1204
|
* @throws This property can throw when used.
|
|
@@ -1349,10 +1225,6 @@ export class BlockPistonComponent extends BlockComponent {
|
|
|
1349
1225
|
* @throws This property can throw when used.
|
|
1350
1226
|
*/
|
|
1351
1227
|
readonly isRetracting: boolean;
|
|
1352
|
-
/**
|
|
1353
|
-
* Source location of the block.
|
|
1354
|
-
*/
|
|
1355
|
-
readonly location: BlockLocation;
|
|
1356
1228
|
/**
|
|
1357
1229
|
* Identifier of this component.
|
|
1358
1230
|
*/
|
|
@@ -1361,6 +1233,7 @@ export class BlockPistonComponent extends BlockComponent {
|
|
|
1361
1233
|
* Identifier of this component.
|
|
1362
1234
|
*/
|
|
1363
1235
|
static readonly componentId = 'minecraft:piston';
|
|
1236
|
+
getAttachedBlocks(): Vector3[];
|
|
1364
1237
|
}
|
|
1365
1238
|
/**
|
|
1366
1239
|
* @beta
|
|
@@ -1419,10 +1292,6 @@ export class BlockPotionContainerComponent extends BlockComponent {
|
|
|
1419
1292
|
* FluidContainer.maxFillLevel (6).
|
|
1420
1293
|
*/
|
|
1421
1294
|
fillLevel: number;
|
|
1422
|
-
/**
|
|
1423
|
-
* Source location of the block.
|
|
1424
|
-
*/
|
|
1425
|
-
readonly location: BlockLocation;
|
|
1426
1295
|
/**
|
|
1427
1296
|
* Identifier of this component. Should always be
|
|
1428
1297
|
* minecraft:potionContainer.
|
|
@@ -2054,10 +1923,6 @@ export class BlockProperties {
|
|
|
2054
1923
|
*/
|
|
2055
1924
|
export class BlockRecordPlayerComponent extends BlockComponent {
|
|
2056
1925
|
protected constructor();
|
|
2057
|
-
/**
|
|
2058
|
-
* Location of this record-playing block.
|
|
2059
|
-
*/
|
|
2060
|
-
readonly location: BlockLocation;
|
|
2061
1926
|
/**
|
|
2062
1927
|
* Identifier of this component. Should always be
|
|
2063
1928
|
* minecraft:recordPlayer.
|
|
@@ -2096,10 +1961,6 @@ export class BlockRecordPlayerComponent extends BlockComponent {
|
|
|
2096
1961
|
*/
|
|
2097
1962
|
export class BlockSignComponent extends BlockComponent {
|
|
2098
1963
|
protected constructor();
|
|
2099
|
-
/**
|
|
2100
|
-
* Location of the sign.
|
|
2101
|
-
*/
|
|
2102
|
-
readonly location: BlockLocation;
|
|
2103
1964
|
/**
|
|
2104
1965
|
* Text of the sign
|
|
2105
1966
|
* @throws This property can throw when used.
|
|
@@ -2129,10 +1990,6 @@ export class BlockSnowContainerComponent extends BlockComponent {
|
|
|
2129
1990
|
* FluidContainer.maxFillLevel (6).
|
|
2130
1991
|
*/
|
|
2131
1992
|
fillLevel: number;
|
|
2132
|
-
/**
|
|
2133
|
-
* Source location of the block.
|
|
2134
|
-
*/
|
|
2135
|
-
readonly location: BlockLocation;
|
|
2136
1993
|
/**
|
|
2137
1994
|
* Identifier of this component. Should always be
|
|
2138
1995
|
* minecraft:snowContainer.
|
|
@@ -2178,20 +2035,12 @@ export class BlockType {
|
|
|
2178
2035
|
*/
|
|
2179
2036
|
export class BlockWaterContainerComponent extends BlockComponent {
|
|
2180
2037
|
protected constructor();
|
|
2181
|
-
/**
|
|
2182
|
-
* Represents a color facet of the water.
|
|
2183
|
-
*/
|
|
2184
|
-
customColor: Color;
|
|
2185
2038
|
/**
|
|
2186
2039
|
* Relative level of water within this block. Valid values are
|
|
2187
2040
|
* between FluidContainer.minFillLevel (0) and
|
|
2188
2041
|
* FluidContainer.maxFillLevel (6).
|
|
2189
2042
|
*/
|
|
2190
2043
|
fillLevel: number;
|
|
2191
|
-
/**
|
|
2192
|
-
* Source location of the block.
|
|
2193
|
-
*/
|
|
2194
|
-
readonly location: BlockLocation;
|
|
2195
2044
|
/**
|
|
2196
2045
|
* Identifier of this component. Should always be
|
|
2197
2046
|
* minecraft:waterContainer.
|
|
@@ -2209,6 +2058,8 @@ export class BlockWaterContainerComponent extends BlockComponent {
|
|
|
2209
2058
|
* @throws This function can throw errors.
|
|
2210
2059
|
*/
|
|
2211
2060
|
addDye(itemType: ItemType): void;
|
|
2061
|
+
getCustomColor(): Color;
|
|
2062
|
+
setCustomColor(color: Color): void;
|
|
2212
2063
|
}
|
|
2213
2064
|
/**
|
|
2214
2065
|
* @beta
|
|
@@ -2221,18 +2072,16 @@ export class BoolBlockProperty extends IBlockProperty {
|
|
|
2221
2072
|
* The name of this property.
|
|
2222
2073
|
*/
|
|
2223
2074
|
readonly name: string;
|
|
2224
|
-
/**
|
|
2225
|
-
* A list of valid values for this property.
|
|
2226
|
-
*/
|
|
2227
|
-
readonly validValues: boolean[];
|
|
2228
2075
|
/**
|
|
2229
2076
|
* The current value of this property.
|
|
2230
2077
|
* @throws
|
|
2231
2078
|
* Setting this property can throw if the value passed is not
|
|
2232
2079
|
* valid for the property. Use {@link
|
|
2233
|
-
* BoolBlockProperty.validValues} to check
|
|
2080
|
+
* @minecraft/server.BoolBlockProperty.validValues} to check
|
|
2081
|
+
* allowed values.
|
|
2234
2082
|
*/
|
|
2235
2083
|
value: boolean;
|
|
2084
|
+
getValidValues(): boolean[];
|
|
2236
2085
|
}
|
|
2237
2086
|
/**
|
|
2238
2087
|
* @beta
|
|
@@ -2297,10 +2146,7 @@ export class ChatEvent {
|
|
|
2297
2146
|
* players (i.e., is not broadcast.)
|
|
2298
2147
|
*/
|
|
2299
2148
|
sendToTargets: boolean;
|
|
2300
|
-
|
|
2301
|
-
* List of players that will receive this message.
|
|
2302
|
-
*/
|
|
2303
|
-
targets: Player[];
|
|
2149
|
+
getTargets(): Player[];
|
|
2304
2150
|
}
|
|
2305
2151
|
/**
|
|
2306
2152
|
* @beta
|
|
@@ -2338,41 +2184,6 @@ export class ChatEventSignal {
|
|
|
2338
2184
|
*/
|
|
2339
2185
|
unsubscribe(callback: (arg: ChatEvent) => void): void;
|
|
2340
2186
|
}
|
|
2341
|
-
/**
|
|
2342
|
-
* @beta
|
|
2343
|
-
* Represents a fully customizable color within Minecraft.
|
|
2344
|
-
*/
|
|
2345
|
-
export class Color {
|
|
2346
|
-
/**
|
|
2347
|
-
* Determines a color's alpha (opacity) component. Valid values
|
|
2348
|
-
* are between 0 (transparent) and 1.0 (opaque).
|
|
2349
|
-
*/
|
|
2350
|
-
alpha: number;
|
|
2351
|
-
/**
|
|
2352
|
-
* Determines a color's blue component. Valid values are
|
|
2353
|
-
* between 0 and 1.0.
|
|
2354
|
-
*/
|
|
2355
|
-
blue: number;
|
|
2356
|
-
/**
|
|
2357
|
-
* Determines a color's green component. Valid values are
|
|
2358
|
-
* between 0 and 1.0.
|
|
2359
|
-
*/
|
|
2360
|
-
green: number;
|
|
2361
|
-
/**
|
|
2362
|
-
* Determines a color's red component. Valid values are between
|
|
2363
|
-
* 0 and 1.0.
|
|
2364
|
-
*/
|
|
2365
|
-
red: number;
|
|
2366
|
-
/**
|
|
2367
|
-
* @remarks
|
|
2368
|
-
* Creates a new color using the specified color values.
|
|
2369
|
-
* @param red
|
|
2370
|
-
* @param green
|
|
2371
|
-
* @param blue
|
|
2372
|
-
* @param alpha
|
|
2373
|
-
*/
|
|
2374
|
-
constructor(red: number, green: number, blue: number, alpha: number);
|
|
2375
|
-
}
|
|
2376
2187
|
/**
|
|
2377
2188
|
* Contains return data on the result of a command execution.
|
|
2378
2189
|
*/
|
|
@@ -2534,12 +2345,6 @@ export class ContainerSlot {
|
|
|
2534
2345
|
* @throws This property can throw when used.
|
|
2535
2346
|
*/
|
|
2536
2347
|
readonly typeId?: string;
|
|
2537
|
-
/**
|
|
2538
|
-
* @remarks
|
|
2539
|
-
* Empties the item stored at the specified slot.
|
|
2540
|
-
* @throws This function can throw errors.
|
|
2541
|
-
*/
|
|
2542
|
-
clearItem(): void;
|
|
2543
2348
|
/**
|
|
2544
2349
|
* @remarks
|
|
2545
2350
|
* Returns the item stored within the container.
|
|
@@ -2552,7 +2357,7 @@ export class ContainerSlot {
|
|
|
2552
2357
|
* container slot.
|
|
2553
2358
|
* @throws This function can throw errors.
|
|
2554
2359
|
*/
|
|
2555
|
-
getLore(): string[]
|
|
2360
|
+
getLore(): string[];
|
|
2556
2361
|
/**
|
|
2557
2362
|
* @remarks
|
|
2558
2363
|
* Sets the item within the slot to a new value.
|
|
@@ -2568,7 +2373,7 @@ export class ContainerSlot {
|
|
|
2568
2373
|
* An array of strings for lines of text for this lore.
|
|
2569
2374
|
* @throws This function can throw errors.
|
|
2570
2375
|
*/
|
|
2571
|
-
setLore(loreList
|
|
2376
|
+
setLore(loreList?: string[]): void;
|
|
2572
2377
|
}
|
|
2573
2378
|
/**
|
|
2574
2379
|
* @beta
|
|
@@ -2586,11 +2391,7 @@ export class DataDrivenEntityTriggerEvent {
|
|
|
2586
2391
|
* Name of the data driven event being triggered.
|
|
2587
2392
|
*/
|
|
2588
2393
|
readonly id: string;
|
|
2589
|
-
|
|
2590
|
-
* A list of modifications to component state that are the
|
|
2591
|
-
* effect of this triggered event.
|
|
2592
|
-
*/
|
|
2593
|
-
readonly modifiers: DefinitionModifier[];
|
|
2394
|
+
getModifiers(): DefinitionModifier[];
|
|
2594
2395
|
}
|
|
2595
2396
|
/**
|
|
2596
2397
|
* @beta
|
|
@@ -2626,21 +2427,12 @@ export class DataDrivenEntityTriggerEventSignal {
|
|
|
2626
2427
|
* of an entity.
|
|
2627
2428
|
*/
|
|
2628
2429
|
export class DefinitionModifier {
|
|
2629
|
-
|
|
2630
|
-
|
|
2631
|
-
|
|
2632
|
-
|
|
2633
|
-
|
|
2634
|
-
|
|
2635
|
-
* A list of components that will be removed via this
|
|
2636
|
-
* definition modification.
|
|
2637
|
-
*/
|
|
2638
|
-
readonly componentGroupsToRemove: string[];
|
|
2639
|
-
/**
|
|
2640
|
-
* A list of entity definition events that will be fired via
|
|
2641
|
-
* this update.
|
|
2642
|
-
*/
|
|
2643
|
-
triggers: Trigger[];
|
|
2430
|
+
getComponentGroupsToAdd(): string[];
|
|
2431
|
+
getComponentGroupsToRemove(): string[];
|
|
2432
|
+
getTriggers(): Trigger[];
|
|
2433
|
+
setComponentGroupsToAdd(newGroups: string[]): void;
|
|
2434
|
+
setComponentGroupsToRemove(removedGroups: string[]): void;
|
|
2435
|
+
setTriggers(newTriggers: Trigger[]): void;
|
|
2644
2436
|
}
|
|
2645
2437
|
/**
|
|
2646
2438
|
* A class that represents a particular dimension (e.g., The
|
|
@@ -2670,46 +2462,43 @@ export class Dimension {
|
|
|
2670
2462
|
* ```
|
|
2671
2463
|
* @example createFireAndWaterExplosions.ts
|
|
2672
2464
|
* ```typescript
|
|
2673
|
-
*
|
|
2465
|
+
* const explosionLoc: mc.Vector3 = { x: targetLocation.x + 0.5, y: targetLocation.y + 0.5, z: targetLocation.z + 0.5 };
|
|
2466
|
+
*
|
|
2467
|
+
* const fireExplosionOptions = new mc.ExplosionOptions();
|
|
2674
2468
|
*
|
|
2675
|
-
*
|
|
2469
|
+
* // Explode with fire
|
|
2470
|
+
* fireExplosionOptions.causesFire = true;
|
|
2676
2471
|
*
|
|
2677
|
-
*
|
|
2678
|
-
*
|
|
2472
|
+
* overworld.createExplosion(explosionLoc, 15, fireExplosionOptions);
|
|
2473
|
+
* const waterExplosionOptions = new mc.ExplosionOptions();
|
|
2679
2474
|
*
|
|
2680
|
-
*
|
|
2681
|
-
*
|
|
2475
|
+
* // Explode in water
|
|
2476
|
+
* waterExplosionOptions.allowUnderwater = true;
|
|
2682
2477
|
*
|
|
2683
|
-
*
|
|
2684
|
-
* waterExplosionOptions.allowUnderwater = true;
|
|
2478
|
+
* const belowWaterLoc: mc.Vector3 = { x: targetLocation.x + 3, y: targetLocation.y + 1, z: targetLocation.z + 3 };
|
|
2685
2479
|
*
|
|
2686
|
-
*
|
|
2480
|
+
* overworld.createExplosion(belowWaterLoc, 10, waterExplosionOptions);
|
|
2687
2481
|
*
|
|
2688
|
-
* overworld.createExplosion(belowWaterLoc, 10, waterExplosionOptions);
|
|
2689
2482
|
* ```
|
|
2690
2483
|
* @example createNoBlockExplosion.ts
|
|
2691
2484
|
* ```typescript
|
|
2692
|
-
*
|
|
2485
|
+
* const explosionOptions = new mc.ExplosionOptions();
|
|
2486
|
+
*
|
|
2487
|
+
* // Start by exploding without breaking blocks
|
|
2488
|
+
* explosionOptions.breaksBlocks = false;
|
|
2693
2489
|
*
|
|
2694
|
-
*
|
|
2695
|
-
*
|
|
2490
|
+
* const explodeNoBlocksLoc: mc.Vector3 = {
|
|
2491
|
+
* x: Math.floor(targetLocation.x + 1),
|
|
2492
|
+
* y: Math.floor(targetLocation.y + 2),
|
|
2493
|
+
* z: Math.floor(targetLocation.z + 1),
|
|
2494
|
+
* };
|
|
2696
2495
|
*
|
|
2697
|
-
*
|
|
2698
|
-
* Math.floor(targetLocation.x + 1),
|
|
2699
|
-
* Math.floor(targetLocation.y + 2),
|
|
2700
|
-
* Math.floor(targetLocation.z + 1)
|
|
2701
|
-
* );
|
|
2496
|
+
* overworld.createExplosion(explodeNoBlocksLoc, 15, explosionOptions);
|
|
2702
2497
|
*
|
|
2703
|
-
* overworld.createExplosion(explodeNoBlocksLoc, 15, explosionOptions);
|
|
2704
2498
|
* ```
|
|
2705
2499
|
*/
|
|
2706
|
-
createExplosion(location:
|
|
2707
|
-
fillBlocks(
|
|
2708
|
-
begin: BlockLocation,
|
|
2709
|
-
end: BlockLocation,
|
|
2710
|
-
block: BlockPermutation | BlockType,
|
|
2711
|
-
options?: BlockFillOptions,
|
|
2712
|
-
): number;
|
|
2500
|
+
createExplosion(location: Vector3, radius: number, explosionOptions?: ExplosionOptions): void;
|
|
2501
|
+
fillBlocks(begin: Vector3, end: Vector3, block: BlockPermutation | BlockType, options?: BlockFillOptions): number;
|
|
2713
2502
|
/**
|
|
2714
2503
|
* @beta
|
|
2715
2504
|
* @remarks
|
|
@@ -2721,7 +2510,7 @@ export class Dimension {
|
|
|
2721
2510
|
* Block at the specified location.
|
|
2722
2511
|
* @throws This function can throw errors.
|
|
2723
2512
|
*/
|
|
2724
|
-
getBlock(location:
|
|
2513
|
+
getBlock(location: Vector3): Block;
|
|
2725
2514
|
/**
|
|
2726
2515
|
* @beta
|
|
2727
2516
|
* @remarks
|
|
@@ -2733,7 +2522,7 @@ export class Dimension {
|
|
|
2733
2522
|
* Additional options for processing this raycast query.
|
|
2734
2523
|
* @throws This function can throw errors.
|
|
2735
2524
|
*/
|
|
2736
|
-
getBlockFromRay(location:
|
|
2525
|
+
getBlockFromRay(location: Vector3, direction: Vector3, options?: BlockRaycastOptions): Block;
|
|
2737
2526
|
/**
|
|
2738
2527
|
* @beta
|
|
2739
2528
|
* @remarks
|
|
@@ -2774,7 +2563,7 @@ export class Dimension {
|
|
|
2774
2563
|
* @returns
|
|
2775
2564
|
* Zero or more entities at the specified location.
|
|
2776
2565
|
*/
|
|
2777
|
-
getEntitiesAtBlockLocation(location:
|
|
2566
|
+
getEntitiesAtBlockLocation(location: Vector3): Entity[];
|
|
2778
2567
|
/**
|
|
2779
2568
|
* @beta
|
|
2780
2569
|
* @remarks
|
|
@@ -2786,7 +2575,7 @@ export class Dimension {
|
|
|
2786
2575
|
* Additional options for processing this raycast query.
|
|
2787
2576
|
* @throws This function can throw errors.
|
|
2788
2577
|
*/
|
|
2789
|
-
getEntitiesFromRay(location:
|
|
2578
|
+
getEntitiesFromRay(location: Vector3, direction: Vector3, options?: EntityRaycastOptions): Entity[];
|
|
2790
2579
|
/**
|
|
2791
2580
|
* @beta
|
|
2792
2581
|
* @remarks
|
|
@@ -2834,20 +2623,23 @@ export class Dimension {
|
|
|
2834
2623
|
* ```
|
|
2835
2624
|
* @example quickFoxLazyDog.ts
|
|
2836
2625
|
* ```typescript
|
|
2837
|
-
*
|
|
2838
|
-
*
|
|
2839
|
-
*
|
|
2840
|
-
*
|
|
2841
|
-
*
|
|
2842
|
-
*
|
|
2626
|
+
* const fox = overworld.spawnEntity("minecraft:fox", {
|
|
2627
|
+
* x: targetLocation.x + 1,
|
|
2628
|
+
* y: targetLocation.y + 2,
|
|
2629
|
+
* z: targetLocation.z + 3,
|
|
2630
|
+
* });
|
|
2631
|
+
* fox.addEffect(mc.MinecraftEffectTypes.speed, 10, 20);
|
|
2632
|
+
* log("Created a fox.");
|
|
2633
|
+
*
|
|
2634
|
+
* const wolf = overworld.spawnEntity("minecraft:wolf", {
|
|
2635
|
+
* x: targetLocation.x + 4,
|
|
2636
|
+
* y: targetLocation.y + 2,
|
|
2637
|
+
* z: targetLocation.z + 3,
|
|
2638
|
+
* });
|
|
2639
|
+
* wolf.addEffect(mc.MinecraftEffectTypes.slowness, 10, 20);
|
|
2640
|
+
* wolf.isSneaking = true;
|
|
2641
|
+
* log("Created a sneaking wolf.", 1);
|
|
2843
2642
|
*
|
|
2844
|
-
* const wolf = overworld.spawnEntity(
|
|
2845
|
-
* "minecraft:wolf",
|
|
2846
|
-
* new mc.BlockLocation(targetLocation.x + 4, targetLocation.y + 2, targetLocation.z + 3)
|
|
2847
|
-
* );
|
|
2848
|
-
* wolf.addEffect(mc.MinecraftEffectTypes.slowness, 10, 20);
|
|
2849
|
-
* wolf.isSneaking = true;
|
|
2850
|
-
* log("Created a sneaking wolf.", 1);
|
|
2851
2643
|
* ```
|
|
2852
2644
|
* @example trapTick.ts
|
|
2853
2645
|
* ```typescript
|
|
@@ -2863,7 +2655,7 @@ export class Dimension {
|
|
|
2863
2655
|
* });
|
|
2864
2656
|
* ```
|
|
2865
2657
|
*/
|
|
2866
|
-
spawnEntity(identifier: string, location:
|
|
2658
|
+
spawnEntity(identifier: string, location: Vector3): Entity;
|
|
2867
2659
|
/**
|
|
2868
2660
|
* @beta
|
|
2869
2661
|
* @remarks
|
|
@@ -2877,17 +2669,18 @@ export class Dimension {
|
|
|
2877
2669
|
* @throws This function can throw errors.
|
|
2878
2670
|
* @example itemStacks.ts
|
|
2879
2671
|
* ```typescript
|
|
2880
|
-
*
|
|
2881
|
-
*
|
|
2882
|
-
*
|
|
2672
|
+
* const oneItemLoc: mc.Vector3 = { x: 3, y: 2, z: 1 };
|
|
2673
|
+
* const fiveItemsLoc: mc.Vector3 = { x: 1, y: 2, z: 1 };
|
|
2674
|
+
* const diamondPickaxeLoc: mc.Vector3 = { x: 2, y: 2, z: 4 };
|
|
2675
|
+
*
|
|
2676
|
+
* const oneEmerald = new mc.ItemStack(mc.MinecraftItemTypes.emerald, 1, 0);
|
|
2677
|
+
* const onePickaxe = new mc.ItemStack(mc.MinecraftItemTypes.diamondPickaxe, 1, 0);
|
|
2678
|
+
* const fiveEmeralds = new mc.ItemStack(mc.MinecraftItemTypes.emerald, 5, 0);
|
|
2883
2679
|
*
|
|
2884
|
-
*
|
|
2885
|
-
*
|
|
2886
|
-
*
|
|
2680
|
+
* overworld.spawnItem(oneEmerald, oneItemLoc);
|
|
2681
|
+
* overworld.spawnItem(fiveEmeralds, fiveItemsLoc);
|
|
2682
|
+
* overworld.spawnItem(onePickaxe, diamondPickaxeLoc);
|
|
2887
2683
|
*
|
|
2888
|
-
* overworld.spawnItem(oneEmerald, oneItemLoc);
|
|
2889
|
-
* overworld.spawnItem(fiveEmeralds, fiveItemsLoc);
|
|
2890
|
-
* overworld.spawnItem(onePickaxe, diamondPickaxeLoc);
|
|
2891
2684
|
* ```
|
|
2892
2685
|
* @example spawnItem.ts
|
|
2893
2686
|
* ```typescript
|
|
@@ -2897,7 +2690,7 @@ export class Dimension {
|
|
|
2897
2690
|
* log("New feather created!");
|
|
2898
2691
|
* ```
|
|
2899
2692
|
*/
|
|
2900
|
-
spawnItem(item: ItemStack, location:
|
|
2693
|
+
spawnItem(item: ItemStack, location: Vector3): Entity;
|
|
2901
2694
|
/**
|
|
2902
2695
|
* @beta
|
|
2903
2696
|
* @remarks
|
|
@@ -2913,7 +2706,7 @@ export class Dimension {
|
|
|
2913
2706
|
* @returns
|
|
2914
2707
|
* Newly created entity at the specified location.
|
|
2915
2708
|
*/
|
|
2916
|
-
spawnParticle(effectName: string, location:
|
|
2709
|
+
spawnParticle(effectName: string, location: Vector3, molangVariables: MolangVariableMap): void;
|
|
2917
2710
|
}
|
|
2918
2711
|
/**
|
|
2919
2712
|
* @beta
|
|
@@ -2926,15 +2719,11 @@ export class DirectionBlockProperty extends IBlockProperty {
|
|
|
2926
2719
|
* Name of the property.
|
|
2927
2720
|
*/
|
|
2928
2721
|
readonly name: string;
|
|
2929
|
-
/**
|
|
2930
|
-
* A set of acceptable potential values for the direction-based
|
|
2931
|
-
* block property.
|
|
2932
|
-
*/
|
|
2933
|
-
readonly validValues: Direction[];
|
|
2934
2722
|
/**
|
|
2935
2723
|
* Value of the block property.
|
|
2936
2724
|
*/
|
|
2937
2725
|
value: Direction;
|
|
2726
|
+
getValidValues(): Direction[];
|
|
2938
2727
|
}
|
|
2939
2728
|
/**
|
|
2940
2729
|
* @beta
|
|
@@ -3184,12 +2973,6 @@ export class Entity {
|
|
|
3184
2973
|
* @throws This property can throw when used.
|
|
3185
2974
|
*/
|
|
3186
2975
|
readonly dimension: Dimension;
|
|
3187
|
-
/**
|
|
3188
|
-
* @beta
|
|
3189
|
-
* Location of the center of the head component of the entity.
|
|
3190
|
-
* @throws This property can throw when used.
|
|
3191
|
-
*/
|
|
3192
|
-
readonly headLocation: Location;
|
|
3193
2976
|
/**
|
|
3194
2977
|
* Unique identifier of the entity. This identifier is intended
|
|
3195
2978
|
* to be consistent across loads of a world instance. No
|
|
@@ -3215,12 +2998,6 @@ export class Entity {
|
|
|
3215
2998
|
* Given name of the entity.
|
|
3216
2999
|
*/
|
|
3217
3000
|
nameTag: string;
|
|
3218
|
-
/**
|
|
3219
|
-
* @beta
|
|
3220
|
-
* Main rotation of the entity.
|
|
3221
|
-
* @throws This property can throw when used.
|
|
3222
|
-
*/
|
|
3223
|
-
readonly rotation: XYRotation;
|
|
3224
3001
|
/**
|
|
3225
3002
|
* @beta
|
|
3226
3003
|
* Returns a scoreboard identity that represents this entity.
|
|
@@ -3240,18 +3017,6 @@ export class Entity {
|
|
|
3240
3017
|
* @throws This property can throw when used.
|
|
3241
3018
|
*/
|
|
3242
3019
|
readonly typeId: string;
|
|
3243
|
-
/**
|
|
3244
|
-
* @beta
|
|
3245
|
-
* Velocity of the entity.
|
|
3246
|
-
* @throws This property can throw when used.
|
|
3247
|
-
*/
|
|
3248
|
-
readonly velocity: Vector;
|
|
3249
|
-
/**
|
|
3250
|
-
* @beta
|
|
3251
|
-
* Direction that this entity is looking out from.
|
|
3252
|
-
* @throws This property can throw when used.
|
|
3253
|
-
*/
|
|
3254
|
-
readonly viewDirection: Vector3;
|
|
3255
3020
|
/**
|
|
3256
3021
|
* @beta
|
|
3257
3022
|
* @remarks
|
|
@@ -3267,29 +3032,34 @@ export class Entity {
|
|
|
3267
3032
|
* @example addEffect.js
|
|
3268
3033
|
* ```typescript
|
|
3269
3034
|
* const villagerId = "minecraft:villager_v2<minecraft:ageable_grow_up>";
|
|
3270
|
-
* const villagerLoc =
|
|
3035
|
+
* const villagerLoc: mc.Vector3 = { x: 1, y: 2, z: 1 };
|
|
3271
3036
|
* const villager = test.spawn(villagerId, villagerLoc);
|
|
3272
3037
|
* const duration = 20;
|
|
3273
3038
|
*
|
|
3274
3039
|
* villager.addEffect(MinecraftEffectTypes.poison, duration, 1);
|
|
3275
3040
|
*
|
|
3041
|
+
*
|
|
3276
3042
|
* ```
|
|
3277
3043
|
* @example quickFoxLazyDog.ts
|
|
3278
3044
|
* ```typescript
|
|
3279
|
-
*
|
|
3280
|
-
*
|
|
3281
|
-
*
|
|
3282
|
-
*
|
|
3283
|
-
*
|
|
3284
|
-
*
|
|
3045
|
+
* const fox = overworld.spawnEntity("minecraft:fox", {
|
|
3046
|
+
* x: targetLocation.x + 1,
|
|
3047
|
+
* y: targetLocation.y + 2,
|
|
3048
|
+
* z: targetLocation.z + 3,
|
|
3049
|
+
* });
|
|
3050
|
+
* fox.addEffect(mc.MinecraftEffectTypes.speed, 10, 20);
|
|
3051
|
+
* log("Created a fox.");
|
|
3052
|
+
*
|
|
3053
|
+
* const wolf = overworld.spawnEntity("minecraft:wolf", {
|
|
3054
|
+
* x: targetLocation.x + 4,
|
|
3055
|
+
* y: targetLocation.y + 2,
|
|
3056
|
+
* z: targetLocation.z + 3,
|
|
3057
|
+
* });
|
|
3058
|
+
* wolf.addEffect(mc.MinecraftEffectTypes.slowness, 10, 20);
|
|
3059
|
+
* wolf.isSneaking = true;
|
|
3060
|
+
* log("Created a sneaking wolf.", 1);
|
|
3061
|
+
*
|
|
3285
3062
|
*
|
|
3286
|
-
* const wolf = overworld.spawnEntity(
|
|
3287
|
-
* "minecraft:wolf",
|
|
3288
|
-
* new mc.BlockLocation(targetLocation.x + 4, targetLocation.y + 2, targetLocation.z + 3)
|
|
3289
|
-
* );
|
|
3290
|
-
* wolf.addEffect(mc.MinecraftEffectTypes.slowness, 10, 20);
|
|
3291
|
-
* wolf.isSneaking = true;
|
|
3292
|
-
* log("Created a sneaking wolf.", 1);
|
|
3293
3063
|
* ```
|
|
3294
3064
|
*/
|
|
3295
3065
|
addEffect(effectType: EffectType, duration: number, amplifier?: number, showParticles?: boolean): void;
|
|
@@ -3303,6 +3073,9 @@ export class Entity {
|
|
|
3303
3073
|
*/
|
|
3304
3074
|
addTag(tag: string): boolean;
|
|
3305
3075
|
applyDamage(amount: number, source?: EntityDamageSource): boolean;
|
|
3076
|
+
applyImpulse(vector: Vector3): void;
|
|
3077
|
+
applyKnockback(directionX: number, directionZ: number, horizontalStrength: number, verticalStrength: number): void;
|
|
3078
|
+
clearVelocity(): void;
|
|
3306
3079
|
extinguishFire(useEffects?: boolean): boolean;
|
|
3307
3080
|
/**
|
|
3308
3081
|
* @beta
|
|
@@ -3365,6 +3138,8 @@ export class Entity {
|
|
|
3365
3138
|
* @throws This function can throw errors.
|
|
3366
3139
|
*/
|
|
3367
3140
|
getEntitiesFromViewDirection(options?: EntityRaycastOptions): Entity[];
|
|
3141
|
+
getHeadLocation(): Vector3;
|
|
3142
|
+
getRotation(): XYRotation;
|
|
3368
3143
|
/**
|
|
3369
3144
|
* @beta
|
|
3370
3145
|
* @remarks
|
|
@@ -3372,6 +3147,8 @@ export class Entity {
|
|
|
3372
3147
|
* @throws This function can throw errors.
|
|
3373
3148
|
*/
|
|
3374
3149
|
getTags(): string[];
|
|
3150
|
+
getVelocity(): Vector3;
|
|
3151
|
+
getViewDirection(): Vector3;
|
|
3375
3152
|
/**
|
|
3376
3153
|
* @beta
|
|
3377
3154
|
* @remarks
|
|
@@ -3399,6 +3176,7 @@ export class Entity {
|
|
|
3399
3176
|
* @throws This function can throw errors.
|
|
3400
3177
|
*/
|
|
3401
3178
|
kill(): void;
|
|
3179
|
+
playAnimation(animationName: string, options?: PlayAnimationOptions): void;
|
|
3402
3180
|
/**
|
|
3403
3181
|
* @beta
|
|
3404
3182
|
* @remarks
|
|
@@ -3450,15 +3228,6 @@ export class Entity {
|
|
|
3450
3228
|
* @throws This function can throw errors.
|
|
3451
3229
|
*/
|
|
3452
3230
|
setRotation(degreesX: number, degreesY: number): void;
|
|
3453
|
-
/**
|
|
3454
|
-
* @beta
|
|
3455
|
-
* @remarks
|
|
3456
|
-
* Sets a velocity for the entity to move with.
|
|
3457
|
-
* @param velocity
|
|
3458
|
-
* X/Y/Z components of the velocity.
|
|
3459
|
-
* @throws This function can throw errors.
|
|
3460
|
-
*/
|
|
3461
|
-
setVelocity(velocity: Vector3): void;
|
|
3462
3231
|
/**
|
|
3463
3232
|
* @beta
|
|
3464
3233
|
* @remarks
|
|
@@ -3548,24 +3317,12 @@ export class EntityAddRiderComponent extends IEntityComponent {
|
|
|
3548
3317
|
*/
|
|
3549
3318
|
export class EntityAgeableComponent extends IEntityComponent {
|
|
3550
3319
|
protected constructor();
|
|
3551
|
-
/**
|
|
3552
|
-
* List of items that the entity drops when it grows up.
|
|
3553
|
-
* @throws This property can throw when used.
|
|
3554
|
-
*/
|
|
3555
|
-
readonly dropItems: string[];
|
|
3556
3320
|
/**
|
|
3557
3321
|
* Amount of time before the entity grows up, -1 for always a
|
|
3558
3322
|
* baby.
|
|
3559
3323
|
* @throws This property can throw when used.
|
|
3560
3324
|
*/
|
|
3561
3325
|
readonly duration: number;
|
|
3562
|
-
/**
|
|
3563
|
-
* List of items that can be fed to the entity. Includes 'item'
|
|
3564
|
-
* for the item name and 'growth' to define how much time it
|
|
3565
|
-
* grows up by.
|
|
3566
|
-
* @throws This property can throw when used.
|
|
3567
|
-
*/
|
|
3568
|
-
readonly feedItems: EntityDefinitionFeedItem[];
|
|
3569
3326
|
/**
|
|
3570
3327
|
* Event to run when this entity grows up.
|
|
3571
3328
|
* @throws This property can throw when used.
|
|
@@ -3581,6 +3338,8 @@ export class EntityAgeableComponent extends IEntityComponent {
|
|
|
3581
3338
|
* minecraft:ageable.
|
|
3582
3339
|
*/
|
|
3583
3340
|
static readonly componentId = 'minecraft:ageable';
|
|
3341
|
+
getDropItems(): string[];
|
|
3342
|
+
getFeedItems(): EntityDefinitionFeedItem[];
|
|
3584
3343
|
}
|
|
3585
3344
|
/**
|
|
3586
3345
|
* @beta
|
|
@@ -3589,12 +3348,6 @@ export class EntityAgeableComponent extends IEntityComponent {
|
|
|
3589
3348
|
*/
|
|
3590
3349
|
export class EntityBreathableComponent extends IEntityComponent {
|
|
3591
3350
|
protected constructor();
|
|
3592
|
-
/**
|
|
3593
|
-
* List of blocks this entity can breathe in, in addition to
|
|
3594
|
-
* the separate properties for classes of blocks.
|
|
3595
|
-
* @throws This property can throw when used.
|
|
3596
|
-
*/
|
|
3597
|
-
readonly breatheBlocks: BlockPermutation[];
|
|
3598
3351
|
/**
|
|
3599
3352
|
* If true, this entity can breathe in air.
|
|
3600
3353
|
* @throws This property can throw when used.
|
|
@@ -3626,11 +3379,6 @@ export class EntityBreathableComponent extends IEntityComponent {
|
|
|
3626
3379
|
* @throws This property can throw when used.
|
|
3627
3380
|
*/
|
|
3628
3381
|
readonly inhaleTime: number;
|
|
3629
|
-
/**
|
|
3630
|
-
* List of blocks this entity can't breathe in.
|
|
3631
|
-
* @throws This property can throw when used.
|
|
3632
|
-
*/
|
|
3633
|
-
readonly nonBreatheBlocks: BlockPermutation[];
|
|
3634
3382
|
/**
|
|
3635
3383
|
* Time in seconds between suffocation damage.
|
|
3636
3384
|
* @throws This property can throw when used.
|
|
@@ -3651,6 +3399,8 @@ export class EntityBreathableComponent extends IEntityComponent {
|
|
|
3651
3399
|
* minecraft:breathable.
|
|
3652
3400
|
*/
|
|
3653
3401
|
static readonly componentId = 'minecraft:breathable';
|
|
3402
|
+
getBreatheBlocks(): BlockPermutation[];
|
|
3403
|
+
getNonBreatheBlocks(): BlockPermutation[];
|
|
3654
3404
|
/**
|
|
3655
3405
|
* @remarks
|
|
3656
3406
|
* Sets the current air supply of the entity.
|
|
@@ -3757,6 +3507,16 @@ export class EntityDefinitionFeedItem {
|
|
|
3757
3507
|
*/
|
|
3758
3508
|
readonly item: string;
|
|
3759
3509
|
}
|
|
3510
|
+
export class EntityDieEvent {
|
|
3511
|
+
protected constructor();
|
|
3512
|
+
readonly damageSource: EntityDamageSource;
|
|
3513
|
+
readonly deadEntity: Entity;
|
|
3514
|
+
}
|
|
3515
|
+
export class EntityDieEventSignal {
|
|
3516
|
+
protected constructor();
|
|
3517
|
+
subscribe(callback: (arg: EntityDieEvent) => void, options?: EntityEventOptions): (arg: EntityDieEvent) => void;
|
|
3518
|
+
unsubscribe(callback: (arg: EntityDieEvent) => void): void;
|
|
3519
|
+
}
|
|
3760
3520
|
/**
|
|
3761
3521
|
* @beta
|
|
3762
3522
|
* When added, this component signifies that this entity
|
|
@@ -3877,11 +3637,6 @@ export class EntityHealableComponent extends IEntityComponent {
|
|
|
3877
3637
|
* @throws This property can throw when used.
|
|
3878
3638
|
*/
|
|
3879
3639
|
readonly forceUse: boolean;
|
|
3880
|
-
/**
|
|
3881
|
-
* A set of items that can specifically heal this entity.
|
|
3882
|
-
* @throws This property can throw when used.
|
|
3883
|
-
*/
|
|
3884
|
-
readonly items: FeedItem[];
|
|
3885
3640
|
/**
|
|
3886
3641
|
* Identifier of this component. Should always be
|
|
3887
3642
|
* minecraft:healable.
|
|
@@ -3892,6 +3647,7 @@ export class EntityHealableComponent extends IEntityComponent {
|
|
|
3892
3647
|
* minecraft:healable.
|
|
3893
3648
|
*/
|
|
3894
3649
|
static readonly componentId = 'minecraft:healable';
|
|
3650
|
+
getFeedItems(): FeedItem[];
|
|
3895
3651
|
}
|
|
3896
3652
|
/**
|
|
3897
3653
|
* @beta
|
|
@@ -3998,18 +3754,6 @@ export class EntityHitEventSignal {
|
|
|
3998
3754
|
*/
|
|
3999
3755
|
unsubscribe(callback: (arg: EntityHitEvent) => void): void;
|
|
4000
3756
|
}
|
|
4001
|
-
/**
|
|
4002
|
-
* @beta
|
|
4003
|
-
* Contains additional information about an entity that was
|
|
4004
|
-
* hit.
|
|
4005
|
-
*/
|
|
4006
|
-
export class EntityHitInformation {
|
|
4007
|
-
protected constructor();
|
|
4008
|
-
/**
|
|
4009
|
-
* Entity that was hit.
|
|
4010
|
-
*/
|
|
4011
|
-
readonly entity: Entity;
|
|
4012
|
-
}
|
|
4013
3757
|
/**
|
|
4014
3758
|
* @beta
|
|
4015
3759
|
* Contains information related to an entity getting hurt by
|
|
@@ -5620,12 +5364,6 @@ export class EntityRideableComponent extends IEntityComponent {
|
|
|
5620
5364
|
* @throws This property can throw when used.
|
|
5621
5365
|
*/
|
|
5622
5366
|
readonly crouchingSkipInteract: boolean;
|
|
5623
|
-
/**
|
|
5624
|
-
* A string-list of entity types that this entity can support
|
|
5625
|
-
* as riders.
|
|
5626
|
-
* @throws This property can throw when used.
|
|
5627
|
-
*/
|
|
5628
|
-
readonly familyTypes: string[];
|
|
5629
5367
|
/**
|
|
5630
5368
|
* Set of text that should be displayed when a player is
|
|
5631
5369
|
* looking to ride on this entity (commonly with touch-screen
|
|
@@ -5650,12 +5388,6 @@ export class EntityRideableComponent extends IEntityComponent {
|
|
|
5650
5388
|
* @throws This property can throw when used.
|
|
5651
5389
|
*/
|
|
5652
5390
|
readonly seatCount: number;
|
|
5653
|
-
/**
|
|
5654
|
-
* The list of positions and number of riders for each position
|
|
5655
|
-
* for entities riding this entity.
|
|
5656
|
-
* @throws This property can throw when used.
|
|
5657
|
-
*/
|
|
5658
|
-
readonly seats: Seat[];
|
|
5659
5391
|
/**
|
|
5660
5392
|
* Identifier of this component. Should always be
|
|
5661
5393
|
* minecraft:rideable.
|
|
@@ -5690,6 +5422,8 @@ export class EntityRideableComponent extends IEntityComponent {
|
|
|
5690
5422
|
* @throws This function can throw errors.
|
|
5691
5423
|
*/
|
|
5692
5424
|
ejectRiders(): void;
|
|
5425
|
+
getFamilyTypes(): string[];
|
|
5426
|
+
getSeats(): Seat[];
|
|
5693
5427
|
}
|
|
5694
5428
|
/**
|
|
5695
5429
|
* @beta
|
|
@@ -5821,11 +5555,6 @@ export class EntityTameableComponent extends IEntityComponent {
|
|
|
5821
5555
|
* @throws This property can throw when used.
|
|
5822
5556
|
*/
|
|
5823
5557
|
readonly tameEvent: Trigger;
|
|
5824
|
-
/**
|
|
5825
|
-
* The list of items that can be used to tame this entity.
|
|
5826
|
-
* @throws This property can throw when used.
|
|
5827
|
-
*/
|
|
5828
|
-
readonly tameItems: string[];
|
|
5829
5558
|
/**
|
|
5830
5559
|
* Identifier of this component. Should always be
|
|
5831
5560
|
* minecraft:tameable.
|
|
@@ -5836,6 +5565,7 @@ export class EntityTameableComponent extends IEntityComponent {
|
|
|
5836
5565
|
* minecraft:tameable.
|
|
5837
5566
|
*/
|
|
5838
5567
|
static readonly componentId = 'minecraft:tameable';
|
|
5568
|
+
getTameItems(): string[];
|
|
5839
5569
|
/**
|
|
5840
5570
|
* @remarks
|
|
5841
5571
|
* Tames this entity.
|
|
@@ -6068,6 +5798,7 @@ export class Events {
|
|
|
6068
5798
|
* an entity.
|
|
6069
5799
|
*/
|
|
6070
5800
|
readonly effectAdd: EffectAddEventSignal;
|
|
5801
|
+
readonly entityDie: EntityDieEventSignal;
|
|
6071
5802
|
/**
|
|
6072
5803
|
* This event fires when an entity hits (makes a melee attack)
|
|
6073
5804
|
* and potentially impacts another entity or block.
|
|
@@ -6161,11 +5892,7 @@ export class Events {
|
|
|
6161
5892
|
/**
|
|
6162
5893
|
* This event fires when a projectile hits an entity or block.
|
|
6163
5894
|
*/
|
|
6164
|
-
projectileHit: ProjectileHitEventSignal;
|
|
6165
|
-
/**
|
|
6166
|
-
* This event fires every tick - which is 20 times per second.
|
|
6167
|
-
*/
|
|
6168
|
-
readonly tick: TickEventSignal;
|
|
5895
|
+
readonly projectileHit: ProjectileHitEventSignal;
|
|
6169
5896
|
/**
|
|
6170
5897
|
* This event will be triggered when the weather changes within
|
|
6171
5898
|
* Minecraft.
|
|
@@ -6189,14 +5916,11 @@ export class ExplosionEvent {
|
|
|
6189
5916
|
* Dimension where the explosion has occurred.
|
|
6190
5917
|
*/
|
|
6191
5918
|
readonly dimension: Dimension;
|
|
6192
|
-
/**
|
|
6193
|
-
* A collection of blocks impacted by this explosion event.
|
|
6194
|
-
*/
|
|
6195
|
-
readonly impactedBlocks: BlockLocation[];
|
|
6196
5919
|
/**
|
|
6197
5920
|
* Optional source of the explosion.
|
|
6198
5921
|
*/
|
|
6199
5922
|
readonly source: Entity;
|
|
5923
|
+
getImpactedBlocks(): Vector3[];
|
|
6200
5924
|
}
|
|
6201
5925
|
/**
|
|
6202
5926
|
* @beta
|
|
@@ -6228,11 +5952,6 @@ export class ExplosionEventSignal {
|
|
|
6228
5952
|
*/
|
|
6229
5953
|
export class FeedItem {
|
|
6230
5954
|
protected constructor();
|
|
6231
|
-
/**
|
|
6232
|
-
* As part of the Healable component, an optional collection of
|
|
6233
|
-
* side effects that can occur from being fed an item.
|
|
6234
|
-
*/
|
|
6235
|
-
readonly effects: FeedItemEffect[];
|
|
6236
5955
|
/**
|
|
6237
5956
|
* The amount of health this entity gains when fed this item.
|
|
6238
5957
|
* This number is an integer starting at 0. Sample values can
|
|
@@ -6245,6 +5964,7 @@ export class FeedItem {
|
|
|
6245
5964
|
* include 'wheat' or 'golden_apple'.
|
|
6246
5965
|
*/
|
|
6247
5966
|
readonly item: string;
|
|
5967
|
+
getEffects(): FeedItemEffect[];
|
|
6248
5968
|
}
|
|
6249
5969
|
/**
|
|
6250
5970
|
* @beta
|
|
@@ -6335,18 +6055,16 @@ export class IntBlockProperty extends IBlockProperty {
|
|
|
6335
6055
|
* The name of this property.
|
|
6336
6056
|
*/
|
|
6337
6057
|
readonly name: string;
|
|
6338
|
-
/**
|
|
6339
|
-
* A list of valid values for this particular property.
|
|
6340
|
-
*/
|
|
6341
|
-
readonly validValues: number[];
|
|
6342
6058
|
/**
|
|
6343
6059
|
* The current value of this property.
|
|
6344
6060
|
* @throws
|
|
6345
6061
|
* Setting this property can throw if the value passed is not
|
|
6346
6062
|
* valid for the property. Use {@link
|
|
6347
|
-
* IntBlockProperty.validValues} to check
|
|
6063
|
+
* @minecraft/server.IntBlockProperty.validValues} to check
|
|
6064
|
+
* allowed values.
|
|
6348
6065
|
*/
|
|
6349
6066
|
value: number;
|
|
6067
|
+
getValidValues(): number[];
|
|
6350
6068
|
}
|
|
6351
6069
|
/**
|
|
6352
6070
|
* @beta
|
|
@@ -6595,12 +6313,6 @@ export class ItemDurabilityComponent {
|
|
|
6595
6313
|
* Returns the current damage level of this particular item.
|
|
6596
6314
|
*/
|
|
6597
6315
|
damage: number;
|
|
6598
|
-
/**
|
|
6599
|
-
* A range of numbers that describes the chance of the item
|
|
6600
|
-
* losing durability.
|
|
6601
|
-
* @throws This property can throw when used.
|
|
6602
|
-
*/
|
|
6603
|
-
readonly damageRange: NumberRange;
|
|
6604
6316
|
/**
|
|
6605
6317
|
* Represents the amount of damage that this item can take
|
|
6606
6318
|
* before breaking.
|
|
@@ -6623,6 +6335,7 @@ export class ItemDurabilityComponent {
|
|
|
6623
6335
|
* @throws This function can throw errors.
|
|
6624
6336
|
*/
|
|
6625
6337
|
getDamageChance(unbreaking?: number): number;
|
|
6338
|
+
getDamageRange(): NumberRange;
|
|
6626
6339
|
}
|
|
6627
6340
|
/**
|
|
6628
6341
|
* @beta
|
|
@@ -6758,10 +6471,6 @@ export class ItemStack {
|
|
|
6758
6471
|
* 0 and 64.
|
|
6759
6472
|
*/
|
|
6760
6473
|
amount: number;
|
|
6761
|
-
/**
|
|
6762
|
-
* A data value used to configure alternate states of the item.
|
|
6763
|
-
*/
|
|
6764
|
-
data: number;
|
|
6765
6474
|
/**
|
|
6766
6475
|
* Given name of this stack of items.
|
|
6767
6476
|
*/
|
|
@@ -6783,11 +6492,9 @@ export class ItemStack {
|
|
|
6783
6492
|
* @param amount
|
|
6784
6493
|
* Number of items to place in the stack, between 1 and 64.
|
|
6785
6494
|
* Note that certain items can only have one item in the stack.
|
|
6786
|
-
* @
|
|
6787
|
-
* Optional data value used for creating the item, or 0 if no
|
|
6788
|
-
* data value is specified.
|
|
6495
|
+
* @throws This function can throw errors.
|
|
6789
6496
|
*/
|
|
6790
|
-
constructor(itemType: ItemType
|
|
6497
|
+
constructor(itemType: ItemType | string, amount?: number);
|
|
6791
6498
|
/**
|
|
6792
6499
|
* @remarks
|
|
6793
6500
|
* Gets a component (that represents additional capabilities)
|
|
@@ -6827,7 +6534,7 @@ export class ItemStack {
|
|
|
6827
6534
|
* ItemStack.
|
|
6828
6535
|
* @param loreList
|
|
6829
6536
|
*/
|
|
6830
|
-
setLore(loreList
|
|
6537
|
+
setLore(loreList?: string[]): void;
|
|
6831
6538
|
/**
|
|
6832
6539
|
* @remarks
|
|
6833
6540
|
* Triggers an item type event. For custom items, a number of
|
|
@@ -6894,15 +6601,6 @@ export class ItemStartUseOnEvent {
|
|
|
6894
6601
|
* The face of the block that an item is being used on.
|
|
6895
6602
|
*/
|
|
6896
6603
|
readonly blockFace: Direction;
|
|
6897
|
-
/**
|
|
6898
|
-
* Location of the block being impacted.
|
|
6899
|
-
*/
|
|
6900
|
-
readonly blockLocation: BlockLocation;
|
|
6901
|
-
/**
|
|
6902
|
-
* Location of the resulting build block position. Useful for
|
|
6903
|
-
* determining where a block was placed.
|
|
6904
|
-
*/
|
|
6905
|
-
readonly buildBlockLocation: BlockLocation;
|
|
6906
6604
|
/**
|
|
6907
6605
|
* The impacted item stack that is starting to be used.
|
|
6908
6606
|
*/
|
|
@@ -6911,6 +6609,8 @@ export class ItemStartUseOnEvent {
|
|
|
6911
6609
|
* Returns the source entity that triggered this item event.
|
|
6912
6610
|
*/
|
|
6913
6611
|
readonly source: Entity;
|
|
6612
|
+
getBlockLocation(): Vector3;
|
|
6613
|
+
getBuildBlockLocation(): Vector3;
|
|
6914
6614
|
}
|
|
6915
6615
|
/**
|
|
6916
6616
|
* @beta
|
|
@@ -6988,10 +6688,6 @@ export class ItemStopChargeEventSignal {
|
|
|
6988
6688
|
*/
|
|
6989
6689
|
export class ItemStopUseOnEvent {
|
|
6990
6690
|
protected constructor();
|
|
6991
|
-
/**
|
|
6992
|
-
* Location of the block being impacted.
|
|
6993
|
-
*/
|
|
6994
|
-
readonly blockLocation: BlockLocation;
|
|
6995
6691
|
/**
|
|
6996
6692
|
* The impacted item stack that is being used on a block.
|
|
6997
6693
|
*/
|
|
@@ -7000,6 +6696,7 @@ export class ItemStopUseOnEvent {
|
|
|
7000
6696
|
* Returns the source entity that triggered this item event.
|
|
7001
6697
|
*/
|
|
7002
6698
|
readonly source: Entity;
|
|
6699
|
+
getBlockLocation(): Vector3;
|
|
7003
6700
|
}
|
|
7004
6701
|
/**
|
|
7005
6702
|
* @beta
|
|
@@ -7111,10 +6808,6 @@ export class ItemUseOnEvent {
|
|
|
7111
6808
|
* The face of the block that an item is being used on.
|
|
7112
6809
|
*/
|
|
7113
6810
|
readonly blockFace: Direction;
|
|
7114
|
-
/**
|
|
7115
|
-
* Location of the block being impacted.
|
|
7116
|
-
*/
|
|
7117
|
-
readonly blockLocation: BlockLocation;
|
|
7118
6811
|
/**
|
|
7119
6812
|
* X coordinate of the item-use impact location on the face of
|
|
7120
6813
|
* the target block.
|
|
@@ -7133,6 +6826,7 @@ export class ItemUseOnEvent {
|
|
|
7133
6826
|
* Returns the source entity that triggered this item event.
|
|
7134
6827
|
*/
|
|
7135
6828
|
readonly source: Entity;
|
|
6829
|
+
getBlockLocation(): Vector3;
|
|
7136
6830
|
}
|
|
7137
6831
|
/**
|
|
7138
6832
|
* @beta
|
|
@@ -7206,61 +6900,6 @@ export class LeverActionEventSignal {
|
|
|
7206
6900
|
*/
|
|
7207
6901
|
unsubscribe(callback: (arg: LeverActionEvent) => void): void;
|
|
7208
6902
|
}
|
|
7209
|
-
/**
|
|
7210
|
-
* @beta
|
|
7211
|
-
* Contains a location description that is useful for entities
|
|
7212
|
-
* and other items. X, Y, and Z can contain decimal fractions.
|
|
7213
|
-
* For integer-based locations useful for blocks, see {@link
|
|
7214
|
-
* BlockLocation}.
|
|
7215
|
-
*/
|
|
7216
|
-
export class Location {
|
|
7217
|
-
/**
|
|
7218
|
-
* X component of this location.
|
|
7219
|
-
*/
|
|
7220
|
-
x: number;
|
|
7221
|
-
/**
|
|
7222
|
-
* Y component of this location.
|
|
7223
|
-
*/
|
|
7224
|
-
y: number;
|
|
7225
|
-
/**
|
|
7226
|
-
* Z component of this location.
|
|
7227
|
-
*/
|
|
7228
|
-
z: number;
|
|
7229
|
-
/**
|
|
7230
|
-
* @remarks
|
|
7231
|
-
* Creates a new instance of an abstract location.
|
|
7232
|
-
* @param x
|
|
7233
|
-
* X position of the location.
|
|
7234
|
-
* @param y
|
|
7235
|
-
* Y position of the location.
|
|
7236
|
-
* @param z
|
|
7237
|
-
* Z position of the location.
|
|
7238
|
-
*/
|
|
7239
|
-
constructor(x: number, y: number, z: number);
|
|
7240
|
-
/**
|
|
7241
|
-
* @remarks
|
|
7242
|
-
* Compares this Location and another Location to one another.
|
|
7243
|
-
* @param other
|
|
7244
|
-
* Other location to compare this Location to.
|
|
7245
|
-
* @returns
|
|
7246
|
-
* True if the two locations are equal.
|
|
7247
|
-
*/
|
|
7248
|
-
equals(other: Location): boolean;
|
|
7249
|
-
/**
|
|
7250
|
-
* @remarks
|
|
7251
|
-
* Determines whether or not two Locations are considered to be
|
|
7252
|
-
* near each other.
|
|
7253
|
-
* @param other
|
|
7254
|
-
* Other Location to compare this Location to.
|
|
7255
|
-
* @param epsilon
|
|
7256
|
-
* Maximum distance that the Locations can be from each other
|
|
7257
|
-
* to be considered nearby.
|
|
7258
|
-
* @returns
|
|
7259
|
-
* True if the two Locations are within epsilon distance of
|
|
7260
|
-
* each other.
|
|
7261
|
-
*/
|
|
7262
|
-
isNear(other: Location, epsilon: number): boolean;
|
|
7263
|
-
}
|
|
7264
6903
|
/**
|
|
7265
6904
|
* @beta
|
|
7266
6905
|
* A specific currently-internal event used for passing
|
|
@@ -7494,6 +7133,7 @@ export class MinecraftBlockTypes {
|
|
|
7494
7133
|
* Represents a blackstone wall within Minecraft.
|
|
7495
7134
|
*/
|
|
7496
7135
|
static readonly blackstoneWall: BlockType;
|
|
7136
|
+
static readonly blackWool: BlockType;
|
|
7497
7137
|
/**
|
|
7498
7138
|
* Represents a blast furnace within Minecraft.
|
|
7499
7139
|
*/
|
|
@@ -7514,6 +7154,7 @@ export class MinecraftBlockTypes {
|
|
|
7514
7154
|
* Represents a blue ice block within Minecraft.
|
|
7515
7155
|
*/
|
|
7516
7156
|
static readonly blueIce: BlockType;
|
|
7157
|
+
static readonly blueWool: BlockType;
|
|
7517
7158
|
/**
|
|
7518
7159
|
* Represents a bone block within Minecraft.
|
|
7519
7160
|
*/
|
|
@@ -7558,6 +7199,7 @@ export class MinecraftBlockTypes {
|
|
|
7558
7199
|
* Represents a block of brown mushroom within Minecraft.
|
|
7559
7200
|
*/
|
|
7560
7201
|
static readonly brownMushroomBlock: BlockType;
|
|
7202
|
+
static readonly brownWool: BlockType;
|
|
7561
7203
|
/**
|
|
7562
7204
|
* Represents a column of bubbles within Minecraft.
|
|
7563
7205
|
*/
|
|
@@ -7912,6 +7554,7 @@ export class MinecraftBlockTypes {
|
|
|
7912
7554
|
* Minecraft.
|
|
7913
7555
|
*/
|
|
7914
7556
|
static readonly cyanGlazedTerracotta: BlockType;
|
|
7557
|
+
static readonly cyanWool: BlockType;
|
|
7915
7558
|
/**
|
|
7916
7559
|
* Represents a dark oak button within Minecraft.
|
|
7917
7560
|
*/
|
|
@@ -8912,6 +8555,7 @@ export class MinecraftBlockTypes {
|
|
|
8912
8555
|
* Minecraft.
|
|
8913
8556
|
*/
|
|
8914
8557
|
static readonly grayGlazedTerracotta: BlockType;
|
|
8558
|
+
static readonly grayWool: BlockType;
|
|
8915
8559
|
/**
|
|
8916
8560
|
* Represents a green-colored candle within Minecraft.
|
|
8917
8561
|
*/
|
|
@@ -8925,6 +8569,7 @@ export class MinecraftBlockTypes {
|
|
|
8925
8569
|
* Minecraft.
|
|
8926
8570
|
*/
|
|
8927
8571
|
static readonly greenGlazedTerracotta: BlockType;
|
|
8572
|
+
static readonly greenWool: BlockType;
|
|
8928
8573
|
/**
|
|
8929
8574
|
* Represents a grindstone within Minecraft.
|
|
8930
8575
|
*/
|
|
@@ -9121,6 +8766,7 @@ export class MinecraftBlockTypes {
|
|
|
9121
8766
|
* Minecraft.
|
|
9122
8767
|
*/
|
|
9123
8768
|
static readonly lightBlueGlazedTerracotta: BlockType;
|
|
8769
|
+
static readonly lightBlueWool: BlockType;
|
|
9124
8770
|
/**
|
|
9125
8771
|
* Represents a light gray candle within Minecraft.
|
|
9126
8772
|
*/
|
|
@@ -9129,6 +8775,7 @@ export class MinecraftBlockTypes {
|
|
|
9129
8775
|
* Represents a light gray candle cake within Minecraft.
|
|
9130
8776
|
*/
|
|
9131
8777
|
static readonly lightGrayCandleCake: BlockType;
|
|
8778
|
+
static readonly lightGrayWool: BlockType;
|
|
9132
8779
|
/**
|
|
9133
8780
|
* Represents a lightning rod within Minecraft.
|
|
9134
8781
|
*/
|
|
@@ -9150,6 +8797,7 @@ export class MinecraftBlockTypes {
|
|
|
9150
8797
|
* Minecraft.
|
|
9151
8798
|
*/
|
|
9152
8799
|
static readonly limeGlazedTerracotta: BlockType;
|
|
8800
|
+
static readonly limeWool: BlockType;
|
|
9153
8801
|
/**
|
|
9154
8802
|
* Represents a lit blast furnace within Minecraft.
|
|
9155
8803
|
*/
|
|
@@ -9208,6 +8856,7 @@ export class MinecraftBlockTypes {
|
|
|
9208
8856
|
* within Minecraft.
|
|
9209
8857
|
*/
|
|
9210
8858
|
static readonly magentaGlazedTerracotta: BlockType;
|
|
8859
|
+
static readonly magentaWool: BlockType;
|
|
9211
8860
|
/**
|
|
9212
8861
|
* Represents magma within Minecraft.
|
|
9213
8862
|
*/
|
|
@@ -9361,6 +9010,7 @@ export class MinecraftBlockTypes {
|
|
|
9361
9010
|
* within Minecraft.
|
|
9362
9011
|
*/
|
|
9363
9012
|
static readonly orangeGlazedTerracotta: BlockType;
|
|
9013
|
+
static readonly orangeWool: BlockType;
|
|
9364
9014
|
/**
|
|
9365
9015
|
* Represents a block of oxidized copper within Minecraft.
|
|
9366
9016
|
*/
|
|
@@ -9402,6 +9052,7 @@ export class MinecraftBlockTypes {
|
|
|
9402
9052
|
* Minecraft.
|
|
9403
9053
|
*/
|
|
9404
9054
|
static readonly pinkGlazedTerracotta: BlockType;
|
|
9055
|
+
static readonly pinkWool: BlockType;
|
|
9405
9056
|
/**
|
|
9406
9057
|
* Represents a piston within Minecraft.
|
|
9407
9058
|
*/
|
|
@@ -9568,6 +9219,7 @@ export class MinecraftBlockTypes {
|
|
|
9568
9219
|
* within Minecraft.
|
|
9569
9220
|
*/
|
|
9570
9221
|
static readonly purpleGlazedTerracotta: BlockType;
|
|
9222
|
+
static readonly purpleWool: BlockType;
|
|
9571
9223
|
/**
|
|
9572
9224
|
* Represents a purpur block within Minecraft.
|
|
9573
9225
|
*/
|
|
@@ -9672,6 +9324,7 @@ export class MinecraftBlockTypes {
|
|
|
9672
9324
|
* Represents a redstone wire within Minecraft.
|
|
9673
9325
|
*/
|
|
9674
9326
|
static readonly redstoneWire: BlockType;
|
|
9327
|
+
static readonly redWool: BlockType;
|
|
9675
9328
|
/**
|
|
9676
9329
|
* Represents reeds within Minecraft.
|
|
9677
9330
|
*/
|
|
@@ -10302,6 +9955,7 @@ export class MinecraftBlockTypes {
|
|
|
10302
9955
|
* Minecraft.
|
|
10303
9956
|
*/
|
|
10304
9957
|
static readonly whiteGlazedTerracotta: BlockType;
|
|
9958
|
+
static readonly whiteWool: BlockType;
|
|
10305
9959
|
/**
|
|
10306
9960
|
* Represents a wither rose within Minecraft.
|
|
10307
9961
|
*/
|
|
@@ -10326,10 +9980,6 @@ export class MinecraftBlockTypes {
|
|
|
10326
9980
|
* Represents a wooden slab within Minecraft.
|
|
10327
9981
|
*/
|
|
10328
9982
|
static readonly woodenSlab: BlockType;
|
|
10329
|
-
/**
|
|
10330
|
-
* Represents wool within Minecraft.
|
|
10331
|
-
*/
|
|
10332
|
-
static readonly wool: BlockType;
|
|
10333
9983
|
/**
|
|
10334
9984
|
* Represents a yellow candle within Minecraft.
|
|
10335
9985
|
*/
|
|
@@ -10347,6 +9997,7 @@ export class MinecraftBlockTypes {
|
|
|
10347
9997
|
* Minecraft.
|
|
10348
9998
|
*/
|
|
10349
9999
|
static readonly yellowGlazedTerracotta: BlockType;
|
|
10000
|
+
static readonly yellowWool: BlockType;
|
|
10350
10001
|
/**
|
|
10351
10002
|
* @remarks
|
|
10352
10003
|
* Returns a specific Minecraft block type given a type id.
|
|
@@ -10821,6 +10472,7 @@ export class MinecraftItemTypes {
|
|
|
10821
10472
|
* Minecraft.
|
|
10822
10473
|
*/
|
|
10823
10474
|
static readonly blackstoneWall: ItemType;
|
|
10475
|
+
static readonly blackWool: ItemType;
|
|
10824
10476
|
/**
|
|
10825
10477
|
* Represents an item that can place a blast furnace within
|
|
10826
10478
|
* Minecraft.
|
|
@@ -10845,6 +10497,7 @@ export class MinecraftItemTypes {
|
|
|
10845
10497
|
* Minecraft.
|
|
10846
10498
|
*/
|
|
10847
10499
|
static readonly blueIce: ItemType;
|
|
10500
|
+
static readonly blueWool: ItemType;
|
|
10848
10501
|
static readonly boat: ItemType;
|
|
10849
10502
|
static readonly bone: ItemType;
|
|
10850
10503
|
/**
|
|
@@ -10904,6 +10557,7 @@ export class MinecraftItemTypes {
|
|
|
10904
10557
|
* within Minecraft.
|
|
10905
10558
|
*/
|
|
10906
10559
|
static readonly brownMushroomBlock: ItemType;
|
|
10560
|
+
static readonly brownWool: ItemType;
|
|
10907
10561
|
static readonly bucket: ItemType;
|
|
10908
10562
|
/**
|
|
10909
10563
|
* Represents an item that can place a block of budding
|
|
@@ -11245,6 +10899,7 @@ export class MinecraftItemTypes {
|
|
|
11245
10899
|
* glazed terracotta within Minecraft.
|
|
11246
10900
|
*/
|
|
11247
10901
|
static readonly cyanGlazedTerracotta: ItemType;
|
|
10902
|
+
static readonly cyanWool: ItemType;
|
|
11248
10903
|
static readonly darkOakBoat: ItemType;
|
|
11249
10904
|
/**
|
|
11250
10905
|
* Represents an item that can place a dark oak button within
|
|
@@ -11704,6 +11359,7 @@ export class MinecraftItemTypes {
|
|
|
11704
11359
|
* glazed terracotta within Minecraft.
|
|
11705
11360
|
*/
|
|
11706
11361
|
static readonly grayGlazedTerracotta: ItemType;
|
|
11362
|
+
static readonly grayWool: ItemType;
|
|
11707
11363
|
/**
|
|
11708
11364
|
* Represents an item that can place a green-colored candle
|
|
11709
11365
|
* within Minecraft.
|
|
@@ -11715,6 +11371,7 @@ export class MinecraftItemTypes {
|
|
|
11715
11371
|
* terracotta within Minecraft.
|
|
11716
11372
|
*/
|
|
11717
11373
|
static readonly greenGlazedTerracotta: ItemType;
|
|
11374
|
+
static readonly greenWool: ItemType;
|
|
11718
11375
|
/**
|
|
11719
11376
|
* Represents an item that can place a grindstone within
|
|
11720
11377
|
* Minecraft.
|
|
@@ -11929,12 +11586,14 @@ export class MinecraftItemTypes {
|
|
|
11929
11586
|
* glazed terracotta within Minecraft.
|
|
11930
11587
|
*/
|
|
11931
11588
|
static readonly lightBlueGlazedTerracotta: ItemType;
|
|
11589
|
+
static readonly lightBlueWool: ItemType;
|
|
11932
11590
|
/**
|
|
11933
11591
|
* Represents an item that can place a light gray candle within
|
|
11934
11592
|
* Minecraft.
|
|
11935
11593
|
*/
|
|
11936
11594
|
static readonly lightGrayCandle: ItemType;
|
|
11937
11595
|
static readonly lightGrayDye: ItemType;
|
|
11596
|
+
static readonly lightGrayWool: ItemType;
|
|
11938
11597
|
/**
|
|
11939
11598
|
* Represents an item that can place a lightning rod within
|
|
11940
11599
|
* Minecraft.
|
|
@@ -11956,6 +11615,7 @@ export class MinecraftItemTypes {
|
|
|
11956
11615
|
* glazed terracotta within Minecraft.
|
|
11957
11616
|
*/
|
|
11958
11617
|
static readonly limeGlazedTerracotta: ItemType;
|
|
11618
|
+
static readonly limeWool: ItemType;
|
|
11959
11619
|
static readonly lingeringPotion: ItemType;
|
|
11960
11620
|
/**
|
|
11961
11621
|
* Represents an item that can place a lit pumpkin within
|
|
@@ -11993,6 +11653,7 @@ export class MinecraftItemTypes {
|
|
|
11993
11653
|
* glazed terracotta within Minecraft.
|
|
11994
11654
|
*/
|
|
11995
11655
|
static readonly magentaGlazedTerracotta: ItemType;
|
|
11656
|
+
static readonly magentaWool: ItemType;
|
|
11996
11657
|
/**
|
|
11997
11658
|
* Represents magma within Minecraft.
|
|
11998
11659
|
*/
|
|
@@ -12199,6 +11860,7 @@ export class MinecraftItemTypes {
|
|
|
12199
11860
|
* glazed terracotta within Minecraft.
|
|
12200
11861
|
*/
|
|
12201
11862
|
static readonly orangeGlazedTerracotta: ItemType;
|
|
11863
|
+
static readonly orangeWool: ItemType;
|
|
12202
11864
|
/**
|
|
12203
11865
|
* Represents an item that can place a block of oxidized copper
|
|
12204
11866
|
* within Minecraft.
|
|
@@ -12248,6 +11910,7 @@ export class MinecraftItemTypes {
|
|
|
12248
11910
|
* glazed terracotta within Minecraft.
|
|
12249
11911
|
*/
|
|
12250
11912
|
static readonly pinkGlazedTerracotta: ItemType;
|
|
11913
|
+
static readonly pinkWool: ItemType;
|
|
12251
11914
|
/**
|
|
12252
11915
|
* Represents an item that can place a piston within Minecraft.
|
|
12253
11916
|
*/
|
|
@@ -12400,6 +12063,7 @@ export class MinecraftItemTypes {
|
|
|
12400
12063
|
* glazed terracotta within Minecraft.
|
|
12401
12064
|
*/
|
|
12402
12065
|
static readonly purpleGlazedTerracotta: ItemType;
|
|
12066
|
+
static readonly purpleWool: ItemType;
|
|
12403
12067
|
/**
|
|
12404
12068
|
* Represents an item that can place a purpur block within
|
|
12405
12069
|
* Minecraft.
|
|
@@ -12528,6 +12192,7 @@ export class MinecraftItemTypes {
|
|
|
12528
12192
|
* Minecraft.
|
|
12529
12193
|
*/
|
|
12530
12194
|
static readonly redstoneTorch: ItemType;
|
|
12195
|
+
static readonly redWool: ItemType;
|
|
12531
12196
|
static readonly reinforcedDeepslate: ItemType;
|
|
12532
12197
|
static readonly repeater: ItemType;
|
|
12533
12198
|
/**
|
|
@@ -13168,6 +12833,7 @@ export class MinecraftItemTypes {
|
|
|
13168
12833
|
* terracotta within Minecraft.
|
|
13169
12834
|
*/
|
|
13170
12835
|
static readonly whiteGlazedTerracotta: ItemType;
|
|
12836
|
+
static readonly whiteWool: ItemType;
|
|
13171
12837
|
static readonly witchSpawnEgg: ItemType;
|
|
13172
12838
|
/**
|
|
13173
12839
|
* Represents an item that can place a wither rose within
|
|
@@ -13228,6 +12894,7 @@ export class MinecraftItemTypes {
|
|
|
13228
12894
|
* terracotta within Minecraft.
|
|
13229
12895
|
*/
|
|
13230
12896
|
static readonly yellowGlazedTerracotta: ItemType;
|
|
12897
|
+
static readonly yellowWool: ItemType;
|
|
13231
12898
|
static readonly zoglinSpawnEgg: ItemType;
|
|
13232
12899
|
static readonly zombieHorseSpawnEgg: ItemType;
|
|
13233
12900
|
static readonly zombiePigmanSpawnEgg: ItemType;
|
|
@@ -13287,32 +12954,7 @@ export class NavigationResult {
|
|
|
13287
12954
|
* including to the requested destination.
|
|
13288
12955
|
*/
|
|
13289
12956
|
readonly isFullPath: boolean;
|
|
13290
|
-
|
|
13291
|
-
* A set of block locations that comprise the navigation route.
|
|
13292
|
-
*/
|
|
13293
|
-
readonly path: BlockLocation[];
|
|
13294
|
-
}
|
|
13295
|
-
/**
|
|
13296
|
-
* @beta
|
|
13297
|
-
* Represents a min/max structure for expressing a potential
|
|
13298
|
-
* range of numbers.
|
|
13299
|
-
*/
|
|
13300
|
-
export class NumberRange {
|
|
13301
|
-
protected constructor();
|
|
13302
|
-
/**
|
|
13303
|
-
* Maximum value within a range.
|
|
13304
|
-
*/
|
|
13305
|
-
max: number;
|
|
13306
|
-
/**
|
|
13307
|
-
* Minimum value within a range.
|
|
13308
|
-
*/
|
|
13309
|
-
min: number;
|
|
13310
|
-
/**
|
|
13311
|
-
* @remarks
|
|
13312
|
-
* Returns a random number between the minimum and maximum of
|
|
13313
|
-
* the range.
|
|
13314
|
-
*/
|
|
13315
|
-
next(): number;
|
|
12957
|
+
getPath(): Vector3[];
|
|
13316
12958
|
}
|
|
13317
12959
|
/**
|
|
13318
12960
|
* @beta
|
|
@@ -13352,21 +12994,23 @@ export class PistonActivateEventSignal {
|
|
|
13352
12994
|
* @param callback
|
|
13353
12995
|
* @example pistonEvent.ts
|
|
13354
12996
|
* ```typescript
|
|
13355
|
-
*
|
|
12997
|
+
* let canceled = false;
|
|
12998
|
+
*
|
|
12999
|
+
* const pistonLoc: mc.Vector3 = {
|
|
13000
|
+
* x: Math.floor(targetLocation.x) + 1,
|
|
13001
|
+
* y: Math.floor(targetLocation.y) + 2,
|
|
13002
|
+
* z: Math.floor(targetLocation.z) + 1,
|
|
13003
|
+
* };
|
|
13004
|
+
*
|
|
13005
|
+
* const pistonCallback = mc.world.events.beforePistonActivate.subscribe((pistonEvent: mc.BeforePistonActivateEvent) => {
|
|
13006
|
+
* if (pistonEvent.piston.location.equals(pistonLoc)) {
|
|
13007
|
+
* log("Cancelling piston event");
|
|
13008
|
+
* pistonEvent.cancel = true;
|
|
13009
|
+
* canceled = true;
|
|
13010
|
+
* }
|
|
13011
|
+
* });
|
|
13356
13012
|
*
|
|
13357
|
-
* const pistonLoc = new mc.BlockLocation(
|
|
13358
|
-
* Math.floor(targetLocation.x) + 1,
|
|
13359
|
-
* Math.floor(targetLocation.y) + 2,
|
|
13360
|
-
* Math.floor(targetLocation.z) + 1
|
|
13361
|
-
* );
|
|
13362
13013
|
*
|
|
13363
|
-
* const pistonCallback = mc.world.events.beforePistonActivate.subscribe((pistonEvent: mc.BeforePistonActivateEvent) => {
|
|
13364
|
-
* if (pistonEvent.piston.location.equals(pistonLoc)) {
|
|
13365
|
-
* log("Cancelling piston event");
|
|
13366
|
-
* pistonEvent.cancel = true;
|
|
13367
|
-
* canceled = true;
|
|
13368
|
-
* }
|
|
13369
|
-
* });
|
|
13370
13014
|
* ```
|
|
13371
13015
|
*/
|
|
13372
13016
|
subscribe(callback: (arg: PistonActivateEvent) => void): (arg: PistonActivateEvent) => void;
|
|
@@ -13390,12 +13034,6 @@ export class Player extends Entity {
|
|
|
13390
13034
|
* @throws This property can throw when used.
|
|
13391
13035
|
*/
|
|
13392
13036
|
readonly dimension: Dimension;
|
|
13393
|
-
/**
|
|
13394
|
-
* @beta
|
|
13395
|
-
* Location of the center of the head component of the player.
|
|
13396
|
-
* @throws This property can throw when used.
|
|
13397
|
-
*/
|
|
13398
|
-
readonly headLocation: Location;
|
|
13399
13037
|
/**
|
|
13400
13038
|
* Unique identifier of the player. This identifier is intended
|
|
13401
13039
|
* to be consistent across loads of a world instance. No
|
|
@@ -13432,12 +13070,6 @@ export class Player extends Entity {
|
|
|
13432
13070
|
* Player.
|
|
13433
13071
|
*/
|
|
13434
13072
|
readonly onScreenDisplay: ScreenDisplay;
|
|
13435
|
-
/**
|
|
13436
|
-
* @beta
|
|
13437
|
-
* Main rotation of the entity.
|
|
13438
|
-
* @throws This property can throw when used.
|
|
13439
|
-
*/
|
|
13440
|
-
readonly rotation: XYRotation;
|
|
13441
13073
|
/**
|
|
13442
13074
|
* @beta
|
|
13443
13075
|
* Returns a scoreboard identity that represents this entity.
|
|
@@ -13449,6 +13081,7 @@ export class Player extends Entity {
|
|
|
13449
13081
|
* Manages the selected slot in the player's hotbar.
|
|
13450
13082
|
*/
|
|
13451
13083
|
selectedSlot: number;
|
|
13084
|
+
readonly spawnDimension?: Dimension;
|
|
13452
13085
|
/**
|
|
13453
13086
|
* @beta
|
|
13454
13087
|
* Retrieves or sets an entity that is used as the target of
|
|
@@ -13465,18 +13098,6 @@ export class Player extends Entity {
|
|
|
13465
13098
|
* @throws This property can throw when used.
|
|
13466
13099
|
*/
|
|
13467
13100
|
readonly typeId: string;
|
|
13468
|
-
/**
|
|
13469
|
-
* @beta
|
|
13470
|
-
* Current speed of the player across X, Y, and Z dimensions.
|
|
13471
|
-
* @throws This property can throw when used.
|
|
13472
|
-
*/
|
|
13473
|
-
readonly velocity: Vector;
|
|
13474
|
-
/**
|
|
13475
|
-
* @beta
|
|
13476
|
-
* Direction that the player is looking, from their head.
|
|
13477
|
-
* @throws This property can throw when used.
|
|
13478
|
-
*/
|
|
13479
|
-
readonly viewDirection: Vector3;
|
|
13480
13101
|
readonly xpEarnedAtCurrentLevel: number;
|
|
13481
13102
|
/**
|
|
13482
13103
|
* @beta
|
|
@@ -13504,6 +13125,10 @@ export class Player extends Entity {
|
|
|
13504
13125
|
*/
|
|
13505
13126
|
addTag(tag: string): boolean;
|
|
13506
13127
|
applyDamage(amount: number, source?: EntityDamageSource): boolean;
|
|
13128
|
+
applyImpulse(vector: Vector3): void;
|
|
13129
|
+
applyKnockback(directionX: number, directionZ: number, horizontalStrength: number, verticalStrength: number): void;
|
|
13130
|
+
clearSpawn(): void;
|
|
13131
|
+
clearVelocity(): void;
|
|
13507
13132
|
extinguishFire(useEffects?: boolean): boolean;
|
|
13508
13133
|
/**
|
|
13509
13134
|
* @beta
|
|
@@ -13566,6 +13191,7 @@ export class Player extends Entity {
|
|
|
13566
13191
|
* @throws This function can throw errors.
|
|
13567
13192
|
*/
|
|
13568
13193
|
getEntitiesFromViewDirection(options?: EntityRaycastOptions): Entity[];
|
|
13194
|
+
getHeadLocation(): Vector3;
|
|
13569
13195
|
/**
|
|
13570
13196
|
* @beta
|
|
13571
13197
|
* @remarks
|
|
@@ -13577,6 +13203,8 @@ export class Player extends Entity {
|
|
|
13577
13203
|
* @throws This function can throw errors.
|
|
13578
13204
|
*/
|
|
13579
13205
|
getItemCooldown(itemCategory: string): number;
|
|
13206
|
+
getRotation(): XYRotation;
|
|
13207
|
+
getSpawnPosition(): Vector3 | undefined;
|
|
13580
13208
|
/**
|
|
13581
13209
|
* @beta
|
|
13582
13210
|
* @remarks
|
|
@@ -13585,6 +13213,8 @@ export class Player extends Entity {
|
|
|
13585
13213
|
*/
|
|
13586
13214
|
getTags(): string[];
|
|
13587
13215
|
getTotalXp(): number;
|
|
13216
|
+
getVelocity(): Vector3;
|
|
13217
|
+
getViewDirection(): Vector3;
|
|
13588
13218
|
/**
|
|
13589
13219
|
* @beta
|
|
13590
13220
|
* @remarks
|
|
@@ -13619,6 +13249,7 @@ export class Player extends Entity {
|
|
|
13619
13249
|
* @throws This function can throw errors.
|
|
13620
13250
|
*/
|
|
13621
13251
|
kill(): void;
|
|
13252
|
+
playAnimation(animationName: string, options?: PlayAnimationOptions): void;
|
|
13622
13253
|
/**
|
|
13623
13254
|
* @beta
|
|
13624
13255
|
* @remarks
|
|
@@ -13672,6 +13303,7 @@ export class Player extends Entity {
|
|
|
13672
13303
|
* @throws This function can throw errors.
|
|
13673
13304
|
*/
|
|
13674
13305
|
runCommandAsync(commandString: string): Promise<CommandResult>;
|
|
13306
|
+
sendMessage(message: (RawMessage | string)[] | RawMessage | string): void;
|
|
13675
13307
|
/**
|
|
13676
13308
|
* @beta
|
|
13677
13309
|
* @remarks
|
|
@@ -13701,15 +13333,7 @@ export class Player extends Entity {
|
|
|
13701
13333
|
* @throws This function can throw errors.
|
|
13702
13334
|
*/
|
|
13703
13335
|
setRotation(degreesX: number, degreesY: number): void;
|
|
13704
|
-
|
|
13705
|
-
* @beta
|
|
13706
|
-
* @remarks
|
|
13707
|
-
* Sets a velocity for the entity to move with.
|
|
13708
|
-
* @param velocity
|
|
13709
|
-
* X/Y/Z components of the velocity.
|
|
13710
|
-
* @throws This function can throw errors.
|
|
13711
|
-
*/
|
|
13712
|
-
setVelocity(velocity: Vector3): void;
|
|
13336
|
+
setSpawn(spawnPosition: Vector3, spawnDimension: Dimension): void;
|
|
13713
13337
|
/**
|
|
13714
13338
|
* @beta
|
|
13715
13339
|
* @remarks
|
|
@@ -13760,15 +13384,6 @@ export class Player extends Entity {
|
|
|
13760
13384
|
* @throws This function can throw errors.
|
|
13761
13385
|
*/
|
|
13762
13386
|
teleportFacing(location: Vector3, dimension: Dimension, facingLocation: Vector3, keepVelocity?: boolean): void;
|
|
13763
|
-
/**
|
|
13764
|
-
* @beta
|
|
13765
|
-
* @remarks
|
|
13766
|
-
* Sends a message that is displayed on the connected client
|
|
13767
|
-
* for this player.
|
|
13768
|
-
* @param message
|
|
13769
|
-
* @throws This function can throw errors.
|
|
13770
|
-
*/
|
|
13771
|
-
tell(message: (RawMessage | string)[] | RawMessage | string): void;
|
|
13772
13387
|
/**
|
|
13773
13388
|
* @beta
|
|
13774
13389
|
* @remarks
|
|
@@ -14023,20 +13638,10 @@ export class PlayerSpawnEventSignal {
|
|
|
14023
13638
|
*/
|
|
14024
13639
|
export class ProjectileHitEvent {
|
|
14025
13640
|
protected constructor();
|
|
14026
|
-
/**
|
|
14027
|
-
* Contains additional information about the block that was hit
|
|
14028
|
-
* by the projectile, or undefined if the projectile did not
|
|
14029
|
-
* hit a block.
|
|
14030
|
-
*/
|
|
14031
|
-
readonly blockHit?: BlockHitInformation;
|
|
14032
13641
|
/**
|
|
14033
13642
|
* Dimension where this projectile hit took place.
|
|
14034
13643
|
*/
|
|
14035
13644
|
readonly dimension: Dimension;
|
|
14036
|
-
/**
|
|
14037
|
-
* Contains additional information about a block that was hit.
|
|
14038
|
-
*/
|
|
14039
|
-
readonly entityHit?: EntityHitInformation;
|
|
14040
13645
|
/**
|
|
14041
13646
|
* Direction vector of the projectile as it hit a block/entity.
|
|
14042
13647
|
*/
|
|
@@ -14044,7 +13649,7 @@ export class ProjectileHitEvent {
|
|
|
14044
13649
|
/**
|
|
14045
13650
|
* Location where the projectile hit occurred.
|
|
14046
13651
|
*/
|
|
14047
|
-
readonly location:
|
|
13652
|
+
readonly location: Vector3;
|
|
14048
13653
|
/**
|
|
14049
13654
|
* Entity for the projectile that hit a block/entity.
|
|
14050
13655
|
*/
|
|
@@ -14053,6 +13658,8 @@ export class ProjectileHitEvent {
|
|
|
14053
13658
|
* Optional source entity that fired the projectile.
|
|
14054
13659
|
*/
|
|
14055
13660
|
readonly source: Entity;
|
|
13661
|
+
getBlockHit(): BlockHitInformation | undefined;
|
|
13662
|
+
getEntityHit(): EntityHitInformation | undefined;
|
|
14056
13663
|
}
|
|
14057
13664
|
/**
|
|
14058
13665
|
* @beta
|
|
@@ -14359,7 +13966,7 @@ export class Seat {
|
|
|
14359
13966
|
* Physical location of this seat, relative to the entity's
|
|
14360
13967
|
* location.
|
|
14361
13968
|
*/
|
|
14362
|
-
readonly position:
|
|
13969
|
+
readonly position: Vector3;
|
|
14363
13970
|
}
|
|
14364
13971
|
/**
|
|
14365
13972
|
* @beta
|
|
@@ -14396,18 +14003,16 @@ export class StringBlockProperty extends IBlockProperty {
|
|
|
14396
14003
|
* Name of this property.
|
|
14397
14004
|
*/
|
|
14398
14005
|
readonly name: string;
|
|
14399
|
-
/**
|
|
14400
|
-
* A list of allowed values for this string property.
|
|
14401
|
-
*/
|
|
14402
|
-
readonly validValues: string[];
|
|
14403
14006
|
/**
|
|
14404
14007
|
* The current value of this property.
|
|
14405
14008
|
* @throws
|
|
14406
14009
|
* Setting this property can throw if the value passed is not
|
|
14407
14010
|
* valid for the property. Use {@link
|
|
14408
|
-
* StringBlockProperty.validValues} to check
|
|
14011
|
+
* @minecraft/server.StringBlockProperty.validValues} to check
|
|
14012
|
+
* allowed values.
|
|
14409
14013
|
*/
|
|
14410
14014
|
value: string;
|
|
14015
|
+
getValidValues(): string[];
|
|
14411
14016
|
}
|
|
14412
14017
|
/**
|
|
14413
14018
|
* A class that provides system-level events and functions.
|
|
@@ -14433,14 +14038,6 @@ export class System {
|
|
|
14433
14038
|
* @param runId
|
|
14434
14039
|
*/
|
|
14435
14040
|
clearRun(runId: number): void;
|
|
14436
|
-
/**
|
|
14437
|
-
* @beta
|
|
14438
|
-
* @remarks
|
|
14439
|
-
* Cancels the execution of a scheduled function run that was
|
|
14440
|
-
* previously scheduled via the `runSchedule` function.
|
|
14441
|
-
* @param runScheduleId
|
|
14442
|
-
*/
|
|
14443
|
-
clearRunSchedule(runScheduleId: number): void;
|
|
14444
14041
|
/**
|
|
14445
14042
|
* @remarks
|
|
14446
14043
|
* Runs a specified function at a future time. This is
|
|
@@ -14454,23 +14051,8 @@ export class System {
|
|
|
14454
14051
|
* function to cancel the execution of this run.
|
|
14455
14052
|
*/
|
|
14456
14053
|
run(callback: () => void): number;
|
|
14457
|
-
|
|
14458
|
-
|
|
14459
|
-
* @remarks
|
|
14460
|
-
* Runs a specified function at a scheduled interval. This is
|
|
14461
|
-
* frequently used to implement delayed behaviors and game
|
|
14462
|
-
* loops.
|
|
14463
|
-
* @param callback
|
|
14464
|
-
* Function callback to run on the specified schedule.
|
|
14465
|
-
* @param tickInterval
|
|
14466
|
-
* The number of ticks to run this function within - run this
|
|
14467
|
-
* function every `tickInterval` ticks.
|
|
14468
|
-
* @returns
|
|
14469
|
-
* An opaque identifier that can be used with the
|
|
14470
|
-
* `clearRunSchedule` function to cancel the execution of this
|
|
14471
|
-
* scheduled run.
|
|
14472
|
-
*/
|
|
14473
|
-
runSchedule(callback: () => void, tickInterval?: number): number;
|
|
14054
|
+
runInterval(callback: () => void, tickInterval?: number): number;
|
|
14055
|
+
runTimeout(callback: () => void, tickDelay?: number): number;
|
|
14474
14056
|
}
|
|
14475
14057
|
/**
|
|
14476
14058
|
* @beta
|
|
@@ -14781,6 +14363,7 @@ export class World {
|
|
|
14781
14363
|
* @throws This function can throw errors.
|
|
14782
14364
|
*/
|
|
14783
14365
|
getAllPlayers(): Player[];
|
|
14366
|
+
getDefaultSpawnPosition(): Vector3;
|
|
14784
14367
|
/**
|
|
14785
14368
|
* @remarks
|
|
14786
14369
|
* Returns a dimension object.
|
|
@@ -14851,15 +14434,8 @@ export class World {
|
|
|
14851
14434
|
* @throws This function can throw errors.
|
|
14852
14435
|
*/
|
|
14853
14436
|
removeDynamicProperty(identifier: string): boolean;
|
|
14854
|
-
|
|
14855
|
-
|
|
14856
|
-
* @remarks
|
|
14857
|
-
* Broadcasts a message that is displayed on all connected
|
|
14858
|
-
* clients.
|
|
14859
|
-
* @param message
|
|
14860
|
-
* @throws This function can throw errors.
|
|
14861
|
-
*/
|
|
14862
|
-
say(message: (RawMessage | string)[] | RawMessage | string): void;
|
|
14437
|
+
sendMessage(message: (RawMessage | string)[] | RawMessage | string): void;
|
|
14438
|
+
setDefaultSpawn(spawnPosition: Vector3): void;
|
|
14863
14439
|
/**
|
|
14864
14440
|
* @beta
|
|
14865
14441
|
* @remarks
|
|
@@ -14959,6 +14535,28 @@ export class XYRotation {
|
|
|
14959
14535
|
export interface BlockFillOptions {
|
|
14960
14536
|
matchingBlock?: BlockPermutation;
|
|
14961
14537
|
}
|
|
14538
|
+
/**
|
|
14539
|
+
* @beta
|
|
14540
|
+
* Contains more information for events where a block is hit.
|
|
14541
|
+
*/
|
|
14542
|
+
export interface BlockHitInformation {
|
|
14543
|
+
/**
|
|
14544
|
+
* Block that was hit.
|
|
14545
|
+
*/
|
|
14546
|
+
block: Block;
|
|
14547
|
+
/**
|
|
14548
|
+
* Face of the block that was hit.
|
|
14549
|
+
*/
|
|
14550
|
+
face: Direction;
|
|
14551
|
+
/**
|
|
14552
|
+
* X coordinate on the face that was hit.
|
|
14553
|
+
*/
|
|
14554
|
+
faceLocationX: number;
|
|
14555
|
+
/**
|
|
14556
|
+
* Y coordinate on the face that was hit.
|
|
14557
|
+
*/
|
|
14558
|
+
faceLocationY: number;
|
|
14559
|
+
}
|
|
14962
14560
|
/**
|
|
14963
14561
|
* @beta
|
|
14964
14562
|
* Contains additional options for configuring a block raycast
|
|
@@ -14980,6 +14578,32 @@ export interface BlockRaycastOptions {
|
|
|
14980
14578
|
*/
|
|
14981
14579
|
maxDistance?: number;
|
|
14982
14580
|
}
|
|
14581
|
+
/**
|
|
14582
|
+
* @beta
|
|
14583
|
+
* Represents a fully customizable color within Minecraft.
|
|
14584
|
+
*/
|
|
14585
|
+
export interface Color {
|
|
14586
|
+
/**
|
|
14587
|
+
* Determines a color's alpha (opacity) component. Valid values
|
|
14588
|
+
* are between 0 (transparent) and 1.0 (opaque).
|
|
14589
|
+
*/
|
|
14590
|
+
alpha: number;
|
|
14591
|
+
/**
|
|
14592
|
+
* Determines a color's blue component. Valid values are
|
|
14593
|
+
* between 0 and 1.0.
|
|
14594
|
+
*/
|
|
14595
|
+
blue: number;
|
|
14596
|
+
/**
|
|
14597
|
+
* Determines a color's green component. Valid values are
|
|
14598
|
+
* between 0 and 1.0.
|
|
14599
|
+
*/
|
|
14600
|
+
green: number;
|
|
14601
|
+
/**
|
|
14602
|
+
* Determines a color's red component. Valid values are between
|
|
14603
|
+
* 0 and 1.0.
|
|
14604
|
+
*/
|
|
14605
|
+
red: number;
|
|
14606
|
+
}
|
|
14983
14607
|
export interface EntityDamageSource {
|
|
14984
14608
|
cause: EntityDamageCause;
|
|
14985
14609
|
damagingEntity?: Entity;
|
|
@@ -15025,6 +14649,17 @@ export interface EntityEventOptions {
|
|
|
15025
14649
|
*/
|
|
15026
14650
|
entityTypes?: string[];
|
|
15027
14651
|
}
|
|
14652
|
+
/**
|
|
14653
|
+
* @beta
|
|
14654
|
+
* Contains additional information about an entity that was
|
|
14655
|
+
* hit.
|
|
14656
|
+
*/
|
|
14657
|
+
export interface EntityHitInformation {
|
|
14658
|
+
/**
|
|
14659
|
+
* Entity that was hit.
|
|
14660
|
+
*/
|
|
14661
|
+
entity: Entity;
|
|
14662
|
+
}
|
|
15028
14663
|
/**
|
|
15029
14664
|
* @beta
|
|
15030
14665
|
* Contains options for selecting entities within an area.
|
|
@@ -15083,7 +14718,7 @@ export interface EntityQueryOptions {
|
|
|
15083
14718
|
* conjunction with closest, farthest, limit, volume, and
|
|
15084
14719
|
* distance properties.
|
|
15085
14720
|
*/
|
|
15086
|
-
location?:
|
|
14721
|
+
location?: Vector3;
|
|
15087
14722
|
/**
|
|
15088
14723
|
* If specified, includes entities that are less than this
|
|
15089
14724
|
* distance away from the location specified in the location
|
|
@@ -15228,12 +14863,38 @@ export interface MusicOptions {
|
|
|
15228
14863
|
*/
|
|
15229
14864
|
volume?: number;
|
|
15230
14865
|
}
|
|
14866
|
+
/**
|
|
14867
|
+
* @beta
|
|
14868
|
+
* Represents a min/max structure for expressing a potential
|
|
14869
|
+
* range of numbers.
|
|
14870
|
+
*/
|
|
14871
|
+
export interface NumberRange {
|
|
14872
|
+
/**
|
|
14873
|
+
* Maximum value within a range.
|
|
14874
|
+
*/
|
|
14875
|
+
max: number;
|
|
14876
|
+
/**
|
|
14877
|
+
* Minimum value within a range.
|
|
14878
|
+
*/
|
|
14879
|
+
min: number;
|
|
14880
|
+
}
|
|
14881
|
+
export interface PlayAnimationOptions {
|
|
14882
|
+
blendOutTime?: number;
|
|
14883
|
+
controller?: string;
|
|
14884
|
+
nextState?: string;
|
|
14885
|
+
stopExpression?: string;
|
|
14886
|
+
}
|
|
15231
14887
|
export interface RawMessage {
|
|
15232
14888
|
rawtext?: (RawMessage | string)[];
|
|
14889
|
+
score?: RawMessageScore;
|
|
15233
14890
|
text?: string;
|
|
15234
14891
|
translate?: string;
|
|
15235
14892
|
with?: string[] | RawMessage;
|
|
15236
14893
|
}
|
|
14894
|
+
export interface RawMessageScore {
|
|
14895
|
+
name?: string;
|
|
14896
|
+
objective?: string;
|
|
14897
|
+
}
|
|
15237
14898
|
/**
|
|
15238
14899
|
* @beta
|
|
15239
14900
|
* Contains additional options for how a scoreboard should be
|
|
@@ -15261,7 +14922,7 @@ export interface SoundOptions {
|
|
|
15261
14922
|
/**
|
|
15262
14923
|
* Specifies a location of where to play a particular sound.
|
|
15263
14924
|
*/
|
|
15264
|
-
location?:
|
|
14925
|
+
location?: Vector3;
|
|
15265
14926
|
/**
|
|
15266
14927
|
* Pitch adjustment level for the sound.
|
|
15267
14928
|
*/
|