@minecraft/server-gametest 1.0.0-beta.1.20.30-preview.24 → 1.0.0-beta.1.20.30-stable
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/index.d.ts +108 -2
- package/package.json +2 -2
package/index.d.ts
CHANGED
|
@@ -17,7 +17,7 @@
|
|
|
17
17
|
* ```json
|
|
18
18
|
* {
|
|
19
19
|
* "module_name": "@minecraft/server-gametest",
|
|
20
|
-
* "version": "1.0.0-internal.1.20.30-
|
|
20
|
+
* "version": "1.0.0-internal.1.20.30-stable"
|
|
21
21
|
* }
|
|
22
22
|
* ```
|
|
23
23
|
*
|
|
@@ -386,7 +386,10 @@ export class SculkSpreader {
|
|
|
386
386
|
* how a player moves throughout the world and to support
|
|
387
387
|
* testing of how entities and the environment will react to a
|
|
388
388
|
* player. This type derives much of its structure and methods
|
|
389
|
-
* from the {@link @minecraft/server.Player} type.
|
|
389
|
+
* from the {@link @minecraft/server.Player} type. Note that
|
|
390
|
+
* many types of events that may be available for entities more
|
|
391
|
+
* broadly, such as item use events, may not fire in the same
|
|
392
|
+
* capacity for simulated players.
|
|
390
393
|
*/
|
|
391
394
|
// @ts-ignore Class inheritance allowed for native defined classes
|
|
392
395
|
export class SimulatedPlayer extends minecraftserver.Player {
|
|
@@ -919,6 +922,8 @@ export class Test {
|
|
|
919
922
|
* Message that is passed if the _condition_ does not evaluate
|
|
920
923
|
* to true.
|
|
921
924
|
* @throws This function can throw errors.
|
|
925
|
+
*
|
|
926
|
+
* {@link GameTestError}
|
|
922
927
|
*/
|
|
923
928
|
assert(condition: boolean, message: string): void;
|
|
924
929
|
/**
|
|
@@ -935,6 +940,8 @@ export class Test {
|
|
|
935
940
|
* specified type is at the location. If false, tests that a
|
|
936
941
|
* block of the specified type is not present.
|
|
937
942
|
* @throws This function can throw errors.
|
|
943
|
+
*
|
|
944
|
+
* {@link GameTestError}
|
|
938
945
|
*/
|
|
939
946
|
assertBlockPresent(
|
|
940
947
|
blockType: minecraftserver.BlockType | string,
|
|
@@ -953,6 +960,8 @@ export class Test {
|
|
|
953
960
|
* Callback function that contains additional tests based on
|
|
954
961
|
* the block at the specified location.
|
|
955
962
|
* @throws This function can throw errors.
|
|
963
|
+
*
|
|
964
|
+
* {@link GameTestError}
|
|
956
965
|
* @example testIfButtonNotPressed.js
|
|
957
966
|
* ```typescript
|
|
958
967
|
* test.assertBlockState(buttonPos, (block) => {
|
|
@@ -977,6 +986,8 @@ export class Test {
|
|
|
977
986
|
* false, tests whether the mob is not able to reach the
|
|
978
987
|
* location.
|
|
979
988
|
* @throws This function can throw errors.
|
|
989
|
+
*
|
|
990
|
+
* {@link GameTestError}
|
|
980
991
|
*/
|
|
981
992
|
assertCanReachLocation(
|
|
982
993
|
mob: minecraftserver.Entity,
|
|
@@ -997,6 +1008,8 @@ export class Test {
|
|
|
997
1008
|
* Location of the block with a container (for example, a
|
|
998
1009
|
* chest) to test the contents of.
|
|
999
1010
|
* @throws This function can throw errors.
|
|
1011
|
+
*
|
|
1012
|
+
* {@link GameTestError}
|
|
1000
1013
|
*/
|
|
1001
1014
|
assertContainerContains(itemStack: minecraftserver.ItemStack, blockLocation: minecraftserver.Vector3): void;
|
|
1002
1015
|
/**
|
|
@@ -1008,6 +1021,8 @@ export class Test {
|
|
|
1008
1021
|
* Location of the block with a container (for example, a
|
|
1009
1022
|
* chest) to test is empty of contents.
|
|
1010
1023
|
* @throws This function can throw errors.
|
|
1024
|
+
*
|
|
1025
|
+
* {@link GameTestError}
|
|
1011
1026
|
*/
|
|
1012
1027
|
assertContainerEmpty(blockLocation: minecraftserver.Vector3): void;
|
|
1013
1028
|
/**
|
|
@@ -1030,6 +1045,8 @@ export class Test {
|
|
|
1030
1045
|
* Whether or not the entity is expected to have the specified
|
|
1031
1046
|
* armor equipped.
|
|
1032
1047
|
* @throws This function can throw errors.
|
|
1048
|
+
*
|
|
1049
|
+
* {@link GameTestError}
|
|
1033
1050
|
* @example horseArmorTest.js
|
|
1034
1051
|
* ```typescript
|
|
1035
1052
|
* test.assertEntityHasArmor("minecraft:horse", armorSlotTorso, "diamond_horse_armor", 0, horseLocation, true);
|
|
@@ -1062,6 +1079,8 @@ export class Test {
|
|
|
1062
1079
|
* Determines whether to test that the component exists, or
|
|
1063
1080
|
* does not.
|
|
1064
1081
|
* @throws This function can throw errors.
|
|
1082
|
+
*
|
|
1083
|
+
* {@link GameTestError}
|
|
1065
1084
|
* @example sheepShearedTest.js
|
|
1066
1085
|
* ```typescript
|
|
1067
1086
|
* test.assertEntityHasComponent("minecraft:sheep", "minecraft:is_sheared", entityLoc, false);
|
|
@@ -1088,6 +1107,8 @@ export class Test {
|
|
|
1088
1107
|
* Whether to test that an entity is present or not present at
|
|
1089
1108
|
* the specified location.
|
|
1090
1109
|
* @throws This function can throw errors.
|
|
1110
|
+
*
|
|
1111
|
+
* {@link GameTestError}
|
|
1091
1112
|
*/
|
|
1092
1113
|
assertEntityInstancePresent(
|
|
1093
1114
|
entity: minecraftserver.Entity,
|
|
@@ -1106,6 +1127,8 @@ export class Test {
|
|
|
1106
1127
|
* present in the GameTest area. If false, tests that the
|
|
1107
1128
|
* specified entity is not present.
|
|
1108
1129
|
* @throws This function can throw errors.
|
|
1130
|
+
*
|
|
1131
|
+
* {@link GameTestError}
|
|
1109
1132
|
* @example simpleMobTest.ts
|
|
1110
1133
|
* ```typescript
|
|
1111
1134
|
* gt.register("StarterTests", "simpleMobTest", (test: gt.Test) => {
|
|
@@ -1148,6 +1171,8 @@ export class Test {
|
|
|
1148
1171
|
* specified type is present. If false, tests that an entity of
|
|
1149
1172
|
* the specified type is not present.
|
|
1150
1173
|
* @throws This function can throw errors.
|
|
1174
|
+
*
|
|
1175
|
+
* {@link GameTestError}
|
|
1151
1176
|
*/
|
|
1152
1177
|
assertEntityPresent(
|
|
1153
1178
|
entityTypeIdentifier: string,
|
|
@@ -1169,6 +1194,8 @@ export class Test {
|
|
|
1169
1194
|
* specified type is present in the GameTest area. If false,
|
|
1170
1195
|
* tests that an entity of the specified type is not present.
|
|
1171
1196
|
* @throws This function can throw errors.
|
|
1197
|
+
*
|
|
1198
|
+
* {@link GameTestError}
|
|
1172
1199
|
* @example simpleMobTest.ts
|
|
1173
1200
|
* ```typescript
|
|
1174
1201
|
* gt.register("StarterTests", "simpleMobTest", (test: gt.Test) => {
|
|
@@ -1207,6 +1234,8 @@ export class Test {
|
|
|
1207
1234
|
* entity with the specified identifier is found, an exception
|
|
1208
1235
|
* is thrown.
|
|
1209
1236
|
* @throws This function can throw errors.
|
|
1237
|
+
*
|
|
1238
|
+
* {@link GameTestError}
|
|
1210
1239
|
* @example villagerEffectTest.js
|
|
1211
1240
|
* ```typescript
|
|
1212
1241
|
* test.assertEntityState(
|
|
@@ -1238,6 +1267,8 @@ export class Test {
|
|
|
1238
1267
|
* the specified location. If false, tests that an entity is
|
|
1239
1268
|
* not testing the specified location.
|
|
1240
1269
|
* @throws This function can throw errors.
|
|
1270
|
+
*
|
|
1271
|
+
* {@link GameTestError}
|
|
1241
1272
|
*/
|
|
1242
1273
|
assertEntityTouching(entityTypeIdentifier: string, location: minecraftserver.Vector3, isTouching?: boolean): void;
|
|
1243
1274
|
/**
|
|
@@ -1253,6 +1284,8 @@ export class Test {
|
|
|
1253
1284
|
* Whether to test that the block at _position_ is expected to
|
|
1254
1285
|
* be waterlogged.
|
|
1255
1286
|
* @throws This function can throw errors.
|
|
1287
|
+
*
|
|
1288
|
+
* {@link GameTestError}
|
|
1256
1289
|
*/
|
|
1257
1290
|
assertIsWaterlogged(blockLocation: minecraftserver.Vector3, isWaterlogged?: boolean): void;
|
|
1258
1291
|
/**
|
|
@@ -1270,6 +1303,8 @@ export class Test {
|
|
|
1270
1303
|
* @param count
|
|
1271
1304
|
* Number of items, at minimum, to look and test for.
|
|
1272
1305
|
* @throws This function can throw errors.
|
|
1306
|
+
*
|
|
1307
|
+
* {@link GameTestError}
|
|
1273
1308
|
* @example findFeathers.js
|
|
1274
1309
|
* ```typescript
|
|
1275
1310
|
* test.assertItemEntityCountIs(Items.feather, expectedFeatherLoc, 0, 1);
|
|
@@ -1299,6 +1334,8 @@ export class Test {
|
|
|
1299
1334
|
* specified type is present. If false, tests that an item
|
|
1300
1335
|
* entity of the specified type is not present.
|
|
1301
1336
|
* @throws This function can throw errors.
|
|
1337
|
+
*
|
|
1338
|
+
* {@link GameTestError}
|
|
1302
1339
|
*/
|
|
1303
1340
|
assertItemEntityPresent(
|
|
1304
1341
|
itemType: minecraftserver.ItemType | string,
|
|
@@ -1316,6 +1353,8 @@ export class Test {
|
|
|
1316
1353
|
* @param power
|
|
1317
1354
|
* Expected power level.
|
|
1318
1355
|
* @throws This function can throw errors.
|
|
1356
|
+
*
|
|
1357
|
+
* {@link GameTestError}
|
|
1319
1358
|
*/
|
|
1320
1359
|
assertRedstonePower(blockLocation: minecraftserver.Vector3, power: number): void;
|
|
1321
1360
|
/**
|
|
@@ -1329,6 +1368,8 @@ export class Test {
|
|
|
1329
1368
|
* @param dropResources
|
|
1330
1369
|
* Whether to add resources exposed with a particular drop.
|
|
1331
1370
|
* @throws This function can throw errors.
|
|
1371
|
+
*
|
|
1372
|
+
* {@link GameTestError}
|
|
1332
1373
|
*/
|
|
1333
1374
|
destroyBlock(blockLocation: minecraftserver.Vector3, dropResources?: boolean): void;
|
|
1334
1375
|
/**
|
|
@@ -1361,6 +1402,8 @@ export class Test {
|
|
|
1361
1402
|
* @param blockLocation
|
|
1362
1403
|
* Location of the block to retrieve.
|
|
1363
1404
|
* @throws This function can throw errors.
|
|
1405
|
+
*
|
|
1406
|
+
* {@link minecraftserver.GameTestError}
|
|
1364
1407
|
*/
|
|
1365
1408
|
getBlock(blockLocation: minecraftserver.Vector3): minecraftserver.Block;
|
|
1366
1409
|
/**
|
|
@@ -1368,6 +1411,8 @@ export class Test {
|
|
|
1368
1411
|
* Gets the dimension of this test.
|
|
1369
1412
|
*
|
|
1370
1413
|
* @throws This function can throw errors.
|
|
1414
|
+
*
|
|
1415
|
+
* {@link minecraftserver.GameTestError}
|
|
1371
1416
|
*/
|
|
1372
1417
|
getDimension(): minecraftserver.Dimension;
|
|
1373
1418
|
/**
|
|
@@ -1381,6 +1426,8 @@ export class Test {
|
|
|
1381
1426
|
* @param blockLocation
|
|
1382
1427
|
* Location of the block to retrieve.
|
|
1383
1428
|
* @throws This function can throw errors.
|
|
1429
|
+
*
|
|
1430
|
+
* {@link GameTestError}
|
|
1384
1431
|
*/
|
|
1385
1432
|
getFenceConnectivity(blockLocation: minecraftserver.Vector3): FenceConnectivity;
|
|
1386
1433
|
/**
|
|
@@ -1392,7 +1439,12 @@ export class Test {
|
|
|
1392
1439
|
*
|
|
1393
1440
|
* @param blockLocation
|
|
1394
1441
|
* Location of the block to retrieve a sculk spreader from.
|
|
1442
|
+
* @returns
|
|
1443
|
+
* Returns the SculkSpreader or undefined if no SculkSpreader
|
|
1444
|
+
* is present on the block.
|
|
1395
1445
|
* @throws This function can throw errors.
|
|
1446
|
+
*
|
|
1447
|
+
* {@link GameTestError}
|
|
1396
1448
|
*/
|
|
1397
1449
|
getSculkSpreader(blockLocation: minecraftserver.Vector3): SculkSpreader;
|
|
1398
1450
|
/**
|
|
@@ -1421,6 +1473,8 @@ export class Test {
|
|
|
1421
1473
|
* This function can't be called in read-only mode.
|
|
1422
1474
|
*
|
|
1423
1475
|
* @throws This function can throw errors.
|
|
1476
|
+
*
|
|
1477
|
+
* {@link GameTestError}
|
|
1424
1478
|
*/
|
|
1425
1479
|
killAllEntities(): void;
|
|
1426
1480
|
/**
|
|
@@ -1428,6 +1482,8 @@ export class Test {
|
|
|
1428
1482
|
* This function can't be called in read-only mode.
|
|
1429
1483
|
*
|
|
1430
1484
|
* @throws This function can throw errors.
|
|
1485
|
+
*
|
|
1486
|
+
* {@link GameTestError}
|
|
1431
1487
|
*/
|
|
1432
1488
|
onPlayerJump(mob: minecraftserver.Entity, jumpAmount: number): void;
|
|
1433
1489
|
/**
|
|
@@ -1441,6 +1497,8 @@ export class Test {
|
|
|
1441
1497
|
* @throws
|
|
1442
1498
|
* Will throw an error if a button is not present at the
|
|
1443
1499
|
* specified position.
|
|
1500
|
+
*
|
|
1501
|
+
* {@link GameTestError}
|
|
1444
1502
|
*/
|
|
1445
1503
|
pressButton(blockLocation: minecraftserver.Vector3): void;
|
|
1446
1504
|
/**
|
|
@@ -1452,6 +1510,8 @@ export class Test {
|
|
|
1452
1510
|
* @param text
|
|
1453
1511
|
* Message to display.
|
|
1454
1512
|
* @throws This function can throw errors.
|
|
1513
|
+
*
|
|
1514
|
+
* {@link GameTestError}
|
|
1455
1515
|
*/
|
|
1456
1516
|
print(text: string): void;
|
|
1457
1517
|
/**
|
|
@@ -1465,6 +1525,8 @@ export class Test {
|
|
|
1465
1525
|
* @throws
|
|
1466
1526
|
* Will throw an error if a lever is not present at the
|
|
1467
1527
|
* specified position.
|
|
1528
|
+
*
|
|
1529
|
+
* {@link GameTestError}
|
|
1468
1530
|
*/
|
|
1469
1531
|
pullLever(blockLocation: minecraftserver.Vector3): void;
|
|
1470
1532
|
/**
|
|
@@ -1479,6 +1541,8 @@ export class Test {
|
|
|
1479
1541
|
* @param duration
|
|
1480
1542
|
* Number of ticks to pulse Redstone.
|
|
1481
1543
|
* @throws This function can throw errors.
|
|
1544
|
+
*
|
|
1545
|
+
* {@link GameTestError}
|
|
1482
1546
|
*/
|
|
1483
1547
|
pulseRedstone(blockLocation: minecraftserver.Vector3, duration: number): void;
|
|
1484
1548
|
/**
|
|
@@ -1495,6 +1559,8 @@ export class Test {
|
|
|
1495
1559
|
* @returns
|
|
1496
1560
|
* A location relative to the GameTest command block.
|
|
1497
1561
|
* @throws This function can throw errors.
|
|
1562
|
+
*
|
|
1563
|
+
* {@link minecraftserver.GameTestError}
|
|
1498
1564
|
*/
|
|
1499
1565
|
relativeBlockLocation(worldBlockLocation: minecraftserver.Vector3): minecraftserver.Vector3;
|
|
1500
1566
|
/**
|
|
@@ -1513,6 +1579,8 @@ export class Test {
|
|
|
1513
1579
|
* @returns
|
|
1514
1580
|
* A location relative to the GameTest command block.
|
|
1515
1581
|
* @throws This function can throw errors.
|
|
1582
|
+
*
|
|
1583
|
+
* {@link minecraftserver.GameTestError}
|
|
1516
1584
|
*/
|
|
1517
1585
|
relativeLocation(worldLocation: minecraftserver.Vector3): minecraftserver.Vector3;
|
|
1518
1586
|
/**
|
|
@@ -1540,6 +1608,8 @@ export class Test {
|
|
|
1540
1608
|
* test direction; Passing in Direction.north will return the
|
|
1541
1609
|
* opposite of the test direction, and so on.
|
|
1542
1610
|
* @throws This function can throw errors.
|
|
1611
|
+
*
|
|
1612
|
+
* {@link minecraftserver.GameTestError}
|
|
1543
1613
|
*/
|
|
1544
1614
|
rotateDirection(direction: minecraftserver.Direction): minecraftserver.Direction;
|
|
1545
1615
|
/**
|
|
@@ -1547,6 +1617,8 @@ export class Test {
|
|
|
1547
1617
|
* This function can't be called in read-only mode.
|
|
1548
1618
|
*
|
|
1549
1619
|
* @throws This function can throw errors.
|
|
1620
|
+
*
|
|
1621
|
+
* {@link minecraftserver.GameTestError}
|
|
1550
1622
|
*/
|
|
1551
1623
|
rotateVector(vector: minecraftserver.Vector3): minecraftserver.Vector3;
|
|
1552
1624
|
/**
|
|
@@ -1591,6 +1663,8 @@ export class Test {
|
|
|
1591
1663
|
* @param blockLocation
|
|
1592
1664
|
* Location of the block to set.
|
|
1593
1665
|
* @throws This function can throw errors.
|
|
1666
|
+
*
|
|
1667
|
+
* {@link GameTestError}
|
|
1594
1668
|
*/
|
|
1595
1669
|
setBlockPermutation(blockData: minecraftserver.BlockPermutation, blockLocation: minecraftserver.Vector3): void;
|
|
1596
1670
|
/**
|
|
@@ -1605,6 +1679,8 @@ export class Test {
|
|
|
1605
1679
|
* @param blockLocation
|
|
1606
1680
|
* Location of the block to set.
|
|
1607
1681
|
* @throws This function can throw errors.
|
|
1682
|
+
*
|
|
1683
|
+
* {@link GameTestError}
|
|
1608
1684
|
*/
|
|
1609
1685
|
setBlockType(blockType: minecraftserver.BlockType | string, blockLocation: minecraftserver.Vector3): void;
|
|
1610
1686
|
/**
|
|
@@ -1620,6 +1696,8 @@ export class Test {
|
|
|
1620
1696
|
* Type of fluid to set. See {@link
|
|
1621
1697
|
* @minecraft/server-gametest.FluidType} for a list of values.
|
|
1622
1698
|
* @throws This function can throw errors.
|
|
1699
|
+
*
|
|
1700
|
+
* {@link GameTestError}
|
|
1623
1701
|
*/
|
|
1624
1702
|
setFluidContainer(location: minecraftserver.Vector3, type: minecraftserver.FluidType): void;
|
|
1625
1703
|
/**
|
|
@@ -1633,6 +1711,8 @@ export class Test {
|
|
|
1633
1711
|
* @param fuseLength
|
|
1634
1712
|
* Length of time, in ticks, before the entity explodes.
|
|
1635
1713
|
* @throws This function can throw errors.
|
|
1714
|
+
*
|
|
1715
|
+
* {@link GameTestError}
|
|
1636
1716
|
*/
|
|
1637
1717
|
setTntFuse(entity: minecraftserver.Entity, fuseLength: number): void;
|
|
1638
1718
|
/**
|
|
@@ -1650,6 +1730,8 @@ export class Test {
|
|
|
1650
1730
|
* The spawned entity. If the entity cannot be spawned, returns
|
|
1651
1731
|
* undefined.
|
|
1652
1732
|
* @throws This function can throw errors.
|
|
1733
|
+
*
|
|
1734
|
+
* {@link minecraftserver.GameTestError}
|
|
1653
1735
|
* @example simpleMobTest.ts
|
|
1654
1736
|
* ```typescript
|
|
1655
1737
|
* gt.register("StarterTests", "simpleMobTest", (test: gt.Test) => {
|
|
@@ -1690,6 +1772,8 @@ export class Test {
|
|
|
1690
1772
|
* The spawned entity. If the entity cannot be spawned, returns
|
|
1691
1773
|
* undefined.
|
|
1692
1774
|
* @throws This function can throw errors.
|
|
1775
|
+
*
|
|
1776
|
+
* {@link minecraftserver.GameTestError}
|
|
1693
1777
|
* @example spawnAdultPig.js
|
|
1694
1778
|
* ```typescript
|
|
1695
1779
|
* test.spawn("minecraft:pig<minecraft:ageable_grow_up>", { x: 1.5, y: 2, z: 1.5 });
|
|
@@ -1707,6 +1791,8 @@ export class Test {
|
|
|
1707
1791
|
* @param location
|
|
1708
1792
|
* Location to create the item entity at.
|
|
1709
1793
|
* @throws This function can throw errors.
|
|
1794
|
+
*
|
|
1795
|
+
* {@link minecraftserver.GameTestError}
|
|
1710
1796
|
* @example spawnEmeralds.js
|
|
1711
1797
|
* ```typescript
|
|
1712
1798
|
* const oneEmerald = new ItemStack(MinecraftItemTypes.Emerald, 1, 0);
|
|
@@ -1728,6 +1814,8 @@ export class Test {
|
|
|
1728
1814
|
* @param name
|
|
1729
1815
|
* Name to give the new simulated player.
|
|
1730
1816
|
* @throws This function can throw errors.
|
|
1817
|
+
*
|
|
1818
|
+
* {@link GameTestError}
|
|
1731
1819
|
*/
|
|
1732
1820
|
spawnSimulatedPlayer(
|
|
1733
1821
|
blockLocation: minecraftserver.Vector3,
|
|
@@ -1745,6 +1833,8 @@ export class Test {
|
|
|
1745
1833
|
* @param blockLocation
|
|
1746
1834
|
* Location where the entity should be spawned.
|
|
1747
1835
|
* @throws This function can throw errors.
|
|
1836
|
+
*
|
|
1837
|
+
* {@link minecraftserver.GameTestError}
|
|
1748
1838
|
*/
|
|
1749
1839
|
spawnWithoutBehaviors(entityTypeIdentifier: string, blockLocation: minecraftserver.Vector3): minecraftserver.Entity;
|
|
1750
1840
|
/**
|
|
@@ -1758,6 +1848,8 @@ export class Test {
|
|
|
1758
1848
|
* @param location
|
|
1759
1849
|
* Location where the entity should be spawned.
|
|
1760
1850
|
* @throws This function can throw errors.
|
|
1851
|
+
*
|
|
1852
|
+
* {@link minecraftserver.GameTestError}
|
|
1761
1853
|
*/
|
|
1762
1854
|
spawnWithoutBehaviorsAtLocation(
|
|
1763
1855
|
entityTypeIdentifier: string,
|
|
@@ -1778,6 +1870,8 @@ export class Test {
|
|
|
1778
1870
|
* Direction to spread. Use the Minecraft.Direction enum to
|
|
1779
1871
|
* specify a direction.
|
|
1780
1872
|
* @throws This function can throw errors.
|
|
1873
|
+
*
|
|
1874
|
+
* {@link GameTestError}
|
|
1781
1875
|
* @example spreadFromFaceTowardDirection.js
|
|
1782
1876
|
* ```typescript
|
|
1783
1877
|
* test.spreadFromFaceTowardDirection({ x: 1, y: 2, z: 1 }, Direction.south, Direction.down);
|
|
@@ -1903,6 +1997,8 @@ export class Test {
|
|
|
1903
1997
|
* specified type is present. If false, tests that a block of
|
|
1904
1998
|
* the specified type is not present.
|
|
1905
1999
|
* @throws This function can throw errors.
|
|
2000
|
+
*
|
|
2001
|
+
* {@link GameTestError}
|
|
1906
2002
|
*/
|
|
1907
2003
|
succeedWhenBlockPresent(
|
|
1908
2004
|
blockType: minecraftserver.BlockType | string,
|
|
@@ -1976,6 +2072,8 @@ export class Test {
|
|
|
1976
2072
|
* minecraft:grow_up, minecraft:grow_down and
|
|
1977
2073
|
* minecraft:grow_sideways.
|
|
1978
2074
|
* @throws This function can throw errors.
|
|
2075
|
+
*
|
|
2076
|
+
* {@link GameTestError}
|
|
1979
2077
|
*/
|
|
1980
2078
|
triggerInternalBlockEvent(blockLocation: minecraftserver.Vector3, event: string, eventParameters?: number[]): void;
|
|
1981
2079
|
/**
|
|
@@ -2007,6 +2105,8 @@ export class Test {
|
|
|
2007
2105
|
* @param speedModifier
|
|
2008
2106
|
* Adjustable modifier to the mob's walking speed.
|
|
2009
2107
|
* @throws This function can throw errors.
|
|
2108
|
+
*
|
|
2109
|
+
* {@link GameTestError}
|
|
2010
2110
|
*/
|
|
2011
2111
|
walkTo(mob: minecraftserver.Entity, blockLocation: minecraftserver.Vector3, speedModifier?: number): void;
|
|
2012
2112
|
/**
|
|
@@ -2025,6 +2125,8 @@ export class Test {
|
|
|
2025
2125
|
* @param speedModifier
|
|
2026
2126
|
* Adjustable modifier to the mob's walking speed.
|
|
2027
2127
|
* @throws This function can throw errors.
|
|
2128
|
+
*
|
|
2129
|
+
* {@link GameTestError}
|
|
2028
2130
|
*/
|
|
2029
2131
|
walkToLocation(mob: minecraftserver.Entity, location: minecraftserver.Vector3, speedModifier?: number): void;
|
|
2030
2132
|
/**
|
|
@@ -2039,6 +2141,8 @@ export class Test {
|
|
|
2039
2141
|
* @returns
|
|
2040
2142
|
* An absolute location relative to the GameTest command block.
|
|
2041
2143
|
* @throws This function can throw errors.
|
|
2144
|
+
*
|
|
2145
|
+
* {@link minecraftserver.GameTestError}
|
|
2042
2146
|
*/
|
|
2043
2147
|
worldBlockLocation(relativeBlockLocation: minecraftserver.Vector3): minecraftserver.Vector3;
|
|
2044
2148
|
/**
|
|
@@ -2053,6 +2157,8 @@ export class Test {
|
|
|
2053
2157
|
* @returns
|
|
2054
2158
|
* An absolute location relative to the GameTest command block.
|
|
2055
2159
|
* @throws This function can throw errors.
|
|
2160
|
+
*
|
|
2161
|
+
* {@link minecraftserver.GameTestError}
|
|
2056
2162
|
*/
|
|
2057
2163
|
worldLocation(relativeLocation: minecraftserver.Vector3): minecraftserver.Vector3;
|
|
2058
2164
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@minecraft/server-gametest",
|
|
3
|
-
"version": "1.0.0-beta.1.20.30-
|
|
3
|
+
"version": "1.0.0-beta.1.20.30-stable",
|
|
4
4
|
"description": "",
|
|
5
5
|
"contributors": [
|
|
6
6
|
{
|
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
}
|
|
14
14
|
],
|
|
15
15
|
"dependencies": {
|
|
16
|
-
"@minecraft/server": "^1.6.0-beta.1.20.30-
|
|
16
|
+
"@minecraft/server": "^1.6.0-beta.1.20.30-stable"
|
|
17
17
|
},
|
|
18
18
|
"license": "MIT"
|
|
19
19
|
}
|