@minecraft/server 2.3.0-beta.1.21.110-preview.22 → 2.3.0-beta.1.21.110-preview.24
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 +210 -127
- package/package.json +2 -2
package/index.d.ts
CHANGED
|
@@ -171,7 +171,6 @@ export enum ButtonState {
|
|
|
171
171
|
}
|
|
172
172
|
|
|
173
173
|
/**
|
|
174
|
-
* @rc
|
|
175
174
|
* The required permission level to execute the custom command.
|
|
176
175
|
*/
|
|
177
176
|
export enum CommandPermissionLevel {
|
|
@@ -302,7 +301,6 @@ export enum ContainerRulesErrorReason {
|
|
|
302
301
|
}
|
|
303
302
|
|
|
304
303
|
/**
|
|
305
|
-
* @rc
|
|
306
304
|
* Reason why custom command registration failed.
|
|
307
305
|
*/
|
|
308
306
|
export enum CustomCommandErrorReason {
|
|
@@ -356,7 +354,6 @@ export enum CustomCommandErrorReason {
|
|
|
356
354
|
}
|
|
357
355
|
|
|
358
356
|
/**
|
|
359
|
-
* @rc
|
|
360
357
|
* The types of paramaters accepted by a custom command.
|
|
361
358
|
*/
|
|
362
359
|
export enum CustomCommandParamType {
|
|
@@ -430,7 +427,6 @@ export enum CustomCommandParamType {
|
|
|
430
427
|
}
|
|
431
428
|
|
|
432
429
|
/**
|
|
433
|
-
* @rc
|
|
434
430
|
* Who executed the command.
|
|
435
431
|
*/
|
|
436
432
|
export enum CustomCommandSource {
|
|
@@ -455,9 +451,6 @@ export enum CustomCommandSource {
|
|
|
455
451
|
Server = 'Server',
|
|
456
452
|
}
|
|
457
453
|
|
|
458
|
-
/**
|
|
459
|
-
* @rc
|
|
460
|
-
*/
|
|
461
454
|
export enum CustomCommandStatus {
|
|
462
455
|
Success = 0,
|
|
463
456
|
Failure = 1,
|
|
@@ -1086,7 +1079,6 @@ export enum EntityComponentTypes {
|
|
|
1086
1079
|
*/
|
|
1087
1080
|
OnFire = 'minecraft:onfire',
|
|
1088
1081
|
/**
|
|
1089
|
-
* @rc
|
|
1090
1082
|
* @remarks
|
|
1091
1083
|
* Use this component to read the exhaustion of a player. This
|
|
1092
1084
|
* is only available on players.
|
|
@@ -1094,7 +1086,6 @@ export enum EntityComponentTypes {
|
|
|
1094
1086
|
*/
|
|
1095
1087
|
Exhaustion = 'minecraft:player.exhaustion',
|
|
1096
1088
|
/**
|
|
1097
|
-
* @rc
|
|
1098
1089
|
* @remarks
|
|
1099
1090
|
* Use this component to read the hunger of a player. This is
|
|
1100
1091
|
* only available on players.
|
|
@@ -1102,7 +1093,6 @@ export enum EntityComponentTypes {
|
|
|
1102
1093
|
*/
|
|
1103
1094
|
Hunger = 'minecraft:player.hunger',
|
|
1104
1095
|
/**
|
|
1105
|
-
* @rc
|
|
1106
1096
|
* @remarks
|
|
1107
1097
|
* Use this component to read the saturation of a player. This
|
|
1108
1098
|
* is only available on players.
|
|
@@ -2462,7 +2452,6 @@ export enum PlatformType {
|
|
|
2462
2452
|
}
|
|
2463
2453
|
|
|
2464
2454
|
/**
|
|
2465
|
-
* @rc
|
|
2466
2455
|
* Specifies the player inventory type.
|
|
2467
2456
|
*/
|
|
2468
2457
|
export enum PlayerInventoryType {
|
|
@@ -2481,7 +2470,6 @@ export enum PlayerInventoryType {
|
|
|
2481
2470
|
}
|
|
2482
2471
|
|
|
2483
2472
|
/**
|
|
2484
|
-
* @rc
|
|
2485
2473
|
* The player permission level.
|
|
2486
2474
|
*/
|
|
2487
2475
|
export enum PlayerPermissionLevel {
|
|
@@ -3584,7 +3572,6 @@ export class Block {
|
|
|
3584
3572
|
*/
|
|
3585
3573
|
readonly isWaterlogged: boolean;
|
|
3586
3574
|
/**
|
|
3587
|
-
* @rc
|
|
3588
3575
|
* @remarks
|
|
3589
3576
|
* Key for the localization of this block's name used in .lang
|
|
3590
3577
|
* files.
|
|
@@ -3821,6 +3808,23 @@ export class Block {
|
|
|
3821
3808
|
* {@link LocationOutOfWorldBoundariesError}
|
|
3822
3809
|
*/
|
|
3823
3810
|
getItemStack(amount?: number, withData?: boolean): ItemStack | undefined;
|
|
3811
|
+
/**
|
|
3812
|
+
* @beta
|
|
3813
|
+
* @remarks
|
|
3814
|
+
* Returns the total brightness level of light shining on a
|
|
3815
|
+
* certain block.
|
|
3816
|
+
*
|
|
3817
|
+
* This function can't be called in read-only mode.
|
|
3818
|
+
*
|
|
3819
|
+
* @returns
|
|
3820
|
+
* The brightness level on the block.
|
|
3821
|
+
* @throws This function can throw errors.
|
|
3822
|
+
*
|
|
3823
|
+
* {@link minecraftcommon.InvalidArgumentError}
|
|
3824
|
+
*
|
|
3825
|
+
* {@link LocationInUnloadedChunkError}
|
|
3826
|
+
*/
|
|
3827
|
+
getLightLevel(): number;
|
|
3824
3828
|
/**
|
|
3825
3829
|
* @beta
|
|
3826
3830
|
* @throws This function can throw errors.
|
|
@@ -3844,6 +3848,23 @@ export class Block {
|
|
|
3844
3848
|
* {@link LocationOutOfWorldBoundariesError}
|
|
3845
3849
|
*/
|
|
3846
3850
|
getRedstonePower(): number | undefined;
|
|
3851
|
+
/**
|
|
3852
|
+
* @beta
|
|
3853
|
+
* @remarks
|
|
3854
|
+
* Returns the brightness level of light shining from the sky
|
|
3855
|
+
* on a certain block.
|
|
3856
|
+
*
|
|
3857
|
+
* This function can't be called in read-only mode.
|
|
3858
|
+
*
|
|
3859
|
+
* @returns
|
|
3860
|
+
* The brightness level on the block.
|
|
3861
|
+
* @throws This function can throw errors.
|
|
3862
|
+
*
|
|
3863
|
+
* {@link minecraftcommon.InvalidArgumentError}
|
|
3864
|
+
*
|
|
3865
|
+
* {@link LocationInUnloadedChunkError}
|
|
3866
|
+
*/
|
|
3867
|
+
getSkyLightLevel(): number;
|
|
3847
3868
|
/**
|
|
3848
3869
|
* @remarks
|
|
3849
3870
|
* Returns a set of tags for a block.
|
|
@@ -5687,6 +5708,23 @@ export class Camera {
|
|
|
5687
5708
|
| CameraSetRotOptions
|
|
5688
5709
|
| CameraTargetOptions,
|
|
5689
5710
|
): void;
|
|
5711
|
+
/**
|
|
5712
|
+
* @beta
|
|
5713
|
+
* @remarks
|
|
5714
|
+
* Sets the current active camera with easing.
|
|
5715
|
+
*
|
|
5716
|
+
* This function can't be called in read-only mode.
|
|
5717
|
+
*
|
|
5718
|
+
* @param cameraPreset
|
|
5719
|
+
* Identifier of a camera preset file defined within JSON.
|
|
5720
|
+
* @param easeOptions
|
|
5721
|
+
* Options to ease the camera from the previous camera to the
|
|
5722
|
+
* current one.
|
|
5723
|
+
* @throws
|
|
5724
|
+
* Throws when easing to minecraft:first_person presets
|
|
5725
|
+
* currently without the experimental cameras toggle enabled.
|
|
5726
|
+
*/
|
|
5727
|
+
setCameraWithEase(cameraPreset: string, easeOptions: EaseOptions): void;
|
|
5690
5728
|
/**
|
|
5691
5729
|
* @remarks
|
|
5692
5730
|
* Sets the current active camera for the specified player and
|
|
@@ -6328,7 +6366,6 @@ export class Container {
|
|
|
6328
6366
|
*/
|
|
6329
6367
|
clearAll(): void;
|
|
6330
6368
|
/**
|
|
6331
|
-
* @rc
|
|
6332
6369
|
* @remarks
|
|
6333
6370
|
* Attempts to find an item inside the container
|
|
6334
6371
|
*
|
|
@@ -6340,7 +6377,6 @@ export class Container {
|
|
|
6340
6377
|
*/
|
|
6341
6378
|
contains(itemStack: ItemStack): boolean;
|
|
6342
6379
|
/**
|
|
6343
|
-
* @rc
|
|
6344
6380
|
* @remarks
|
|
6345
6381
|
* Find the index of the first instance of an item inside the
|
|
6346
6382
|
* container
|
|
@@ -6353,7 +6389,6 @@ export class Container {
|
|
|
6353
6389
|
*/
|
|
6354
6390
|
find(itemStack: ItemStack): number | undefined;
|
|
6355
6391
|
/**
|
|
6356
|
-
* @rc
|
|
6357
6392
|
* @remarks
|
|
6358
6393
|
* Find the index of the last instance of an item inside the
|
|
6359
6394
|
* container
|
|
@@ -6366,7 +6401,6 @@ export class Container {
|
|
|
6366
6401
|
*/
|
|
6367
6402
|
findLast(itemStack: ItemStack): number | undefined;
|
|
6368
6403
|
/**
|
|
6369
|
-
* @rc
|
|
6370
6404
|
* @remarks
|
|
6371
6405
|
* Finds the index of the first empty slot inside the container
|
|
6372
6406
|
*
|
|
@@ -6376,7 +6410,6 @@ export class Container {
|
|
|
6376
6410
|
*/
|
|
6377
6411
|
firstEmptySlot(): number | undefined;
|
|
6378
6412
|
/**
|
|
6379
|
-
* @rc
|
|
6380
6413
|
* @remarks
|
|
6381
6414
|
* Finds the index of the first item inside the container
|
|
6382
6415
|
*
|
|
@@ -6979,7 +7012,6 @@ export class ContainerSlot {
|
|
|
6979
7012
|
}
|
|
6980
7013
|
|
|
6981
7014
|
/**
|
|
6982
|
-
* @rc
|
|
6983
7015
|
* Details about the origins of the command.
|
|
6984
7016
|
*/
|
|
6985
7017
|
export class CustomCommandOrigin {
|
|
@@ -7014,7 +7046,6 @@ export class CustomCommandOrigin {
|
|
|
7014
7046
|
}
|
|
7015
7047
|
|
|
7016
7048
|
/**
|
|
7017
|
-
* @rc
|
|
7018
7049
|
* Provides the functionality for registering custom commands.
|
|
7019
7050
|
*/
|
|
7020
7051
|
export class CustomCommandRegistry {
|
|
@@ -7157,7 +7188,6 @@ export class Dimension {
|
|
|
7157
7188
|
*/
|
|
7158
7189
|
readonly id: string;
|
|
7159
7190
|
/**
|
|
7160
|
-
* @rc
|
|
7161
7191
|
* @remarks
|
|
7162
7192
|
* Key for the localization of a dimension's name used by
|
|
7163
7193
|
* language files.
|
|
@@ -7306,6 +7336,24 @@ export class Dimension {
|
|
|
7306
7336
|
* {@link Error}
|
|
7307
7337
|
*/
|
|
7308
7338
|
findClosestBiome(pos: Vector3, biomeToFind: BiomeType | string, options?: BiomeSearchOptions): Vector3 | undefined;
|
|
7339
|
+
/**
|
|
7340
|
+
* @beta
|
|
7341
|
+
* @remarks
|
|
7342
|
+
* Returns the biome type at the specified location.
|
|
7343
|
+
*
|
|
7344
|
+
* @param location
|
|
7345
|
+
* Location at which to check the biome.
|
|
7346
|
+
* @throws
|
|
7347
|
+
* An error will be thrown if the location is out of world
|
|
7348
|
+
* bounds.
|
|
7349
|
+
* An error will be thrown if the location is in an unloaded
|
|
7350
|
+
* chunk.
|
|
7351
|
+
*
|
|
7352
|
+
* {@link LocationInUnloadedChunkError}
|
|
7353
|
+
*
|
|
7354
|
+
* {@link LocationOutOfWorldBoundariesError}
|
|
7355
|
+
*/
|
|
7356
|
+
getBiome(location: Vector3): BiomeType;
|
|
7309
7357
|
/**
|
|
7310
7358
|
* @remarks
|
|
7311
7359
|
* Returns a block instance at the given location.
|
|
@@ -8359,7 +8407,6 @@ export class Entity {
|
|
|
8359
8407
|
*/
|
|
8360
8408
|
readonly isValid: boolean;
|
|
8361
8409
|
/**
|
|
8362
|
-
* @rc
|
|
8363
8410
|
* @remarks
|
|
8364
8411
|
* Key for the localization of this entity's name used in .lang
|
|
8365
8412
|
* files.
|
|
@@ -8714,6 +8761,23 @@ export class Entity {
|
|
|
8714
8761
|
* ```
|
|
8715
8762
|
*/
|
|
8716
8763
|
extinguishFire(useEffects?: boolean): boolean;
|
|
8764
|
+
/**
|
|
8765
|
+
* @beta
|
|
8766
|
+
* @remarks
|
|
8767
|
+
* Gets the solid blocks that this entity is directly standing
|
|
8768
|
+
* on. Ignores pressure plates.
|
|
8769
|
+
*
|
|
8770
|
+
* @param options
|
|
8771
|
+
* Additional configuration options for what blocks are
|
|
8772
|
+
* returned.
|
|
8773
|
+
* @returns
|
|
8774
|
+
* The solid blocks that this entity is directly standing on.
|
|
8775
|
+
* Returns an empty list if the entity is jumping or flying.
|
|
8776
|
+
* @throws This function can throw errors.
|
|
8777
|
+
*
|
|
8778
|
+
* {@link InvalidEntityError}
|
|
8779
|
+
*/
|
|
8780
|
+
getAllBlocksStandingOn(options?: GetBlocksStandingOnOptions): Block[];
|
|
8717
8781
|
/**
|
|
8718
8782
|
* @remarks
|
|
8719
8783
|
* Returns the first intersecting block from the direction that
|
|
@@ -8729,6 +8793,24 @@ export class Entity {
|
|
|
8729
8793
|
* {@link InvalidEntityError}
|
|
8730
8794
|
*/
|
|
8731
8795
|
getBlockFromViewDirection(options?: BlockRaycastOptions): BlockRaycastHit | undefined;
|
|
8796
|
+
/**
|
|
8797
|
+
* @beta
|
|
8798
|
+
* @remarks
|
|
8799
|
+
* Gets a single solid block closest to the center of the
|
|
8800
|
+
* entity that this entity is directly standing on. Ignores
|
|
8801
|
+
* pressure plates.
|
|
8802
|
+
*
|
|
8803
|
+
* @param options
|
|
8804
|
+
* Additional configuration options for what block is returned.
|
|
8805
|
+
* @returns
|
|
8806
|
+
* A single solid block closest to the center of the entity
|
|
8807
|
+
* that this entity is directly standing on. Undefined if
|
|
8808
|
+
* entity is flying or jumping.
|
|
8809
|
+
* @throws This function can throw errors.
|
|
8810
|
+
*
|
|
8811
|
+
* {@link InvalidEntityError}
|
|
8812
|
+
*/
|
|
8813
|
+
getBlockStandingOn(options?: GetBlocksStandingOnOptions): Block | undefined;
|
|
8732
8814
|
/**
|
|
8733
8815
|
* @remarks
|
|
8734
8816
|
* Gets a component (that represents additional capabilities)
|
|
@@ -9876,7 +9958,6 @@ export class EntityDieAfterEventSignal {
|
|
|
9876
9958
|
export class EntityEquippableComponent extends EntityComponent {
|
|
9877
9959
|
private constructor();
|
|
9878
9960
|
/**
|
|
9879
|
-
* @rc
|
|
9880
9961
|
* @remarks
|
|
9881
9962
|
* Returns the total Armor level of the owner.
|
|
9882
9963
|
*
|
|
@@ -9886,7 +9967,6 @@ export class EntityEquippableComponent extends EntityComponent {
|
|
|
9886
9967
|
*/
|
|
9887
9968
|
readonly totalArmor: number;
|
|
9888
9969
|
/**
|
|
9889
|
-
* @rc
|
|
9890
9970
|
* @remarks
|
|
9891
9971
|
* Returns the total Toughness level of the owner.
|
|
9892
9972
|
*
|
|
@@ -9937,7 +10017,6 @@ export class EntityEquippableComponent extends EntityComponent {
|
|
|
9937
10017
|
}
|
|
9938
10018
|
|
|
9939
10019
|
/**
|
|
9940
|
-
* @rc
|
|
9941
10020
|
* Defines the interactions with this entity for Exhaustion.
|
|
9942
10021
|
* Wraps the `minecraft.player.exhaustion` attribute.
|
|
9943
10022
|
*/
|
|
@@ -10235,7 +10314,6 @@ export class EntityHitEntityAfterEventSignal {
|
|
|
10235
10314
|
}
|
|
10236
10315
|
|
|
10237
10316
|
/**
|
|
10238
|
-
* @rc
|
|
10239
10317
|
* Defines the interactions with this entity for hunger. Wraps
|
|
10240
10318
|
* the `minecraft.player.hunger` attribute.
|
|
10241
10319
|
*/
|
|
@@ -11603,7 +11681,6 @@ export class EntityRidingComponent extends EntityComponent {
|
|
|
11603
11681
|
}
|
|
11604
11682
|
|
|
11605
11683
|
/**
|
|
11606
|
-
* @rc
|
|
11607
11684
|
* Defines the interactions with this entity for Saturation.
|
|
11608
11685
|
* Wraps the `minecraft.player.saturation` attribute.
|
|
11609
11686
|
*/
|
|
@@ -13448,25 +13525,26 @@ export class ItemPotionComponent extends ItemComponent {
|
|
|
13448
13525
|
private constructor();
|
|
13449
13526
|
/**
|
|
13450
13527
|
* @remarks
|
|
13451
|
-
* The
|
|
13528
|
+
* The PotionDeliveryType associated with the potion item.
|
|
13452
13529
|
*
|
|
13453
13530
|
* @throws This property can throw when used.
|
|
13454
|
-
*/
|
|
13455
|
-
readonly potionEffectType: PotionEffectType;
|
|
13456
|
-
/**
|
|
13457
|
-
* @remarks
|
|
13458
|
-
* The PotionLiquidType associated with the potion item.
|
|
13459
13531
|
*
|
|
13460
|
-
* @
|
|
13532
|
+
* {@link minecraftcommon.EngineError}
|
|
13533
|
+
*
|
|
13534
|
+
* {@link Error}
|
|
13461
13535
|
*/
|
|
13462
|
-
readonly
|
|
13536
|
+
readonly potionDeliveryType: PotionDeliveryType;
|
|
13463
13537
|
/**
|
|
13464
13538
|
* @remarks
|
|
13465
|
-
* The
|
|
13539
|
+
* The PotionEffectType associated with the potion item.
|
|
13466
13540
|
*
|
|
13467
13541
|
* @throws This property can throw when used.
|
|
13542
|
+
*
|
|
13543
|
+
* {@link minecraftcommon.EngineError}
|
|
13544
|
+
*
|
|
13545
|
+
* {@link Error}
|
|
13468
13546
|
*/
|
|
13469
|
-
readonly
|
|
13547
|
+
readonly potionEffectType: PotionEffectType;
|
|
13470
13548
|
static readonly componentId = 'minecraft:potion';
|
|
13471
13549
|
}
|
|
13472
13550
|
|
|
@@ -13631,7 +13709,6 @@ export class ItemStack {
|
|
|
13631
13709
|
*/
|
|
13632
13710
|
keepOnDeath: boolean;
|
|
13633
13711
|
/**
|
|
13634
|
-
* @rc
|
|
13635
13712
|
* @remarks
|
|
13636
13713
|
* Key for the localization of this items's name used in .lang
|
|
13637
13714
|
* files.
|
|
@@ -14050,16 +14127,6 @@ export class ItemStack {
|
|
|
14050
14127
|
* ```
|
|
14051
14128
|
*/
|
|
14052
14129
|
setLore(loreList?: (RawMessage | string)[]): void;
|
|
14053
|
-
/**
|
|
14054
|
-
* @beta
|
|
14055
|
-
* @remarks
|
|
14056
|
-
* Helper function for creating potion items.
|
|
14057
|
-
*
|
|
14058
|
-
* This function can't be called in read-only mode.
|
|
14059
|
-
*
|
|
14060
|
-
* @throws This function can throw errors.
|
|
14061
|
-
*/
|
|
14062
|
-
static createPotion(options: PotionOptions): ItemStack;
|
|
14063
14130
|
}
|
|
14064
14131
|
|
|
14065
14132
|
/**
|
|
@@ -14814,7 +14881,7 @@ export class PackSettingChangeAfterEvent {
|
|
|
14814
14881
|
* The value of the setting.
|
|
14815
14882
|
*
|
|
14816
14883
|
*/
|
|
14817
|
-
readonly settingValue: boolean | number;
|
|
14884
|
+
readonly settingValue: boolean | number | string;
|
|
14818
14885
|
}
|
|
14819
14886
|
|
|
14820
14887
|
/**
|
|
@@ -14986,7 +15053,6 @@ export class Player extends Entity {
|
|
|
14986
15053
|
*/
|
|
14987
15054
|
readonly clientSystemInfo: ClientSystemInfo;
|
|
14988
15055
|
/**
|
|
14989
|
-
* @rc
|
|
14990
15056
|
* @remarks
|
|
14991
15057
|
* This property can't be edited in read-only mode.
|
|
14992
15058
|
*
|
|
@@ -15069,7 +15135,6 @@ export class Player extends Entity {
|
|
|
15069
15135
|
*/
|
|
15070
15136
|
readonly onScreenDisplay: ScreenDisplay;
|
|
15071
15137
|
/**
|
|
15072
|
-
* @rc
|
|
15073
15138
|
* @throws This property can throw when used.
|
|
15074
15139
|
*
|
|
15075
15140
|
* {@link InvalidEntityError}
|
|
@@ -16016,7 +16081,6 @@ export class PlayerGameModeChangeBeforeEventSignal {
|
|
|
16016
16081
|
}
|
|
16017
16082
|
|
|
16018
16083
|
/**
|
|
16019
|
-
* @rc
|
|
16020
16084
|
* Contains information regarding an event after changing the
|
|
16021
16085
|
* selected hotbar slot for a player.
|
|
16022
16086
|
*/
|
|
@@ -16049,7 +16113,6 @@ export class PlayerHotbarSelectedSlotChangeAfterEvent {
|
|
|
16049
16113
|
}
|
|
16050
16114
|
|
|
16051
16115
|
/**
|
|
16052
|
-
* @rc
|
|
16053
16116
|
* Manages callbacks that are connected after a player selected
|
|
16054
16117
|
* hotbar slot is changed.
|
|
16055
16118
|
*/
|
|
@@ -16531,7 +16594,6 @@ export class PlayerInteractWithEntityBeforeEventSignal {
|
|
|
16531
16594
|
}
|
|
16532
16595
|
|
|
16533
16596
|
/**
|
|
16534
|
-
* @rc
|
|
16535
16597
|
* Contains information regarding an event after a player's
|
|
16536
16598
|
* inventory item changes.
|
|
16537
16599
|
*/
|
|
@@ -16570,7 +16632,6 @@ export class PlayerInventoryItemChangeAfterEvent {
|
|
|
16570
16632
|
}
|
|
16571
16633
|
|
|
16572
16634
|
/**
|
|
16573
|
-
* @rc
|
|
16574
16635
|
* Manages callbacks that are connected after a player's
|
|
16575
16636
|
* inventory item is changed.
|
|
16576
16637
|
*/
|
|
@@ -16934,41 +16995,65 @@ export class PlayerSpawnAfterEventSignal {
|
|
|
16934
16995
|
|
|
16935
16996
|
/**
|
|
16936
16997
|
* @beta
|
|
16937
|
-
* Represents
|
|
16938
|
-
* - that can be used with PotionOptions.
|
|
16998
|
+
* Represents how the potion effect is delivered.
|
|
16939
16999
|
*/
|
|
16940
|
-
export class
|
|
17000
|
+
export class PotionDeliveryType {
|
|
16941
17001
|
private constructor();
|
|
16942
17002
|
readonly id: string;
|
|
16943
17003
|
}
|
|
16944
17004
|
|
|
16945
17005
|
/**
|
|
16946
17006
|
* @beta
|
|
16947
|
-
* Represents a type of potion
|
|
16948
|
-
*
|
|
17007
|
+
* Represents a type of potion effect - like healing or
|
|
17008
|
+
* leaping.
|
|
16949
17009
|
*/
|
|
16950
|
-
export class
|
|
16951
|
-
private constructor();
|
|
16952
|
-
readonly id: string;
|
|
16953
|
-
}
|
|
16954
|
-
|
|
16955
|
-
/**
|
|
16956
|
-
* @beta
|
|
16957
|
-
* Represents a type of potion modifier - like strong, or long
|
|
16958
|
-
* - that can be used with PotionOptions.
|
|
16959
|
-
*/
|
|
16960
|
-
export class PotionModifierType {
|
|
17010
|
+
export class PotionEffectType {
|
|
16961
17011
|
private constructor();
|
|
17012
|
+
/**
|
|
17013
|
+
* @remarks
|
|
17014
|
+
* Duration of the effect when applied to an entity in ticks.
|
|
17015
|
+
* Undefined means the effect does not expire.
|
|
17016
|
+
*
|
|
17017
|
+
* @throws This property can throw when used.
|
|
17018
|
+
*
|
|
17019
|
+
* {@link minecraftcommon.EngineError}
|
|
17020
|
+
*/
|
|
17021
|
+
readonly durationTicks?: number;
|
|
16962
17022
|
readonly id: string;
|
|
16963
17023
|
}
|
|
16964
17024
|
|
|
16965
17025
|
/**
|
|
16966
17026
|
* @beta
|
|
16967
|
-
* Used for accessing all potion
|
|
16968
|
-
*
|
|
17027
|
+
* Used for accessing all potion effect types, delivery types,
|
|
17028
|
+
* and creating potions.
|
|
16969
17029
|
*/
|
|
16970
17030
|
export class Potions {
|
|
16971
17031
|
private constructor();
|
|
17032
|
+
/**
|
|
17033
|
+
* @remarks
|
|
17034
|
+
* Retrieves handles for all registered potion delivery types.
|
|
17035
|
+
*
|
|
17036
|
+
* @returns
|
|
17037
|
+
* Array of all registered delivery type handles.
|
|
17038
|
+
*/
|
|
17039
|
+
static getAllDeliveryTypes(): PotionDeliveryType[];
|
|
17040
|
+
/**
|
|
17041
|
+
* @remarks
|
|
17042
|
+
* Retrieves all type handle for all registered potion effects.
|
|
17043
|
+
*
|
|
17044
|
+
* @returns
|
|
17045
|
+
* Array of all registered effect type handles.
|
|
17046
|
+
*/
|
|
17047
|
+
static getAllEffectTypes(): PotionEffectType[];
|
|
17048
|
+
/**
|
|
17049
|
+
* @remarks
|
|
17050
|
+
* Retrieves a type handle for a specified potion delivery id.
|
|
17051
|
+
*
|
|
17052
|
+
* @returns
|
|
17053
|
+
* A type handle wrapping the valid delivery id, or undefined
|
|
17054
|
+
* for an invalid delivery id.
|
|
17055
|
+
*/
|
|
17056
|
+
static getDeliveryType(potionDeliveryId: string): PotionDeliveryType | undefined;
|
|
16972
17057
|
/**
|
|
16973
17058
|
* @remarks
|
|
16974
17059
|
* Retrieves a type handle for a specified potion effect id.
|
|
@@ -16980,25 +17065,23 @@ export class Potions {
|
|
|
16980
17065
|
* A type handle wrapping the valid effect id, or undefined for
|
|
16981
17066
|
* an invalid effect id.
|
|
16982
17067
|
*/
|
|
16983
|
-
static
|
|
17068
|
+
static getEffectType(potionEffectId: string): PotionEffectType | undefined;
|
|
16984
17069
|
/**
|
|
16985
17070
|
* @remarks
|
|
16986
|
-
*
|
|
17071
|
+
* Creates a potion given an effect and delivery type.
|
|
16987
17072
|
*
|
|
16988
|
-
* @
|
|
16989
|
-
* A type handle wrapping the valid liquid id, or undefined for
|
|
16990
|
-
* an invalid liquid id.
|
|
16991
|
-
*/
|
|
16992
|
-
static getPotionLiquidType(potionLiquidId: string): PotionLiquidType | undefined;
|
|
16993
|
-
/**
|
|
16994
|
-
* @remarks
|
|
16995
|
-
* Retrieves a type handle for a specified potion modifier id.
|
|
17073
|
+
* @throws This function can throw errors.
|
|
16996
17074
|
*
|
|
16997
|
-
* @
|
|
16998
|
-
*
|
|
16999
|
-
*
|
|
17075
|
+
* {@link minecraftcommon.EngineError}
|
|
17076
|
+
*
|
|
17077
|
+
* {@link InvalidPotionDeliveryTypeError}
|
|
17078
|
+
*
|
|
17079
|
+
* {@link InvalidPotionEffectTypeError}
|
|
17000
17080
|
*/
|
|
17001
|
-
static
|
|
17081
|
+
static resolve<
|
|
17082
|
+
T extends string = minecraftvanilladata.MinecraftPotionEffectTypes,
|
|
17083
|
+
U extends string = minecraftvanilladata.MinecraftPotionDeliveryTypes,
|
|
17084
|
+
>(potionEffectType: PotionEffectType | T, potionDeliveryType: PotionDeliveryType | U): ItemStack;
|
|
17002
17085
|
}
|
|
17003
17086
|
|
|
17004
17087
|
/**
|
|
@@ -18056,7 +18139,6 @@ export class StartupEvent {
|
|
|
18056
18139
|
*/
|
|
18057
18140
|
readonly blockComponentRegistry: BlockComponentRegistry;
|
|
18058
18141
|
/**
|
|
18059
|
-
* @rc
|
|
18060
18142
|
* @remarks
|
|
18061
18143
|
* This property can be read in early-execution mode.
|
|
18062
18144
|
*
|
|
@@ -19387,7 +19469,7 @@ export class World {
|
|
|
19387
19469
|
* This function can be called in early-execution mode.
|
|
19388
19470
|
*
|
|
19389
19471
|
*/
|
|
19390
|
-
getPackSettings(): Record<string, boolean | number>;
|
|
19472
|
+
getPackSettings(): Record<string, boolean | number | string>;
|
|
19391
19473
|
/**
|
|
19392
19474
|
* @remarks
|
|
19393
19475
|
* Returns a set of players based on a set of conditions
|
|
@@ -19912,7 +19994,6 @@ export class WorldAfterEvents {
|
|
|
19912
19994
|
*/
|
|
19913
19995
|
readonly playerGameModeChange: PlayerGameModeChangeAfterEventSignal;
|
|
19914
19996
|
/**
|
|
19915
|
-
* @rc
|
|
19916
19997
|
* @remarks
|
|
19917
19998
|
* This event fires when a player's selected slot changes.
|
|
19918
19999
|
*
|
|
@@ -19953,7 +20034,6 @@ export class WorldAfterEvents {
|
|
|
19953
20034
|
*/
|
|
19954
20035
|
readonly playerInteractWithEntity: PlayerInteractWithEntityAfterEventSignal;
|
|
19955
20036
|
/**
|
|
19956
|
-
* @rc
|
|
19957
20037
|
* @remarks
|
|
19958
20038
|
* This event fires when an item gets added or removed to the
|
|
19959
20039
|
* player's inventory.
|
|
@@ -20699,7 +20779,6 @@ export interface ContainerRules {
|
|
|
20699
20779
|
}
|
|
20700
20780
|
|
|
20701
20781
|
/**
|
|
20702
|
-
* @rc
|
|
20703
20782
|
* Define the custom command, including name, permissions, and
|
|
20704
20783
|
* parameters.
|
|
20705
20784
|
*/
|
|
@@ -20744,7 +20823,6 @@ export interface CustomCommand {
|
|
|
20744
20823
|
}
|
|
20745
20824
|
|
|
20746
20825
|
/**
|
|
20747
|
-
* @rc
|
|
20748
20826
|
* Definition for each parameter expected by the custom
|
|
20749
20827
|
* command.
|
|
20750
20828
|
*/
|
|
@@ -20773,7 +20851,6 @@ export interface CustomCommandParameter {
|
|
|
20773
20851
|
}
|
|
20774
20852
|
|
|
20775
20853
|
/**
|
|
20776
|
-
* @rc
|
|
20777
20854
|
* Interface returned from custom command callback function.
|
|
20778
20855
|
*/
|
|
20779
20856
|
export interface CustomCommandResult {
|
|
@@ -21558,6 +21635,29 @@ export interface ExplosionOptions {
|
|
|
21558
21635
|
source?: Entity;
|
|
21559
21636
|
}
|
|
21560
21637
|
|
|
21638
|
+
/**
|
|
21639
|
+
* @beta
|
|
21640
|
+
* Contains additional options for getBlockStandingOn and
|
|
21641
|
+
* getAllBlocksStandingOn.
|
|
21642
|
+
*/
|
|
21643
|
+
export interface GetBlocksStandingOnOptions {
|
|
21644
|
+
/**
|
|
21645
|
+
* @remarks
|
|
21646
|
+
* When specified, the function will include / exclude what
|
|
21647
|
+
* block(s) are returned based on the block filter.
|
|
21648
|
+
*
|
|
21649
|
+
*/
|
|
21650
|
+
blockFilter?: BlockFilter;
|
|
21651
|
+
/**
|
|
21652
|
+
* @remarks
|
|
21653
|
+
* If true, all blocks of height 0.2 or lower like trapdoors
|
|
21654
|
+
* and carpets will be ignored, and the block underneath will
|
|
21655
|
+
* be returned.
|
|
21656
|
+
*
|
|
21657
|
+
*/
|
|
21658
|
+
ignoreThinBlocks?: boolean;
|
|
21659
|
+
}
|
|
21660
|
+
|
|
21561
21661
|
/**
|
|
21562
21662
|
* Greater than operator.
|
|
21563
21663
|
*/
|
|
@@ -21583,7 +21683,6 @@ export interface GreaterThanOrEqualsComparison {
|
|
|
21583
21683
|
}
|
|
21584
21684
|
|
|
21585
21685
|
/**
|
|
21586
|
-
* @rc
|
|
21587
21686
|
* Contains additional filtering options for hotbar events.
|
|
21588
21687
|
*/
|
|
21589
21688
|
export interface HotbarEventOptions {
|
|
@@ -21620,7 +21719,6 @@ export interface InputEventOptions {
|
|
|
21620
21719
|
}
|
|
21621
21720
|
|
|
21622
21721
|
/**
|
|
21623
|
-
* @rc
|
|
21624
21722
|
* Contains additional filtering options for inventory item
|
|
21625
21723
|
* events.
|
|
21626
21724
|
*/
|
|
@@ -21954,35 +22052,6 @@ export interface PlayerSoundOptions {
|
|
|
21954
22052
|
volume?: number;
|
|
21955
22053
|
}
|
|
21956
22054
|
|
|
21957
|
-
/**
|
|
21958
|
-
* @beta
|
|
21959
|
-
* Options for use in creating potions. See
|
|
21960
|
-
* ItemStack.createPotion.
|
|
21961
|
-
*/
|
|
21962
|
-
export interface PotionOptions {
|
|
21963
|
-
/**
|
|
21964
|
-
* @remarks
|
|
21965
|
-
* The type of potion effect to create. See
|
|
21966
|
-
* @minecraft/vanilla-data.MinecraftPotionEffectTypes.
|
|
21967
|
-
*
|
|
21968
|
-
*/
|
|
21969
|
-
effect: PotionEffectType | string;
|
|
21970
|
-
/**
|
|
21971
|
-
* @remarks
|
|
21972
|
-
* Optional potion liquid, defaults to 'Regular'. See
|
|
21973
|
-
* @minecraft/vanilla-data.MinecraftPotionLiquidTypes.
|
|
21974
|
-
*
|
|
21975
|
-
*/
|
|
21976
|
-
liquid?: PotionLiquidType | string;
|
|
21977
|
-
/**
|
|
21978
|
-
* @remarks
|
|
21979
|
-
* Optional potion modifier, defaults to 'Normal'. See
|
|
21980
|
-
* @minecraft/vanilla-data.MinecraftPotionModifierTypes.
|
|
21981
|
-
*
|
|
21982
|
-
*/
|
|
21983
|
-
modifier?: PotionModifierType | string;
|
|
21984
|
-
}
|
|
21985
|
-
|
|
21986
22055
|
/**
|
|
21987
22056
|
* Optional arguments for
|
|
21988
22057
|
* @minecraft/server.EntityProjectileComponent.shoot.
|
|
@@ -22658,7 +22727,6 @@ export class ContainerRulesError extends Error {
|
|
|
22658
22727
|
}
|
|
22659
22728
|
|
|
22660
22729
|
/**
|
|
22661
|
-
* @rc
|
|
22662
22730
|
* Error object thrown when CustomCommandRegistry errors occur.
|
|
22663
22731
|
*/
|
|
22664
22732
|
// @ts-ignore Class inheritance allowed for native defined classes
|
|
@@ -22711,7 +22779,6 @@ export class EntitySpawnError extends Error {
|
|
|
22711
22779
|
}
|
|
22712
22780
|
|
|
22713
22781
|
/**
|
|
22714
|
-
* @rc
|
|
22715
22782
|
* The container is invalid. This can occur if the container is
|
|
22716
22783
|
* missing or deleted.
|
|
22717
22784
|
*/
|
|
@@ -22777,6 +22844,22 @@ export class InvalidIteratorError extends Error {
|
|
|
22777
22844
|
private constructor();
|
|
22778
22845
|
}
|
|
22779
22846
|
|
|
22847
|
+
/**
|
|
22848
|
+
* @beta
|
|
22849
|
+
*/
|
|
22850
|
+
// @ts-ignore Class inheritance allowed for native defined classes
|
|
22851
|
+
export class InvalidPotionDeliveryTypeError extends Error {
|
|
22852
|
+
private constructor();
|
|
22853
|
+
}
|
|
22854
|
+
|
|
22855
|
+
/**
|
|
22856
|
+
* @beta
|
|
22857
|
+
*/
|
|
22858
|
+
// @ts-ignore Class inheritance allowed for native defined classes
|
|
22859
|
+
export class InvalidPotionEffectTypeError extends Error {
|
|
22860
|
+
private constructor();
|
|
22861
|
+
}
|
|
22862
|
+
|
|
22780
22863
|
/**
|
|
22781
22864
|
* Thrown when a Structure is invalid. A structure becomes
|
|
22782
22865
|
* invalid when it is deleted.
|
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.24",
|
|
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.24"
|
|
18
18
|
},
|
|
19
19
|
"license": "MIT"
|
|
20
20
|
}
|