@minecraft/server 1.1.0-beta.1.19.70-preview.21 → 1.1.0-beta.1.19.70-preview.22

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 +49 -9
  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": "1.1.0-internal.1.19.70-preview.21"
19
+ * "version": "1.1.0-internal.1.19.70-preview.22"
20
20
  * }
21
21
  * ```
22
22
  *
@@ -181,6 +181,11 @@ export enum GameMode {
181
181
  */
182
182
  survival = 'survival',
183
183
  }
184
+ export enum ItemLockMode {
185
+ inventory = 'inventory',
186
+ none = 'none',
187
+ slot = 'slot',
188
+ }
184
189
  export enum MessageSourceType {
185
190
  clientScript = 'clientScript',
186
191
  commandBlock = 'commandBlock',
@@ -2329,22 +2334,28 @@ export class ContainerSlot {
2329
2334
  * Modifier value for the item type stored within the slot.
2330
2335
  */
2331
2336
  data: number;
2337
+ readonly isStackable: boolean;
2332
2338
  /**
2333
2339
  * If true, the state of this container slot is still valid
2334
2340
  * (e.g., the underlying block or entity for this container
2335
2341
  * slot still exists.)
2336
2342
  */
2337
2343
  readonly isValid: boolean;
2344
+ keepOnDeath: boolean;
2345
+ lockMode: ItemLockMode;
2346
+ readonly maxAmount: number;
2338
2347
  /**
2339
2348
  * Returns a name tag for the container slot.
2340
2349
  */
2341
2350
  nameTag?: string;
2351
+ readonly 'type': ItemType;
2342
2352
  /**
2343
2353
  * Returns a string identifier of the type if item stored in
2344
2354
  * this slot.
2345
2355
  * @throws This property can throw when used.
2346
2356
  */
2347
2357
  readonly typeId?: string;
2358
+ clone(): ItemStack;
2348
2359
  /**
2349
2360
  * @remarks
2350
2361
  * Returns the item stored within the container.
@@ -2358,6 +2369,9 @@ export class ContainerSlot {
2358
2369
  * @throws This function can throw errors.
2359
2370
  */
2360
2371
  getLore(): string[];
2372
+ isStackableWith(itemStack: ItemStack): boolean;
2373
+ setCanDestroy(blockIdentifiers?: string[]): void;
2374
+ setCanPlaceOn(blockIdentifiers?: string[]): void;
2361
2375
  /**
2362
2376
  * @remarks
2363
2377
  * Sets the item within the slot to a new value.
@@ -6471,10 +6485,15 @@ export class ItemStack {
6471
6485
  * 0 and 64.
6472
6486
  */
6473
6487
  amount: number;
6488
+ readonly isStackable: boolean;
6489
+ keepOnDeath: boolean;
6490
+ lockMode: ItemLockMode;
6491
+ readonly maxAmount: number;
6474
6492
  /**
6475
6493
  * Given name of this stack of items.
6476
6494
  */
6477
6495
  nameTag?: string;
6496
+ readonly 'type': ItemType;
6478
6497
  /**
6479
6498
  * Identifier of the type of items for the stack. If a
6480
6499
  * namespace is not specified, 'minecraft:' is assumed.
@@ -6495,6 +6514,7 @@ export class ItemStack {
6495
6514
  * @throws This function can throw errors.
6496
6515
  */
6497
6516
  constructor(itemType: ItemType | string, amount?: number);
6517
+ clone(): ItemStack;
6498
6518
  /**
6499
6519
  * @remarks
6500
6520
  * Gets a component (that represents additional capabilities)
@@ -6528,6 +6548,9 @@ export class ItemStack {
6528
6548
  * is assumed.
6529
6549
  */
6530
6550
  hasComponent(componentId: string): boolean;
6551
+ isStackableWith(itemStack: ItemStack): boolean;
6552
+ setCanDestroy(blockIdentifiers?: string[]): void;
6553
+ setCanPlaceOn(blockIdentifiers?: string[]): void;
6531
6554
  /**
6532
6555
  * @remarks
6533
6556
  * Sets the lore value - a secondary display string - for an
@@ -12909,24 +12932,36 @@ export class MinecraftItemTypes {
12909
12932
  export class MolangVariableMap {
12910
12933
  /**
12911
12934
  * @remarks
12912
- * Sets a Molang rendering/animation variable with the value of
12913
- * a Red/Green/Blue color.
12935
+ * Adds the following variables to Molang:
12936
+ * - `<variable_name>.r` - Red color value [0-1]
12937
+ * - `<variable_name>.g` - Green color value [0-1]
12938
+ * - `<variable_name>.b` - Blue color value [0-1]
12914
12939
  * @param variableName
12915
12940
  * @param color
12916
12941
  */
12917
12942
  setColorRGB(variableName: string, color: Color): MolangVariableMap;
12918
12943
  /**
12919
12944
  * @remarks
12920
- * Sets a Molang rendering/animation variable with the value of
12921
- * a Red/Green/Blue color + Alpha (transparency) value.
12945
+ * Adds the following variables to Molang:
12946
+ * - `<variable_name>.r` - Red color value [0-1]
12947
+ * - `<variable_name>.g` - Green color value [0-1]
12948
+ * - `<variable_name>.b` - Blue color value [0-1]
12949
+ * - `<variable_name>.a` - Alpha (transparency) color value
12950
+ * [0-1]
12922
12951
  * @param variableName
12923
12952
  * @param color
12924
12953
  */
12925
12954
  setColorRGBA(variableName: string, color: Color): MolangVariableMap;
12926
12955
  /**
12927
12956
  * @remarks
12928
- * Sets the speed and direction for a Molang (rendering and
12929
- * animation) variable.
12957
+ * Adds the following variables to Molang:
12958
+ * - `<variable_name>.speed` - Speed number provided
12959
+ * - `<variable_name>.direction_x` - X value from the {@link
12960
+ * Vector3} provided
12961
+ * - `<variable_name>.direction_y` - Y value from the {@link
12962
+ * Vector3} provided
12963
+ * - `<variable_name>.direction_z` - Z value from the {@link
12964
+ * Vector3} provided
12930
12965
  * @param variableName
12931
12966
  * @param speed
12932
12967
  * @param direction
@@ -12934,8 +12969,13 @@ export class MolangVariableMap {
12934
12969
  setSpeedAndDirection(variableName: string, speed: number, direction: Vector): MolangVariableMap;
12935
12970
  /**
12936
12971
  * @remarks
12937
- * Sets a vector value for a Molang (rendering and animation)
12938
- * variable.
12972
+ * Adds the following variables to Molang:
12973
+ * - `<variable_name>.x` - X value from the {@link Vector3}
12974
+ * provided
12975
+ * - `<variable_name>.y` - Y value from the {@link Vector3}
12976
+ * provided
12977
+ * - `<variable_name>.z` - Z value from the {@link Vector3}
12978
+ * provided
12939
12979
  * @param variableName
12940
12980
  * @param vector
12941
12981
  */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@minecraft/server",
3
- "version": "1.1.0-beta.1.19.70-preview.21",
3
+ "version": "1.1.0-beta.1.19.70-preview.22",
4
4
  "description": "",
5
5
  "contributors": [
6
6
  {