@minecraft/server 2.5.0-beta.1.21.130-preview.28 → 2.6.0-beta.1.26.0-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 +568 -10
- package/package.json +2 -2
package/index.d.ts
CHANGED
|
@@ -16,7 +16,7 @@
|
|
|
16
16
|
* ```json
|
|
17
17
|
* {
|
|
18
18
|
* "module_name": "@minecraft/server",
|
|
19
|
-
* "version": "2.
|
|
19
|
+
* "version": "2.6.0-beta"
|
|
20
20
|
* }
|
|
21
21
|
* ```
|
|
22
22
|
*
|
|
@@ -56,6 +56,20 @@ export enum BlockComponentTypes {
|
|
|
56
56
|
*
|
|
57
57
|
*/
|
|
58
58
|
Inventory = 'minecraft:inventory',
|
|
59
|
+
/**
|
|
60
|
+
* @rc
|
|
61
|
+
* @remarks
|
|
62
|
+
* Represents the color of a block when displayed on a map.
|
|
63
|
+
*
|
|
64
|
+
*/
|
|
65
|
+
MapColor = 'minecraft:map_color',
|
|
66
|
+
/**
|
|
67
|
+
* @rc
|
|
68
|
+
* @remarks
|
|
69
|
+
* Represents a block that can move (such as a piston).
|
|
70
|
+
*
|
|
71
|
+
*/
|
|
72
|
+
Movable = 'minecraft:movable',
|
|
59
73
|
/**
|
|
60
74
|
* @remarks
|
|
61
75
|
* When present, this block has piston-like behavior. Contains
|
|
@@ -63,12 +77,27 @@ export enum BlockComponentTypes {
|
|
|
63
77
|
*
|
|
64
78
|
*/
|
|
65
79
|
Piston = 'minecraft:piston',
|
|
80
|
+
/**
|
|
81
|
+
* @rc
|
|
82
|
+
* @remarks
|
|
83
|
+
* Represents a how a block interacts with precipitation (such
|
|
84
|
+
* as rain or snow).
|
|
85
|
+
*
|
|
86
|
+
*/
|
|
87
|
+
PrecipitationInteractions = 'minecraft:precipitation_interactions',
|
|
66
88
|
/**
|
|
67
89
|
* @remarks
|
|
68
90
|
* Represents a block that can play a record.
|
|
69
91
|
*
|
|
70
92
|
*/
|
|
71
93
|
RecordPlayer = 'minecraft:record_player',
|
|
94
|
+
/**
|
|
95
|
+
* @rc
|
|
96
|
+
* @remarks
|
|
97
|
+
* Represents a block that can output a redstone signal.
|
|
98
|
+
*
|
|
99
|
+
*/
|
|
100
|
+
RedstoneProducer = 'minecraft:redstone_producer',
|
|
72
101
|
/**
|
|
73
102
|
* @remarks
|
|
74
103
|
* Represents a block that can display text on it.
|
|
@@ -731,6 +760,23 @@ export enum EnchantmentSlot {
|
|
|
731
760
|
Sword = 'Sword',
|
|
732
761
|
}
|
|
733
762
|
|
|
763
|
+
/**
|
|
764
|
+
* @beta
|
|
765
|
+
* The entity's attach location point. Contains points such as
|
|
766
|
+
* head, body, leg, etc to attach the camera to.
|
|
767
|
+
*/
|
|
768
|
+
export enum EntityAttachPoint {
|
|
769
|
+
Body = 'Body',
|
|
770
|
+
BreathingPoint = 'BreathingPoint',
|
|
771
|
+
DropAttachPoint = 'DropAttachPoint',
|
|
772
|
+
ExplosionPoint = 'ExplosionPoint',
|
|
773
|
+
Eyes = 'Eyes',
|
|
774
|
+
Feet = 'Feet',
|
|
775
|
+
Head = 'Head',
|
|
776
|
+
Mouth = 'Mouth',
|
|
777
|
+
WeaponAttachPoint = 'WeaponAttachPoint',
|
|
778
|
+
}
|
|
779
|
+
|
|
734
780
|
/**
|
|
735
781
|
* The types of entity components that are accessible via
|
|
736
782
|
* function Entity.getComponent.
|
|
@@ -1435,6 +1481,31 @@ export enum EntityDamageCause {
|
|
|
1435
1481
|
wither = 'wither',
|
|
1436
1482
|
}
|
|
1437
1483
|
|
|
1484
|
+
/**
|
|
1485
|
+
* @beta
|
|
1486
|
+
* Describes the source of healing of an Entity.
|
|
1487
|
+
*/
|
|
1488
|
+
export enum EntityHealCause {
|
|
1489
|
+
/**
|
|
1490
|
+
* @remarks
|
|
1491
|
+
* Healing caused by items such as potions.
|
|
1492
|
+
*
|
|
1493
|
+
*/
|
|
1494
|
+
Heal = 'Heal',
|
|
1495
|
+
/**
|
|
1496
|
+
* @remarks
|
|
1497
|
+
* Healing caused by regeneration effects.
|
|
1498
|
+
*
|
|
1499
|
+
*/
|
|
1500
|
+
Regeneration = 'Regeneration',
|
|
1501
|
+
/**
|
|
1502
|
+
* @remarks
|
|
1503
|
+
* Healing caused when hunger is full.
|
|
1504
|
+
*
|
|
1505
|
+
*/
|
|
1506
|
+
SelfHeal = 'SelfHeal',
|
|
1507
|
+
}
|
|
1508
|
+
|
|
1438
1509
|
/**
|
|
1439
1510
|
* An enumeration describing initialization cause of an entity.
|
|
1440
1511
|
*/
|
|
@@ -1475,7 +1546,7 @@ export enum EntityInitializationCause {
|
|
|
1475
1546
|
}
|
|
1476
1547
|
|
|
1477
1548
|
/**
|
|
1478
|
-
* @
|
|
1549
|
+
* @rc
|
|
1479
1550
|
* Enumerator describing the source of an Entity swing. Sent as
|
|
1480
1551
|
* part of {@link PlayerSwingStartAfterEvent}
|
|
1481
1552
|
*/
|
|
@@ -1969,7 +2040,7 @@ export enum GraphicsMode {
|
|
|
1969
2040
|
}
|
|
1970
2041
|
|
|
1971
2042
|
/**
|
|
1972
|
-
* @
|
|
2043
|
+
* @rc
|
|
1973
2044
|
* Specifies options related to the item currently being held
|
|
1974
2045
|
* by an entity.
|
|
1975
2046
|
*/
|
|
@@ -3681,6 +3752,22 @@ export class BiomeType {
|
|
|
3681
3752
|
*
|
|
3682
3753
|
*/
|
|
3683
3754
|
readonly id: string;
|
|
3755
|
+
/**
|
|
3756
|
+
* @beta
|
|
3757
|
+
* @remarks
|
|
3758
|
+
* Returns a list of the biome's tags.
|
|
3759
|
+
*
|
|
3760
|
+
*/
|
|
3761
|
+
getTags(): string[];
|
|
3762
|
+
/**
|
|
3763
|
+
* @beta
|
|
3764
|
+
* @remarks
|
|
3765
|
+
* Checks if the biome has all of the provided tags.
|
|
3766
|
+
*
|
|
3767
|
+
* @param tags
|
|
3768
|
+
* The list of tags to check against the biome.
|
|
3769
|
+
*/
|
|
3770
|
+
hasTags(tags: string[]): boolean;
|
|
3684
3771
|
}
|
|
3685
3772
|
|
|
3686
3773
|
/**
|
|
@@ -4508,6 +4595,35 @@ export class BlockComponentBlockBreakEvent extends BlockEvent {
|
|
|
4508
4595
|
readonly entitySource?: Entity;
|
|
4509
4596
|
}
|
|
4510
4597
|
|
|
4598
|
+
/**
|
|
4599
|
+
* @beta
|
|
4600
|
+
* Contains information regarding an event sent by an entity to
|
|
4601
|
+
* this block in the world.
|
|
4602
|
+
*/
|
|
4603
|
+
// @ts-ignore Class inheritance allowed for native defined classes
|
|
4604
|
+
export class BlockComponentEntityEvent extends BlockEvent {
|
|
4605
|
+
private constructor();
|
|
4606
|
+
/**
|
|
4607
|
+
* @remarks
|
|
4608
|
+
* Returns permutation information about the block receiving
|
|
4609
|
+
* the event.
|
|
4610
|
+
*
|
|
4611
|
+
*/
|
|
4612
|
+
readonly blockPermutation: BlockPermutation;
|
|
4613
|
+
/**
|
|
4614
|
+
* @remarks
|
|
4615
|
+
* The entity that sent the event.
|
|
4616
|
+
*
|
|
4617
|
+
*/
|
|
4618
|
+
readonly entitySource?: Entity;
|
|
4619
|
+
/**
|
|
4620
|
+
* @remarks
|
|
4621
|
+
* Name of the event fired by the entity.
|
|
4622
|
+
*
|
|
4623
|
+
*/
|
|
4624
|
+
readonly name: string;
|
|
4625
|
+
}
|
|
4626
|
+
|
|
4511
4627
|
/**
|
|
4512
4628
|
* Contains information regarding an entity falling onto a
|
|
4513
4629
|
* specific block.
|
|
@@ -4639,7 +4755,6 @@ export class BlockComponentRandomTickEvent extends BlockEvent {
|
|
|
4639
4755
|
}
|
|
4640
4756
|
|
|
4641
4757
|
/**
|
|
4642
|
-
* @beta
|
|
4643
4758
|
* Contains information regarding a specific block redstone
|
|
4644
4759
|
* update event.
|
|
4645
4760
|
*/
|
|
@@ -4987,6 +5102,9 @@ export class BlockMapColorComponent extends BlockComponent {
|
|
|
4987
5102
|
static readonly componentId = 'minecraft:map_color';
|
|
4988
5103
|
}
|
|
4989
5104
|
|
|
5105
|
+
/**
|
|
5106
|
+
* Represents a block that can move (such as a piston).
|
|
5107
|
+
*/
|
|
4990
5108
|
// @ts-ignore Class inheritance allowed for native defined classes
|
|
4991
5109
|
export class BlockMovableComponent extends BlockComponent {
|
|
4992
5110
|
private constructor();
|
|
@@ -5042,6 +5160,14 @@ export class BlockMovableComponent extends BlockComponent {
|
|
|
5042
5160
|
*/
|
|
5043
5161
|
export class BlockPermutation {
|
|
5044
5162
|
private constructor();
|
|
5163
|
+
/**
|
|
5164
|
+
* @beta
|
|
5165
|
+
* @remarks
|
|
5166
|
+
* Key for the localization of this BlockPermutation's name
|
|
5167
|
+
* used in .lang files.
|
|
5168
|
+
*
|
|
5169
|
+
*/
|
|
5170
|
+
readonly localizationKey: string;
|
|
5045
5171
|
/**
|
|
5046
5172
|
* @remarks
|
|
5047
5173
|
* The {@link BlockType} that the permutation has.
|
|
@@ -5290,6 +5416,8 @@ export class BlockPistonComponent extends BlockComponent {
|
|
|
5290
5416
|
|
|
5291
5417
|
/**
|
|
5292
5418
|
* @rc
|
|
5419
|
+
* Represents a how a block interacts with precipitation (such
|
|
5420
|
+
* as rain or snow).
|
|
5293
5421
|
*/
|
|
5294
5422
|
// @ts-ignore Class inheritance allowed for native defined classes
|
|
5295
5423
|
export class BlockPrecipitationInteractionsComponent extends BlockComponent {
|
|
@@ -5703,6 +5831,14 @@ export class BlockType {
|
|
|
5703
5831
|
*
|
|
5704
5832
|
*/
|
|
5705
5833
|
readonly id: string;
|
|
5834
|
+
/**
|
|
5835
|
+
* @beta
|
|
5836
|
+
* @remarks
|
|
5837
|
+
* Key for the localization of this BlockType's name used in
|
|
5838
|
+
* .lang files.
|
|
5839
|
+
*
|
|
5840
|
+
*/
|
|
5841
|
+
readonly localizationKey: string;
|
|
5706
5842
|
}
|
|
5707
5843
|
|
|
5708
5844
|
/**
|
|
@@ -6000,6 +6136,19 @@ export class Camera {
|
|
|
6000
6136
|
*
|
|
6001
6137
|
*/
|
|
6002
6138
|
readonly isValid: boolean;
|
|
6139
|
+
/**
|
|
6140
|
+
* @beta
|
|
6141
|
+
* @remarks
|
|
6142
|
+
* Attaches the camera to a non-player entity.
|
|
6143
|
+
*
|
|
6144
|
+
* This function can't be called in read-only mode.
|
|
6145
|
+
*
|
|
6146
|
+
* @param attachCameraOptions
|
|
6147
|
+
* Options for the entity the camera is attaching to. Contains
|
|
6148
|
+
* the entity identifier and optional entity location.
|
|
6149
|
+
* @throws This function can throw errors.
|
|
6150
|
+
*/
|
|
6151
|
+
attachToEntity(attachCameraOptions?: CameraAttachOptions): void;
|
|
6003
6152
|
/**
|
|
6004
6153
|
* @remarks
|
|
6005
6154
|
* Clears the active camera for the specified player. Causes
|
|
@@ -7573,6 +7722,46 @@ export class Dimension {
|
|
|
7573
7722
|
*
|
|
7574
7723
|
*/
|
|
7575
7724
|
readonly localizationKey: string;
|
|
7725
|
+
/**
|
|
7726
|
+
* @beta
|
|
7727
|
+
* @remarks
|
|
7728
|
+
* Checks if an area contains the specified biomes. If the area
|
|
7729
|
+
* is partially inside world boundaries, only the area that is
|
|
7730
|
+
* in bounds will be searched. This operation takes longer
|
|
7731
|
+
* proportional to both the area of the volume and the number
|
|
7732
|
+
* of biomes to check.
|
|
7733
|
+
*
|
|
7734
|
+
* @param volume
|
|
7735
|
+
* Area to check biomes in.
|
|
7736
|
+
* @param biomeFilter
|
|
7737
|
+
* A list of biomes to include and exclude. A list of tags to
|
|
7738
|
+
* include and exclude. Will return false if a biome is found
|
|
7739
|
+
* in the area that is in the excluded list or contains any of
|
|
7740
|
+
* the excluded tags. If superset is set to true then the area
|
|
7741
|
+
* must contain at least one biome in the included list or that
|
|
7742
|
+
* contains all of the included tags. If superset is set to
|
|
7743
|
+
* false then the area must contain only biomes in the included
|
|
7744
|
+
* list and that contain all of the included tags
|
|
7745
|
+
* @returns
|
|
7746
|
+
* Returns true if the biomes in the area match the filter
|
|
7747
|
+
* settings passed in. Otherwise, returns false.
|
|
7748
|
+
* @throws
|
|
7749
|
+
* An error will be thrown if the area provided includes
|
|
7750
|
+
* unloaded chunks.
|
|
7751
|
+
* An error will be thrown if the area provided is completely
|
|
7752
|
+
* outside the world boundaries.
|
|
7753
|
+
* An error will be thrown if an unknown biome name is
|
|
7754
|
+
* provided.
|
|
7755
|
+
*
|
|
7756
|
+
* {@link minecraftcommon.EngineError}
|
|
7757
|
+
*
|
|
7758
|
+
* {@link minecraftcommon.InvalidArgumentError}
|
|
7759
|
+
*
|
|
7760
|
+
* {@link LocationOutOfWorldBoundariesError}
|
|
7761
|
+
*
|
|
7762
|
+
* {@link UnloadedChunksError}
|
|
7763
|
+
*/
|
|
7764
|
+
containsBiomes(volume: BlockVolumeBase, biomeFilter: BiomeFilter): boolean;
|
|
7576
7765
|
/**
|
|
7577
7766
|
* @remarks
|
|
7578
7767
|
* Searches the block volume for a block that satisfies the
|
|
@@ -10626,6 +10815,144 @@ export class EntityHealableComponent extends EntityComponent {
|
|
|
10626
10815
|
getFeedItems(): FeedItem[];
|
|
10627
10816
|
}
|
|
10628
10817
|
|
|
10818
|
+
/**
|
|
10819
|
+
* @beta
|
|
10820
|
+
* Contains information related to an entity having been
|
|
10821
|
+
* healed.
|
|
10822
|
+
*/
|
|
10823
|
+
export class EntityHealAfterEvent {
|
|
10824
|
+
private constructor();
|
|
10825
|
+
/**
|
|
10826
|
+
* @remarks
|
|
10827
|
+
* Entity that was healed.
|
|
10828
|
+
*
|
|
10829
|
+
*/
|
|
10830
|
+
readonly healedEntity: Entity;
|
|
10831
|
+
/**
|
|
10832
|
+
* @remarks
|
|
10833
|
+
* Describes the amount of healing.
|
|
10834
|
+
*
|
|
10835
|
+
*/
|
|
10836
|
+
readonly healing: number;
|
|
10837
|
+
/**
|
|
10838
|
+
* @remarks
|
|
10839
|
+
* Information on the source of healing.
|
|
10840
|
+
*
|
|
10841
|
+
*/
|
|
10842
|
+
readonly healSource: EntityHealSource;
|
|
10843
|
+
}
|
|
10844
|
+
|
|
10845
|
+
/**
|
|
10846
|
+
* @beta
|
|
10847
|
+
* Manages callbacks that are connected to when an entity is
|
|
10848
|
+
* healed.
|
|
10849
|
+
*/
|
|
10850
|
+
export class EntityHealAfterEventSignal {
|
|
10851
|
+
private constructor();
|
|
10852
|
+
/**
|
|
10853
|
+
* @remarks
|
|
10854
|
+
* Adds a callback that will be called when an entity is
|
|
10855
|
+
* healed.
|
|
10856
|
+
*
|
|
10857
|
+
* This function can't be called in read-only mode.
|
|
10858
|
+
*
|
|
10859
|
+
* This function can be called in early-execution mode.
|
|
10860
|
+
*
|
|
10861
|
+
*/
|
|
10862
|
+
subscribe(
|
|
10863
|
+
callback: (arg0: EntityHealAfterEvent) => void,
|
|
10864
|
+
options?: EntityHealEventOptions,
|
|
10865
|
+
): (arg0: EntityHealAfterEvent) => void;
|
|
10866
|
+
/**
|
|
10867
|
+
* @remarks
|
|
10868
|
+
* Removes a callback from being called when an entity is
|
|
10869
|
+
* healed.
|
|
10870
|
+
*
|
|
10871
|
+
* This function can't be called in read-only mode.
|
|
10872
|
+
*
|
|
10873
|
+
* This function can be called in early-execution mode.
|
|
10874
|
+
*
|
|
10875
|
+
*/
|
|
10876
|
+
unsubscribe(callback: (arg0: EntityHealAfterEvent) => void): void;
|
|
10877
|
+
}
|
|
10878
|
+
|
|
10879
|
+
/**
|
|
10880
|
+
* @beta
|
|
10881
|
+
* Contains information related to an entity that will be
|
|
10882
|
+
* healed.
|
|
10883
|
+
*/
|
|
10884
|
+
export class EntityHealBeforeEvent {
|
|
10885
|
+
private constructor();
|
|
10886
|
+
cancel: boolean;
|
|
10887
|
+
/**
|
|
10888
|
+
* @remarks
|
|
10889
|
+
* Entity that will be healed.
|
|
10890
|
+
*
|
|
10891
|
+
*/
|
|
10892
|
+
readonly healedEntity: Entity;
|
|
10893
|
+
/**
|
|
10894
|
+
* @remarks
|
|
10895
|
+
* Describes the amount of healing.
|
|
10896
|
+
*
|
|
10897
|
+
*/
|
|
10898
|
+
healing: number;
|
|
10899
|
+
/**
|
|
10900
|
+
* @remarks
|
|
10901
|
+
* Information on the source of healing.
|
|
10902
|
+
*
|
|
10903
|
+
*/
|
|
10904
|
+
readonly healSource: EntityHealSource;
|
|
10905
|
+
}
|
|
10906
|
+
|
|
10907
|
+
/**
|
|
10908
|
+
* @beta
|
|
10909
|
+
* Manages callbacks that are connected to when an entity will
|
|
10910
|
+
* be healed.
|
|
10911
|
+
*/
|
|
10912
|
+
export class EntityHealBeforeEventSignal {
|
|
10913
|
+
private constructor();
|
|
10914
|
+
/**
|
|
10915
|
+
* @remarks
|
|
10916
|
+
* Adds a callback that will be called when an entity will be
|
|
10917
|
+
* healed.
|
|
10918
|
+
*
|
|
10919
|
+
* This function can't be called in read-only mode.
|
|
10920
|
+
*
|
|
10921
|
+
* This function can be called in early-execution mode.
|
|
10922
|
+
*
|
|
10923
|
+
*/
|
|
10924
|
+
subscribe(
|
|
10925
|
+
callback: (arg0: EntityHealBeforeEvent) => void,
|
|
10926
|
+
options?: EntityHealEventOptions,
|
|
10927
|
+
): (arg0: EntityHealBeforeEvent) => void;
|
|
10928
|
+
/**
|
|
10929
|
+
* @remarks
|
|
10930
|
+
* Removes a callback from being called when an entity will be
|
|
10931
|
+
* healed.
|
|
10932
|
+
*
|
|
10933
|
+
* This function can't be called in read-only mode.
|
|
10934
|
+
*
|
|
10935
|
+
* This function can be called in early-execution mode.
|
|
10936
|
+
*
|
|
10937
|
+
*/
|
|
10938
|
+
unsubscribe(callback: (arg0: EntityHealBeforeEvent) => void): void;
|
|
10939
|
+
}
|
|
10940
|
+
|
|
10941
|
+
/**
|
|
10942
|
+
* @beta
|
|
10943
|
+
* Provides information about how healing has been applied to
|
|
10944
|
+
* an entity.
|
|
10945
|
+
*/
|
|
10946
|
+
export class EntityHealSource {
|
|
10947
|
+
private constructor();
|
|
10948
|
+
/**
|
|
10949
|
+
* @remarks
|
|
10950
|
+
* Cause enumerator of the source of healing.
|
|
10951
|
+
*
|
|
10952
|
+
*/
|
|
10953
|
+
readonly cause: EntityHealCause;
|
|
10954
|
+
}
|
|
10955
|
+
|
|
10629
10956
|
/**
|
|
10630
10957
|
* Contains information related to an entity when its health
|
|
10631
10958
|
* changes. Warning: don't change the health of an entity in
|
|
@@ -10886,7 +11213,7 @@ export class EntityHurtAfterEventSignal {
|
|
|
10886
11213
|
*/
|
|
10887
11214
|
subscribe(
|
|
10888
11215
|
callback: (arg0: EntityHurtAfterEvent) => void,
|
|
10889
|
-
options?:
|
|
11216
|
+
options?: EntityHurtAfterEventOptions,
|
|
10890
11217
|
): (arg0: EntityHurtAfterEvent) => void;
|
|
10891
11218
|
/**
|
|
10892
11219
|
* @remarks
|
|
@@ -10900,6 +11227,68 @@ export class EntityHurtAfterEventSignal {
|
|
|
10900
11227
|
unsubscribe(callback: (arg0: EntityHurtAfterEvent) => void): void;
|
|
10901
11228
|
}
|
|
10902
11229
|
|
|
11230
|
+
/**
|
|
11231
|
+
* @beta
|
|
11232
|
+
* Contains information related to an entity that will be hurt.
|
|
11233
|
+
*/
|
|
11234
|
+
export class EntityHurtBeforeEvent {
|
|
11235
|
+
private constructor();
|
|
11236
|
+
cancel: boolean;
|
|
11237
|
+
/**
|
|
11238
|
+
* @remarks
|
|
11239
|
+
* Describes the amount of damage that will be caused.
|
|
11240
|
+
*
|
|
11241
|
+
*/
|
|
11242
|
+
damage: number;
|
|
11243
|
+
/**
|
|
11244
|
+
* @remarks
|
|
11245
|
+
* Source information on the entity that may have applied this
|
|
11246
|
+
* damage.
|
|
11247
|
+
*
|
|
11248
|
+
*/
|
|
11249
|
+
readonly damageSource: EntityDamageSource;
|
|
11250
|
+
/**
|
|
11251
|
+
* @remarks
|
|
11252
|
+
* Entity that will be hurt.
|
|
11253
|
+
*
|
|
11254
|
+
*/
|
|
11255
|
+
readonly hurtEntity: Entity;
|
|
11256
|
+
}
|
|
11257
|
+
|
|
11258
|
+
/**
|
|
11259
|
+
* @beta
|
|
11260
|
+
* Manages callbacks that are connected to when an entity will
|
|
11261
|
+
* be hurt.
|
|
11262
|
+
*/
|
|
11263
|
+
export class EntityHurtBeforeEventSignal {
|
|
11264
|
+
private constructor();
|
|
11265
|
+
/**
|
|
11266
|
+
* @remarks
|
|
11267
|
+
* Adds a callback that will be called when an entity will be
|
|
11268
|
+
* hurt.
|
|
11269
|
+
*
|
|
11270
|
+
* This function can't be called in read-only mode.
|
|
11271
|
+
*
|
|
11272
|
+
* This function can be called in early-execution mode.
|
|
11273
|
+
*
|
|
11274
|
+
*/
|
|
11275
|
+
subscribe(
|
|
11276
|
+
callback: (arg0: EntityHurtBeforeEvent) => void,
|
|
11277
|
+
options?: EntityHurtBeforeEventOptions,
|
|
11278
|
+
): (arg0: EntityHurtBeforeEvent) => void;
|
|
11279
|
+
/**
|
|
11280
|
+
* @remarks
|
|
11281
|
+
* Removes a callback from being called when an entity will be
|
|
11282
|
+
* hurt.
|
|
11283
|
+
*
|
|
11284
|
+
* This function can't be called in read-only mode.
|
|
11285
|
+
*
|
|
11286
|
+
* This function can be called in early-execution mode.
|
|
11287
|
+
*
|
|
11288
|
+
*/
|
|
11289
|
+
unsubscribe(callback: (arg0: EntityHurtBeforeEvent) => void): void;
|
|
11290
|
+
}
|
|
11291
|
+
|
|
10903
11292
|
/**
|
|
10904
11293
|
* Defines this entity's inventory properties.
|
|
10905
11294
|
*/
|
|
@@ -12534,6 +12923,14 @@ export class EntityType {
|
|
|
12534
12923
|
*
|
|
12535
12924
|
*/
|
|
12536
12925
|
readonly id: string;
|
|
12926
|
+
/**
|
|
12927
|
+
* @beta
|
|
12928
|
+
* @remarks
|
|
12929
|
+
* Key for the localization of this EntityType's name used in
|
|
12930
|
+
* .lang files.
|
|
12931
|
+
*
|
|
12932
|
+
*/
|
|
12933
|
+
readonly localizationKey: string;
|
|
12537
12934
|
}
|
|
12538
12935
|
|
|
12539
12936
|
// @ts-ignore Class inheritance allowed for native defined classes
|
|
@@ -14990,6 +15387,14 @@ export class ItemType {
|
|
|
14990
15387
|
*
|
|
14991
15388
|
*/
|
|
14992
15389
|
readonly id: string;
|
|
15390
|
+
/**
|
|
15391
|
+
* @beta
|
|
15392
|
+
* @remarks
|
|
15393
|
+
* Key for the localization of this ItemType's name used in
|
|
15394
|
+
* .lang files.
|
|
15395
|
+
*
|
|
15396
|
+
*/
|
|
15397
|
+
readonly localizationKey: string;
|
|
14993
15398
|
}
|
|
14994
15399
|
|
|
14995
15400
|
/**
|
|
@@ -18007,7 +18412,7 @@ export class PlayerSpawnAfterEventSignal {
|
|
|
18007
18412
|
}
|
|
18008
18413
|
|
|
18009
18414
|
/**
|
|
18010
|
-
* @
|
|
18415
|
+
* @rc
|
|
18011
18416
|
* Contains information regarding a player starting to swing
|
|
18012
18417
|
* their arm.
|
|
18013
18418
|
*/
|
|
@@ -18036,7 +18441,7 @@ export class PlayerSwingStartAfterEvent {
|
|
|
18036
18441
|
}
|
|
18037
18442
|
|
|
18038
18443
|
/**
|
|
18039
|
-
* @
|
|
18444
|
+
* @rc
|
|
18040
18445
|
* Manages callbacks that are connected to when a player starts
|
|
18041
18446
|
* to swing their arm (e.g. attacking, using an item,
|
|
18042
18447
|
* interacting).
|
|
@@ -21424,6 +21829,13 @@ export class WorldAfterEvents {
|
|
|
21424
21829
|
*
|
|
21425
21830
|
*/
|
|
21426
21831
|
readonly entityDie: EntityDieAfterEventSignal;
|
|
21832
|
+
/**
|
|
21833
|
+
* @beta
|
|
21834
|
+
* @remarks
|
|
21835
|
+
* This property can be read in early-execution mode.
|
|
21836
|
+
*
|
|
21837
|
+
*/
|
|
21838
|
+
readonly entityHeal: EntityHealAfterEventSignal;
|
|
21427
21839
|
/**
|
|
21428
21840
|
* @remarks
|
|
21429
21841
|
* This event fires when entity health changes in any degree.
|
|
@@ -21722,7 +22134,7 @@ export class WorldAfterEvents {
|
|
|
21722
22134
|
*/
|
|
21723
22135
|
readonly playerSpawn: PlayerSpawnAfterEventSignal;
|
|
21724
22136
|
/**
|
|
21725
|
-
* @
|
|
22137
|
+
* @rc
|
|
21726
22138
|
* @remarks
|
|
21727
22139
|
* This property can be read in early-execution mode.
|
|
21728
22140
|
*
|
|
@@ -21860,6 +22272,20 @@ export class WorldBeforeEvents {
|
|
|
21860
22272
|
*
|
|
21861
22273
|
*/
|
|
21862
22274
|
readonly effectAdd: EffectAddBeforeEventSignal;
|
|
22275
|
+
/**
|
|
22276
|
+
* @beta
|
|
22277
|
+
* @remarks
|
|
22278
|
+
* This property can be read in early-execution mode.
|
|
22279
|
+
*
|
|
22280
|
+
*/
|
|
22281
|
+
readonly entityHeal: EntityHealBeforeEventSignal;
|
|
22282
|
+
/**
|
|
22283
|
+
* @beta
|
|
22284
|
+
* @remarks
|
|
22285
|
+
* This property can be read in early-execution mode.
|
|
22286
|
+
*
|
|
22287
|
+
*/
|
|
22288
|
+
readonly entityHurt: EntityHurtBeforeEventSignal;
|
|
21863
22289
|
/**
|
|
21864
22290
|
* @remarks
|
|
21865
22291
|
* Fires before an entity is removed from the world (for
|
|
@@ -22005,6 +22431,17 @@ export interface AnimationOptions {
|
|
|
22005
22431
|
totalTimeSeconds: number;
|
|
22006
22432
|
}
|
|
22007
22433
|
|
|
22434
|
+
/**
|
|
22435
|
+
* @beta
|
|
22436
|
+
*/
|
|
22437
|
+
export interface BiomeFilter {
|
|
22438
|
+
excludeBiomes?: string[];
|
|
22439
|
+
excludeTags?: string[];
|
|
22440
|
+
includeBiomes?: string[];
|
|
22441
|
+
includeTags?: string[];
|
|
22442
|
+
superset: boolean;
|
|
22443
|
+
}
|
|
22444
|
+
|
|
22008
22445
|
/**
|
|
22009
22446
|
* @beta
|
|
22010
22447
|
* Contains additional options for searches for the
|
|
@@ -22078,6 +22515,14 @@ export interface BlockCustomComponent {
|
|
|
22078
22515
|
*
|
|
22079
22516
|
*/
|
|
22080
22517
|
onBreak?: (arg0: BlockComponentBlockBreakEvent, arg1: CustomComponentParameters) => void;
|
|
22518
|
+
/**
|
|
22519
|
+
* @beta
|
|
22520
|
+
* @remarks
|
|
22521
|
+
* This function will be called when an entity fires an event
|
|
22522
|
+
* to this block in the world.
|
|
22523
|
+
*
|
|
22524
|
+
*/
|
|
22525
|
+
onEntity?: (arg0: BlockComponentEntityEvent, arg1: CustomComponentParameters) => void;
|
|
22081
22526
|
/**
|
|
22082
22527
|
* @remarks
|
|
22083
22528
|
* This function will be called when an entity falls onto the
|
|
@@ -22108,7 +22553,6 @@ export interface BlockCustomComponent {
|
|
|
22108
22553
|
*/
|
|
22109
22554
|
onRandomTick?: (arg0: BlockComponentRandomTickEvent, arg1: CustomComponentParameters) => void;
|
|
22110
22555
|
/**
|
|
22111
|
-
* @beta
|
|
22112
22556
|
* @remarks
|
|
22113
22557
|
* This function will be called when an 'onRedstoneUpdate'
|
|
22114
22558
|
* engine event occurs if the block has a
|
|
@@ -22311,6 +22755,26 @@ export interface BlockRaycastOptions extends BlockFilter {
|
|
|
22311
22755
|
maxDistance?: number;
|
|
22312
22756
|
}
|
|
22313
22757
|
|
|
22758
|
+
/**
|
|
22759
|
+
* @beta
|
|
22760
|
+
* Used to attach the camera to a non player entity.
|
|
22761
|
+
*/
|
|
22762
|
+
export interface CameraAttachOptions {
|
|
22763
|
+
/**
|
|
22764
|
+
* @remarks
|
|
22765
|
+
* Set a non player entity for the camera to target.
|
|
22766
|
+
*
|
|
22767
|
+
*/
|
|
22768
|
+
entity: Entity;
|
|
22769
|
+
/**
|
|
22770
|
+
* @remarks
|
|
22771
|
+
* The location of the entity that you want to target (eg.
|
|
22772
|
+
* head, feet, eyes).
|
|
22773
|
+
*
|
|
22774
|
+
*/
|
|
22775
|
+
locator: EntityAttachPoint;
|
|
22776
|
+
}
|
|
22777
|
+
|
|
22314
22778
|
/**
|
|
22315
22779
|
* Used to initiate a full-screen color fade.
|
|
22316
22780
|
*/
|
|
@@ -22937,6 +23401,28 @@ export interface EntityFilter {
|
|
|
22937
23401
|
type?: string;
|
|
22938
23402
|
}
|
|
22939
23403
|
|
|
23404
|
+
/**
|
|
23405
|
+
* @beta
|
|
23406
|
+
* Contains optional parameters for registering an entity heal
|
|
23407
|
+
* event.
|
|
23408
|
+
*/
|
|
23409
|
+
export interface EntityHealEventOptions {
|
|
23410
|
+
/**
|
|
23411
|
+
* @remarks
|
|
23412
|
+
* If this value is set, this event will only fire for healing
|
|
23413
|
+
* causes that match.
|
|
23414
|
+
*
|
|
23415
|
+
*/
|
|
23416
|
+
allowedHealCauses?: EntityHealCause[];
|
|
23417
|
+
/**
|
|
23418
|
+
* @remarks
|
|
23419
|
+
* If this value is set, this event will only fire for entities
|
|
23420
|
+
* that match.
|
|
23421
|
+
*
|
|
23422
|
+
*/
|
|
23423
|
+
entityFilter?: EntityFilter;
|
|
23424
|
+
}
|
|
23425
|
+
|
|
22940
23426
|
/**
|
|
22941
23427
|
* Contains additional information about an entity that was
|
|
22942
23428
|
* hit.
|
|
@@ -22950,6 +23436,64 @@ export interface EntityHitInformation {
|
|
|
22950
23436
|
entity?: Entity;
|
|
22951
23437
|
}
|
|
22952
23438
|
|
|
23439
|
+
/**
|
|
23440
|
+
* @beta
|
|
23441
|
+
* Contains optional parameters for registering an entity hurt
|
|
23442
|
+
* after event.
|
|
23443
|
+
*/
|
|
23444
|
+
export interface EntityHurtAfterEventOptions {
|
|
23445
|
+
/**
|
|
23446
|
+
* @remarks
|
|
23447
|
+
* If this value is set, this event will only fire for damage
|
|
23448
|
+
* causes that match.
|
|
23449
|
+
*
|
|
23450
|
+
*/
|
|
23451
|
+
allowedDamageCauses?: EntityDamageCause[];
|
|
23452
|
+
/**
|
|
23453
|
+
* @remarks
|
|
23454
|
+
* If this value is set, this event will only fire for entities
|
|
23455
|
+
* that match the entities within this collection.
|
|
23456
|
+
*
|
|
23457
|
+
*/
|
|
23458
|
+
entities?: Entity[];
|
|
23459
|
+
/**
|
|
23460
|
+
* @remarks
|
|
23461
|
+
* If this value is set, this event will only fire for entities
|
|
23462
|
+
* that match.
|
|
23463
|
+
*
|
|
23464
|
+
*/
|
|
23465
|
+
entityFilter?: EntityFilter;
|
|
23466
|
+
/**
|
|
23467
|
+
* @remarks
|
|
23468
|
+
* If this value is set, this event will only fire if the
|
|
23469
|
+
* impacted entities' type matches this parameter.
|
|
23470
|
+
*
|
|
23471
|
+
*/
|
|
23472
|
+
entityTypes?: string[];
|
|
23473
|
+
}
|
|
23474
|
+
|
|
23475
|
+
/**
|
|
23476
|
+
* @beta
|
|
23477
|
+
* Contains optional parameters for registering an entity hurt
|
|
23478
|
+
* before event.
|
|
23479
|
+
*/
|
|
23480
|
+
export interface EntityHurtBeforeEventOptions {
|
|
23481
|
+
/**
|
|
23482
|
+
* @remarks
|
|
23483
|
+
* If this value is set, this event will only fire for damage
|
|
23484
|
+
* causes that match.
|
|
23485
|
+
*
|
|
23486
|
+
*/
|
|
23487
|
+
allowedDamageCauses?: EntityDamageCause[];
|
|
23488
|
+
/**
|
|
23489
|
+
* @remarks
|
|
23490
|
+
* If this value is set, this event will only fire for entities
|
|
23491
|
+
* that match.
|
|
23492
|
+
*
|
|
23493
|
+
*/
|
|
23494
|
+
entityFilter?: EntityFilter;
|
|
23495
|
+
}
|
|
23496
|
+
|
|
22953
23497
|
/**
|
|
22954
23498
|
* Contains options for selecting entities within an area.
|
|
22955
23499
|
* @example blockConditional.ts
|
|
@@ -23771,7 +24315,7 @@ export interface PlayerSoundOptions {
|
|
|
23771
24315
|
}
|
|
23772
24316
|
|
|
23773
24317
|
/**
|
|
23774
|
-
* @
|
|
24318
|
+
* @rc
|
|
23775
24319
|
* An interface that is passed into {@link
|
|
23776
24320
|
* @minecraft/Server.PlayerSwingStartAfterEvent.subscribe} that
|
|
23777
24321
|
* filters out which events are passed to the provided
|
|
@@ -23808,6 +24352,13 @@ export interface ProgressKeyFrame {
|
|
|
23808
24352
|
*
|
|
23809
24353
|
*/
|
|
23810
24354
|
alpha: number;
|
|
24355
|
+
/**
|
|
24356
|
+
* @remarks
|
|
24357
|
+
* The optional easing type that the frame will use for
|
|
24358
|
+
* position.
|
|
24359
|
+
*
|
|
24360
|
+
*/
|
|
24361
|
+
easingFunc?: EasingType;
|
|
23811
24362
|
/**
|
|
23812
24363
|
* @remarks
|
|
23813
24364
|
* Time value that the camera will be at the given alpha.
|
|
@@ -24061,6 +24612,13 @@ export interface RGBA extends RGB {
|
|
|
24061
24612
|
* Key frame that holds the rotation of the camera animation.
|
|
24062
24613
|
*/
|
|
24063
24614
|
export interface RotationKeyFrame {
|
|
24615
|
+
/**
|
|
24616
|
+
* @remarks
|
|
24617
|
+
* The optional easing type that the frame will use for
|
|
24618
|
+
* rotation.
|
|
24619
|
+
*
|
|
24620
|
+
*/
|
|
24621
|
+
easingFunc?: EasingType;
|
|
24064
24622
|
/**
|
|
24065
24623
|
* @remarks
|
|
24066
24624
|
* Value of the rotation of the camera.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@minecraft/server",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.6.0-beta.1.26.0-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.
|
|
17
|
+
"@minecraft/vanilla-data": ">=1.20.70 || 1.26.0-preview.24"
|
|
18
18
|
},
|
|
19
19
|
"license": "MIT"
|
|
20
20
|
}
|