@minecraft/server 2.1.0-beta.1.21.90-preview.28 → 2.2.0-beta.1.21.100-preview.20

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 +51 -22
  2. package/package.json +1 -1
package/index.d.ts CHANGED
@@ -16,7 +16,7 @@
16
16
  * ```json
17
17
  * {
18
18
  * "module_name": "@minecraft/server",
19
- * "version": "2.1.0-beta"
19
+ * "version": "2.2.0-beta"
20
20
  * }
21
21
  * ```
22
22
  *
@@ -2056,7 +2056,7 @@ export enum ItemComponentTypes {
2056
2056
  */
2057
2057
  Durability = 'minecraft:durability',
2058
2058
  /**
2059
- * @beta
2059
+ * @rc
2060
2060
  */
2061
2061
  Dyeable = 'minecraft:dyeable',
2062
2062
  /**
@@ -2241,7 +2241,7 @@ export enum MoonPhase {
2241
2241
  }
2242
2242
 
2243
2243
  /**
2244
- * @beta
2244
+ * @rc
2245
2245
  */
2246
2246
  export enum MovementType {
2247
2247
  Immovable = 'Immovable',
@@ -2418,7 +2418,7 @@ export enum PlatformType {
2418
2418
  }
2419
2419
 
2420
2420
  /**
2421
- * @beta
2421
+ * @rc
2422
2422
  * Specifies the player inventory type.
2423
2423
  */
2424
2424
  export enum PlayerInventoryType {
@@ -2542,7 +2542,7 @@ export enum SignSide {
2542
2542
  }
2543
2543
 
2544
2544
  /**
2545
- * @beta
2545
+ * @rc
2546
2546
  */
2547
2547
  export enum StickyType {
2548
2548
  None = 'None',
@@ -4692,7 +4692,7 @@ export class BlockMapColorComponent extends BlockComponent {
4692
4692
  }
4693
4693
 
4694
4694
  /**
4695
- * @beta
4695
+ * @rc
4696
4696
  */
4697
4697
  // @ts-ignore Class inheritance allowed for native defined classes
4698
4698
  export class BlockMovableComponent extends BlockComponent {
@@ -5232,9 +5232,7 @@ export class BlockSignComponent extends BlockComponent {
5232
5232
  * @param message
5233
5233
  * The message to set on the sign. If set to a string, then
5234
5234
  * call `getText` to read that string. If set to a RawMessage,
5235
- * then calling `getRawText` will return a RawText. If set to a
5236
- * RawText, then calling `getRawText` will return the same
5237
- * object that was passed in.
5235
+ * then calling `getRawText` will return a RawText.
5238
5236
  * @param side
5239
5237
  * The side of the sign the message will be set on. If not
5240
5238
  * provided, the message will be set on the front side of the
@@ -5244,7 +5242,7 @@ export class BlockSignComponent extends BlockComponent {
5244
5242
  * Throws if the provided message is greater than 512
5245
5243
  * characters in length.
5246
5244
  */
5247
- setText(message: RawMessage | RawText | string, side?: SignSide): void;
5245
+ setText(message: RawMessage | string, side?: SignSide): void;
5248
5246
  /**
5249
5247
  * @remarks
5250
5248
  * Sets the dye color of the text.
@@ -6936,7 +6934,7 @@ export class ContainerSlot {
6936
6934
  * @throws
6937
6935
  * Throws if the slot's container is invalid.
6938
6936
  *
6939
- * {@link Error}
6937
+ * {@link minecraftcommon.ArgumentOutOfBoundsError}
6940
6938
  *
6941
6939
  * {@link InvalidContainerSlotError}
6942
6940
  */
@@ -8458,6 +8456,10 @@ export class Entity {
8458
8456
  * @param vector
8459
8457
  * Impulse vector.
8460
8458
  * @throws This function can throw errors.
8459
+ *
8460
+ * {@link minecraftcommon.ArgumentOutOfBoundsError}
8461
+ *
8462
+ * {@link Error}
8461
8463
  * @example applyImpulse.ts
8462
8464
  * ```typescript
8463
8465
  * import { DimensionLocation } from "@minecraft/server";
@@ -12750,7 +12752,7 @@ export class ItemDurabilityComponent extends ItemComponent {
12750
12752
  }
12751
12753
 
12752
12754
  /**
12753
- * @beta
12755
+ * @rc
12754
12756
  * When present on an item, this item can be dyed.
12755
12757
  */
12756
12758
  // @ts-ignore Class inheritance allowed for native defined classes
@@ -13566,6 +13568,8 @@ export class ItemStack {
13566
13568
  * new line. The maximum lore line count is 20. The maximum
13567
13569
  * lore line length is 50 characters.
13568
13570
  * @throws This function can throw errors.
13571
+ *
13572
+ * {@link minecraftcommon.ArgumentOutOfBoundsError}
13569
13573
  * @example diamondAwesomeSword.ts
13570
13574
  * ```typescript
13571
13575
  * import { EntityComponentTypes, ItemStack, Player } from '@minecraft/server';
@@ -15429,7 +15433,7 @@ export class PlayerGameModeChangeBeforeEventSignal {
15429
15433
  }
15430
15434
 
15431
15435
  /**
15432
- * @beta
15436
+ * @rc
15433
15437
  * Contains information regarding an event after changing the
15434
15438
  * selected hotbar slot for a player.
15435
15439
  */
@@ -15462,7 +15466,7 @@ export class PlayerHotbarSelectedSlotChangeAfterEvent {
15462
15466
  }
15463
15467
 
15464
15468
  /**
15465
- * @beta
15469
+ * @rc
15466
15470
  * Manages callbacks that are connected after a player selected
15467
15471
  * hotbar slot is changed.
15468
15472
  */
@@ -15944,7 +15948,7 @@ export class PlayerInteractWithEntityBeforeEventSignal {
15944
15948
  }
15945
15949
 
15946
15950
  /**
15947
- * @beta
15951
+ * @rc
15948
15952
  * Contains information regarding an event after a player's
15949
15953
  * inventory item changes.
15950
15954
  */
@@ -15983,7 +15987,7 @@ export class PlayerInventoryItemChangeAfterEvent {
15983
15987
  }
15984
15988
 
15985
15989
  /**
15986
- * @beta
15990
+ * @rc
15987
15991
  * Manages callbacks that are connected after a player's
15988
15992
  * inventory item is changed.
15989
15993
  */
@@ -19312,8 +19316,10 @@ export class WorldAfterEvents {
19312
19316
  */
19313
19317
  readonly playerGameModeChange: PlayerGameModeChangeAfterEventSignal;
19314
19318
  /**
19315
- * @beta
19319
+ * @rc
19316
19320
  * @remarks
19321
+ * This event fires when a player's selected slot changes.
19322
+ *
19317
19323
  * This property can be read in early-execution mode.
19318
19324
  *
19319
19325
  */
@@ -19351,8 +19357,11 @@ export class WorldAfterEvents {
19351
19357
  */
19352
19358
  readonly playerInteractWithEntity: PlayerInteractWithEntityAfterEventSignal;
19353
19359
  /**
19354
- * @beta
19360
+ * @rc
19355
19361
  * @remarks
19362
+ * This event fires when an item gets added or removed to the
19363
+ * player's inventory.
19364
+ *
19356
19365
  * This property can be read in early-execution mode.
19357
19366
  *
19358
19367
  */
@@ -20962,13 +20971,14 @@ export interface GreaterThanOrEqualsComparison {
20962
20971
  }
20963
20972
 
20964
20973
  /**
20965
- * @beta
20974
+ * @rc
20966
20975
  * Contains additional filtering options for hotbar events.
20967
20976
  */
20968
20977
  export interface HotbarEventOptions {
20969
20978
  /**
20970
20979
  * @remarks
20971
- * The slot indexes to consider.
20980
+ * The slot indexes to consider. Values should be between 0 and
20981
+ * 8, inclusive. If not specified, all slots are considered.
20972
20982
  *
20973
20983
  */
20974
20984
  allowedSlots?: number[];
@@ -20998,14 +21008,15 @@ export interface InputEventOptions {
20998
21008
  }
20999
21009
 
21000
21010
  /**
21001
- * @beta
21011
+ * @rc
21002
21012
  * Contains additional filtering options for inventory item
21003
21013
  * events.
21004
21014
  */
21005
21015
  export interface InventoryItemEventOptions {
21006
21016
  /**
21007
21017
  * @remarks
21008
- * The slot indexes to consider.
21018
+ * The slot indexes to consider. Values should be positive
21019
+ * numbers. If not specified, all slots are considered.
21009
21020
  *
21010
21021
  */
21011
21022
  allowedSlots?: number[];
@@ -22080,6 +22091,24 @@ export class InvalidEntityError extends Error {
22080
22091
  type: string;
22081
22092
  }
22082
22093
 
22094
+ /**
22095
+ * @beta
22096
+ * The error called when an item is invalid. This can occur
22097
+ * when accessing components on a removed item.
22098
+ */
22099
+ // @ts-ignore Class inheritance allowed for native defined classes
22100
+ export class InvalidItemStackError extends Error {
22101
+ private constructor();
22102
+ /**
22103
+ * @remarks
22104
+ * The type of the item that is now invalid.
22105
+ *
22106
+ * This property can be read in early-execution mode.
22107
+ *
22108
+ */
22109
+ itemType: ItemType;
22110
+ }
22111
+
22083
22112
  // @ts-ignore Class inheritance allowed for native defined classes
22084
22113
  export class InvalidIteratorError extends Error {
22085
22114
  private constructor();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@minecraft/server",
3
- "version": "2.1.0-beta.1.21.90-preview.28",
3
+ "version": "2.2.0-beta.1.21.100-preview.20",
4
4
  "description": "",
5
5
  "contributors": [
6
6
  {