@minecraft/server-gametest 1.0.0-beta.release.1.19.40 → 1.0.0-beta.release.1.19.50

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 (2) hide show
  1. package/index.d.ts +19 -17
  2. package/package.json +2 -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.release.1.19.40"
19
+ * "version": "1.0.0-internal.release.1.19.50"
20
20
  * }
21
21
  * ```
22
22
  *
@@ -27,6 +27,7 @@ import * as minecraftserver from '@minecraft/server';
27
27
  * other fences in several directions.
28
28
  */
29
29
  export class FenceConnectivity {
30
+ protected constructor();
30
31
  /**
31
32
  * Represents whether this fence block is connected to another
32
33
  * fence to the east (x + 1).
@@ -47,7 +48,6 @@ export class FenceConnectivity {
47
48
  * fence to the west (x - 1).
48
49
  */
49
50
  readonly west: boolean;
50
- protected constructor();
51
51
  }
52
52
  /**
53
53
  * Executes a set of steps defined via chained .thenXyz
@@ -55,6 +55,7 @@ export class FenceConnectivity {
55
55
  * GameTest setup methods and assertions over time.
56
56
  */
57
57
  export class GameTestSequence {
58
+ protected constructor();
58
59
  /**
59
60
  * @remarks
60
61
  * Runs the given callback as a step within a GameTest
@@ -147,13 +148,13 @@ export class GameTestSequence {
147
148
  * method steps can be added.
148
149
  */
149
150
  thenWaitAfter(delayTicks: number, callback: () => void): GameTestSequence;
150
- protected constructor();
151
151
  }
152
152
  /**
153
153
  * A utility class to set GameTest parameters for a test.
154
154
  * Methods can be chained together to set multiple properties.
155
155
  */
156
156
  export class RegistrationBuilder {
157
+ protected constructor();
157
158
  /**
158
159
  * @remarks
159
160
  * Sets the batch for the test to run in.
@@ -256,7 +257,6 @@ export class RegistrationBuilder {
256
257
  * methods can be called.
257
258
  */
258
259
  tag(tag: string): RegistrationBuilder;
259
- protected constructor();
260
260
  }
261
261
  /**
262
262
  * Implements a class that can be used for testing sculk
@@ -264,6 +264,7 @@ export class RegistrationBuilder {
264
264
  * growth of sculk around a particular block.
265
265
  */
266
266
  export class SculkSpreader {
267
+ protected constructor();
267
268
  /**
268
269
  * Gets the maximum charge of a sculk spreader.
269
270
  * @throws This property can throw when used.
@@ -296,7 +297,6 @@ export class SculkSpreader {
296
297
  * @throws This function can throw errors.
297
298
  */
298
299
  getTotalCharge(): number;
299
- protected constructor();
300
300
  }
301
301
  /**
302
302
  * A simulated player can be used within GameTests to represent
@@ -306,6 +306,7 @@ export class SculkSpreader {
306
306
  * from the {@link @minecraft/server.Player} type.
307
307
  */
308
308
  export class SimulatedPlayer extends minecraftserver.Player {
309
+ protected constructor();
309
310
  /**
310
311
  * Dimension that the simulated player is currently within.
311
312
  * @throws This property can throw when used.
@@ -337,7 +338,7 @@ export class SimulatedPlayer extends minecraftserver.Player {
337
338
  * Current location of the player.
338
339
  * @throws This property can throw when used.
339
340
  */
340
- readonly location: minecraftserver.Location;
341
+ readonly location: minecraftserver.Vector3;
341
342
  /**
342
343
  * Name of the player.
343
344
  * @throws This property can throw when used.
@@ -577,6 +578,7 @@ export class SimulatedPlayer extends minecraftserver.Player {
577
578
  * @throws This function can throw errors.
578
579
  */
579
580
  interactWithEntity(entity: minecraftserver.Entity): boolean;
581
+ isOp(): boolean;
580
582
  /**
581
583
  * @remarks
582
584
  * Causes the simulated player to jump.
@@ -739,7 +741,6 @@ export class SimulatedPlayer extends minecraftserver.Player {
739
741
  * @throws This function can throw errors.
740
742
  */
741
743
  rotateBody(angleInDegrees: number): void;
742
- runCommand(commandString: string): any;
743
744
  /**
744
745
  * @remarks
745
746
  * Runs a particular command asynchronously from the context of
@@ -793,6 +794,7 @@ export class SimulatedPlayer extends minecraftserver.Player {
793
794
  * @throws This function can throw errors.
794
795
  */
795
796
  setItem(itemStack: minecraftserver.ItemStack, slot: number, selectSlot?: boolean): boolean;
797
+ setOp(isOp: boolean): void;
796
798
  /**
797
799
  * @remarks
798
800
  * Sets the main rotation of the entity.
@@ -808,7 +810,7 @@ export class SimulatedPlayer extends minecraftserver.Player {
808
810
  * X/Y/Z components of the velocity.
809
811
  * @throws This function can throw errors.
810
812
  */
811
- setVelocity(velocity: minecraftserver.IVec3): void;
813
+ setVelocity(velocity: minecraftserver.Vector3): void;
812
814
  /**
813
815
  * @remarks
814
816
  * Sets the item cooldown time for a particular cooldown
@@ -861,7 +863,7 @@ export class SimulatedPlayer extends minecraftserver.Player {
861
863
  * @throws This function can throw errors.
862
864
  */
863
865
  teleport(
864
- location: minecraftserver.IVec3,
866
+ location: minecraftserver.Vector3,
865
867
  dimension: minecraftserver.Dimension,
866
868
  xRotation: number,
867
869
  yRotation: number,
@@ -881,9 +883,9 @@ export class SimulatedPlayer extends minecraftserver.Player {
881
883
  * @throws This function can throw errors.
882
884
  */
883
885
  teleportFacing(
884
- location: minecraftserver.IVec3,
886
+ location: minecraftserver.Vector3,
885
887
  dimension: minecraftserver.Dimension,
886
- facingLocation: minecraftserver.IVec3,
888
+ facingLocation: minecraftserver.Vector3,
887
889
  keepVelocity?: boolean,
888
890
  ): void;
889
891
  /**
@@ -972,7 +974,6 @@ export class SimulatedPlayer extends minecraftserver.Player {
972
974
  faceLocationX?: number,
973
975
  faceLocationY?: number,
974
976
  ): boolean;
975
- protected constructor();
976
977
  }
977
978
  /**
978
979
  * These well-known tags can be used to classify different
@@ -980,6 +981,7 @@ export class SimulatedPlayer extends minecraftserver.Player {
980
981
  */
981
982
  // tslint:disable-next-line:no-unnecessary-class
982
983
  export class Tags {
984
+ protected constructor();
983
985
  /**
984
986
  * Indicates that the tagged test should be a part of all
985
987
  * suites.
@@ -1000,7 +1002,6 @@ export class Tags {
1000
1002
  * of disabled tests.
1001
1003
  */
1002
1004
  static readonly suiteDisabled = 'suite:disabled';
1003
- protected constructor();
1004
1005
  }
1005
1006
  /**
1006
1007
  * Main class for GameTest functions, with helpers and data for
@@ -1009,6 +1010,7 @@ export class Tags {
1009
1010
  * the GameTest structure block.
1010
1011
  */
1011
1012
  export class Test {
1013
+ protected constructor();
1012
1014
  /**
1013
1015
  * @remarks
1014
1016
  * Tests that the condition specified in _condition_ is true.
@@ -1447,6 +1449,7 @@ export class Test {
1447
1449
  * @throws This function can throw errors.
1448
1450
  */
1449
1451
  killAllEntities(): void;
1452
+ onPlayerJump(mob: minecraftserver.Entity, jumpAmount: number): void;
1450
1453
  /**
1451
1454
  * @remarks
1452
1455
  * Presses a button at a block location.
@@ -1500,7 +1503,7 @@ export class Test {
1500
1503
  * A location relative to the GameTest command block.
1501
1504
  * @throws This function can throw errors.
1502
1505
  */
1503
- relativeBlockLocation(worldBlockLocation: minecraftserver.BlockLocation): minecraftserver.BlockLocation;
1506
+ relativeBlockLocation(worldBlockLocation: minecraftserver.Vector3): minecraftserver.BlockLocation;
1504
1507
  /**
1505
1508
  * @remarks
1506
1509
  * From a location, returns a new location with coordinates
@@ -1515,7 +1518,7 @@ export class Test {
1515
1518
  * A location relative to the GameTest command block.
1516
1519
  * @throws This function can throw errors.
1517
1520
  */
1518
- relativeLocation(worldLocation: minecraftserver.Location): minecraftserver.Location;
1521
+ relativeLocation(worldLocation: minecraftserver.Vector3): minecraftserver.Location;
1519
1522
  /**
1520
1523
  * @remarks
1521
1524
  * Removes a simulated player from the world.
@@ -1982,8 +1985,7 @@ export class Test {
1982
1985
  * An absolute location relative to the GameTest command block.
1983
1986
  * @throws This function can throw errors.
1984
1987
  */
1985
- worldLocation(relativeLocation: minecraftserver.Location): minecraftserver.Location;
1986
- protected constructor();
1988
+ worldLocation(relativeLocation: minecraftserver.Vector3): minecraftserver.Location;
1987
1989
  }
1988
1990
  /**
1989
1991
  * @remarks
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@minecraft/server-gametest",
3
- "version": "1.0.0-beta.release.1.19.40",
3
+ "version": "1.0.0-beta.release.1.19.50",
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.release.1.19.40"
16
+ "@minecraft/server": "1.1.0-beta.release.1.19.50"
17
17
  },
18
18
  "license": "MIT"
19
19
  }