@minecraft/server 1.6.0-beta.1.20.30-preview.20 → 1.6.0-beta.1.20.30-preview.21
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.
- package/index.d.ts +23 -35
- 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.6.0-internal.1.20.30-preview.
|
|
19
|
+
* "version": "1.6.0-internal.1.20.30-preview.21"
|
|
20
20
|
* }
|
|
21
21
|
* ```
|
|
22
22
|
*
|
|
@@ -3087,7 +3087,6 @@ export class Dimension {
|
|
|
3087
3087
|
* @remarks
|
|
3088
3088
|
* Identifier of the dimension.
|
|
3089
3089
|
*
|
|
3090
|
-
* @throws This property can throw when used.
|
|
3091
3090
|
*/
|
|
3092
3091
|
readonly id: string;
|
|
3093
3092
|
/**
|
|
@@ -3942,7 +3941,6 @@ export class Entity {
|
|
|
3942
3941
|
* property is accessible even if {@link Entity.isValid} is
|
|
3943
3942
|
* false.
|
|
3944
3943
|
*
|
|
3945
|
-
* @throws This property can throw when used.
|
|
3946
3944
|
*/
|
|
3947
3945
|
readonly id: string;
|
|
3948
3946
|
/**
|
|
@@ -4059,7 +4057,6 @@ export class Entity {
|
|
|
4059
4057
|
* 'minecraft:skeleton'. This property is accessible even if
|
|
4060
4058
|
* {@link Entity.isValid} is false.
|
|
4061
4059
|
*
|
|
4062
|
-
* @throws This property can throw when used.
|
|
4063
4060
|
*/
|
|
4064
4061
|
readonly typeId: string;
|
|
4065
4062
|
/**
|
|
@@ -5201,52 +5198,29 @@ export class EntityDieAfterEventSignal {
|
|
|
5201
5198
|
|
|
5202
5199
|
/**
|
|
5203
5200
|
* @beta
|
|
5204
|
-
* Provides access to a mob's equipment slots. This component
|
|
5205
|
-
* exists for all mob entities.
|
|
5206
5201
|
*/
|
|
5207
5202
|
// @ts-ignore Class inheritance allowed for native defined classes
|
|
5208
|
-
export class
|
|
5203
|
+
export class EntityEquippableComponent extends EntityComponent {
|
|
5209
5204
|
private constructor();
|
|
5210
|
-
static readonly componentId = 'minecraft:
|
|
5205
|
+
static readonly componentId = 'minecraft:equippable';
|
|
5211
5206
|
/**
|
|
5212
5207
|
* @remarks
|
|
5213
|
-
* Gets the equipped item for the given EquipmentSlot.
|
|
5214
|
-
*
|
|
5215
5208
|
* This function can't be called in read-only mode.
|
|
5216
5209
|
*
|
|
5217
|
-
* @param equipmentSlot
|
|
5218
|
-
* The equipment slot. e.g. "head", "chest", "offhand"
|
|
5219
|
-
* @returns
|
|
5220
|
-
* Returns the item equipped to the given EquipmentSlot. If
|
|
5221
|
-
* empty, returns undefined.
|
|
5222
5210
|
* @throws This function can throw errors.
|
|
5223
5211
|
*/
|
|
5224
5212
|
getEquipment(equipmentSlot: EquipmentSlot): ItemStack | undefined;
|
|
5225
5213
|
/**
|
|
5226
5214
|
* @remarks
|
|
5227
|
-
* Gets the ContainerSlot corresponding to the given
|
|
5228
|
-
* EquipmentSlot.
|
|
5229
|
-
*
|
|
5230
5215
|
* This function can't be called in read-only mode.
|
|
5231
5216
|
*
|
|
5232
|
-
* @param equipmentSlot
|
|
5233
|
-
* The equipment slot. e.g. "head", "chest", "offhand".
|
|
5234
|
-
* @returns
|
|
5235
|
-
* Returns the ContainerSlot corresponding to the given
|
|
5236
|
-
* EquipmentSlot.
|
|
5237
5217
|
* @throws This function can throw errors.
|
|
5238
5218
|
*/
|
|
5239
5219
|
getEquipmentSlot(equipmentSlot: EquipmentSlot): ContainerSlot;
|
|
5240
5220
|
/**
|
|
5241
5221
|
* @remarks
|
|
5242
|
-
* Replaces the item in the given EquipmentSlot.
|
|
5243
|
-
*
|
|
5244
5222
|
* This function can't be called in read-only mode.
|
|
5245
5223
|
*
|
|
5246
|
-
* @param equipmentSlot
|
|
5247
|
-
* The equipment slot. e.g. "head", "chest", "offhand".
|
|
5248
|
-
* @param itemStack
|
|
5249
|
-
* The item to equip. If undefined, clears the slot.
|
|
5250
5224
|
* @throws This function can throw errors.
|
|
5251
5225
|
*/
|
|
5252
5226
|
setEquipment(equipmentSlot: EquipmentSlot, itemStack?: ItemStack): boolean;
|
|
@@ -7612,7 +7586,7 @@ export class ItemStack {
|
|
|
7612
7586
|
* The identifier of the component (e.g., 'minecraft:food') to
|
|
7613
7587
|
* retrieve. If no namespace prefix is specified, 'minecraft:'
|
|
7614
7588
|
* is assumed. If the component is not present on the item
|
|
7615
|
-
* stack, undefined is returned.
|
|
7589
|
+
* stack or doesn't exist, undefined is returned.
|
|
7616
7590
|
* @example durability.ts
|
|
7617
7591
|
* ```typescript
|
|
7618
7592
|
* // Get the maximum durability of a custom sword item
|
|
@@ -7636,7 +7610,7 @@ export class ItemStack {
|
|
|
7636
7610
|
* ItemStack.
|
|
7637
7611
|
*
|
|
7638
7612
|
* @returns
|
|
7639
|
-
* An array of lore
|
|
7613
|
+
* An array of lore lines. If the item does not have lore,
|
|
7640
7614
|
* returns an empty array.
|
|
7641
7615
|
*/
|
|
7642
7616
|
getLore(): string[];
|
|
@@ -7679,6 +7653,11 @@ export class ItemStack {
|
|
|
7679
7653
|
* item stacks. The amount of each item stack is not taken into
|
|
7680
7654
|
* consideration.
|
|
7681
7655
|
*
|
|
7656
|
+
* @param itemStack
|
|
7657
|
+
* ItemStack to check stacking compatability with.
|
|
7658
|
+
* @returns
|
|
7659
|
+
* True if the Item Stack is stackable with the itemStack
|
|
7660
|
+
* passed in.
|
|
7682
7661
|
*/
|
|
7683
7662
|
isStackableWith(itemStack: ItemStack): boolean;
|
|
7684
7663
|
/**
|
|
@@ -7690,6 +7669,8 @@ export class ItemStack {
|
|
|
7690
7669
|
*
|
|
7691
7670
|
* This function can't be called in read-only mode.
|
|
7692
7671
|
*
|
|
7672
|
+
* @param blockIdentifiers
|
|
7673
|
+
* String list of block types that the item can destroy.
|
|
7693
7674
|
* @throws
|
|
7694
7675
|
* Throws if any of the provided block identifiers are invalid.
|
|
7695
7676
|
* @example example.ts
|
|
@@ -7710,6 +7691,8 @@ export class ItemStack {
|
|
|
7710
7691
|
*
|
|
7711
7692
|
* This function can't be called in read-only mode.
|
|
7712
7693
|
*
|
|
7694
|
+
* @param blockIdentifiers
|
|
7695
|
+
* String list of block types that the item can be placed on.
|
|
7713
7696
|
* @throws
|
|
7714
7697
|
* Throws if any of the provided block identifiers are invalid.
|
|
7715
7698
|
* @example example.ts
|
|
@@ -7724,10 +7707,15 @@ export class ItemStack {
|
|
|
7724
7707
|
* @beta
|
|
7725
7708
|
* @remarks
|
|
7726
7709
|
* Sets the lore value - a secondary display string - for an
|
|
7727
|
-
* ItemStack.
|
|
7710
|
+
* ItemStack. The lore list is cleared if set to an empty
|
|
7711
|
+
* string or undefined.
|
|
7728
7712
|
*
|
|
7729
7713
|
* This function can't be called in read-only mode.
|
|
7730
7714
|
*
|
|
7715
|
+
* @param loreList
|
|
7716
|
+
* List of lore lines. Each element in the list represents a
|
|
7717
|
+
* new line. The maximum lore line count is 20. The maximum
|
|
7718
|
+
* lore line length is 50 characters.
|
|
7731
7719
|
* @throws This function can throw errors.
|
|
7732
7720
|
* @example diamondAwesomeSword.ts
|
|
7733
7721
|
* ```typescript
|
|
@@ -9684,7 +9672,7 @@ export class ScriptEventCommandMessageAfterEvent {
|
|
|
9684
9672
|
* that initiated the NPC dialogue.
|
|
9685
9673
|
*
|
|
9686
9674
|
*/
|
|
9687
|
-
readonly initiator
|
|
9675
|
+
readonly initiator?: Entity;
|
|
9688
9676
|
/**
|
|
9689
9677
|
* @remarks
|
|
9690
9678
|
* Optional additional data passed in with the script event
|
|
@@ -9698,14 +9686,14 @@ export class ScriptEventCommandMessageAfterEvent {
|
|
|
9698
9686
|
* (e.g., a commandblock.)
|
|
9699
9687
|
*
|
|
9700
9688
|
*/
|
|
9701
|
-
readonly sourceBlock
|
|
9689
|
+
readonly sourceBlock?: Block;
|
|
9702
9690
|
/**
|
|
9703
9691
|
* @remarks
|
|
9704
9692
|
* Source entity if this command was triggered by an entity
|
|
9705
9693
|
* (e.g., a NPC).
|
|
9706
9694
|
*
|
|
9707
9695
|
*/
|
|
9708
|
-
readonly sourceEntity
|
|
9696
|
+
readonly sourceEntity?: Entity;
|
|
9709
9697
|
/**
|
|
9710
9698
|
* @remarks
|
|
9711
9699
|
* Returns the type of source that fired this command.
|