@minecraft/server 2.1.0-beta.1.21.90-preview.23 → 2.1.0-beta.1.21.90-preview.26
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 +158 -28
- package/package.json +1 -1
package/index.d.ts
CHANGED
|
@@ -1049,6 +1049,18 @@ export enum EntityComponentTypes {
|
|
|
1049
1049
|
*
|
|
1050
1050
|
*/
|
|
1051
1051
|
OnFire = 'minecraft:onfire',
|
|
1052
|
+
/**
|
|
1053
|
+
* @beta
|
|
1054
|
+
*/
|
|
1055
|
+
Exhaustion = 'minecraft:player.exhaustion',
|
|
1056
|
+
/**
|
|
1057
|
+
* @beta
|
|
1058
|
+
*/
|
|
1059
|
+
Hunger = 'minecraft:player.hunger',
|
|
1060
|
+
/**
|
|
1061
|
+
* @beta
|
|
1062
|
+
*/
|
|
1063
|
+
Saturation = 'minecraft:player.saturation',
|
|
1052
1064
|
/**
|
|
1053
1065
|
* @remarks
|
|
1054
1066
|
* The projectile component controls the properties of a
|
|
@@ -2228,6 +2240,16 @@ export enum MoonPhase {
|
|
|
2228
2240
|
WaxingGibbous = 7,
|
|
2229
2241
|
}
|
|
2230
2242
|
|
|
2243
|
+
/**
|
|
2244
|
+
* @beta
|
|
2245
|
+
*/
|
|
2246
|
+
export enum MovementType {
|
|
2247
|
+
Immovable = 'Immovable',
|
|
2248
|
+
Popped = 'Popped',
|
|
2249
|
+
Push = 'Push',
|
|
2250
|
+
PushPull = 'PushPull',
|
|
2251
|
+
}
|
|
2252
|
+
|
|
2231
2253
|
/**
|
|
2232
2254
|
* An enumeration describing the reason for the namespace name
|
|
2233
2255
|
* error being thrown
|
|
@@ -2519,6 +2541,14 @@ export enum SignSide {
|
|
|
2519
2541
|
Front = 'Front',
|
|
2520
2542
|
}
|
|
2521
2543
|
|
|
2544
|
+
/**
|
|
2545
|
+
* @beta
|
|
2546
|
+
*/
|
|
2547
|
+
export enum StickyType {
|
|
2548
|
+
None = 'None',
|
|
2549
|
+
Same = 'Same',
|
|
2550
|
+
}
|
|
2551
|
+
|
|
2522
2552
|
/**
|
|
2523
2553
|
* Specifies how structure blocks should be animated when a
|
|
2524
2554
|
* structure is placed.
|
|
@@ -2791,9 +2821,11 @@ export type BlockComponentTypeMap = {
|
|
|
2791
2821
|
'minecraft:fluid_container': BlockFluidContainerComponent;
|
|
2792
2822
|
'minecraft:inventory': BlockInventoryComponent;
|
|
2793
2823
|
'minecraft:map_color': BlockMapColorComponent;
|
|
2824
|
+
'minecraft:movable': BlockMovableComponent;
|
|
2794
2825
|
'minecraft:piston': BlockPistonComponent;
|
|
2795
2826
|
'minecraft:record_player': BlockRecordPlayerComponent;
|
|
2796
2827
|
'minecraft:sign': BlockSignComponent;
|
|
2828
|
+
movable: BlockMovableComponent;
|
|
2797
2829
|
piston: BlockPistonComponent;
|
|
2798
2830
|
record_player: BlockRecordPlayerComponent;
|
|
2799
2831
|
sign: BlockSignComponent;
|
|
@@ -2902,6 +2934,9 @@ export type EntityComponentTypeMap = {
|
|
|
2902
2934
|
'minecraft:navigation.walk': EntityNavigationWalkComponent;
|
|
2903
2935
|
'minecraft:npc': EntityNpcComponent;
|
|
2904
2936
|
'minecraft:onfire': EntityOnFireComponent;
|
|
2937
|
+
'minecraft:player.exhaustion': EntityExhaustionComponent;
|
|
2938
|
+
'minecraft:player.hunger': EntityHungerComponent;
|
|
2939
|
+
'minecraft:player.saturation': EntitySaturationComponent;
|
|
2905
2940
|
'minecraft:projectile': EntityProjectileComponent;
|
|
2906
2941
|
'minecraft:push_through': EntityPushThroughComponent;
|
|
2907
2942
|
'minecraft:rideable': EntityRideableComponent;
|
|
@@ -2933,6 +2968,9 @@ export type EntityComponentTypeMap = {
|
|
|
2933
2968
|
'navigation.walk': EntityNavigationWalkComponent;
|
|
2934
2969
|
npc: EntityNpcComponent;
|
|
2935
2970
|
onfire: EntityOnFireComponent;
|
|
2971
|
+
'player.exhaustion': EntityExhaustionComponent;
|
|
2972
|
+
'player.hunger': EntityHungerComponent;
|
|
2973
|
+
'player.saturation': EntitySaturationComponent;
|
|
2936
2974
|
projectile: EntityProjectileComponent;
|
|
2937
2975
|
push_through: EntityPushThroughComponent;
|
|
2938
2976
|
rideable: EntityRideableComponent;
|
|
@@ -4653,6 +4691,31 @@ export class BlockMapColorComponent extends BlockComponent {
|
|
|
4653
4691
|
static readonly componentId = 'minecraft:map_color';
|
|
4654
4692
|
}
|
|
4655
4693
|
|
|
4694
|
+
/**
|
|
4695
|
+
* @beta
|
|
4696
|
+
*/
|
|
4697
|
+
// @ts-ignore Class inheritance allowed for native defined classes
|
|
4698
|
+
export class BlockMovableComponent extends BlockComponent {
|
|
4699
|
+
private constructor();
|
|
4700
|
+
/**
|
|
4701
|
+
* @throws This property can throw when used.
|
|
4702
|
+
*
|
|
4703
|
+
* {@link LocationInUnloadedChunkError}
|
|
4704
|
+
*
|
|
4705
|
+
* {@link LocationOutOfWorldBoundariesError}
|
|
4706
|
+
*/
|
|
4707
|
+
readonly movementType: MovementType;
|
|
4708
|
+
/**
|
|
4709
|
+
* @throws This property can throw when used.
|
|
4710
|
+
*
|
|
4711
|
+
* {@link LocationInUnloadedChunkError}
|
|
4712
|
+
*
|
|
4713
|
+
* {@link LocationOutOfWorldBoundariesError}
|
|
4714
|
+
*/
|
|
4715
|
+
readonly stickyType: StickyType;
|
|
4716
|
+
static readonly componentId = 'minecraft:movable';
|
|
4717
|
+
}
|
|
4718
|
+
|
|
4656
4719
|
/**
|
|
4657
4720
|
* Contains the combination of type {@link BlockType} and
|
|
4658
4721
|
* properties (also sometimes called block state) which
|
|
@@ -5630,7 +5693,7 @@ export class Camera {
|
|
|
5630
5693
|
* rotation.
|
|
5631
5694
|
* @throws This function can throw errors.
|
|
5632
5695
|
*/
|
|
5633
|
-
setDefaultCamera(cameraPreset: string, easeOptions?:
|
|
5696
|
+
setDefaultCamera(cameraPreset: string, easeOptions?: EaseOptions): void;
|
|
5634
5697
|
}
|
|
5635
5698
|
|
|
5636
5699
|
/**
|
|
@@ -7059,6 +7122,14 @@ export class Dimension {
|
|
|
7059
7122
|
*
|
|
7060
7123
|
*/
|
|
7061
7124
|
readonly id: string;
|
|
7125
|
+
/**
|
|
7126
|
+
* @beta
|
|
7127
|
+
* @remarks
|
|
7128
|
+
* Key for the localization of a dimension's name used by
|
|
7129
|
+
* language files.
|
|
7130
|
+
*
|
|
7131
|
+
*/
|
|
7132
|
+
readonly localizationKey: string;
|
|
7062
7133
|
/**
|
|
7063
7134
|
* @remarks
|
|
7064
7135
|
* Searches the block volume for a block that satisfies the
|
|
@@ -8446,8 +8517,7 @@ export class Entity {
|
|
|
8446
8517
|
clearDynamicProperties(): void;
|
|
8447
8518
|
/**
|
|
8448
8519
|
* @remarks
|
|
8449
|
-
* Sets the current velocity of the Entity to zero.
|
|
8450
|
-
* this method may not have an impact on Players.
|
|
8520
|
+
* Sets the current velocity of the Entity to zero.
|
|
8451
8521
|
*
|
|
8452
8522
|
* This function can't be called in read-only mode.
|
|
8453
8523
|
*
|
|
@@ -9252,12 +9322,17 @@ export class EntityAttributeComponent extends EntityComponent {
|
|
|
9252
9322
|
resetToMinValue(): void;
|
|
9253
9323
|
/**
|
|
9254
9324
|
* @remarks
|
|
9255
|
-
* Sets the current value of this attribute.
|
|
9256
|
-
* will be clamped to the range of this attribute.
|
|
9325
|
+
* Sets the current value of this attribute.
|
|
9257
9326
|
*
|
|
9258
9327
|
* This function can't be called in read-only mode.
|
|
9259
9328
|
*
|
|
9260
|
-
* @throws
|
|
9329
|
+
* @throws
|
|
9330
|
+
* If the value is out of bounds, an ArgumentOutOfBounds Error
|
|
9331
|
+
* is thrown.
|
|
9332
|
+
*
|
|
9333
|
+
* {@link minecraftcommon.ArgumentOutOfBoundsError}
|
|
9334
|
+
*
|
|
9335
|
+
* {@link InvalidEntityError}
|
|
9261
9336
|
*/
|
|
9262
9337
|
setCurrentValue(value: number): boolean;
|
|
9263
9338
|
}
|
|
@@ -9569,6 +9644,26 @@ export class EntityDieAfterEventSignal {
|
|
|
9569
9644
|
// @ts-ignore Class inheritance allowed for native defined classes
|
|
9570
9645
|
export class EntityEquippableComponent extends EntityComponent {
|
|
9571
9646
|
private constructor();
|
|
9647
|
+
/**
|
|
9648
|
+
* @beta
|
|
9649
|
+
* @remarks
|
|
9650
|
+
* Returns the total Armor level of the owner.
|
|
9651
|
+
*
|
|
9652
|
+
* @throws This property can throw when used.
|
|
9653
|
+
*
|
|
9654
|
+
* {@link InvalidEntityError}
|
|
9655
|
+
*/
|
|
9656
|
+
readonly totalArmor: number;
|
|
9657
|
+
/**
|
|
9658
|
+
* @beta
|
|
9659
|
+
* @remarks
|
|
9660
|
+
* Returns the total Toughness level of the owner.
|
|
9661
|
+
*
|
|
9662
|
+
* @throws This property can throw when used.
|
|
9663
|
+
*
|
|
9664
|
+
* {@link InvalidEntityError}
|
|
9665
|
+
*/
|
|
9666
|
+
readonly totalToughness: number;
|
|
9572
9667
|
static readonly componentId = 'minecraft:equippable';
|
|
9573
9668
|
/**
|
|
9574
9669
|
* @remarks
|
|
@@ -9610,6 +9705,17 @@ export class EntityEquippableComponent extends EntityComponent {
|
|
|
9610
9705
|
setEquipment(equipmentSlot: EquipmentSlot, itemStack?: ItemStack): boolean;
|
|
9611
9706
|
}
|
|
9612
9707
|
|
|
9708
|
+
/**
|
|
9709
|
+
* @beta
|
|
9710
|
+
* Defines the interactions with this entity for Exhaustion.
|
|
9711
|
+
* Wraps the `minecraft.player.exhaustion` attribute.
|
|
9712
|
+
*/
|
|
9713
|
+
// @ts-ignore Class inheritance allowed for native defined classes
|
|
9714
|
+
export class EntityExhaustionComponent extends EntityAttributeComponent {
|
|
9715
|
+
private constructor();
|
|
9716
|
+
static readonly componentId = 'minecraft:player.exhaustion';
|
|
9717
|
+
}
|
|
9718
|
+
|
|
9613
9719
|
/**
|
|
9614
9720
|
* When added, this component signifies that this entity
|
|
9615
9721
|
* doesn't take damage from fire.
|
|
@@ -9897,6 +10003,17 @@ export class EntityHitEntityAfterEventSignal {
|
|
|
9897
10003
|
unsubscribe(callback: (arg0: EntityHitEntityAfterEvent) => void): void;
|
|
9898
10004
|
}
|
|
9899
10005
|
|
|
10006
|
+
/**
|
|
10007
|
+
* @beta
|
|
10008
|
+
* Defines the interactions with this entity for hunger. Wraps
|
|
10009
|
+
* the `minecraft.player.hunger` attribute.
|
|
10010
|
+
*/
|
|
10011
|
+
// @ts-ignore Class inheritance allowed for native defined classes
|
|
10012
|
+
export class EntityHungerComponent extends EntityAttributeComponent {
|
|
10013
|
+
private constructor();
|
|
10014
|
+
static readonly componentId = 'minecraft:player.hunger';
|
|
10015
|
+
}
|
|
10016
|
+
|
|
9900
10017
|
/**
|
|
9901
10018
|
* Contains information related to an entity getting hurt.
|
|
9902
10019
|
*/
|
|
@@ -11254,6 +11371,17 @@ export class EntityRidingComponent extends EntityComponent {
|
|
|
11254
11371
|
static readonly componentId = 'minecraft:riding';
|
|
11255
11372
|
}
|
|
11256
11373
|
|
|
11374
|
+
/**
|
|
11375
|
+
* @beta
|
|
11376
|
+
* Defines the interactions with this entity for Saturation.
|
|
11377
|
+
* Wraps the `minecraft.player.saturation` attribute.
|
|
11378
|
+
*/
|
|
11379
|
+
// @ts-ignore Class inheritance allowed for native defined classes
|
|
11380
|
+
export class EntitySaturationComponent extends EntityAttributeComponent {
|
|
11381
|
+
private constructor();
|
|
11382
|
+
static readonly componentId = 'minecraft:player.saturation';
|
|
11383
|
+
}
|
|
11384
|
+
|
|
11257
11385
|
/**
|
|
11258
11386
|
* Sets the entity's visual size.
|
|
11259
11387
|
*/
|
|
@@ -19784,24 +19912,6 @@ export interface BlockRaycastOptions extends BlockFilter {
|
|
|
19784
19912
|
maxDistance?: number;
|
|
19785
19913
|
}
|
|
19786
19914
|
|
|
19787
|
-
/**
|
|
19788
|
-
* Contains options associated with a camera ease operation.
|
|
19789
|
-
*/
|
|
19790
|
-
export interface CameraEaseOptions {
|
|
19791
|
-
/**
|
|
19792
|
-
* @remarks
|
|
19793
|
-
* Time for the ease operation.
|
|
19794
|
-
*
|
|
19795
|
-
*/
|
|
19796
|
-
easeTime?: number;
|
|
19797
|
-
/**
|
|
19798
|
-
* @remarks
|
|
19799
|
-
* Type of ease operation to use.
|
|
19800
|
-
*
|
|
19801
|
-
*/
|
|
19802
|
-
easeType?: EasingType;
|
|
19803
|
-
}
|
|
19804
|
-
|
|
19805
19915
|
/**
|
|
19806
19916
|
* Used to initiate a full-screen color fade.
|
|
19807
19917
|
*/
|
|
@@ -19865,24 +19975,24 @@ export interface CameraFixedBoomOptions {
|
|
|
19865
19975
|
}
|
|
19866
19976
|
|
|
19867
19977
|
export interface CameraSetFacingOptions {
|
|
19868
|
-
easeOptions?:
|
|
19978
|
+
easeOptions?: EaseOptions;
|
|
19869
19979
|
facingEntity: Entity;
|
|
19870
19980
|
location?: Vector3;
|
|
19871
19981
|
}
|
|
19872
19982
|
|
|
19873
19983
|
export interface CameraSetLocationOptions {
|
|
19874
|
-
easeOptions?:
|
|
19984
|
+
easeOptions?: EaseOptions;
|
|
19875
19985
|
location: Vector3;
|
|
19876
19986
|
}
|
|
19877
19987
|
|
|
19878
19988
|
export interface CameraSetPosOptions {
|
|
19879
|
-
easeOptions?:
|
|
19989
|
+
easeOptions?: EaseOptions;
|
|
19880
19990
|
facingLocation: Vector3;
|
|
19881
19991
|
location?: Vector3;
|
|
19882
19992
|
}
|
|
19883
19993
|
|
|
19884
19994
|
export interface CameraSetRotOptions {
|
|
19885
|
-
easeOptions?:
|
|
19995
|
+
easeOptions?: EaseOptions;
|
|
19886
19996
|
location?: Vector3;
|
|
19887
19997
|
rotation: Vector2;
|
|
19888
19998
|
}
|
|
@@ -20120,6 +20230,26 @@ export interface DimensionLocation {
|
|
|
20120
20230
|
z: number;
|
|
20121
20231
|
}
|
|
20122
20232
|
|
|
20233
|
+
/**
|
|
20234
|
+
* @rc
|
|
20235
|
+
* Contains options associated with easing between positions
|
|
20236
|
+
* and/or rotations.
|
|
20237
|
+
*/
|
|
20238
|
+
export interface EaseOptions {
|
|
20239
|
+
/**
|
|
20240
|
+
* @remarks
|
|
20241
|
+
* Time for the ease operation.
|
|
20242
|
+
*
|
|
20243
|
+
*/
|
|
20244
|
+
easeTime?: number;
|
|
20245
|
+
/**
|
|
20246
|
+
* @remarks
|
|
20247
|
+
* Type of ease operation to use.
|
|
20248
|
+
*
|
|
20249
|
+
*/
|
|
20250
|
+
easeType?: EasingType;
|
|
20251
|
+
}
|
|
20252
|
+
|
|
20123
20253
|
/**
|
|
20124
20254
|
* This interface represents a specific leveled enchantment
|
|
20125
20255
|
* that is applied to an item.
|