@minecraft/server-gametest 1.0.0-beta.00001b50 → 1.0.0-beta.11940b23

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.
Files changed (3) hide show
  1. package/index.d.ts +14 -6
  2. package/package.json +2 -2
  3. package/tests.ts +3 -2
package/index.d.ts CHANGED
@@ -16,7 +16,7 @@
16
16
  * ```json
17
17
  * {
18
18
  * "module_name": "@minecraft/server-gametest",
19
- * "version": "1.0.0-internal.00001b50"
19
+ * "version": "1.0.0-internal.11940b23"
20
20
  * }
21
21
  * ```
22
22
  *
@@ -322,7 +322,10 @@ export class SimulatedPlayer extends minecraftserver.Player {
322
322
  */
323
323
  readonly headRotation: minecraftserver.XYRotation;
324
324
  /**
325
- * Identifier for the player.
325
+ * Unique identifier of the player. This identifier is intended
326
+ * to be consistent across loads of a world instance. No
327
+ * meaning should be inferred from the value and structure of
328
+ * this unique identifier - do not parse or interpret it.
326
329
  * @throws This property can throw when used.
327
330
  */
328
331
  readonly id: string;
@@ -334,7 +337,7 @@ export class SimulatedPlayer extends minecraftserver.Player {
334
337
  * Current location of the player.
335
338
  * @throws This property can throw when used.
336
339
  */
337
- readonly location: minecraftserver.IVec3;
340
+ readonly location: minecraftserver.Location;
338
341
  /**
339
342
  * Name of the player.
340
343
  * @throws This property can throw when used.
@@ -369,6 +372,11 @@ export class SimulatedPlayer extends minecraftserver.Player {
369
372
  * @throws This property can throw when used.
370
373
  */
371
374
  readonly target: minecraftserver.Entity;
375
+ /**
376
+ * Unique identifier of the type of the entity - for example,
377
+ * 'minecraft:player'.
378
+ * @throws This property can throw when used.
379
+ */
372
380
  readonly typeId: string;
373
381
  /**
374
382
  * Current speed of the player across X, Y, and Z dimensions.
@@ -1511,7 +1519,7 @@ export class Test {
1511
1519
  * A location relative to the GameTest command block.
1512
1520
  * @throws This function can throw errors.
1513
1521
  */
1514
- relativeBlockLocation(worldBlockLocation: minecraftserver.IVec3): minecraftserver.BlockLocation;
1522
+ relativeBlockLocation(worldBlockLocation: minecraftserver.BlockLocation): minecraftserver.BlockLocation;
1515
1523
  /**
1516
1524
  * @remarks
1517
1525
  * From a location, returns a new location with coordinates
@@ -1526,7 +1534,7 @@ export class Test {
1526
1534
  * A location relative to the GameTest command block.
1527
1535
  * @throws This function can throw errors.
1528
1536
  */
1529
- relativeLocation(worldLocation: minecraftserver.IVec3): minecraftserver.Location;
1537
+ relativeLocation(worldLocation: minecraftserver.Location): minecraftserver.Location;
1530
1538
  /**
1531
1539
  * @remarks
1532
1540
  * Removes a simulated player from the world.
@@ -1993,7 +2001,7 @@ export class Test {
1993
2001
  * An absolute location relative to the GameTest command block.
1994
2002
  * @throws This function can throw errors.
1995
2003
  */
1996
- worldLocation(relativeLocation: minecraftserver.IVec3): minecraftserver.Location;
2004
+ worldLocation(relativeLocation: minecraftserver.Location): minecraftserver.Location;
1997
2005
  protected constructor();
1998
2006
  }
1999
2007
  /**
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@minecraft/server-gametest",
3
- "version": "1.0.0-beta.00001b50",
3
+ "version": "1.0.0-beta.11940b23",
4
4
  "description": "",
5
5
  "contributors": [
6
6
  {
@@ -13,7 +13,7 @@
13
13
  }
14
14
  ],
15
15
  "dependencies": {
16
- "@minecraft/server": "1.0.0-beta.00001b50"
16
+ "@minecraft/server": "1.0.0-beta.11940b23"
17
17
  },
18
18
  "license": "MIT"
19
19
  }
package/tests.ts CHANGED
@@ -1,6 +1,7 @@
1
+ /* eslint-disable @typescript-eslint/no-unused-vars */
1
2
  import * as mc from '@minecraft/server';
2
3
 
3
- export function simpleMobTest() {
4
+ export function simpleMobTest(log: (message: string, status?: number) => void, targetLocation: mc.Location) {
4
5
  gt.register('StarterTests', 'simpleMobTest', (test: gt.Test) => {
5
6
  const attackerId = 'fox';
6
7
  const victimId = 'chicken';
@@ -127,7 +128,7 @@ export default class SampleManager {
127
128
  }
128
129
  }
129
130
 
130
- import * as gt from '@minecraft/server-gametest';
131
+ import * as gt from '@minecraft/server-gametest'; // keep in for gametest samples
131
132
 
132
133
  const mojangGameTestFuncs: {
133
134
  [name: string]: Array<(log: (message: string, status?: number) => void, location: mc.Location) => void>;