@minecraft/server 2.3.0-beta.1.21.110-preview.23 → 2.3.0-beta.1.21.110-preview.25
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 +442 -31
- package/package.json +2 -2
package/index.d.ts
CHANGED
|
@@ -133,7 +133,7 @@ export enum BlockVolumeIntersection {
|
|
|
133
133
|
}
|
|
134
134
|
|
|
135
135
|
/**
|
|
136
|
-
* @
|
|
136
|
+
* @rc
|
|
137
137
|
* An enum of error reasons relating to using {@link
|
|
138
138
|
* ItemBookComponent}.
|
|
139
139
|
*/
|
|
@@ -1891,6 +1891,26 @@ export enum GraphicsMode {
|
|
|
1891
1891
|
Simple = 'Simple',
|
|
1892
1892
|
}
|
|
1893
1893
|
|
|
1894
|
+
/**
|
|
1895
|
+
* @beta
|
|
1896
|
+
* Specifies options related to the item currently being held
|
|
1897
|
+
* by an entity.
|
|
1898
|
+
*/
|
|
1899
|
+
export enum HeldItemOption {
|
|
1900
|
+
/**
|
|
1901
|
+
* @remarks
|
|
1902
|
+
* Any item is being held.
|
|
1903
|
+
*
|
|
1904
|
+
*/
|
|
1905
|
+
AnyItem = 'AnyItem',
|
|
1906
|
+
/**
|
|
1907
|
+
* @remarks
|
|
1908
|
+
* No item is being held.
|
|
1909
|
+
*
|
|
1910
|
+
*/
|
|
1911
|
+
NoItem = 'NoItem',
|
|
1912
|
+
}
|
|
1913
|
+
|
|
1894
1914
|
export enum HudElement {
|
|
1895
1915
|
PaperDoll = 0,
|
|
1896
1916
|
Armor = 1,
|
|
@@ -2076,7 +2096,7 @@ export enum InputPermissionCategory {
|
|
|
2076
2096
|
*/
|
|
2077
2097
|
export enum ItemComponentTypes {
|
|
2078
2098
|
/**
|
|
2079
|
-
* @
|
|
2099
|
+
* @rc
|
|
2080
2100
|
* @remarks
|
|
2081
2101
|
* The minecraft:book component.
|
|
2082
2102
|
*
|
|
@@ -5708,6 +5728,23 @@ export class Camera {
|
|
|
5708
5728
|
| CameraSetRotOptions
|
|
5709
5729
|
| CameraTargetOptions,
|
|
5710
5730
|
): void;
|
|
5731
|
+
/**
|
|
5732
|
+
* @beta
|
|
5733
|
+
* @remarks
|
|
5734
|
+
* Sets the current active camera with easing.
|
|
5735
|
+
*
|
|
5736
|
+
* This function can't be called in read-only mode.
|
|
5737
|
+
*
|
|
5738
|
+
* @param cameraPreset
|
|
5739
|
+
* Identifier of a camera preset file defined within JSON.
|
|
5740
|
+
* @param easeOptions
|
|
5741
|
+
* Options to ease the camera from the previous camera to the
|
|
5742
|
+
* current one.
|
|
5743
|
+
* @throws
|
|
5744
|
+
* Throws when easing to minecraft:first_person presets
|
|
5745
|
+
* currently without the experimental cameras toggle enabled.
|
|
5746
|
+
*/
|
|
5747
|
+
setCameraWithEase(cameraPreset: string, easeOptions: EaseOptions): void;
|
|
5711
5748
|
/**
|
|
5712
5749
|
* @remarks
|
|
5713
5750
|
* Sets the current active camera for the specified player and
|
|
@@ -5725,7 +5762,7 @@ export class Camera {
|
|
|
5725
5762
|
*/
|
|
5726
5763
|
setDefaultCamera(cameraPreset: string, easeOptions?: EaseOptions): void;
|
|
5727
5764
|
/**
|
|
5728
|
-
* @
|
|
5765
|
+
* @rc
|
|
5729
5766
|
* @remarks
|
|
5730
5767
|
* This function can't be called in read-only mode.
|
|
5731
5768
|
*
|
|
@@ -6811,7 +6848,7 @@ export class ContainerSlot {
|
|
|
6811
6848
|
*/
|
|
6812
6849
|
getLore(): string[];
|
|
6813
6850
|
/**
|
|
6814
|
-
* @
|
|
6851
|
+
* @rc
|
|
6815
6852
|
* @remarks
|
|
6816
6853
|
* Returns the lore value - a secondary display string - for an
|
|
6817
6854
|
* ItemStack. String lore lines will be converted to a {@link
|
|
@@ -7301,8 +7338,6 @@ export class Dimension {
|
|
|
7301
7338
|
* time to complete, so avoid using many of these calls within
|
|
7302
7339
|
* a particular tick.
|
|
7303
7340
|
*
|
|
7304
|
-
* This function can't be called in read-only mode.
|
|
7305
|
-
*
|
|
7306
7341
|
* @param pos
|
|
7307
7342
|
* Starting location to look for a biome to find.
|
|
7308
7343
|
* @param biomeToFind
|
|
@@ -7319,6 +7354,24 @@ export class Dimension {
|
|
|
7319
7354
|
* {@link Error}
|
|
7320
7355
|
*/
|
|
7321
7356
|
findClosestBiome(pos: Vector3, biomeToFind: BiomeType | string, options?: BiomeSearchOptions): Vector3 | undefined;
|
|
7357
|
+
/**
|
|
7358
|
+
* @beta
|
|
7359
|
+
* @remarks
|
|
7360
|
+
* Returns the biome type at the specified location.
|
|
7361
|
+
*
|
|
7362
|
+
* @param location
|
|
7363
|
+
* Location at which to check the biome.
|
|
7364
|
+
* @throws
|
|
7365
|
+
* An error will be thrown if the location is out of world
|
|
7366
|
+
* bounds.
|
|
7367
|
+
* An error will be thrown if the location is in an unloaded
|
|
7368
|
+
* chunk.
|
|
7369
|
+
*
|
|
7370
|
+
* {@link LocationInUnloadedChunkError}
|
|
7371
|
+
*
|
|
7372
|
+
* {@link LocationOutOfWorldBoundariesError}
|
|
7373
|
+
*/
|
|
7374
|
+
getBiome(location: Vector3): BiomeType;
|
|
7322
7375
|
/**
|
|
7323
7376
|
* @remarks
|
|
7324
7377
|
* Returns a block instance at the given location.
|
|
@@ -7349,8 +7402,6 @@ export class Dimension {
|
|
|
7349
7402
|
* based on the given options (by default will find the first
|
|
7350
7403
|
* solid block above).
|
|
7351
7404
|
*
|
|
7352
|
-
* This function can't be called in read-only mode.
|
|
7353
|
-
*
|
|
7354
7405
|
* @param location
|
|
7355
7406
|
* Location to retrieve the block above from.
|
|
7356
7407
|
* @param options
|
|
@@ -7364,8 +7415,6 @@ export class Dimension {
|
|
|
7364
7415
|
* based on the given options (by default will find the first
|
|
7365
7416
|
* solid block below).
|
|
7366
7417
|
*
|
|
7367
|
-
* This function can't be called in read-only mode.
|
|
7368
|
-
*
|
|
7369
7418
|
* @param location
|
|
7370
7419
|
* Location to retrieve the block below from.
|
|
7371
7420
|
* @param options
|
|
@@ -7531,8 +7580,6 @@ export class Dimension {
|
|
|
7531
7580
|
* Returns the total brightness level of light shining on a
|
|
7532
7581
|
* certain block position.
|
|
7533
7582
|
*
|
|
7534
|
-
* This function can't be called in read-only mode.
|
|
7535
|
-
*
|
|
7536
7583
|
* @param location
|
|
7537
7584
|
* Location of the block we want to check the brightness of.
|
|
7538
7585
|
* @returns
|
|
@@ -7567,8 +7614,6 @@ export class Dimension {
|
|
|
7567
7614
|
* Returns the brightness level of light shining from the sky
|
|
7568
7615
|
* on a certain block position.
|
|
7569
7616
|
*
|
|
7570
|
-
* This function can't be called in read-only mode.
|
|
7571
|
-
*
|
|
7572
7617
|
* @param location
|
|
7573
7618
|
* Position of the block we want to check the brightness of.
|
|
7574
7619
|
* @returns
|
|
@@ -7584,8 +7629,6 @@ export class Dimension {
|
|
|
7584
7629
|
* @remarks
|
|
7585
7630
|
* Returns the highest block at the given XZ location.
|
|
7586
7631
|
*
|
|
7587
|
-
* This function can't be called in read-only mode.
|
|
7588
|
-
*
|
|
7589
7632
|
* @param locationXZ
|
|
7590
7633
|
* Location to retrieve the topmost block for.
|
|
7591
7634
|
* @param minHeight
|
|
@@ -7599,13 +7642,21 @@ export class Dimension {
|
|
|
7599
7642
|
* @remarks
|
|
7600
7643
|
* Returns the current weather.
|
|
7601
7644
|
*
|
|
7602
|
-
* This function can't be called in read-only mode.
|
|
7603
|
-
*
|
|
7604
7645
|
* @returns
|
|
7605
7646
|
* Returns a WeatherType that explains the broad category of
|
|
7606
7647
|
* weather that is currently going on.
|
|
7607
7648
|
*/
|
|
7608
7649
|
getWeather(): WeatherType;
|
|
7650
|
+
/**
|
|
7651
|
+
* @beta
|
|
7652
|
+
* @remarks
|
|
7653
|
+
* Returns true if the chunk at the given location is loaded
|
|
7654
|
+
* (and valid for use with scripting).
|
|
7655
|
+
*
|
|
7656
|
+
* @param location
|
|
7657
|
+
* Location to check if the chunk is loaded.
|
|
7658
|
+
*/
|
|
7659
|
+
isChunkLoaded(location: Vector3): boolean;
|
|
7609
7660
|
/**
|
|
7610
7661
|
* @remarks
|
|
7611
7662
|
* Places the given feature into the dimension at the specified
|
|
@@ -8206,6 +8257,16 @@ export class EffectTypes {
|
|
|
8206
8257
|
static getAll(): EffectType[];
|
|
8207
8258
|
}
|
|
8208
8259
|
|
|
8260
|
+
/**
|
|
8261
|
+
* @beta
|
|
8262
|
+
* Represents a completely empty entry in a loot pool. If this
|
|
8263
|
+
* entry is chosen, no items will drop.
|
|
8264
|
+
*/
|
|
8265
|
+
// @ts-ignore Class inheritance allowed for native defined classes
|
|
8266
|
+
export class EmptyLootItem extends LootPoolEntry {
|
|
8267
|
+
private constructor();
|
|
8268
|
+
}
|
|
8269
|
+
|
|
8209
8270
|
/**
|
|
8210
8271
|
* Contains information on a type of enchantment.
|
|
8211
8272
|
*/
|
|
@@ -8726,6 +8787,23 @@ export class Entity {
|
|
|
8726
8787
|
* ```
|
|
8727
8788
|
*/
|
|
8728
8789
|
extinguishFire(useEffects?: boolean): boolean;
|
|
8790
|
+
/**
|
|
8791
|
+
* @beta
|
|
8792
|
+
* @remarks
|
|
8793
|
+
* Gets the solid blocks that this entity is directly standing
|
|
8794
|
+
* on. Ignores pressure plates.
|
|
8795
|
+
*
|
|
8796
|
+
* @param options
|
|
8797
|
+
* Additional configuration options for what blocks are
|
|
8798
|
+
* returned.
|
|
8799
|
+
* @returns
|
|
8800
|
+
* The solid blocks that this entity is directly standing on.
|
|
8801
|
+
* Returns an empty list if the entity is jumping or flying.
|
|
8802
|
+
* @throws This function can throw errors.
|
|
8803
|
+
*
|
|
8804
|
+
* {@link InvalidEntityError}
|
|
8805
|
+
*/
|
|
8806
|
+
getAllBlocksStandingOn(options?: GetBlocksStandingOnOptions): Block[];
|
|
8729
8807
|
/**
|
|
8730
8808
|
* @remarks
|
|
8731
8809
|
* Returns the first intersecting block from the direction that
|
|
@@ -8741,6 +8819,24 @@ export class Entity {
|
|
|
8741
8819
|
* {@link InvalidEntityError}
|
|
8742
8820
|
*/
|
|
8743
8821
|
getBlockFromViewDirection(options?: BlockRaycastOptions): BlockRaycastHit | undefined;
|
|
8822
|
+
/**
|
|
8823
|
+
* @beta
|
|
8824
|
+
* @remarks
|
|
8825
|
+
* Gets a single solid block closest to the center of the
|
|
8826
|
+
* entity that this entity is directly standing on. Ignores
|
|
8827
|
+
* pressure plates.
|
|
8828
|
+
*
|
|
8829
|
+
* @param options
|
|
8830
|
+
* Additional configuration options for what block is returned.
|
|
8831
|
+
* @returns
|
|
8832
|
+
* A single solid block closest to the center of the entity
|
|
8833
|
+
* that this entity is directly standing on. Undefined if
|
|
8834
|
+
* entity is flying or jumping.
|
|
8835
|
+
* @throws This function can throw errors.
|
|
8836
|
+
*
|
|
8837
|
+
* {@link InvalidEntityError}
|
|
8838
|
+
*/
|
|
8839
|
+
getBlockStandingOn(options?: GetBlocksStandingOnOptions): Block | undefined;
|
|
8744
8840
|
/**
|
|
8745
8841
|
* @remarks
|
|
8746
8842
|
* Gets a component (that represents additional capabilities)
|
|
@@ -12531,7 +12627,7 @@ export class InputInfo {
|
|
|
12531
12627
|
}
|
|
12532
12628
|
|
|
12533
12629
|
/**
|
|
12534
|
-
* @
|
|
12630
|
+
* @rc
|
|
12535
12631
|
* When present on an item, this item is a book item. Can
|
|
12536
12632
|
* access and modify the contents of the book and sign it.
|
|
12537
12633
|
*/
|
|
@@ -13844,7 +13940,7 @@ export class ItemStack {
|
|
|
13844
13940
|
*/
|
|
13845
13941
|
getLore(): string[];
|
|
13846
13942
|
/**
|
|
13847
|
-
* @
|
|
13943
|
+
* @rc
|
|
13848
13944
|
* @remarks
|
|
13849
13945
|
* Returns the lore value - a secondary display string - for an
|
|
13850
13946
|
* ItemStack. String lore lines will be converted to a {@link
|
|
@@ -14615,6 +14711,166 @@ export class ListBlockVolume extends BlockVolumeBase {
|
|
|
14615
14711
|
|
|
14616
14712
|
/**
|
|
14617
14713
|
* @beta
|
|
14714
|
+
* Represents a loot pool entry containing an item to drop.
|
|
14715
|
+
*/
|
|
14716
|
+
// @ts-ignore Class inheritance allowed for native defined classes
|
|
14717
|
+
export class LootItem extends LootPoolEntry {
|
|
14718
|
+
private constructor();
|
|
14719
|
+
/**
|
|
14720
|
+
* @remarks
|
|
14721
|
+
* The name of the item contained in this entry.
|
|
14722
|
+
*
|
|
14723
|
+
*/
|
|
14724
|
+
readonly name?: ItemType;
|
|
14725
|
+
}
|
|
14726
|
+
|
|
14727
|
+
/**
|
|
14728
|
+
* @beta
|
|
14729
|
+
* A collection of entries which individually determine loot
|
|
14730
|
+
* drops. Can contain values determining drop outcomes,
|
|
14731
|
+
* including rolls, bonus rolls and tiers.
|
|
14732
|
+
*/
|
|
14733
|
+
export class LootPool {
|
|
14734
|
+
private constructor();
|
|
14735
|
+
/**
|
|
14736
|
+
* @remarks
|
|
14737
|
+
* Returns the number of extra times a loot pool will be rolled
|
|
14738
|
+
* based on the player's luck level, represented as a range
|
|
14739
|
+
* from minimum to maximum rolls.
|
|
14740
|
+
*
|
|
14741
|
+
*/
|
|
14742
|
+
readonly bonusRolls: minecraftcommon.NumberRange;
|
|
14743
|
+
/**
|
|
14744
|
+
* @remarks
|
|
14745
|
+
* Gets a complete list of all loot pool entries contained in
|
|
14746
|
+
* the loot pool.
|
|
14747
|
+
*
|
|
14748
|
+
*/
|
|
14749
|
+
readonly entries: LootPoolEntry[];
|
|
14750
|
+
/**
|
|
14751
|
+
* @remarks
|
|
14752
|
+
* Returns the number of times a loot pool will be rolled,
|
|
14753
|
+
* represented as a range from minimum to maximum rolls.
|
|
14754
|
+
*
|
|
14755
|
+
*/
|
|
14756
|
+
readonly rolls: minecraftcommon.NumberRange;
|
|
14757
|
+
/**
|
|
14758
|
+
* @remarks
|
|
14759
|
+
* Gets the loot pool tier values for a given table if they
|
|
14760
|
+
* exist.
|
|
14761
|
+
*
|
|
14762
|
+
*/
|
|
14763
|
+
readonly tiers?: LootPoolTiers;
|
|
14764
|
+
}
|
|
14765
|
+
|
|
14766
|
+
/**
|
|
14767
|
+
* @beta
|
|
14768
|
+
* Represents one entry within Loot Table, which describes one
|
|
14769
|
+
* possible drop when a loot drop occurs. Can contain an item,
|
|
14770
|
+
* another loot table, a path to another loot table, or an
|
|
14771
|
+
* empty drop.
|
|
14772
|
+
*/
|
|
14773
|
+
export class LootPoolEntry {
|
|
14774
|
+
private constructor();
|
|
14775
|
+
/**
|
|
14776
|
+
* @remarks
|
|
14777
|
+
* Gets the quality of a given loot pool entry.
|
|
14778
|
+
*
|
|
14779
|
+
*/
|
|
14780
|
+
readonly quality: number;
|
|
14781
|
+
/**
|
|
14782
|
+
* @remarks
|
|
14783
|
+
* Gets the subtable of a given loot pool entry.
|
|
14784
|
+
*
|
|
14785
|
+
*/
|
|
14786
|
+
readonly subTable?: LootPoolEntry;
|
|
14787
|
+
/**
|
|
14788
|
+
* @remarks
|
|
14789
|
+
* Gets the weight of a given loot pool entry.
|
|
14790
|
+
*
|
|
14791
|
+
*/
|
|
14792
|
+
readonly weight: number;
|
|
14793
|
+
}
|
|
14794
|
+
|
|
14795
|
+
/**
|
|
14796
|
+
* @beta
|
|
14797
|
+
* Represents the values which determine loot drops in a tiered
|
|
14798
|
+
* loot pool. Potential drops from tiered loot pools are
|
|
14799
|
+
* ordered, and chosen via logic controlled by the values in
|
|
14800
|
+
* this object.
|
|
14801
|
+
*/
|
|
14802
|
+
export class LootPoolTiers {
|
|
14803
|
+
private constructor();
|
|
14804
|
+
/**
|
|
14805
|
+
* @remarks
|
|
14806
|
+
* The chance for each bonus roll attempt to upgrade the tier
|
|
14807
|
+
* of the dropped item.
|
|
14808
|
+
*
|
|
14809
|
+
*/
|
|
14810
|
+
readonly bonusChance: number;
|
|
14811
|
+
/**
|
|
14812
|
+
* @remarks
|
|
14813
|
+
* The number of attempts for the loot drop to upgrade its
|
|
14814
|
+
* tier, thereby incrementing its position in the loot pool
|
|
14815
|
+
* entry array, resulting in a higher tier drop.
|
|
14816
|
+
*
|
|
14817
|
+
*/
|
|
14818
|
+
readonly bonusRolls: number;
|
|
14819
|
+
/**
|
|
14820
|
+
* @remarks
|
|
14821
|
+
* Represents the upper bound for the starting point in
|
|
14822
|
+
* determining which tier of loot to drop. The lower bound is
|
|
14823
|
+
* always 1. For example, a value of 3 would result in the tier
|
|
14824
|
+
* drop logic starting at a randomly selected position in the
|
|
14825
|
+
* loot pool entry array between 1 and 3.
|
|
14826
|
+
*
|
|
14827
|
+
*/
|
|
14828
|
+
readonly initialRange: number;
|
|
14829
|
+
}
|
|
14830
|
+
|
|
14831
|
+
/**
|
|
14832
|
+
* @beta
|
|
14833
|
+
* Represents a single Loot Table, which determines what items
|
|
14834
|
+
* are generated when killing a mob, breaking a block, filling
|
|
14835
|
+
* a container, and more.
|
|
14836
|
+
*/
|
|
14837
|
+
export class LootTable {
|
|
14838
|
+
private constructor();
|
|
14839
|
+
/**
|
|
14840
|
+
* @remarks
|
|
14841
|
+
* Returns the path to the JSON file that represents this loot
|
|
14842
|
+
* table. Does not include file extension, or 'loot_tables/'
|
|
14843
|
+
* folder prefix. Example: `entities/creeper`.
|
|
14844
|
+
*
|
|
14845
|
+
*/
|
|
14846
|
+
readonly path: string;
|
|
14847
|
+
/**
|
|
14848
|
+
* @remarks
|
|
14849
|
+
* Returns the array of loot pools on a given loot table.
|
|
14850
|
+
*
|
|
14851
|
+
*/
|
|
14852
|
+
readonly pools: LootPool[];
|
|
14853
|
+
}
|
|
14854
|
+
|
|
14855
|
+
/**
|
|
14856
|
+
* @beta
|
|
14857
|
+
* Represents a loot pool entry containing another separate,
|
|
14858
|
+
* nested loot table.
|
|
14859
|
+
*/
|
|
14860
|
+
// @ts-ignore Class inheritance allowed for native defined classes
|
|
14861
|
+
export class LootTableEntry extends LootPoolEntry {
|
|
14862
|
+
private constructor();
|
|
14863
|
+
/**
|
|
14864
|
+
* @remarks
|
|
14865
|
+
* Gets the loot table stored as a subtable in the parent loot
|
|
14866
|
+
* pool.
|
|
14867
|
+
*
|
|
14868
|
+
*/
|
|
14869
|
+
readonly lootTable: LootTable;
|
|
14870
|
+
}
|
|
14871
|
+
|
|
14872
|
+
/**
|
|
14873
|
+
* @rc
|
|
14618
14874
|
* Manager for Loot Table related APIs. Allows for generation
|
|
14619
14875
|
* of drops from blocks and entities according to their loot
|
|
14620
14876
|
* tables.
|
|
@@ -14697,6 +14953,51 @@ export class LootTableManager {
|
|
|
14697
14953
|
* Can be empty if no loot dropped.
|
|
14698
14954
|
*/
|
|
14699
14955
|
generateLootFromEntityType(entityType: EntityType, tool?: ItemStack): ItemStack[] | undefined;
|
|
14956
|
+
/**
|
|
14957
|
+
* @beta
|
|
14958
|
+
* @remarks
|
|
14959
|
+
* Generates loot from a given LootTable.
|
|
14960
|
+
*
|
|
14961
|
+
* @param tool
|
|
14962
|
+
* Optional. The tool to use in the looting operation.
|
|
14963
|
+
* @returns
|
|
14964
|
+
* An array of item stacks dropped from the loot drop event.
|
|
14965
|
+
* Can be empty if no loot dropped, or undefined if the
|
|
14966
|
+
* provided tool is insufficient to mine the block.
|
|
14967
|
+
*/
|
|
14968
|
+
generateLootFromTable(lootTable: LootTable, tool?: ItemStack): ItemStack[] | undefined;
|
|
14969
|
+
/**
|
|
14970
|
+
* @beta
|
|
14971
|
+
* @remarks
|
|
14972
|
+
* Retrieves a single loot table from the level's current
|
|
14973
|
+
* registry.
|
|
14974
|
+
*
|
|
14975
|
+
* @param path
|
|
14976
|
+
* Path to the table to retrieve. Does not include file
|
|
14977
|
+
* extension, or 'loot_tables/' folder prefix. Example:
|
|
14978
|
+
* `entities/creeper`.
|
|
14979
|
+
* @returns
|
|
14980
|
+
* Returns a LootTable if one is found, or `undefined` if the
|
|
14981
|
+
* provided path does not correspond to an existing loot table.
|
|
14982
|
+
*/
|
|
14983
|
+
getLootTable(path: string): LootTable | undefined;
|
|
14984
|
+
}
|
|
14985
|
+
|
|
14986
|
+
/**
|
|
14987
|
+
* @beta
|
|
14988
|
+
* Represents a loot pool entry containing a reference to
|
|
14989
|
+
* another loot table, described by its path.
|
|
14990
|
+
*/
|
|
14991
|
+
// @ts-ignore Class inheritance allowed for native defined classes
|
|
14992
|
+
export class LootTableReference extends LootPoolEntry {
|
|
14993
|
+
private constructor();
|
|
14994
|
+
/**
|
|
14995
|
+
* @remarks
|
|
14996
|
+
* The path to the referenced loot table. Example:
|
|
14997
|
+
* `loot_tables/chests/village/village_bundle.json`
|
|
14998
|
+
*
|
|
14999
|
+
*/
|
|
15000
|
+
readonly path: string;
|
|
14700
15001
|
}
|
|
14701
15002
|
|
|
14702
15003
|
/**
|
|
@@ -14811,7 +15112,7 @@ export class PackSettingChangeAfterEvent {
|
|
|
14811
15112
|
* The value of the setting.
|
|
14812
15113
|
*
|
|
14813
15114
|
*/
|
|
14814
|
-
readonly settingValue: boolean | number;
|
|
15115
|
+
readonly settingValue: boolean | number | string;
|
|
14815
15116
|
}
|
|
14816
15117
|
|
|
14817
15118
|
/**
|
|
@@ -16923,6 +17224,65 @@ export class PlayerSpawnAfterEventSignal {
|
|
|
16923
17224
|
unsubscribe(callback: (arg0: PlayerSpawnAfterEvent) => void): void;
|
|
16924
17225
|
}
|
|
16925
17226
|
|
|
17227
|
+
/**
|
|
17228
|
+
* @beta
|
|
17229
|
+
* Contains information regarding a player starting to swing
|
|
17230
|
+
* their arm.
|
|
17231
|
+
*/
|
|
17232
|
+
export class PlayerSwingStartAfterEvent {
|
|
17233
|
+
private constructor();
|
|
17234
|
+
/**
|
|
17235
|
+
* @remarks
|
|
17236
|
+
* The item stack being held by the player at the start of
|
|
17237
|
+
* their swing.
|
|
17238
|
+
*
|
|
17239
|
+
*/
|
|
17240
|
+
readonly heldItemStack?: ItemStack;
|
|
17241
|
+
/**
|
|
17242
|
+
* @remarks
|
|
17243
|
+
* Source Player for this event.
|
|
17244
|
+
*
|
|
17245
|
+
*/
|
|
17246
|
+
readonly player: Player;
|
|
17247
|
+
}
|
|
17248
|
+
|
|
17249
|
+
/**
|
|
17250
|
+
* @beta
|
|
17251
|
+
* Manages callbacks that are connected to when a player starts
|
|
17252
|
+
* to swing their arm (e.g. attacking, using an item,
|
|
17253
|
+
* interacting).
|
|
17254
|
+
*/
|
|
17255
|
+
export class PlayerSwingStartAfterEventSignal {
|
|
17256
|
+
private constructor();
|
|
17257
|
+
/**
|
|
17258
|
+
* @remarks
|
|
17259
|
+
* Adds a callback that will be called when a player starts to
|
|
17260
|
+
* swing their arm (e.g. attacking, using an item,
|
|
17261
|
+
* interacting).
|
|
17262
|
+
*
|
|
17263
|
+
* This function can't be called in read-only mode.
|
|
17264
|
+
*
|
|
17265
|
+
* This function can be called in early-execution mode.
|
|
17266
|
+
*
|
|
17267
|
+
*/
|
|
17268
|
+
subscribe(
|
|
17269
|
+
callback: (arg0: PlayerSwingStartAfterEvent) => void,
|
|
17270
|
+
options?: PlayerSwingEventOptions,
|
|
17271
|
+
): (arg0: PlayerSwingStartAfterEvent) => void;
|
|
17272
|
+
/**
|
|
17273
|
+
* @remarks
|
|
17274
|
+
* Removes a callback from being called when a player starts to
|
|
17275
|
+
* swing their arm (e.g. attacking, using an item,
|
|
17276
|
+
* interacting).
|
|
17277
|
+
*
|
|
17278
|
+
* This function can't be called in read-only mode.
|
|
17279
|
+
*
|
|
17280
|
+
* This function can be called in early-execution mode.
|
|
17281
|
+
*
|
|
17282
|
+
*/
|
|
17283
|
+
unsubscribe(callback: (arg0: PlayerSwingStartAfterEvent) => void): void;
|
|
17284
|
+
}
|
|
17285
|
+
|
|
16926
17286
|
/**
|
|
16927
17287
|
* @beta
|
|
16928
17288
|
* Represents how the potion effect is delivered.
|
|
@@ -19382,7 +19742,14 @@ export class World {
|
|
|
19382
19742
|
*/
|
|
19383
19743
|
getEntity(id: string): Entity | undefined;
|
|
19384
19744
|
/**
|
|
19385
|
-
* @
|
|
19745
|
+
* @rc
|
|
19746
|
+
* @remarks
|
|
19747
|
+
* Returns a manager capable of generating loot from an
|
|
19748
|
+
* assortment of sources.
|
|
19749
|
+
*
|
|
19750
|
+
* @returns
|
|
19751
|
+
* A loot table manager with a variety of loot generation
|
|
19752
|
+
* methods.
|
|
19386
19753
|
*/
|
|
19387
19754
|
getLootTableManager(): LootTableManager;
|
|
19388
19755
|
/**
|
|
@@ -19399,7 +19766,7 @@ export class World {
|
|
|
19399
19766
|
* This function can be called in early-execution mode.
|
|
19400
19767
|
*
|
|
19401
19768
|
*/
|
|
19402
|
-
getPackSettings(): Record<string, boolean | number>;
|
|
19769
|
+
getPackSettings(): Record<string, boolean | number | string>;
|
|
19403
19770
|
/**
|
|
19404
19771
|
* @remarks
|
|
19405
19772
|
* Returns a set of players based on a set of conditions
|
|
@@ -20008,6 +20375,13 @@ export class WorldAfterEvents {
|
|
|
20008
20375
|
*
|
|
20009
20376
|
*/
|
|
20010
20377
|
readonly playerSpawn: PlayerSpawnAfterEventSignal;
|
|
20378
|
+
/**
|
|
20379
|
+
* @beta
|
|
20380
|
+
* @remarks
|
|
20381
|
+
* This property can be read in early-execution mode.
|
|
20382
|
+
*
|
|
20383
|
+
*/
|
|
20384
|
+
readonly playerSwingStart: PlayerSwingStartAfterEventSignal;
|
|
20011
20385
|
/**
|
|
20012
20386
|
* @remarks
|
|
20013
20387
|
* A pressure plate has popped back up (i.e., there are no
|
|
@@ -20580,12 +20954,8 @@ export interface CameraFixedBoomOptions {
|
|
|
20580
20954
|
}
|
|
20581
20955
|
|
|
20582
20956
|
/**
|
|
20583
|
-
* @
|
|
20957
|
+
* @rc
|
|
20584
20958
|
* Used to change the field of view of the current camera.
|
|
20585
|
-
*
|
|
20586
|
-
* Required Experiments:
|
|
20587
|
-
* - Required Experiment Toggle: Experimental Creator Cameras
|
|
20588
|
-
*
|
|
20589
20959
|
*/
|
|
20590
20960
|
export interface CameraFovOptions {
|
|
20591
20961
|
easeOptions?: EaseOptions;
|
|
@@ -21565,6 +21935,29 @@ export interface ExplosionOptions {
|
|
|
21565
21935
|
source?: Entity;
|
|
21566
21936
|
}
|
|
21567
21937
|
|
|
21938
|
+
/**
|
|
21939
|
+
* @beta
|
|
21940
|
+
* Contains additional options for getBlockStandingOn and
|
|
21941
|
+
* getAllBlocksStandingOn.
|
|
21942
|
+
*/
|
|
21943
|
+
export interface GetBlocksStandingOnOptions {
|
|
21944
|
+
/**
|
|
21945
|
+
* @remarks
|
|
21946
|
+
* When specified, the function will include / exclude what
|
|
21947
|
+
* block(s) are returned based on the block filter.
|
|
21948
|
+
*
|
|
21949
|
+
*/
|
|
21950
|
+
blockFilter?: BlockFilter;
|
|
21951
|
+
/**
|
|
21952
|
+
* @remarks
|
|
21953
|
+
* If true, all blocks of height 0.2 or lower like trapdoors
|
|
21954
|
+
* and carpets will be ignored, and the block underneath will
|
|
21955
|
+
* be returned.
|
|
21956
|
+
*
|
|
21957
|
+
*/
|
|
21958
|
+
ignoreThinBlocks?: boolean;
|
|
21959
|
+
}
|
|
21960
|
+
|
|
21568
21961
|
/**
|
|
21569
21962
|
* Greater than operator.
|
|
21570
21963
|
*/
|
|
@@ -21959,6 +22352,24 @@ export interface PlayerSoundOptions {
|
|
|
21959
22352
|
volume?: number;
|
|
21960
22353
|
}
|
|
21961
22354
|
|
|
22355
|
+
/**
|
|
22356
|
+
* @beta
|
|
22357
|
+
* An interface that is passed into {@link
|
|
22358
|
+
* @minecraft/Server.PlayerSwingStartAfterEvent.subscribe} that
|
|
22359
|
+
* filters out which events are passed to the provided
|
|
22360
|
+
* callback.
|
|
22361
|
+
*/
|
|
22362
|
+
export interface PlayerSwingEventOptions {
|
|
22363
|
+
/**
|
|
22364
|
+
* @remarks
|
|
22365
|
+
* The held item option that the callback should be called for.
|
|
22366
|
+
* If undefined, the callback will be called whether or not the
|
|
22367
|
+
* player is holding an item in their hand.
|
|
22368
|
+
*
|
|
22369
|
+
*/
|
|
22370
|
+
heldItemOption?: HeldItemOption;
|
|
22371
|
+
}
|
|
22372
|
+
|
|
21962
22373
|
/**
|
|
21963
22374
|
* Optional arguments for
|
|
21964
22375
|
* @minecraft/server.EntityProjectileComponent.shoot.
|
|
@@ -22566,7 +22977,7 @@ export class BlockCustomComponentReloadVersionError extends Error {
|
|
|
22566
22977
|
}
|
|
22567
22978
|
|
|
22568
22979
|
/**
|
|
22569
|
-
* @
|
|
22980
|
+
* @rc
|
|
22570
22981
|
* Errors that can be thrown when using {@link
|
|
22571
22982
|
* ItemBookComponent}.
|
|
22572
22983
|
*/
|
|
@@ -22584,7 +22995,7 @@ export class BookError extends Error {
|
|
|
22584
22995
|
}
|
|
22585
22996
|
|
|
22586
22997
|
/**
|
|
22587
|
-
* @
|
|
22998
|
+
* @rc
|
|
22588
22999
|
* The error called if page content being set on an {@link
|
|
22589
23000
|
* ItemBookComponent} are invalid ie. exceeding the maximum
|
|
22590
23001
|
* page length.
|
|
@@ -22729,7 +23140,7 @@ export class InvalidEntityError extends Error {
|
|
|
22729
23140
|
}
|
|
22730
23141
|
|
|
22731
23142
|
/**
|
|
22732
|
-
* @
|
|
23143
|
+
* @rc
|
|
22733
23144
|
* The error called when an item is invalid. This can occur
|
|
22734
23145
|
* when accessing components on a removed item.
|
|
22735
23146
|
*/
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@minecraft/server",
|
|
3
|
-
"version": "2.3.0-beta.1.21.110-preview.
|
|
3
|
+
"version": "2.3.0-beta.1.21.110-preview.25",
|
|
4
4
|
"description": "",
|
|
5
5
|
"contributors": [
|
|
6
6
|
{
|
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
],
|
|
15
15
|
"peerDependencies": {
|
|
16
16
|
"@minecraft/common": "^1.2.0",
|
|
17
|
-
"@minecraft/vanilla-data": ">=1.20.70 || 1.21.110-preview.
|
|
17
|
+
"@minecraft/vanilla-data": ">=1.20.70 || 1.21.110-preview.25"
|
|
18
18
|
},
|
|
19
19
|
"license": "MIT"
|
|
20
20
|
}
|