@minecraft/server 1.0.0-beta.11940b24 → 1.0.0-beta.release.1.19.40

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 +110 -61
  2. package/package.json +1 -1
package/index.d.ts CHANGED
@@ -648,6 +648,10 @@ export class Block {
648
648
  * @throws This property can throw when used.
649
649
  */
650
650
  readonly 'type': BlockType;
651
+ /**
652
+ * Identifier of the type of block for this block.
653
+ * @throws This property can throw when used.
654
+ */
651
655
  readonly typeId: string;
652
656
  /**
653
657
  * X coordinate of the block.
@@ -1967,10 +1971,28 @@ export class BlockRecordPlayerComponent extends BlockComponent {
1967
1971
  setRecord(recordItemType: ItemType): void;
1968
1972
  protected constructor();
1969
1973
  }
1974
+ /**
1975
+ * Represents a block that can display text on it.
1976
+ */
1970
1977
  export class BlockSignComponent extends BlockComponent {
1978
+ /**
1979
+ * Location of the sign.
1980
+ */
1971
1981
  readonly location: BlockLocation;
1982
+ /**
1983
+ * Text of the sign
1984
+ * @throws This property can throw when used.
1985
+ */
1972
1986
  readonly text: string;
1987
+ /**
1988
+ * Identifier of this component. Should always be
1989
+ * minecraft:sign.
1990
+ */
1973
1991
  readonly typeId: string;
1992
+ /**
1993
+ * Identifier of this component. Should always be
1994
+ * minecraft:sign.
1995
+ */
1974
1996
  static readonly componentId = 'minecraft:sign';
1975
1997
  protected constructor();
1976
1998
  }
@@ -2543,31 +2565,13 @@ export class Dimension {
2543
2565
  * @throws This function can throw errors.
2544
2566
  */
2545
2567
  getPlayers(getPlayers?: EntityQueryOptions): PlayerIterator;
2546
- /**
2547
- * @remarks
2548
- * Runs a particular command from the context of the broader
2549
- * dimension.
2550
- * @param commandString
2551
- * Command to run. Note that command strings should not start
2552
- * with slash.
2553
- * @returns
2554
- * For commands that return data, returns a JSON structure with
2555
- * command response values.
2556
- * @throws This function can throw errors.
2557
- * @example commands.js
2558
- * ```typescript
2559
- * world.getDimension("overworld").runCommand("say You got a new high score!");
2560
- * world.getDimension("overworld").runCommand("scoreboard players set @p score 10");
2561
- *
2562
- * ```
2563
- */
2564
2568
  runCommand(commandString: string): any;
2565
2569
  /**
2566
2570
  * @remarks
2567
2571
  * Runs a particular command asynchronously from the context of
2568
- * the broader dimension. Where possible - and especially for
2569
- * long-running operations - you should use runCommandAsync
2570
- * over runCommand.
2572
+ * the broader dimension. Note that there is a maximum queue
2573
+ * of 128 asynchronous commands that can be run in a given
2574
+ * tick.
2571
2575
  * @param commandString
2572
2576
  * Command to run. Note that command strings should not start
2573
2577
  * with slash.
@@ -3116,30 +3120,12 @@ export class Entity {
3116
3120
  * @throws This function can throw errors.
3117
3121
  */
3118
3122
  removeTag(tag: string): boolean;
3119
- /**
3120
- * @remarks
3121
- * Runs a particular command from the context of this entity.
3122
- * @param commandString
3123
- * Command to run. Note that command strings should not start
3124
- * with slash.
3125
- * @returns
3126
- * For commands that return data, returns a JSON structure with
3127
- * command response values.
3128
- * @throws This function can throw errors.
3129
- * @example commands.js
3130
- * ```typescript
3131
- * entity.runCommand("say You got a new high score!");
3132
- * entity.runCommand("scoreboard players set @p score 10");
3133
- *
3134
- * ```
3135
- */
3136
3123
  runCommand(commandString: string): any;
3137
3124
  /**
3138
3125
  * @remarks
3139
3126
  * Runs a particular command asynchronously from the context of
3140
- * this entity. Where possible, running a command
3141
- * asynchronously is recommended, especially for long running
3142
- * operations.
3127
+ * this entity. Note that there is a maximum queue of 128
3128
+ * asynchronous commands that can be run in a given tick.
3143
3129
  * @param commandString
3144
3130
  * Command to run. Note that command strings should not start
3145
3131
  * with slash.
@@ -5829,6 +5815,10 @@ export class Events {
5829
5815
  * This event fires when a lever activates or is deactivated.
5830
5816
  */
5831
5817
  readonly leverActivate: LeverActionEventSignal;
5818
+ /**
5819
+ * This event is an internal implementation detail, and is
5820
+ * otherwise not currently functional.
5821
+ */
5832
5822
  readonly messageReceive: ServerMessageSignal;
5833
5823
  /**
5834
5824
  * This event fires when a piston expands or retracts.
@@ -6173,6 +6163,10 @@ export class ItemCooldownComponent {
6173
6163
  * @throws This property can throw when used.
6174
6164
  */
6175
6165
  readonly cooldownTicks: number;
6166
+ /**
6167
+ * Identifier of this component. Should always be
6168
+ * 'minecraft:cooldown'.
6169
+ */
6176
6170
  static readonly componentId = 'minecraft:cooldown';
6177
6171
  /**
6178
6172
  * @remarks
@@ -6247,6 +6241,10 @@ export class ItemDurabilityComponent {
6247
6241
  * @throws This property can throw when used.
6248
6242
  */
6249
6243
  readonly maxDurability: number;
6244
+ /**
6245
+ * Identifier of this component. Should always be
6246
+ * 'minecraft:durability'.
6247
+ */
6250
6248
  static readonly componentId = 'minecraft:durability';
6251
6249
  /**
6252
6250
  * @remarks
@@ -6272,6 +6270,9 @@ export class ItemEnchantsComponent {
6272
6270
  * item stack.
6273
6271
  */
6274
6272
  enchantments: EnchantmentList;
6273
+ /**
6274
+ * Identifier of this component.
6275
+ */
6275
6276
  static readonly componentId = 'minecraft:enchantments';
6276
6277
  /**
6277
6278
  * @remarks
@@ -6312,6 +6313,10 @@ export class ItemFoodComponent {
6312
6313
  * @throws This property can throw when used.
6313
6314
  */
6314
6315
  readonly usingConvertsTo: string;
6316
+ /**
6317
+ * Identifier of this component. Should always be
6318
+ * 'minecraft:food'.
6319
+ */
6315
6320
  static readonly componentId = 'minecraft:food';
6316
6321
  protected constructor();
6317
6322
  }
@@ -6390,6 +6395,11 @@ export class ItemStack {
6390
6395
  * Given name of this stack of items.
6391
6396
  */
6392
6397
  nameTag?: string;
6398
+ /**
6399
+ * Identifier of the type of items for the stack. If a
6400
+ * namespace is not specified, 'minecraft:' is assumed.
6401
+ * Examples include 'wheat' or 'apple'.
6402
+ */
6393
6403
  readonly typeId: string;
6394
6404
  /**
6395
6405
  * @remarks
@@ -13135,30 +13145,12 @@ export class Player extends Entity {
13135
13145
  * @throws This function can throw errors.
13136
13146
  */
13137
13147
  removeTag(tag: string): boolean;
13138
- /**
13139
- * @remarks
13140
- * Runs a particular command from the context of this player.
13141
- * @param commandString
13142
- * Command to run. Note that command strings should not start
13143
- * with slash.
13144
- * @returns
13145
- * For commands that return data, returns a JSON structure with
13146
- * command response values.
13147
- * @throws This function can throw errors.
13148
- * @example commands.js
13149
- * ```typescript
13150
- * player.runCommand("say You got a new high score!");
13151
- * player.runCommand("scoreboard players set @s score 10");
13152
- *
13153
- * ```
13154
- */
13155
13148
  runCommand(commandString: string): any;
13156
13149
  /**
13157
13150
  * @remarks
13158
13151
  * Runs a particular command asynchronously from the context of
13159
- * this entity. Where possible, running a command
13160
- * asynchronously is recommended, especially for long running
13161
- * operations.
13152
+ * this entity. Note that there is a maximum queue of 128
13153
+ * asynchronous commands that can be run in a given tick.
13162
13154
  * @param commandString
13163
13155
  * Command to run. Note that command strings should not start
13164
13156
  * with slash.
@@ -13758,6 +13750,18 @@ export class System {
13758
13750
  * lifecycle of items in the Minecraft system.
13759
13751
  */
13760
13752
  readonly events: SystemEvents;
13753
+ /**
13754
+ * @remarks
13755
+ * Runs a specified function at a future time. This is
13756
+ * frequently used to implement delayed behaviors and game
13757
+ * loops.
13758
+ * @param callback
13759
+ * Function callback to run when the tickDelay time criteria is
13760
+ * met.
13761
+ * @returns
13762
+ * An opaque identifier that can be used with the `clearRun`
13763
+ * function to cancel the execution of this run.
13764
+ */
13761
13765
  run(callback: (arg: TickEvent) => void): void;
13762
13766
  protected constructor();
13763
13767
  }
@@ -14035,6 +14039,10 @@ export class World {
14035
14039
  */
14036
14040
  readonly scoreboard: Scoreboard;
14037
14041
  broadcastClientMessage(id: string, value: string): void;
14042
+ /**
14043
+ * @remarks
14044
+ * Returns the absolute time since the start of the world.
14045
+ */
14038
14046
  getAbsoluteTime(): number;
14039
14047
  /**
14040
14048
  * @param dimensionId
@@ -14063,6 +14071,10 @@ export class World {
14063
14071
  * @throws This function can throw errors.
14064
14072
  */
14065
14073
  getPlayers(options?: EntityQueryOptions): PlayerIterator;
14074
+ /**
14075
+ * @remarks
14076
+ * Sets the current game time of the day.
14077
+ */
14066
14078
  getTime(): number;
14067
14079
  /**
14068
14080
  * @remarks
@@ -14110,6 +14122,11 @@ export class World {
14110
14122
  * @throws This function can throw errors.
14111
14123
  */
14112
14124
  setDynamicProperty(identifier: string, value: boolean | number | string): void;
14125
+ /**
14126
+ * @remarks
14127
+ * Returns the current game time of the day.
14128
+ * @param timeOfDay
14129
+ */
14113
14130
  setTime(timeOfDay: number): void;
14114
14131
  /**
14115
14132
  * @remarks
@@ -14367,17 +14384,49 @@ export interface ExplosionOptions {
14367
14384
  */
14368
14385
  source?: Entity;
14369
14386
  }
14387
+ /**
14388
+ * An interface that describes the signature of a message that
14389
+ * is passed into a say/tell API request.
14390
+ */
14370
14391
  // tslint:disable-next-line:interface-name
14371
14392
  export interface IRawMessage {
14393
+ /**
14394
+ * A list of text objects used to build a message.
14395
+ */
14372
14396
  rawtext?: IRawMessage | string[];
14397
+ /**
14398
+ * Contains plain text to display directly. Only valid when
14399
+ * used as a sub member in a parent _rawtext_ or _with_ member.
14400
+ */
14373
14401
  text?: string;
14402
+ /**
14403
+ * Contains a resource pack translation identifier that can be
14404
+ * used to translate text in the player's selected language.
14405
+ */
14374
14406
  translate?: string;
14407
+ /**
14408
+ * A list of text object arguments that can be used to fill
14409
+ * values in the _translate_ text. Ignored when _translate_ is
14410
+ * not present.
14411
+ */
14375
14412
  with?: IRawMessage | string[];
14376
14413
  }
14414
+ /**
14415
+ * Contains a description of a vector.
14416
+ */
14377
14417
  // tslint:disable-next-line:interface-name
14378
14418
  export interface IVec3 {
14419
+ /**
14420
+ * X component of this vector.
14421
+ */
14379
14422
  x: number;
14423
+ /**
14424
+ * Y component of this vector.
14425
+ */
14380
14426
  y: number;
14427
+ /**
14428
+ * Z component of this vector.
14429
+ */
14381
14430
  z: number;
14382
14431
  }
14383
14432
  /**
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@minecraft/server",
3
- "version": "1.0.0-beta.11940b24",
3
+ "version": "1.0.0-beta.release.1.19.40",
4
4
  "description": "",
5
5
  "contributors": [
6
6
  {