@minecraft/server-gametest 1.0.0-beta.1.20.40-preview.21 → 1.0.0-beta.1.20.40-preview.22
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/index.d.ts +102 -1
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -6,4 +6,4 @@ The @minecraft/server-gametest module provides scriptable APIs for scaffolding a
|
|
|
6
6
|
|
|
7
7
|
See full documentation for this module here:
|
|
8
8
|
|
|
9
|
-
https://learn.microsoft.com/en-us/minecraft/creator/scriptapi
|
|
9
|
+
https://learn.microsoft.com/en-us/minecraft/creator/scriptapi/minecraft/server-gametest/minecraft-server-gametest
|
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.40-preview.
|
|
20
|
+
* "version": "1.0.0-internal.1.20.40-preview.22"
|
|
21
21
|
* }
|
|
22
22
|
* ```
|
|
23
23
|
*
|
|
@@ -908,6 +908,7 @@ export class Tags {
|
|
|
908
908
|
*
|
|
909
909
|
*/
|
|
910
910
|
static readonly suiteDisabled = 'suite:disabled';
|
|
911
|
+
static readonly suiteNextUpdate = 'suite:nextupdate';
|
|
911
912
|
}
|
|
912
913
|
|
|
913
914
|
/**
|
|
@@ -929,6 +930,8 @@ export class Test {
|
|
|
929
930
|
* Message that is passed if the _condition_ does not evaluate
|
|
930
931
|
* to true.
|
|
931
932
|
* @throws This function can throw errors.
|
|
933
|
+
*
|
|
934
|
+
* {@link GameTestError}
|
|
932
935
|
*/
|
|
933
936
|
assert(condition: boolean, message: string): void;
|
|
934
937
|
/**
|
|
@@ -945,6 +948,8 @@ export class Test {
|
|
|
945
948
|
* specified type is at the location. If false, tests that a
|
|
946
949
|
* block of the specified type is not present.
|
|
947
950
|
* @throws This function can throw errors.
|
|
951
|
+
*
|
|
952
|
+
* {@link GameTestError}
|
|
948
953
|
*/
|
|
949
954
|
assertBlockPresent(
|
|
950
955
|
blockType: minecraftserver.BlockType | string,
|
|
@@ -963,6 +968,8 @@ export class Test {
|
|
|
963
968
|
* Callback function that contains additional tests based on
|
|
964
969
|
* the block at the specified location.
|
|
965
970
|
* @throws This function can throw errors.
|
|
971
|
+
*
|
|
972
|
+
* {@link GameTestError}
|
|
966
973
|
* @example testIfButtonNotPressed.js
|
|
967
974
|
* ```typescript
|
|
968
975
|
* test.assertBlockState(buttonPos, (block) => {
|
|
@@ -987,6 +994,8 @@ export class Test {
|
|
|
987
994
|
* false, tests whether the mob is not able to reach the
|
|
988
995
|
* location.
|
|
989
996
|
* @throws This function can throw errors.
|
|
997
|
+
*
|
|
998
|
+
* {@link GameTestError}
|
|
990
999
|
*/
|
|
991
1000
|
assertCanReachLocation(
|
|
992
1001
|
mob: minecraftserver.Entity,
|
|
@@ -1007,6 +1016,8 @@ export class Test {
|
|
|
1007
1016
|
* Location of the block with a container (for example, a
|
|
1008
1017
|
* chest) to test the contents of.
|
|
1009
1018
|
* @throws This function can throw errors.
|
|
1019
|
+
*
|
|
1020
|
+
* {@link GameTestError}
|
|
1010
1021
|
*/
|
|
1011
1022
|
assertContainerContains(itemStack: minecraftserver.ItemStack, blockLocation: minecraftserver.Vector3): void;
|
|
1012
1023
|
/**
|
|
@@ -1018,6 +1029,8 @@ export class Test {
|
|
|
1018
1029
|
* Location of the block with a container (for example, a
|
|
1019
1030
|
* chest) to test is empty of contents.
|
|
1020
1031
|
* @throws This function can throw errors.
|
|
1032
|
+
*
|
|
1033
|
+
* {@link GameTestError}
|
|
1021
1034
|
*/
|
|
1022
1035
|
assertContainerEmpty(blockLocation: minecraftserver.Vector3): void;
|
|
1023
1036
|
/**
|
|
@@ -1040,6 +1053,8 @@ export class Test {
|
|
|
1040
1053
|
* Whether or not the entity is expected to have the specified
|
|
1041
1054
|
* armor equipped.
|
|
1042
1055
|
* @throws This function can throw errors.
|
|
1056
|
+
*
|
|
1057
|
+
* {@link GameTestError}
|
|
1043
1058
|
* @example horseArmorTest.js
|
|
1044
1059
|
* ```typescript
|
|
1045
1060
|
* test.assertEntityHasArmor("minecraft:horse", armorSlotTorso, "diamond_horse_armor", 0, horseLocation, true);
|
|
@@ -1072,6 +1087,8 @@ export class Test {
|
|
|
1072
1087
|
* Determines whether to test that the component exists, or
|
|
1073
1088
|
* does not.
|
|
1074
1089
|
* @throws This function can throw errors.
|
|
1090
|
+
*
|
|
1091
|
+
* {@link GameTestError}
|
|
1075
1092
|
* @example sheepShearedTest.js
|
|
1076
1093
|
* ```typescript
|
|
1077
1094
|
* test.assertEntityHasComponent("minecraft:sheep", "minecraft:is_sheared", entityLoc, false);
|
|
@@ -1098,6 +1115,8 @@ export class Test {
|
|
|
1098
1115
|
* Whether to test that an entity is present or not present at
|
|
1099
1116
|
* the specified location.
|
|
1100
1117
|
* @throws This function can throw errors.
|
|
1118
|
+
*
|
|
1119
|
+
* {@link GameTestError}
|
|
1101
1120
|
*/
|
|
1102
1121
|
assertEntityInstancePresent(
|
|
1103
1122
|
entity: minecraftserver.Entity,
|
|
@@ -1116,6 +1135,8 @@ export class Test {
|
|
|
1116
1135
|
* present in the GameTest area. If false, tests that the
|
|
1117
1136
|
* specified entity is not present.
|
|
1118
1137
|
* @throws This function can throw errors.
|
|
1138
|
+
*
|
|
1139
|
+
* {@link GameTestError}
|
|
1119
1140
|
* @example simpleMobTest.ts
|
|
1120
1141
|
* ```typescript
|
|
1121
1142
|
* gt.register("StarterTests", "simpleMobTest", (test: gt.Test) => {
|
|
@@ -1158,6 +1179,8 @@ export class Test {
|
|
|
1158
1179
|
* specified type is present. If false, tests that an entity of
|
|
1159
1180
|
* the specified type is not present.
|
|
1160
1181
|
* @throws This function can throw errors.
|
|
1182
|
+
*
|
|
1183
|
+
* {@link GameTestError}
|
|
1161
1184
|
*/
|
|
1162
1185
|
assertEntityPresent(
|
|
1163
1186
|
entityTypeIdentifier: string,
|
|
@@ -1179,6 +1202,8 @@ export class Test {
|
|
|
1179
1202
|
* specified type is present in the GameTest area. If false,
|
|
1180
1203
|
* tests that an entity of the specified type is not present.
|
|
1181
1204
|
* @throws This function can throw errors.
|
|
1205
|
+
*
|
|
1206
|
+
* {@link GameTestError}
|
|
1182
1207
|
* @example simpleMobTest.ts
|
|
1183
1208
|
* ```typescript
|
|
1184
1209
|
* gt.register("StarterTests", "simpleMobTest", (test: gt.Test) => {
|
|
@@ -1217,6 +1242,8 @@ export class Test {
|
|
|
1217
1242
|
* entity with the specified identifier is found, an exception
|
|
1218
1243
|
* is thrown.
|
|
1219
1244
|
* @throws This function can throw errors.
|
|
1245
|
+
*
|
|
1246
|
+
* {@link GameTestError}
|
|
1220
1247
|
* @example villagerEffectTest.js
|
|
1221
1248
|
* ```typescript
|
|
1222
1249
|
* test.assertEntityState(
|
|
@@ -1248,6 +1275,8 @@ export class Test {
|
|
|
1248
1275
|
* the specified location. If false, tests that an entity is
|
|
1249
1276
|
* not testing the specified location.
|
|
1250
1277
|
* @throws This function can throw errors.
|
|
1278
|
+
*
|
|
1279
|
+
* {@link GameTestError}
|
|
1251
1280
|
*/
|
|
1252
1281
|
assertEntityTouching(entityTypeIdentifier: string, location: minecraftserver.Vector3, isTouching?: boolean): void;
|
|
1253
1282
|
/**
|
|
@@ -1263,6 +1292,8 @@ export class Test {
|
|
|
1263
1292
|
* Whether to test that the block at _position_ is expected to
|
|
1264
1293
|
* be waterlogged.
|
|
1265
1294
|
* @throws This function can throw errors.
|
|
1295
|
+
*
|
|
1296
|
+
* {@link GameTestError}
|
|
1266
1297
|
*/
|
|
1267
1298
|
assertIsWaterlogged(blockLocation: minecraftserver.Vector3, isWaterlogged?: boolean): void;
|
|
1268
1299
|
/**
|
|
@@ -1280,6 +1311,8 @@ export class Test {
|
|
|
1280
1311
|
* @param count
|
|
1281
1312
|
* Number of items, at minimum, to look and test for.
|
|
1282
1313
|
* @throws This function can throw errors.
|
|
1314
|
+
*
|
|
1315
|
+
* {@link GameTestError}
|
|
1283
1316
|
* @example findFeathers.js
|
|
1284
1317
|
* ```typescript
|
|
1285
1318
|
* test.assertItemEntityCountIs(Items.feather, expectedFeatherLoc, 0, 1);
|
|
@@ -1309,6 +1342,8 @@ export class Test {
|
|
|
1309
1342
|
* specified type is present. If false, tests that an item
|
|
1310
1343
|
* entity of the specified type is not present.
|
|
1311
1344
|
* @throws This function can throw errors.
|
|
1345
|
+
*
|
|
1346
|
+
* {@link GameTestError}
|
|
1312
1347
|
*/
|
|
1313
1348
|
assertItemEntityPresent(
|
|
1314
1349
|
itemType: minecraftserver.ItemType | string,
|
|
@@ -1326,6 +1361,8 @@ export class Test {
|
|
|
1326
1361
|
* @param power
|
|
1327
1362
|
* Expected power level.
|
|
1328
1363
|
* @throws This function can throw errors.
|
|
1364
|
+
*
|
|
1365
|
+
* {@link GameTestError}
|
|
1329
1366
|
*/
|
|
1330
1367
|
assertRedstonePower(blockLocation: minecraftserver.Vector3, power: number): void;
|
|
1331
1368
|
/**
|
|
@@ -1339,6 +1376,8 @@ export class Test {
|
|
|
1339
1376
|
* @param dropResources
|
|
1340
1377
|
* Whether to add resources exposed with a particular drop.
|
|
1341
1378
|
* @throws This function can throw errors.
|
|
1379
|
+
*
|
|
1380
|
+
* {@link GameTestError}
|
|
1342
1381
|
*/
|
|
1343
1382
|
destroyBlock(blockLocation: minecraftserver.Vector3, dropResources?: boolean): void;
|
|
1344
1383
|
/**
|
|
@@ -1371,6 +1410,8 @@ export class Test {
|
|
|
1371
1410
|
* @param blockLocation
|
|
1372
1411
|
* Location of the block to retrieve.
|
|
1373
1412
|
* @throws This function can throw errors.
|
|
1413
|
+
*
|
|
1414
|
+
* {@link minecraftserver.GameTestError}
|
|
1374
1415
|
*/
|
|
1375
1416
|
getBlock(blockLocation: minecraftserver.Vector3): minecraftserver.Block;
|
|
1376
1417
|
/**
|
|
@@ -1378,6 +1419,8 @@ export class Test {
|
|
|
1378
1419
|
* Gets the dimension of this test.
|
|
1379
1420
|
*
|
|
1380
1421
|
* @throws This function can throw errors.
|
|
1422
|
+
*
|
|
1423
|
+
* {@link minecraftserver.GameTestError}
|
|
1381
1424
|
*/
|
|
1382
1425
|
getDimension(): minecraftserver.Dimension;
|
|
1383
1426
|
/**
|
|
@@ -1391,6 +1434,8 @@ export class Test {
|
|
|
1391
1434
|
* @param blockLocation
|
|
1392
1435
|
* Location of the block to retrieve.
|
|
1393
1436
|
* @throws This function can throw errors.
|
|
1437
|
+
*
|
|
1438
|
+
* {@link GameTestError}
|
|
1394
1439
|
*/
|
|
1395
1440
|
getFenceConnectivity(blockLocation: minecraftserver.Vector3): FenceConnectivity;
|
|
1396
1441
|
/**
|
|
@@ -1406,6 +1451,8 @@ export class Test {
|
|
|
1406
1451
|
* Returns the SculkSpreader or undefined if no SculkSpreader
|
|
1407
1452
|
* is present on the block.
|
|
1408
1453
|
* @throws This function can throw errors.
|
|
1454
|
+
*
|
|
1455
|
+
* {@link GameTestError}
|
|
1409
1456
|
*/
|
|
1410
1457
|
getSculkSpreader(blockLocation: minecraftserver.Vector3): SculkSpreader | undefined;
|
|
1411
1458
|
/**
|
|
@@ -1434,6 +1481,8 @@ export class Test {
|
|
|
1434
1481
|
* This function can't be called in read-only mode.
|
|
1435
1482
|
*
|
|
1436
1483
|
* @throws This function can throw errors.
|
|
1484
|
+
*
|
|
1485
|
+
* {@link GameTestError}
|
|
1437
1486
|
*/
|
|
1438
1487
|
killAllEntities(): void;
|
|
1439
1488
|
/**
|
|
@@ -1441,6 +1490,8 @@ export class Test {
|
|
|
1441
1490
|
* This function can't be called in read-only mode.
|
|
1442
1491
|
*
|
|
1443
1492
|
* @throws This function can throw errors.
|
|
1493
|
+
*
|
|
1494
|
+
* {@link GameTestError}
|
|
1444
1495
|
*/
|
|
1445
1496
|
onPlayerJump(mob: minecraftserver.Entity, jumpAmount: number): void;
|
|
1446
1497
|
/**
|
|
@@ -1454,6 +1505,8 @@ export class Test {
|
|
|
1454
1505
|
* @throws
|
|
1455
1506
|
* Will throw an error if a button is not present at the
|
|
1456
1507
|
* specified position.
|
|
1508
|
+
*
|
|
1509
|
+
* {@link GameTestError}
|
|
1457
1510
|
*/
|
|
1458
1511
|
pressButton(blockLocation: minecraftserver.Vector3): void;
|
|
1459
1512
|
/**
|
|
@@ -1465,6 +1518,8 @@ export class Test {
|
|
|
1465
1518
|
* @param text
|
|
1466
1519
|
* Message to display.
|
|
1467
1520
|
* @throws This function can throw errors.
|
|
1521
|
+
*
|
|
1522
|
+
* {@link GameTestError}
|
|
1468
1523
|
*/
|
|
1469
1524
|
print(text: string): void;
|
|
1470
1525
|
/**
|
|
@@ -1478,6 +1533,8 @@ export class Test {
|
|
|
1478
1533
|
* @throws
|
|
1479
1534
|
* Will throw an error if a lever is not present at the
|
|
1480
1535
|
* specified position.
|
|
1536
|
+
*
|
|
1537
|
+
* {@link GameTestError}
|
|
1481
1538
|
*/
|
|
1482
1539
|
pullLever(blockLocation: minecraftserver.Vector3): void;
|
|
1483
1540
|
/**
|
|
@@ -1492,6 +1549,8 @@ export class Test {
|
|
|
1492
1549
|
* @param duration
|
|
1493
1550
|
* Number of ticks to pulse Redstone.
|
|
1494
1551
|
* @throws This function can throw errors.
|
|
1552
|
+
*
|
|
1553
|
+
* {@link GameTestError}
|
|
1495
1554
|
*/
|
|
1496
1555
|
pulseRedstone(blockLocation: minecraftserver.Vector3, duration: number): void;
|
|
1497
1556
|
/**
|
|
@@ -1508,6 +1567,8 @@ export class Test {
|
|
|
1508
1567
|
* @returns
|
|
1509
1568
|
* A location relative to the GameTest command block.
|
|
1510
1569
|
* @throws This function can throw errors.
|
|
1570
|
+
*
|
|
1571
|
+
* {@link minecraftserver.GameTestError}
|
|
1511
1572
|
*/
|
|
1512
1573
|
relativeBlockLocation(worldBlockLocation: minecraftserver.Vector3): minecraftserver.Vector3;
|
|
1513
1574
|
/**
|
|
@@ -1526,6 +1587,8 @@ export class Test {
|
|
|
1526
1587
|
* @returns
|
|
1527
1588
|
* A location relative to the GameTest command block.
|
|
1528
1589
|
* @throws This function can throw errors.
|
|
1590
|
+
*
|
|
1591
|
+
* {@link minecraftserver.GameTestError}
|
|
1529
1592
|
*/
|
|
1530
1593
|
relativeLocation(worldLocation: minecraftserver.Vector3): minecraftserver.Vector3;
|
|
1531
1594
|
/**
|
|
@@ -1553,6 +1616,8 @@ export class Test {
|
|
|
1553
1616
|
* test direction; Passing in Direction.north will return the
|
|
1554
1617
|
* opposite of the test direction, and so on.
|
|
1555
1618
|
* @throws This function can throw errors.
|
|
1619
|
+
*
|
|
1620
|
+
* {@link minecraftserver.GameTestError}
|
|
1556
1621
|
*/
|
|
1557
1622
|
rotateDirection(direction: minecraftserver.Direction): minecraftserver.Direction;
|
|
1558
1623
|
/**
|
|
@@ -1560,6 +1625,8 @@ export class Test {
|
|
|
1560
1625
|
* This function can't be called in read-only mode.
|
|
1561
1626
|
*
|
|
1562
1627
|
* @throws This function can throw errors.
|
|
1628
|
+
*
|
|
1629
|
+
* {@link minecraftserver.GameTestError}
|
|
1563
1630
|
*/
|
|
1564
1631
|
rotateVector(vector: minecraftserver.Vector3): minecraftserver.Vector3;
|
|
1565
1632
|
/**
|
|
@@ -1604,6 +1671,8 @@ export class Test {
|
|
|
1604
1671
|
* @param blockLocation
|
|
1605
1672
|
* Location of the block to set.
|
|
1606
1673
|
* @throws This function can throw errors.
|
|
1674
|
+
*
|
|
1675
|
+
* {@link GameTestError}
|
|
1607
1676
|
*/
|
|
1608
1677
|
setBlockPermutation(blockData: minecraftserver.BlockPermutation, blockLocation: minecraftserver.Vector3): void;
|
|
1609
1678
|
/**
|
|
@@ -1618,6 +1687,8 @@ export class Test {
|
|
|
1618
1687
|
* @param blockLocation
|
|
1619
1688
|
* Location of the block to set.
|
|
1620
1689
|
* @throws This function can throw errors.
|
|
1690
|
+
*
|
|
1691
|
+
* {@link GameTestError}
|
|
1621
1692
|
*/
|
|
1622
1693
|
setBlockType(blockType: minecraftserver.BlockType | string, blockLocation: minecraftserver.Vector3): void;
|
|
1623
1694
|
/**
|
|
@@ -1633,6 +1704,8 @@ export class Test {
|
|
|
1633
1704
|
* Type of fluid to set. See {@link
|
|
1634
1705
|
* @minecraft/server-gametest.FluidType} for a list of values.
|
|
1635
1706
|
* @throws This function can throw errors.
|
|
1707
|
+
*
|
|
1708
|
+
* {@link GameTestError}
|
|
1636
1709
|
*/
|
|
1637
1710
|
setFluidContainer(location: minecraftserver.Vector3, type: minecraftserver.FluidType): void;
|
|
1638
1711
|
/**
|
|
@@ -1646,6 +1719,8 @@ export class Test {
|
|
|
1646
1719
|
* @param fuseLength
|
|
1647
1720
|
* Length of time, in ticks, before the entity explodes.
|
|
1648
1721
|
* @throws This function can throw errors.
|
|
1722
|
+
*
|
|
1723
|
+
* {@link GameTestError}
|
|
1649
1724
|
*/
|
|
1650
1725
|
setTntFuse(entity: minecraftserver.Entity, fuseLength: number): void;
|
|
1651
1726
|
/**
|
|
@@ -1663,6 +1738,8 @@ export class Test {
|
|
|
1663
1738
|
* The spawned entity. If the entity cannot be spawned, returns
|
|
1664
1739
|
* undefined.
|
|
1665
1740
|
* @throws This function can throw errors.
|
|
1741
|
+
*
|
|
1742
|
+
* {@link minecraftserver.GameTestError}
|
|
1666
1743
|
* @example simpleMobTest.ts
|
|
1667
1744
|
* ```typescript
|
|
1668
1745
|
* gt.register("StarterTests", "simpleMobTest", (test: gt.Test) => {
|
|
@@ -1703,6 +1780,8 @@ export class Test {
|
|
|
1703
1780
|
* The spawned entity. If the entity cannot be spawned, returns
|
|
1704
1781
|
* undefined.
|
|
1705
1782
|
* @throws This function can throw errors.
|
|
1783
|
+
*
|
|
1784
|
+
* {@link minecraftserver.GameTestError}
|
|
1706
1785
|
* @example spawnAdultPig.js
|
|
1707
1786
|
* ```typescript
|
|
1708
1787
|
* test.spawn("minecraft:pig<minecraft:ageable_grow_up>", { x: 1.5, y: 2, z: 1.5 });
|
|
@@ -1720,6 +1799,8 @@ export class Test {
|
|
|
1720
1799
|
* @param location
|
|
1721
1800
|
* Location to create the item entity at.
|
|
1722
1801
|
* @throws This function can throw errors.
|
|
1802
|
+
*
|
|
1803
|
+
* {@link minecraftserver.GameTestError}
|
|
1723
1804
|
* @example spawnEmeralds.js
|
|
1724
1805
|
* ```typescript
|
|
1725
1806
|
* const oneEmerald = new ItemStack(MinecraftItemTypes.Emerald, 1, 0);
|
|
@@ -1741,6 +1822,8 @@ export class Test {
|
|
|
1741
1822
|
* @param name
|
|
1742
1823
|
* Name to give the new simulated player.
|
|
1743
1824
|
* @throws This function can throw errors.
|
|
1825
|
+
*
|
|
1826
|
+
* {@link GameTestError}
|
|
1744
1827
|
*/
|
|
1745
1828
|
spawnSimulatedPlayer(
|
|
1746
1829
|
blockLocation: minecraftserver.Vector3,
|
|
@@ -1758,6 +1841,8 @@ export class Test {
|
|
|
1758
1841
|
* @param blockLocation
|
|
1759
1842
|
* Location where the entity should be spawned.
|
|
1760
1843
|
* @throws This function can throw errors.
|
|
1844
|
+
*
|
|
1845
|
+
* {@link minecraftserver.GameTestError}
|
|
1761
1846
|
*/
|
|
1762
1847
|
spawnWithoutBehaviors(entityTypeIdentifier: string, blockLocation: minecraftserver.Vector3): minecraftserver.Entity;
|
|
1763
1848
|
/**
|
|
@@ -1771,6 +1856,8 @@ export class Test {
|
|
|
1771
1856
|
* @param location
|
|
1772
1857
|
* Location where the entity should be spawned.
|
|
1773
1858
|
* @throws This function can throw errors.
|
|
1859
|
+
*
|
|
1860
|
+
* {@link minecraftserver.GameTestError}
|
|
1774
1861
|
*/
|
|
1775
1862
|
spawnWithoutBehaviorsAtLocation(
|
|
1776
1863
|
entityTypeIdentifier: string,
|
|
@@ -1791,6 +1878,8 @@ export class Test {
|
|
|
1791
1878
|
* Direction to spread. Use the Minecraft.Direction enum to
|
|
1792
1879
|
* specify a direction.
|
|
1793
1880
|
* @throws This function can throw errors.
|
|
1881
|
+
*
|
|
1882
|
+
* {@link GameTestError}
|
|
1794
1883
|
* @example spreadFromFaceTowardDirection.js
|
|
1795
1884
|
* ```typescript
|
|
1796
1885
|
* test.spreadFromFaceTowardDirection({ x: 1, y: 2, z: 1 }, Direction.south, Direction.down);
|
|
@@ -1916,6 +2005,8 @@ export class Test {
|
|
|
1916
2005
|
* specified type is present. If false, tests that a block of
|
|
1917
2006
|
* the specified type is not present.
|
|
1918
2007
|
* @throws This function can throw errors.
|
|
2008
|
+
*
|
|
2009
|
+
* {@link GameTestError}
|
|
1919
2010
|
*/
|
|
1920
2011
|
succeedWhenBlockPresent(
|
|
1921
2012
|
blockType: minecraftserver.BlockType | string,
|
|
@@ -1989,6 +2080,8 @@ export class Test {
|
|
|
1989
2080
|
* minecraft:grow_up, minecraft:grow_down and
|
|
1990
2081
|
* minecraft:grow_sideways.
|
|
1991
2082
|
* @throws This function can throw errors.
|
|
2083
|
+
*
|
|
2084
|
+
* {@link GameTestError}
|
|
1992
2085
|
*/
|
|
1993
2086
|
triggerInternalBlockEvent(blockLocation: minecraftserver.Vector3, event: string, eventParameters?: number[]): void;
|
|
1994
2087
|
/**
|
|
@@ -2020,6 +2113,8 @@ export class Test {
|
|
|
2020
2113
|
* @param speedModifier
|
|
2021
2114
|
* Adjustable modifier to the mob's walking speed.
|
|
2022
2115
|
* @throws This function can throw errors.
|
|
2116
|
+
*
|
|
2117
|
+
* {@link GameTestError}
|
|
2023
2118
|
*/
|
|
2024
2119
|
walkTo(mob: minecraftserver.Entity, blockLocation: minecraftserver.Vector3, speedModifier?: number): void;
|
|
2025
2120
|
/**
|
|
@@ -2038,6 +2133,8 @@ export class Test {
|
|
|
2038
2133
|
* @param speedModifier
|
|
2039
2134
|
* Adjustable modifier to the mob's walking speed.
|
|
2040
2135
|
* @throws This function can throw errors.
|
|
2136
|
+
*
|
|
2137
|
+
* {@link GameTestError}
|
|
2041
2138
|
*/
|
|
2042
2139
|
walkToLocation(mob: minecraftserver.Entity, location: minecraftserver.Vector3, speedModifier?: number): void;
|
|
2043
2140
|
/**
|
|
@@ -2052,6 +2149,8 @@ export class Test {
|
|
|
2052
2149
|
* @returns
|
|
2053
2150
|
* An absolute location relative to the GameTest command block.
|
|
2054
2151
|
* @throws This function can throw errors.
|
|
2152
|
+
*
|
|
2153
|
+
* {@link minecraftserver.GameTestError}
|
|
2055
2154
|
*/
|
|
2056
2155
|
worldBlockLocation(relativeBlockLocation: minecraftserver.Vector3): minecraftserver.Vector3;
|
|
2057
2156
|
/**
|
|
@@ -2066,6 +2165,8 @@ export class Test {
|
|
|
2066
2165
|
* @returns
|
|
2067
2166
|
* An absolute location relative to the GameTest command block.
|
|
2068
2167
|
* @throws This function can throw errors.
|
|
2168
|
+
*
|
|
2169
|
+
* {@link minecraftserver.GameTestError}
|
|
2069
2170
|
*/
|
|
2070
2171
|
worldLocation(relativeLocation: minecraftserver.Vector3): minecraftserver.Vector3;
|
|
2071
2172
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@minecraft/server-gametest",
|
|
3
|
-
"version": "1.0.0-beta.1.20.40-preview.
|
|
3
|
+
"version": "1.0.0-beta.1.20.40-preview.22",
|
|
4
4
|
"description": "",
|
|
5
5
|
"contributors": [
|
|
6
6
|
{
|
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
}
|
|
14
14
|
],
|
|
15
15
|
"dependencies": {
|
|
16
|
-
"@minecraft/server": "^1.7.0-beta.1.20.40-preview.
|
|
16
|
+
"@minecraft/server": "^1.7.0-beta.1.20.40-preview.22"
|
|
17
17
|
},
|
|
18
18
|
"license": "MIT"
|
|
19
19
|
}
|