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