@minecraft/server 2.9.0-beta.1.26.30-preview.32 → 2.9.0-rc.1.26.40-preview.23
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 +207 -2346
- package/package.json +2 -2
package/index.d.ts
CHANGED
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
Copyright (c) Microsoft Corporation.
|
|
8
8
|
***************************************************************************** */
|
|
9
9
|
/**
|
|
10
|
-
* @
|
|
10
|
+
* @preview
|
|
11
11
|
* @packageDocumentation
|
|
12
12
|
* Contains many types related to manipulating a Minecraft
|
|
13
13
|
* world, including entities, blocks, dimensions, and more.
|
|
@@ -16,7 +16,7 @@
|
|
|
16
16
|
* ```json
|
|
17
17
|
* {
|
|
18
18
|
* "module_name": "@minecraft/server",
|
|
19
|
-
* "version": "2.9.0
|
|
19
|
+
* "version": "2.9.0"
|
|
20
20
|
* }
|
|
21
21
|
* ```
|
|
22
22
|
*
|
|
@@ -47,10 +47,6 @@ export enum AimAssistTargetMode {
|
|
|
47
47
|
* function Block.getComponent.
|
|
48
48
|
*/
|
|
49
49
|
export enum BlockComponentTypes {
|
|
50
|
-
/**
|
|
51
|
-
* @beta
|
|
52
|
-
*/
|
|
53
|
-
DynamicProperties = 'minecraft:dynamic_properties',
|
|
54
50
|
FluidContainer = 'minecraft:fluid_container',
|
|
55
51
|
/**
|
|
56
52
|
* @remarks
|
|
@@ -233,55 +229,6 @@ export enum CommandPermissionLevel {
|
|
|
233
229
|
Owner = 4,
|
|
234
230
|
}
|
|
235
231
|
|
|
236
|
-
/**
|
|
237
|
-
* @beta
|
|
238
|
-
* The Action enum determines how the CompoundBlockVolume
|
|
239
|
-
* considers the associated CompoundBlockVolumeItem when
|
|
240
|
-
* performing inside/outside calculations.
|
|
241
|
-
*/
|
|
242
|
-
export enum CompoundBlockVolumeAction {
|
|
243
|
-
/**
|
|
244
|
-
* @remarks
|
|
245
|
-
* The associated BlockVolume is considered a positive space,
|
|
246
|
-
* and any intersection tests are considered hits
|
|
247
|
-
*
|
|
248
|
-
*/
|
|
249
|
-
Add = 0,
|
|
250
|
-
/**
|
|
251
|
-
* @remarks
|
|
252
|
-
* The associated BlockVolume is considered a negative or void
|
|
253
|
-
* space, and any intersection tests are considered misses.
|
|
254
|
-
* Using the Subtract action, it is possible to `punch holes`
|
|
255
|
-
* in block volumes so that any intersection tests may pass
|
|
256
|
-
* through such spaces
|
|
257
|
-
*
|
|
258
|
-
*/
|
|
259
|
-
Subtract = 1,
|
|
260
|
-
}
|
|
261
|
-
|
|
262
|
-
/**
|
|
263
|
-
* @beta
|
|
264
|
-
* An enum describing the relativity of the
|
|
265
|
-
* CompoundBlockVolumeItem, relative to the parent
|
|
266
|
-
* CompoundVolume.
|
|
267
|
-
*/
|
|
268
|
-
export enum CompoundBlockVolumePositionRelativity {
|
|
269
|
-
/**
|
|
270
|
-
* @remarks
|
|
271
|
-
* The locations within the associated BlockVolume are relative
|
|
272
|
-
* to the CompoundBlockVolume to which they were added
|
|
273
|
-
*
|
|
274
|
-
*/
|
|
275
|
-
Relative = 0,
|
|
276
|
-
/**
|
|
277
|
-
* @remarks
|
|
278
|
-
* The locations within the associated BlockVolume are in
|
|
279
|
-
* absolute world space
|
|
280
|
-
*
|
|
281
|
-
*/
|
|
282
|
-
Absolute = 1,
|
|
283
|
-
}
|
|
284
|
-
|
|
285
232
|
/**
|
|
286
233
|
* Reasons that the {@link
|
|
287
234
|
* @minecraft/server.ContainerRulesError} was thrown.
|
|
@@ -384,13 +331,6 @@ export enum CustomCommandErrorReason {
|
|
|
384
331
|
*
|
|
385
332
|
*/
|
|
386
333
|
RegistryReadOnly = 'RegistryReadOnly',
|
|
387
|
-
/**
|
|
388
|
-
* @beta
|
|
389
|
-
* @remarks
|
|
390
|
-
* Non enum type command parameters cannot use enumName.
|
|
391
|
-
*
|
|
392
|
-
*/
|
|
393
|
-
UnexpectedEnumName = 'UnexpectedEnumName',
|
|
394
334
|
}
|
|
395
335
|
|
|
396
336
|
/**
|
|
@@ -1128,14 +1068,6 @@ export enum EntityComponentTypes {
|
|
|
1128
1068
|
*
|
|
1129
1069
|
*/
|
|
1130
1070
|
NavigationWalk = 'minecraft:navigation.walk',
|
|
1131
|
-
/**
|
|
1132
|
-
* @beta
|
|
1133
|
-
* @remarks
|
|
1134
|
-
* Adds NPC capabilities to an entity such as custom skin,
|
|
1135
|
-
* name, and dialogue interactions.
|
|
1136
|
-
*
|
|
1137
|
-
*/
|
|
1138
|
-
Npc = 'minecraft:npc',
|
|
1139
1071
|
/**
|
|
1140
1072
|
* @remarks
|
|
1141
1073
|
* When present on an entity, this entity is on fire.
|
|
@@ -1149,15 +1081,6 @@ export enum EntityComponentTypes {
|
|
|
1149
1081
|
*
|
|
1150
1082
|
*/
|
|
1151
1083
|
Exhaustion = 'minecraft:player.exhaustion',
|
|
1152
|
-
/**
|
|
1153
|
-
* @beta
|
|
1154
|
-
* @remarks
|
|
1155
|
-
* Use this component to access and manipulate the fog
|
|
1156
|
-
* definitions stack of a player. This is only available on
|
|
1157
|
-
* players.
|
|
1158
|
-
*
|
|
1159
|
-
*/
|
|
1160
|
-
Fog = 'minecraft:player.fog',
|
|
1161
1084
|
/**
|
|
1162
1085
|
* @remarks
|
|
1163
1086
|
* Use this component to read the hunger of a player. This is
|
|
@@ -1629,14 +1552,6 @@ export enum EntitySwingSource {
|
|
|
1629
1552
|
* and mainhand slots.
|
|
1630
1553
|
*/
|
|
1631
1554
|
export enum EquipmentSlot {
|
|
1632
|
-
/**
|
|
1633
|
-
* @beta
|
|
1634
|
-
* @remarks
|
|
1635
|
-
* The body slot. This slot is used to hold armor for
|
|
1636
|
-
* non-humanoid mobs.
|
|
1637
|
-
*
|
|
1638
|
-
*/
|
|
1639
|
-
Body = 'Body',
|
|
1640
1555
|
/**
|
|
1641
1556
|
* @remarks
|
|
1642
1557
|
* The chest slot. This slot is used to hold items such as
|
|
@@ -1906,14 +1821,6 @@ export enum GameRule {
|
|
|
1906
1821
|
*
|
|
1907
1822
|
*/
|
|
1908
1823
|
PlayersSleepingPercentage = 'playersSleepingPercentage',
|
|
1909
|
-
/**
|
|
1910
|
-
* @beta
|
|
1911
|
-
* @remarks
|
|
1912
|
-
* Controls which player waypoints are automatically added to
|
|
1913
|
-
* the players locator bar.
|
|
1914
|
-
*
|
|
1915
|
-
*/
|
|
1916
|
-
PlayerWaypoints = 'playerWaypoints',
|
|
1917
1824
|
/**
|
|
1918
1825
|
* @remarks
|
|
1919
1826
|
* Controls whether projectiles (entities with a projectile
|
|
@@ -2705,11 +2612,35 @@ export enum PlayerPermissionLevel {
|
|
|
2705
2612
|
}
|
|
2706
2613
|
|
|
2707
2614
|
/**
|
|
2708
|
-
* @
|
|
2615
|
+
* @rc
|
|
2616
|
+
* The split screen slot of a player.
|
|
2709
2617
|
*/
|
|
2710
|
-
export enum
|
|
2711
|
-
|
|
2712
|
-
|
|
2618
|
+
export enum PlayerSplitScreenSlot {
|
|
2619
|
+
/**
|
|
2620
|
+
* @remarks
|
|
2621
|
+
* The first player in the split screen session. This is the
|
|
2622
|
+
* primary player.
|
|
2623
|
+
*
|
|
2624
|
+
*/
|
|
2625
|
+
First = 'First',
|
|
2626
|
+
/**
|
|
2627
|
+
* @remarks
|
|
2628
|
+
* The fourth player in the split screen session.
|
|
2629
|
+
*
|
|
2630
|
+
*/
|
|
2631
|
+
Fourth = 'Fourth',
|
|
2632
|
+
/**
|
|
2633
|
+
* @remarks
|
|
2634
|
+
* The second player in the split screen session.
|
|
2635
|
+
*
|
|
2636
|
+
*/
|
|
2637
|
+
Second = 'Second',
|
|
2638
|
+
/**
|
|
2639
|
+
* @remarks
|
|
2640
|
+
* The third player in the split screen session.
|
|
2641
|
+
*
|
|
2642
|
+
*/
|
|
2643
|
+
Third = 'Third',
|
|
2713
2644
|
}
|
|
2714
2645
|
|
|
2715
2646
|
/**
|
|
@@ -3038,29 +2969,6 @@ export enum TintMethod {
|
|
|
3038
2969
|
Water = 'Water',
|
|
3039
2970
|
}
|
|
3040
2971
|
|
|
3041
|
-
/**
|
|
3042
|
-
* @beta
|
|
3043
|
-
* An enumeration with the reason that a watchdog is deciding
|
|
3044
|
-
* to terminate execution of a behavior packs' script.
|
|
3045
|
-
*/
|
|
3046
|
-
export enum WatchdogTerminateReason {
|
|
3047
|
-
/**
|
|
3048
|
-
* @remarks
|
|
3049
|
-
* Script runtime for a behavior pack is terminated due to
|
|
3050
|
-
* non-responsiveness from script (a hang or infinite loop).
|
|
3051
|
-
*
|
|
3052
|
-
*/
|
|
3053
|
-
Hang = 'Hang',
|
|
3054
|
-
/**
|
|
3055
|
-
* @remarks
|
|
3056
|
-
* Script runtime for a behavior pack is terminated due to a
|
|
3057
|
-
* stack overflow (a long, and potentially infinite) chain of
|
|
3058
|
-
* function calls.
|
|
3059
|
-
*
|
|
3060
|
-
*/
|
|
3061
|
-
StackOverflow = 'StackOverflow',
|
|
3062
|
-
}
|
|
3063
|
-
|
|
3064
2972
|
/**
|
|
3065
2973
|
* @rc
|
|
3066
2974
|
* Enum representing different texture icons that can be
|
|
@@ -3123,11 +3031,9 @@ export type BlockComponentReturnType<T extends string> = T extends keyof BlockCo
|
|
|
3123
3031
|
: BlockCustomComponentInstance;
|
|
3124
3032
|
|
|
3125
3033
|
export type BlockComponentTypeMap = {
|
|
3126
|
-
dynamic_properties: BlockDynamicPropertiesComponent;
|
|
3127
3034
|
fluid_container: BlockFluidContainerComponent;
|
|
3128
3035
|
inventory: BlockInventoryComponent;
|
|
3129
3036
|
map_color: BlockMapColorComponent;
|
|
3130
|
-
'minecraft:dynamic_properties': BlockDynamicPropertiesComponent;
|
|
3131
3037
|
'minecraft:fluid_container': BlockFluidContainerComponent;
|
|
3132
3038
|
'minecraft:inventory': BlockInventoryComponent;
|
|
3133
3039
|
'minecraft:map_color': BlockMapColorComponent;
|
|
@@ -3248,10 +3154,8 @@ export type EntityComponentTypeMap = {
|
|
|
3248
3154
|
'minecraft:navigation.generic': EntityNavigationGenericComponent;
|
|
3249
3155
|
'minecraft:navigation.hover': EntityNavigationHoverComponent;
|
|
3250
3156
|
'minecraft:navigation.walk': EntityNavigationWalkComponent;
|
|
3251
|
-
'minecraft:npc': EntityNpcComponent;
|
|
3252
3157
|
'minecraft:onfire': EntityOnFireComponent;
|
|
3253
3158
|
'minecraft:player.exhaustion': EntityExhaustionComponent;
|
|
3254
|
-
'minecraft:player.fog': EntityFogComponent;
|
|
3255
3159
|
'minecraft:player.hunger': EntityHungerComponent;
|
|
3256
3160
|
'minecraft:player.saturation': EntitySaturationComponent;
|
|
3257
3161
|
'minecraft:projectile': EntityProjectileComponent;
|
|
@@ -3283,10 +3187,8 @@ export type EntityComponentTypeMap = {
|
|
|
3283
3187
|
'navigation.generic': EntityNavigationGenericComponent;
|
|
3284
3188
|
'navigation.hover': EntityNavigationHoverComponent;
|
|
3285
3189
|
'navigation.walk': EntityNavigationWalkComponent;
|
|
3286
|
-
npc: EntityNpcComponent;
|
|
3287
3190
|
onfire: EntityOnFireComponent;
|
|
3288
3191
|
'player.exhaustion': EntityExhaustionComponent;
|
|
3289
|
-
'player.fog': EntityFogComponent;
|
|
3290
3192
|
'player.hunger': EntityHungerComponent;
|
|
3291
3193
|
'player.saturation': EntitySaturationComponent;
|
|
3292
3194
|
projectile: EntityProjectileComponent;
|
|
@@ -3304,15 +3206,6 @@ export type EntityComponentTypeMap = {
|
|
|
3304
3206
|
wants_jockey: EntityWantsJockeyComponent;
|
|
3305
3207
|
};
|
|
3306
3208
|
|
|
3307
|
-
/**
|
|
3308
|
-
* @beta
|
|
3309
|
-
*/
|
|
3310
|
-
export type EntityIdentifierType<T> = [T] extends [never]
|
|
3311
|
-
? VanillaEntityIdentifier
|
|
3312
|
-
: T extends string
|
|
3313
|
-
? VanillaEntityIdentifier | T
|
|
3314
|
-
: never;
|
|
3315
|
-
|
|
3316
3209
|
export type ItemComponentReturnType<T extends string> = T extends keyof ItemComponentTypeMap
|
|
3317
3210
|
? ItemComponentTypeMap[T]
|
|
3318
3211
|
: ItemCustomComponentInstance;
|
|
@@ -3338,15 +3231,6 @@ export type ItemComponentTypeMap = {
|
|
|
3338
3231
|
potion: ItemPotionComponent;
|
|
3339
3232
|
};
|
|
3340
3233
|
|
|
3341
|
-
/**
|
|
3342
|
-
* @beta
|
|
3343
|
-
*/
|
|
3344
|
-
export type VanillaEntityIdentifier =
|
|
3345
|
-
| EntityType
|
|
3346
|
-
| minecraftvanilladata.MinecraftEntityTypes
|
|
3347
|
-
| `${minecraftvanilladata.MinecraftEntityTypes}`
|
|
3348
|
-
| `${minecraftvanilladata.MinecraftEntityTypes}<${string}>`;
|
|
3349
|
-
|
|
3350
3234
|
/**
|
|
3351
3235
|
* Handle to an aim-assist category that exists in the
|
|
3352
3236
|
* world.aimAssist registry.
|
|
@@ -3504,9 +3388,7 @@ export class AimAssistCategorySettings {
|
|
|
3504
3388
|
* A record mapping block Ids to their priority settings.
|
|
3505
3389
|
* Larger numbers have greater priority.
|
|
3506
3390
|
*/
|
|
3507
|
-
setBlockPriorities(
|
|
3508
|
-
blockPriorities: Record<keyof typeof minecraftvanilladata.MinecraftBlockTypes | string, number>,
|
|
3509
|
-
): void;
|
|
3391
|
+
setBlockPriorities(blockPriorities: Record<string, number>): void;
|
|
3510
3392
|
/**
|
|
3511
3393
|
* @remarks
|
|
3512
3394
|
* Sets the priority settings used for block targeting.
|
|
@@ -3525,9 +3407,7 @@ export class AimAssistCategorySettings {
|
|
|
3525
3407
|
* A record mapping entity Ids to their priority settings.
|
|
3526
3408
|
* Larger numbers have greater priority.
|
|
3527
3409
|
*/
|
|
3528
|
-
setEntityPriorities(
|
|
3529
|
-
entityPriorities: Record<keyof typeof minecraftvanilladata.MinecraftEntityTypes | string, number>,
|
|
3530
|
-
): void;
|
|
3410
|
+
setEntityPriorities(entityPriorities: Record<string, number>): void;
|
|
3531
3411
|
/**
|
|
3532
3412
|
* @remarks
|
|
3533
3413
|
* Sets the priority settings used for entity targeting.
|
|
@@ -3726,10 +3606,8 @@ export class AimAssistPresetSettings {
|
|
|
3726
3606
|
*
|
|
3727
3607
|
* This function can't be called in restricted-execution mode.
|
|
3728
3608
|
*
|
|
3729
|
-
* @param targets
|
|
3730
|
-
* An array of block tags.
|
|
3731
3609
|
*/
|
|
3732
|
-
setExcludedBlockTagTargets(
|
|
3610
|
+
setExcludedBlockTagTargets(blockTagTargets?: string[]): void;
|
|
3733
3611
|
/**
|
|
3734
3612
|
* @remarks
|
|
3735
3613
|
* Sets the list of block Ids to exclude from aim assist
|
|
@@ -3737,10 +3615,8 @@ export class AimAssistPresetSettings {
|
|
|
3737
3615
|
*
|
|
3738
3616
|
* This function can't be called in restricted-execution mode.
|
|
3739
3617
|
*
|
|
3740
|
-
* @param targets
|
|
3741
|
-
* An array of block Ids.
|
|
3742
3618
|
*/
|
|
3743
|
-
setExcludedBlockTargets(
|
|
3619
|
+
setExcludedBlockTargets(blockTargets?: string[]): void;
|
|
3744
3620
|
/**
|
|
3745
3621
|
* @remarks
|
|
3746
3622
|
* Sets the list of entity Ids to exclude from aim assist
|
|
@@ -3748,10 +3624,8 @@ export class AimAssistPresetSettings {
|
|
|
3748
3624
|
*
|
|
3749
3625
|
* This function can't be called in restricted-execution mode.
|
|
3750
3626
|
*
|
|
3751
|
-
* @param targets
|
|
3752
|
-
* An array of entity Ids.
|
|
3753
3627
|
*/
|
|
3754
|
-
setExcludedEntityTargets(
|
|
3628
|
+
setExcludedEntityTargets(entityTargets?: string[]): void;
|
|
3755
3629
|
/**
|
|
3756
3630
|
* @remarks
|
|
3757
3631
|
* Sets the list of entity type families to exclude from aim
|
|
@@ -3759,10 +3633,8 @@ export class AimAssistPresetSettings {
|
|
|
3759
3633
|
*
|
|
3760
3634
|
* This function can't be called in restricted-execution mode.
|
|
3761
3635
|
*
|
|
3762
|
-
* @param targets
|
|
3763
|
-
* An array of entity type families.
|
|
3764
3636
|
*/
|
|
3765
|
-
setExcludedEntityTypeFamilyTargets(
|
|
3637
|
+
setExcludedEntityTypeFamilyTargets(entityTypeFamilyTargets?: string[]): void;
|
|
3766
3638
|
/**
|
|
3767
3639
|
* @remarks
|
|
3768
3640
|
* Sets the per-item aim-assist category Ids.
|
|
@@ -3773,7 +3645,7 @@ export class AimAssistPresetSettings {
|
|
|
3773
3645
|
* A record mapping item Ids to aim-assist category Ids.
|
|
3774
3646
|
* Category Ids must have a namespace.
|
|
3775
3647
|
*/
|
|
3776
|
-
setItemSettings(itemSettings: Record<
|
|
3648
|
+
setItemSettings(itemSettings: Record<string, string>): void;
|
|
3777
3649
|
/**
|
|
3778
3650
|
* @remarks
|
|
3779
3651
|
* Sets the list of item Ids that will target liquid blocks
|
|
@@ -3784,7 +3656,7 @@ export class AimAssistPresetSettings {
|
|
|
3784
3656
|
* @param items
|
|
3785
3657
|
* An array of item Ids.
|
|
3786
3658
|
*/
|
|
3787
|
-
setLiquidTargetingItems(items?:
|
|
3659
|
+
setLiquidTargetingItems(items?: string[]): void;
|
|
3788
3660
|
}
|
|
3789
3661
|
|
|
3790
3662
|
/**
|
|
@@ -3890,28 +3762,6 @@ export class AimAssistRegistry {
|
|
|
3890
3762
|
getPresets(): AimAssistPreset[];
|
|
3891
3763
|
}
|
|
3892
3764
|
|
|
3893
|
-
/**
|
|
3894
|
-
* @beta
|
|
3895
|
-
* Describes a single banner pattern, which includes a colour
|
|
3896
|
-
* and a pattern type.
|
|
3897
|
-
*/
|
|
3898
|
-
export class BannerPattern {
|
|
3899
|
-
private constructor();
|
|
3900
|
-
/**
|
|
3901
|
-
* @remarks
|
|
3902
|
-
* The color to apply to this banner pattern.
|
|
3903
|
-
*
|
|
3904
|
-
*/
|
|
3905
|
-
readonly color: string;
|
|
3906
|
-
/**
|
|
3907
|
-
* @remarks
|
|
3908
|
-
* The pattern type (e.g. gradient, chevron, cross, etc.) to
|
|
3909
|
-
* apply to the banner.
|
|
3910
|
-
*
|
|
3911
|
-
*/
|
|
3912
|
-
readonly pattern: string;
|
|
3913
|
-
}
|
|
3914
|
-
|
|
3915
3765
|
/**
|
|
3916
3766
|
* Describes a type of biome.
|
|
3917
3767
|
*/
|
|
@@ -4005,20 +3855,6 @@ export class Block {
|
|
|
4005
3855
|
* {@link LocationOutOfWorldBoundariesError}
|
|
4006
3856
|
*/
|
|
4007
3857
|
readonly isLiquid: boolean;
|
|
4008
|
-
/**
|
|
4009
|
-
* @beta
|
|
4010
|
-
* @remarks
|
|
4011
|
-
* Returns true if this block is solid and impassible - (e.g.,
|
|
4012
|
-
* a cobblestone block and a diamond block are solid, while a
|
|
4013
|
-
* ladder block and a fence block are not).
|
|
4014
|
-
*
|
|
4015
|
-
* @throws This property can throw when used.
|
|
4016
|
-
*
|
|
4017
|
-
* {@link LocationInUnloadedChunkError}
|
|
4018
|
-
*
|
|
4019
|
-
* {@link LocationOutOfWorldBoundariesError}
|
|
4020
|
-
*/
|
|
4021
|
-
readonly isSolid: boolean;
|
|
4022
3858
|
/**
|
|
4023
3859
|
* @remarks
|
|
4024
3860
|
* Returns true if this reference to a block is still valid
|
|
@@ -4184,30 +4020,6 @@ export class Block {
|
|
|
4184
4020
|
* {@link LocationOutOfWorldBoundariesError}
|
|
4185
4021
|
*/
|
|
4186
4022
|
canContainLiquid(liquidType: LiquidType): boolean;
|
|
4187
|
-
/**
|
|
4188
|
-
* @beta
|
|
4189
|
-
* @remarks
|
|
4190
|
-
* Checks to see whether it is valid to place the specified
|
|
4191
|
-
* block type or block permutation, on a specified face on this
|
|
4192
|
-
* block.
|
|
4193
|
-
*
|
|
4194
|
-
* @param blockToPlace
|
|
4195
|
-
* Block type or block permutation to check placement for.
|
|
4196
|
-
* @param faceToPlaceOn
|
|
4197
|
-
* Optional specific face of this block to check placement
|
|
4198
|
-
* against.
|
|
4199
|
-
* @returns
|
|
4200
|
-
* Returns `true` if the block type or permutation can be
|
|
4201
|
-
* placed on this block, else `false`.
|
|
4202
|
-
* @throws This function can throw errors.
|
|
4203
|
-
*
|
|
4204
|
-
* {@link Error}
|
|
4205
|
-
*
|
|
4206
|
-
* {@link LocationInUnloadedChunkError}
|
|
4207
|
-
*
|
|
4208
|
-
* {@link LocationOutOfWorldBoundariesError}
|
|
4209
|
-
*/
|
|
4210
|
-
canPlace(blockToPlace: BlockPermutation | BlockType | string, faceToPlaceOn?: Direction): boolean;
|
|
4211
4023
|
/**
|
|
4212
4024
|
* @remarks
|
|
4213
4025
|
* Returns the {@link Vector3} of the center of this block on
|
|
@@ -4305,16 +4117,7 @@ export class Block {
|
|
|
4305
4117
|
*/
|
|
4306
4118
|
getLightLevel(): number;
|
|
4307
4119
|
/**
|
|
4308
|
-
* @
|
|
4309
|
-
* @throws This function can throw errors.
|
|
4310
|
-
*
|
|
4311
|
-
* {@link LocationInUnloadedChunkError}
|
|
4312
|
-
*
|
|
4313
|
-
* {@link LocationOutOfWorldBoundariesError}
|
|
4314
|
-
*/
|
|
4315
|
-
getMapColor(): RGBA;
|
|
4316
|
-
/**
|
|
4317
|
-
* @beta
|
|
4120
|
+
* @rc
|
|
4318
4121
|
* @remarks
|
|
4319
4122
|
* Returns array of all loaded block parts if this block has
|
|
4320
4123
|
* the 'minecraft:multi_block' trait. If it does not have the
|
|
@@ -4594,27 +4397,6 @@ export class Block {
|
|
|
4594
4397
|
* {@link LocationOutOfWorldBoundariesError}
|
|
4595
4398
|
*/
|
|
4596
4399
|
south(steps?: number): Block | undefined;
|
|
4597
|
-
/**
|
|
4598
|
-
* @beta
|
|
4599
|
-
* @remarks
|
|
4600
|
-
* Tries to set the block in the dimension to the state of the
|
|
4601
|
-
* permutation by first checking if the placement is valid.
|
|
4602
|
-
*
|
|
4603
|
-
* This function can't be called in restricted-execution mode.
|
|
4604
|
-
*
|
|
4605
|
-
* @param permutation
|
|
4606
|
-
* Permutation that contains a set of property states for the
|
|
4607
|
-
* Block.
|
|
4608
|
-
* @returns
|
|
4609
|
-
* Returns `true` if the block permutation data was
|
|
4610
|
-
* successfully set, else `false`.
|
|
4611
|
-
* @throws This function can throw errors.
|
|
4612
|
-
*
|
|
4613
|
-
* {@link LocationInUnloadedChunkError}
|
|
4614
|
-
*
|
|
4615
|
-
* {@link LocationOutOfWorldBoundariesError}
|
|
4616
|
-
*/
|
|
4617
|
-
trySetPermutation(permutation: BlockPermutation): boolean;
|
|
4618
4400
|
/**
|
|
4619
4401
|
* @remarks
|
|
4620
4402
|
* Returns the {@link Block} to the west of this block
|
|
@@ -4632,137 +4414,6 @@ export class Block {
|
|
|
4632
4414
|
west(steps?: number): Block | undefined;
|
|
4633
4415
|
}
|
|
4634
4416
|
|
|
4635
|
-
/**
|
|
4636
|
-
* @beta
|
|
4637
|
-
* Bounding Box Utils is a utility class that provides a number
|
|
4638
|
-
* of useful functions for the creation and utility of {@link
|
|
4639
|
-
* BlockBoundingBox} objects
|
|
4640
|
-
*/
|
|
4641
|
-
export class BlockBoundingBoxUtils {
|
|
4642
|
-
private constructor();
|
|
4643
|
-
/**
|
|
4644
|
-
* @remarks
|
|
4645
|
-
* Create a validated instance of a {@link BlockBoundingBox}
|
|
4646
|
-
* where the min and max components are guaranteed to be (min
|
|
4647
|
-
* <= max)
|
|
4648
|
-
*
|
|
4649
|
-
* This function can't be called in restricted-execution mode.
|
|
4650
|
-
*
|
|
4651
|
-
* @param min
|
|
4652
|
-
* A corner world location
|
|
4653
|
-
* @param max
|
|
4654
|
-
* A corner world location diametrically opposite
|
|
4655
|
-
*/
|
|
4656
|
-
static createValid(min: Vector3, max: Vector3): BlockBoundingBox;
|
|
4657
|
-
/**
|
|
4658
|
-
* @remarks
|
|
4659
|
-
* Expand a {@link BlockBoundingBox} by a given amount along
|
|
4660
|
-
* each axis.
|
|
4661
|
-
* Sizes can be negative to perform contraction.
|
|
4662
|
-
* Note: corners can be inverted if the contraction size is
|
|
4663
|
-
* greater than the span, but the min/max relationship will
|
|
4664
|
-
* remain correct
|
|
4665
|
-
*
|
|
4666
|
-
* This function can't be called in restricted-execution mode.
|
|
4667
|
-
*
|
|
4668
|
-
* @returns
|
|
4669
|
-
* Return a new {@link BlockBoundingBox} object representing
|
|
4670
|
-
* the changes
|
|
4671
|
-
*/
|
|
4672
|
-
static dilate(box: BlockBoundingBox, size: Vector3): BlockBoundingBox;
|
|
4673
|
-
/**
|
|
4674
|
-
* @remarks
|
|
4675
|
-
* Check if two {@link BlockBoundingBox} objects are identical
|
|
4676
|
-
*
|
|
4677
|
-
* This function can't be called in restricted-execution mode.
|
|
4678
|
-
*
|
|
4679
|
-
*/
|
|
4680
|
-
static equals(box: BlockBoundingBox, other: BlockBoundingBox): boolean;
|
|
4681
|
-
/**
|
|
4682
|
-
* @remarks
|
|
4683
|
-
* Expand the initial box object bounds to include the 2nd box
|
|
4684
|
-
* argument. The resultant {@link BlockBoundingBox} object
|
|
4685
|
-
* will be a BlockBoundingBox which exactly encompasses the two
|
|
4686
|
-
* boxes.
|
|
4687
|
-
*
|
|
4688
|
-
* This function can't be called in restricted-execution mode.
|
|
4689
|
-
*
|
|
4690
|
-
* @returns
|
|
4691
|
-
* A new {@link BlockBoundingBox} instance representing the
|
|
4692
|
-
* smallest possible bounding box which can encompass both
|
|
4693
|
-
*/
|
|
4694
|
-
static expand(box: BlockBoundingBox, other: BlockBoundingBox): BlockBoundingBox;
|
|
4695
|
-
/**
|
|
4696
|
-
* @remarks
|
|
4697
|
-
* Calculate the center block of a given {@link
|
|
4698
|
-
* BlockBoundingBox} object.
|
|
4699
|
-
*
|
|
4700
|
-
* This function can't be called in restricted-execution mode.
|
|
4701
|
-
*
|
|
4702
|
-
* @returns
|
|
4703
|
-
* Note that {@link BlockBoundingBox} objects represent whole
|
|
4704
|
-
* blocks, so the center of boxes which have odd numbered
|
|
4705
|
-
* bounds are not mathematically centered...
|
|
4706
|
-
* i.e. a BlockBoundingBox( 0,0,0 -> 3,3,3 ) would have a
|
|
4707
|
-
* center of (1,1,1) (not (1.5, 1.5, 1.5) as expected)
|
|
4708
|
-
*/
|
|
4709
|
-
static getCenter(box: BlockBoundingBox): Vector3;
|
|
4710
|
-
/**
|
|
4711
|
-
* @remarks
|
|
4712
|
-
* Calculate the BlockBoundingBox which represents the union
|
|
4713
|
-
* area of two intersecting BlockBoundingBoxes
|
|
4714
|
-
*
|
|
4715
|
-
* This function can't be called in restricted-execution mode.
|
|
4716
|
-
*
|
|
4717
|
-
*/
|
|
4718
|
-
static getIntersection(box: BlockBoundingBox, other: BlockBoundingBox): BlockBoundingBox | undefined;
|
|
4719
|
-
/**
|
|
4720
|
-
* @remarks
|
|
4721
|
-
* Get the Span of each of the BlockBoundingBox Axis components
|
|
4722
|
-
*
|
|
4723
|
-
* This function can't be called in restricted-execution mode.
|
|
4724
|
-
*
|
|
4725
|
-
*/
|
|
4726
|
-
static getSpan(box: BlockBoundingBox): Vector3;
|
|
4727
|
-
/**
|
|
4728
|
-
* @remarks
|
|
4729
|
-
* Check to see if two BlockBoundingBox objects intersect
|
|
4730
|
-
*
|
|
4731
|
-
* This function can't be called in restricted-execution mode.
|
|
4732
|
-
*
|
|
4733
|
-
*/
|
|
4734
|
-
static intersects(box: BlockBoundingBox, other: BlockBoundingBox): boolean;
|
|
4735
|
-
/**
|
|
4736
|
-
* @remarks
|
|
4737
|
-
* Check to see if a given coordinate is inside a
|
|
4738
|
-
* BlockBoundingBox
|
|
4739
|
-
*
|
|
4740
|
-
* This function can't be called in restricted-execution mode.
|
|
4741
|
-
*
|
|
4742
|
-
*/
|
|
4743
|
-
static isInside(box: BlockBoundingBox, pos: Vector3): boolean;
|
|
4744
|
-
/**
|
|
4745
|
-
* @remarks
|
|
4746
|
-
* Check to see if a BlockBoundingBox is valid (i.e. (min <=
|
|
4747
|
-
* max))
|
|
4748
|
-
*
|
|
4749
|
-
* This function can't be called in restricted-execution mode.
|
|
4750
|
-
*
|
|
4751
|
-
*/
|
|
4752
|
-
static isValid(box: BlockBoundingBox): boolean;
|
|
4753
|
-
/**
|
|
4754
|
-
* @remarks
|
|
4755
|
-
* Move a BlockBoundingBox by a given amount
|
|
4756
|
-
*
|
|
4757
|
-
* This function can't be called in restricted-execution mode.
|
|
4758
|
-
*
|
|
4759
|
-
* @returns
|
|
4760
|
-
* Return a new BlockBoundingBox object which represents the
|
|
4761
|
-
* change
|
|
4762
|
-
*/
|
|
4763
|
-
static translate(box: BlockBoundingBox, delta: Vector3): BlockBoundingBox;
|
|
4764
|
-
}
|
|
4765
|
-
|
|
4766
4417
|
/**
|
|
4767
4418
|
* Base type for components associated with blocks.
|
|
4768
4419
|
*/
|
|
@@ -4986,13 +4637,6 @@ export class BlockComponentRandomTickEvent extends BlockEvent {
|
|
|
4986
4637
|
// @ts-ignore Class inheritance allowed for native defined classes
|
|
4987
4638
|
export class BlockComponentRedstoneUpdateEvent extends BlockEvent {
|
|
4988
4639
|
private constructor();
|
|
4989
|
-
/**
|
|
4990
|
-
* @beta
|
|
4991
|
-
* @remarks
|
|
4992
|
-
* The first update event for the redstone component.
|
|
4993
|
-
*
|
|
4994
|
-
*/
|
|
4995
|
-
readonly firstUpdate: boolean;
|
|
4996
4640
|
/**
|
|
4997
4641
|
* @remarks
|
|
4998
4642
|
* The redstone signal strength passing through this block. It
|
|
@@ -5189,123 +4833,21 @@ export class BlockCustomComponentInstance extends BlockComponent {
|
|
|
5189
4833
|
}
|
|
5190
4834
|
|
|
5191
4835
|
/**
|
|
5192
|
-
*
|
|
5193
|
-
*
|
|
5194
|
-
* Only available with block entities. Up to 1KBytes of data
|
|
5195
|
-
* can be stored per block entity in their dynamic properties
|
|
5196
|
-
* storage.
|
|
5197
|
-
* @example rememberPlayerInteraction.ts
|
|
5198
|
-
* ```typescript
|
|
5199
|
-
* import { system } from '@minecraft/server-wrapper';
|
|
5200
|
-
*
|
|
5201
|
-
* system.beforeEvents.startup.subscribe(initEvent => {
|
|
5202
|
-
* initEvent.blockComponentRegistry.registerCustomComponent('scripting_demo_pack:block_entity_onPlayerInteract', {
|
|
5203
|
-
* onPlayerInteract: e => {
|
|
5204
|
-
* if (e.player === undefined) {
|
|
5205
|
-
* return;
|
|
5206
|
-
* }
|
|
5207
|
-
*
|
|
5208
|
-
* const dynamicProperties = e.block.getComponent('minecraft:dynamic_properties');
|
|
5209
|
-
* if (!dynamicProperties) {
|
|
5210
|
-
* return;
|
|
5211
|
-
* }
|
|
5212
|
-
*
|
|
5213
|
-
* const lastInteractorValue = dynamicProperties.get('last_interactor');
|
|
5214
|
-
* const lastVisitor = typeof lastInteractorValue === 'string' ? lastInteractorValue : 'unknown';
|
|
5215
|
-
* const lastTick = Number(dynamicProperties.get('last_interact_tick') ?? system.currentTick);
|
|
5216
|
-
* const ticksAgo = Math.max(0, system.currentTick - lastTick);
|
|
5217
|
-
*
|
|
5218
|
-
* if (lastVisitor === e.player.name) {
|
|
5219
|
-
* e.player.sendMessage("do you remember that player? I 'member, it was here " + String(ticksAgo) + ' ticks ago!');
|
|
5220
|
-
* } else {
|
|
5221
|
-
* e.player.sendMessage("oh, I don't remember that player");
|
|
5222
|
-
* }
|
|
5223
|
-
*
|
|
5224
|
-
* dynamicProperties.set('last_interactor', e.player.name);
|
|
5225
|
-
* dynamicProperties.set('last_interact_tick', system.currentTick);
|
|
5226
|
-
* },
|
|
5227
|
-
* });
|
|
5228
|
-
* });
|
|
5229
|
-
* ```
|
|
4836
|
+
* Contains information regarding an event that impacts a
|
|
4837
|
+
* specific block.
|
|
5230
4838
|
*/
|
|
5231
|
-
|
|
5232
|
-
export class BlockDynamicPropertiesComponent extends BlockComponent {
|
|
4839
|
+
export class BlockEvent {
|
|
5233
4840
|
private constructor();
|
|
5234
|
-
static readonly componentId = 'minecraft:dynamic_properties';
|
|
5235
4841
|
/**
|
|
5236
4842
|
* @remarks
|
|
5237
|
-
*
|
|
5238
|
-
* key. Keys are unique to each content pack and cannot be used
|
|
5239
|
-
* to retrieve dynamic properties set from other content packs.
|
|
5240
|
-
* Returns undefined if the key was not found.
|
|
5241
|
-
*
|
|
5242
|
-
* @throws This function can throw errors.
|
|
5243
|
-
*
|
|
5244
|
-
* {@link Error}
|
|
5245
|
-
*
|
|
5246
|
-
* {@link InvalidBlockComponentError}
|
|
5247
|
-
*
|
|
5248
|
-
* {@link LocationInUnloadedChunkError}
|
|
4843
|
+
* Block currently in the world at the location of this event.
|
|
5249
4844
|
*
|
|
5250
|
-
* {@link LocationOutOfWorldBoundariesError}
|
|
5251
4845
|
*/
|
|
5252
|
-
|
|
4846
|
+
readonly block: Block;
|
|
5253
4847
|
/**
|
|
5254
4848
|
* @remarks
|
|
5255
|
-
*
|
|
5256
|
-
*
|
|
5257
|
-
* set dynamic properties for other content packs. Values can
|
|
5258
|
-
* be either a Number, a String or a Vector3. Setting a
|
|
5259
|
-
* property with an undefined value will remove it from the
|
|
5260
|
-
* storage.
|
|
5261
|
-
*
|
|
5262
|
-
* This function can't be called in restricted-execution mode.
|
|
5263
|
-
*
|
|
5264
|
-
* @throws This function can throw errors.
|
|
5265
|
-
*
|
|
5266
|
-
* {@link Error}
|
|
5267
|
-
*
|
|
5268
|
-
* {@link InvalidBlockComponentError}
|
|
5269
|
-
*
|
|
5270
|
-
* {@link LocationInUnloadedChunkError}
|
|
5271
|
-
*
|
|
5272
|
-
* {@link LocationOutOfWorldBoundariesError}
|
|
5273
|
-
*/
|
|
5274
|
-
set(key: string, value?: boolean | number | string | Vector3): void;
|
|
5275
|
-
/**
|
|
5276
|
-
* @remarks
|
|
5277
|
-
* Returns the current size, in bytes, of the dynamic
|
|
5278
|
-
* properties storage for this block entity.
|
|
5279
|
-
*
|
|
5280
|
-
* @throws This function can throw errors.
|
|
5281
|
-
*
|
|
5282
|
-
* {@link Error}
|
|
5283
|
-
*
|
|
5284
|
-
* {@link InvalidBlockComponentError}
|
|
5285
|
-
*
|
|
5286
|
-
* {@link LocationInUnloadedChunkError}
|
|
5287
|
-
*
|
|
5288
|
-
* {@link LocationOutOfWorldBoundariesError}
|
|
5289
|
-
*/
|
|
5290
|
-
totalByteCount(): number;
|
|
5291
|
-
}
|
|
5292
|
-
|
|
5293
|
-
/**
|
|
5294
|
-
* Contains information regarding an event that impacts a
|
|
5295
|
-
* specific block.
|
|
5296
|
-
*/
|
|
5297
|
-
export class BlockEvent {
|
|
5298
|
-
private constructor();
|
|
5299
|
-
/**
|
|
5300
|
-
* @remarks
|
|
5301
|
-
* Block currently in the world at the location of this event.
|
|
5302
|
-
*
|
|
5303
|
-
*/
|
|
5304
|
-
readonly block: Block;
|
|
5305
|
-
/**
|
|
5306
|
-
* @remarks
|
|
5307
|
-
* Dimension that contains the block that is the subject of
|
|
5308
|
-
* this event.
|
|
4849
|
+
* Dimension that contains the block that is the subject of
|
|
4850
|
+
* this event.
|
|
5309
4851
|
*
|
|
5310
4852
|
*/
|
|
5311
4853
|
readonly dimension: Dimension;
|
|
@@ -5499,18 +5041,6 @@ export class BlockLocationIterator implements Iterable<Vector3> {
|
|
|
5499
5041
|
*
|
|
5500
5042
|
*/
|
|
5501
5043
|
[Symbol.iterator](): Iterator<Vector3>;
|
|
5502
|
-
/**
|
|
5503
|
-
* @beta
|
|
5504
|
-
* @remarks
|
|
5505
|
-
* Checks if the underlining block volume has been invalidated.
|
|
5506
|
-
* Will return false if the block volume was modified between
|
|
5507
|
-
* creating the iterator and iterating it, and true otherwise.
|
|
5508
|
-
*
|
|
5509
|
-
* @throws This function can throw errors.
|
|
5510
|
-
*
|
|
5511
|
-
* {@link minecraftcommon.EngineError}
|
|
5512
|
-
*/
|
|
5513
|
-
isValid(): boolean;
|
|
5514
5044
|
/**
|
|
5515
5045
|
* @remarks
|
|
5516
5046
|
* This function can't be called in restricted-execution mode.
|
|
@@ -6427,15 +5957,6 @@ export class BlockVolumeBase {
|
|
|
6427
5957
|
*
|
|
6428
5958
|
*/
|
|
6429
5959
|
getBlockLocationIterator(): BlockLocationIterator;
|
|
6430
|
-
/**
|
|
6431
|
-
* @beta
|
|
6432
|
-
* @remarks
|
|
6433
|
-
* Return a {@link BlockBoundingBox} object which represents
|
|
6434
|
-
* the validated min and max coordinates of the volume
|
|
6435
|
-
*
|
|
6436
|
-
* @throws This function can throw errors.
|
|
6437
|
-
*/
|
|
6438
|
-
getBoundingBox(): BlockBoundingBox;
|
|
6439
5960
|
/**
|
|
6440
5961
|
* @remarks
|
|
6441
5962
|
* Return the capacity (volume) of the BlockVolume (W*D*H)
|
|
@@ -6666,23 +6187,6 @@ export class Camera {
|
|
|
6666
6187
|
| CameraSetRotOptions
|
|
6667
6188
|
| CameraTargetOptions,
|
|
6668
6189
|
): void;
|
|
6669
|
-
/**
|
|
6670
|
-
* @beta
|
|
6671
|
-
* @remarks
|
|
6672
|
-
* Sets the current active camera with easing.
|
|
6673
|
-
*
|
|
6674
|
-
* This function can't be called in restricted-execution mode.
|
|
6675
|
-
*
|
|
6676
|
-
* @param cameraPreset
|
|
6677
|
-
* Identifier of a camera preset file defined within JSON.
|
|
6678
|
-
* @param easeOptions
|
|
6679
|
-
* Options to ease the camera from the previous camera to the
|
|
6680
|
-
* current one.
|
|
6681
|
-
* @throws
|
|
6682
|
-
* Throws when easing to minecraft:first_person presets
|
|
6683
|
-
* currently without the experimental cameras toggle enabled.
|
|
6684
|
-
*/
|
|
6685
|
-
setCameraWithEase(cameraPreset: string, easeOptions: EaseOptions): void;
|
|
6686
6190
|
/**
|
|
6687
6191
|
* @remarks
|
|
6688
6192
|
* Sets the current active camera for the specified player and
|
|
@@ -6722,164 +6226,6 @@ export class CatmullRomSpline {
|
|
|
6722
6226
|
controlPoints: Vector3[];
|
|
6723
6227
|
}
|
|
6724
6228
|
|
|
6725
|
-
/**
|
|
6726
|
-
* @beta
|
|
6727
|
-
* An event that fires as players enter chat messages.
|
|
6728
|
-
*/
|
|
6729
|
-
export class ChatSendAfterEvent {
|
|
6730
|
-
private constructor();
|
|
6731
|
-
/**
|
|
6732
|
-
* @remarks
|
|
6733
|
-
* Message that is being broadcast.
|
|
6734
|
-
*
|
|
6735
|
-
*/
|
|
6736
|
-
readonly message: string;
|
|
6737
|
-
/**
|
|
6738
|
-
* @remarks
|
|
6739
|
-
* Player that sent the chat message.
|
|
6740
|
-
*
|
|
6741
|
-
*/
|
|
6742
|
-
readonly sender: Player;
|
|
6743
|
-
/**
|
|
6744
|
-
* @remarks
|
|
6745
|
-
* Optional list of players that will receive this message. If
|
|
6746
|
-
* defined, this message is directly targeted to one or more
|
|
6747
|
-
* players (i.e., is not broadcast.)
|
|
6748
|
-
*
|
|
6749
|
-
*/
|
|
6750
|
-
readonly targets?: Player[];
|
|
6751
|
-
}
|
|
6752
|
-
|
|
6753
|
-
/**
|
|
6754
|
-
* @beta
|
|
6755
|
-
* Manages callbacks that are connected to chat messages being
|
|
6756
|
-
* sent.
|
|
6757
|
-
*/
|
|
6758
|
-
export class ChatSendAfterEventSignal {
|
|
6759
|
-
private constructor();
|
|
6760
|
-
/**
|
|
6761
|
-
* @remarks
|
|
6762
|
-
* Adds a callback that will be called when new chat messages
|
|
6763
|
-
* are sent.
|
|
6764
|
-
*
|
|
6765
|
-
* This function can't be called in restricted-execution mode.
|
|
6766
|
-
*
|
|
6767
|
-
* This function can be called in early-execution mode.
|
|
6768
|
-
*
|
|
6769
|
-
*/
|
|
6770
|
-
subscribe(callback: (arg0: ChatSendAfterEvent) => void): (arg0: ChatSendAfterEvent) => void;
|
|
6771
|
-
/**
|
|
6772
|
-
* @remarks
|
|
6773
|
-
* Removes a callback from being called when new chat messages
|
|
6774
|
-
* are sent.
|
|
6775
|
-
*
|
|
6776
|
-
* This function can't be called in restricted-execution mode.
|
|
6777
|
-
*
|
|
6778
|
-
* This function can be called in early-execution mode.
|
|
6779
|
-
*
|
|
6780
|
-
*/
|
|
6781
|
-
unsubscribe(callback: (arg0: ChatSendAfterEvent) => void): void;
|
|
6782
|
-
}
|
|
6783
|
-
|
|
6784
|
-
/**
|
|
6785
|
-
* @beta
|
|
6786
|
-
* An event that fires as players enter chat messages.
|
|
6787
|
-
*/
|
|
6788
|
-
export class ChatSendBeforeEvent {
|
|
6789
|
-
private constructor();
|
|
6790
|
-
/**
|
|
6791
|
-
* @remarks
|
|
6792
|
-
* If set to true in a beforeChat event handler, this message
|
|
6793
|
-
* is not broadcast out.
|
|
6794
|
-
*
|
|
6795
|
-
*/
|
|
6796
|
-
cancel: boolean;
|
|
6797
|
-
/**
|
|
6798
|
-
* @remarks
|
|
6799
|
-
* Message that is being broadcast.
|
|
6800
|
-
*
|
|
6801
|
-
*/
|
|
6802
|
-
readonly message: string;
|
|
6803
|
-
/**
|
|
6804
|
-
* @remarks
|
|
6805
|
-
* Player that sent the chat message.
|
|
6806
|
-
*
|
|
6807
|
-
*/
|
|
6808
|
-
readonly sender: Player;
|
|
6809
|
-
/**
|
|
6810
|
-
* @remarks
|
|
6811
|
-
* Optional list of players that will receive this message. If
|
|
6812
|
-
* defined, this message is directly targeted to one or more
|
|
6813
|
-
* players (i.e., is not broadcast.)
|
|
6814
|
-
*
|
|
6815
|
-
*/
|
|
6816
|
-
readonly targets?: Player[];
|
|
6817
|
-
}
|
|
6818
|
-
|
|
6819
|
-
/**
|
|
6820
|
-
* @beta
|
|
6821
|
-
* Manages callbacks that are connected to an event that fires
|
|
6822
|
-
* before chat messages are sent.
|
|
6823
|
-
* @example customCommand.ts
|
|
6824
|
-
* ```typescript
|
|
6825
|
-
* import { world, DimensionLocation } from '@minecraft/server';
|
|
6826
|
-
*
|
|
6827
|
-
* function customCommand(targetLocation: DimensionLocation) {
|
|
6828
|
-
* const chatCallback = world.beforeEvents.chatSend.subscribe(eventData => {
|
|
6829
|
-
* if (eventData.message.includes('cancel')) {
|
|
6830
|
-
* // Cancel event if the message contains "cancel"
|
|
6831
|
-
* eventData.cancel = true;
|
|
6832
|
-
* } else {
|
|
6833
|
-
* const args = eventData.message.split(' ');
|
|
6834
|
-
*
|
|
6835
|
-
* if (args.length > 0) {
|
|
6836
|
-
* switch (args[0].toLowerCase()) {
|
|
6837
|
-
* case 'echo':
|
|
6838
|
-
* // Send a modified version of chat message
|
|
6839
|
-
* world.sendMessage(`Echo '${eventData.message.substring(4).trim()}'`);
|
|
6840
|
-
* break;
|
|
6841
|
-
* case 'help':
|
|
6842
|
-
* world.sendMessage(`Available commands: echo <message>`);
|
|
6843
|
-
* break;
|
|
6844
|
-
* }
|
|
6845
|
-
* }
|
|
6846
|
-
* }
|
|
6847
|
-
* });
|
|
6848
|
-
* }
|
|
6849
|
-
* ```
|
|
6850
|
-
*/
|
|
6851
|
-
export class ChatSendBeforeEventSignal {
|
|
6852
|
-
private constructor();
|
|
6853
|
-
/**
|
|
6854
|
-
* @remarks
|
|
6855
|
-
* Adds a callback that will be called before new chat messages
|
|
6856
|
-
* are sent.
|
|
6857
|
-
*
|
|
6858
|
-
* This function can't be called in restricted-execution mode.
|
|
6859
|
-
*
|
|
6860
|
-
* This function can be called in early-execution mode.
|
|
6861
|
-
*
|
|
6862
|
-
* @param callback
|
|
6863
|
-
* This closure is called with restricted-execution privilege.
|
|
6864
|
-
* @returns
|
|
6865
|
-
* Closure that is called with restricted-execution privilege.
|
|
6866
|
-
*/
|
|
6867
|
-
subscribe(callback: (arg0: ChatSendBeforeEvent) => void): (arg0: ChatSendBeforeEvent) => void;
|
|
6868
|
-
/**
|
|
6869
|
-
* @remarks
|
|
6870
|
-
* Removes a callback from being called before new chat
|
|
6871
|
-
* messages are sent.
|
|
6872
|
-
*
|
|
6873
|
-
* This function can't be called in restricted-execution mode.
|
|
6874
|
-
*
|
|
6875
|
-
* This function can be called in early-execution mode.
|
|
6876
|
-
*
|
|
6877
|
-
* @param callback
|
|
6878
|
-
* This closure is called with restricted-execution privilege.
|
|
6879
|
-
*/
|
|
6880
|
-
unsubscribe(callback: (arg0: ChatSendBeforeEvent) => void): void;
|
|
6881
|
-
}
|
|
6882
|
-
|
|
6883
6229
|
/**
|
|
6884
6230
|
* Contains the device information for a client instance.
|
|
6885
6231
|
*/
|
|
@@ -6953,363 +6299,111 @@ export class Component {
|
|
|
6953
6299
|
}
|
|
6954
6300
|
|
|
6955
6301
|
/**
|
|
6956
|
-
*
|
|
6957
|
-
*
|
|
6958
|
-
*
|
|
6959
|
-
*
|
|
6960
|
-
*
|
|
6961
|
-
*
|
|
6962
|
-
*
|
|
6963
|
-
*
|
|
6964
|
-
*
|
|
6965
|
-
*
|
|
6966
|
-
*
|
|
6967
|
-
*
|
|
6968
|
-
*
|
|
6969
|
-
*
|
|
6970
|
-
*
|
|
6971
|
-
*
|
|
6972
|
-
*
|
|
6973
|
-
*
|
|
6974
|
-
*
|
|
6975
|
-
*
|
|
6976
|
-
*
|
|
6977
|
-
*
|
|
6978
|
-
*
|
|
6302
|
+
* Represents a container that can hold sets of items. Used
|
|
6303
|
+
* with entities such as Players, Chest Minecarts, Llamas, and
|
|
6304
|
+
* more.
|
|
6305
|
+
* @example containers.ts
|
|
6306
|
+
* ```typescript
|
|
6307
|
+
* import { ItemStack, EntityInventoryComponent, BlockInventoryComponent, DimensionLocation } from '@minecraft/server';
|
|
6308
|
+
* import { MinecraftBlockTypes, MinecraftItemTypes, MinecraftEntityTypes } from '@minecraft/vanilla-data';
|
|
6309
|
+
*
|
|
6310
|
+
* function containers(log: (message: string, status?: number) => void, targetLocation: DimensionLocation) {
|
|
6311
|
+
* const xLocation = targetLocation; // left chest location
|
|
6312
|
+
* const xPlusTwoLocation = { x: targetLocation.x + 2, y: targetLocation.y, z: targetLocation.z }; // right chest
|
|
6313
|
+
*
|
|
6314
|
+
* const chestCart = targetLocation.dimension.spawnEntity(MinecraftEntityTypes.ChestMinecart, {
|
|
6315
|
+
* x: targetLocation.x + 4,
|
|
6316
|
+
* y: targetLocation.y,
|
|
6317
|
+
* z: targetLocation.z,
|
|
6318
|
+
* });
|
|
6319
|
+
*
|
|
6320
|
+
* const xChestBlock = targetLocation.dimension.getBlock(xLocation);
|
|
6321
|
+
* const xPlusTwoChestBlock = targetLocation.dimension.getBlock(xPlusTwoLocation);
|
|
6322
|
+
*
|
|
6323
|
+
* if (!xChestBlock || !xPlusTwoChestBlock) {
|
|
6324
|
+
* log('Could not retrieve chest blocks.');
|
|
6325
|
+
* return;
|
|
6326
|
+
* }
|
|
6327
|
+
*
|
|
6328
|
+
* xChestBlock.setType(MinecraftBlockTypes.Chest);
|
|
6329
|
+
* xPlusTwoChestBlock.setType(MinecraftBlockTypes.Chest);
|
|
6330
|
+
*
|
|
6331
|
+
* const xPlusTwoChestInventoryComp = xPlusTwoChestBlock.getComponent('inventory') as BlockInventoryComponent;
|
|
6332
|
+
* const xChestInventoryComponent = xChestBlock.getComponent('inventory') as BlockInventoryComponent;
|
|
6333
|
+
* const chestCartInventoryComp = chestCart.getComponent('inventory') as EntityInventoryComponent;
|
|
6334
|
+
*
|
|
6335
|
+
* const xPlusTwoChestContainer = xPlusTwoChestInventoryComp.container;
|
|
6336
|
+
* const xChestContainer = xChestInventoryComponent.container;
|
|
6337
|
+
* const chestCartContainer = chestCartInventoryComp.container;
|
|
6338
|
+
*
|
|
6339
|
+
* if (!xPlusTwoChestContainer || !xChestContainer || !chestCartContainer) {
|
|
6340
|
+
* log('Could not retrieve chest containers.');
|
|
6341
|
+
* return;
|
|
6342
|
+
* }
|
|
6343
|
+
*
|
|
6344
|
+
* xPlusTwoChestContainer.setItem(0, new ItemStack(MinecraftItemTypes.Apple, 10));
|
|
6345
|
+
* if (xPlusTwoChestContainer.getItem(0)?.typeId !== MinecraftItemTypes.Apple) {
|
|
6346
|
+
* log('Expected apple in x+2 container slot index 0', -1);
|
|
6347
|
+
* }
|
|
6348
|
+
*
|
|
6349
|
+
* xPlusTwoChestContainer.setItem(1, new ItemStack(MinecraftItemTypes.Emerald, 10));
|
|
6350
|
+
* if (xPlusTwoChestContainer.getItem(1)?.typeId !== MinecraftItemTypes.Emerald) {
|
|
6351
|
+
* log('Expected emerald in x+2 container slot index 1', -1);
|
|
6352
|
+
* }
|
|
6353
|
+
*
|
|
6354
|
+
* if (xPlusTwoChestContainer.size !== 27) {
|
|
6355
|
+
* log('Unexpected size: ' + xPlusTwoChestContainer.size, -1);
|
|
6356
|
+
* }
|
|
6357
|
+
*
|
|
6358
|
+
* if (xPlusTwoChestContainer.emptySlotsCount !== 25) {
|
|
6359
|
+
* log('Unexpected emptySlotsCount: ' + xPlusTwoChestContainer.emptySlotsCount, -1);
|
|
6360
|
+
* }
|
|
6361
|
+
*
|
|
6362
|
+
* xChestContainer.setItem(0, new ItemStack(MinecraftItemTypes.Cake, 10));
|
|
6363
|
+
*
|
|
6364
|
+
* xPlusTwoChestContainer.transferItem(0, chestCartContainer); // transfer the apple from the xPlusTwo chest to a chest cart
|
|
6365
|
+
* xPlusTwoChestContainer.swapItems(1, 0, xChestContainer); // swap the cake from x and the emerald from xPlusTwo
|
|
6366
|
+
*
|
|
6367
|
+
* if (chestCartContainer.getItem(0)?.typeId !== MinecraftItemTypes.Apple) {
|
|
6368
|
+
* log('Expected apple in minecraft chest container slot index 0', -1);
|
|
6369
|
+
* }
|
|
6370
|
+
*
|
|
6371
|
+
* if (xChestContainer.getItem(0)?.typeId === MinecraftItemTypes.Emerald) {
|
|
6372
|
+
* log('Expected emerald in x container slot index 0', -1);
|
|
6373
|
+
* }
|
|
6374
|
+
*
|
|
6375
|
+
* if (xPlusTwoChestContainer.getItem(1)?.typeId === MinecraftItemTypes.Cake) {
|
|
6376
|
+
* log('Expected cake in x+2 container slot index 1', -1);
|
|
6377
|
+
* }
|
|
6378
|
+
* }
|
|
6379
|
+
* ```
|
|
6979
6380
|
*/
|
|
6980
|
-
export class
|
|
6381
|
+
export class Container {
|
|
6382
|
+
private constructor();
|
|
6981
6383
|
/**
|
|
6982
6384
|
* @remarks
|
|
6983
|
-
*
|
|
6984
|
-
*
|
|
6385
|
+
* If these rules are defined other container operations will
|
|
6386
|
+
* throw if they cause these rules to be invalidated. For
|
|
6387
|
+
* example, adding a shulker box to a vanilla bundle.
|
|
6985
6388
|
*
|
|
6986
6389
|
*/
|
|
6987
|
-
readonly
|
|
6988
|
-
readonly items: CompoundBlockVolumeItem[];
|
|
6989
|
-
readonly itemsAbsolute: CompoundBlockVolumeItem[];
|
|
6390
|
+
readonly containerRules?: ContainerRules;
|
|
6990
6391
|
/**
|
|
6991
6392
|
* @remarks
|
|
6992
|
-
*
|
|
6993
|
-
* volume stack
|
|
6393
|
+
* Count of the slots in the container that are empty.
|
|
6994
6394
|
*
|
|
6395
|
+
* @throws
|
|
6396
|
+
* Throws if the container is invalid.
|
|
6995
6397
|
*/
|
|
6996
|
-
readonly
|
|
6398
|
+
readonly emptySlotsCount: number;
|
|
6997
6399
|
/**
|
|
6998
6400
|
* @remarks
|
|
6999
|
-
*
|
|
6401
|
+
* Returns whether a container object (or the entity or block
|
|
6402
|
+
* that this container is associated with) is still available
|
|
6403
|
+
* for use in this context.
|
|
7000
6404
|
*
|
|
7001
|
-
* @param origin
|
|
7002
|
-
* An optional world space origin on which to center the
|
|
7003
|
-
* compound volume.
|
|
7004
|
-
* If not specified, the origin is set to (0,0,0)
|
|
7005
6405
|
*/
|
|
7006
|
-
|
|
7007
|
-
/**
|
|
7008
|
-
* @remarks
|
|
7009
|
-
* Clear the contents of the volume stack
|
|
7010
|
-
*
|
|
7011
|
-
* This function can't be called in restricted-execution mode.
|
|
7012
|
-
*
|
|
7013
|
-
*/
|
|
7014
|
-
clear(): void;
|
|
7015
|
-
/**
|
|
7016
|
-
* @remarks
|
|
7017
|
-
* Fetch a Block Location Iterator for the Compound Block
|
|
7018
|
-
* Volume. This iterator will allow a creator to iterate
|
|
7019
|
-
* across all of the selected volumes within the larger
|
|
7020
|
-
* bounding area.
|
|
7021
|
-
* Areas of a volume which have been overridden by a
|
|
7022
|
-
* subtractive volume will not be included in the iterator
|
|
7023
|
-
* step.
|
|
7024
|
-
* (i.e. if you push a cube to the stack, and then push a
|
|
7025
|
-
* subtractive volume to the same location, then the iterator
|
|
7026
|
-
* will step over the initial volume because it is considered
|
|
7027
|
-
* negative space)
|
|
7028
|
-
* Note that the Block Locations returned by this iterator are
|
|
7029
|
-
* in absolute world space (irrespective of whether the
|
|
7030
|
-
* compound volume items pushed are absolute or relative)
|
|
7031
|
-
*
|
|
7032
|
-
* This function can't be called in restricted-execution mode.
|
|
7033
|
-
*
|
|
7034
|
-
*/
|
|
7035
|
-
getBlockLocationIterator(): BlockLocationIterator;
|
|
7036
|
-
/**
|
|
7037
|
-
* @remarks
|
|
7038
|
-
* Get the largest bounding box that represents a container for
|
|
7039
|
-
* all of the volumes on the stack
|
|
7040
|
-
* Note that the bounding box returned is represented in
|
|
7041
|
-
* absolute world space (irrespective of whether the compound
|
|
7042
|
-
* volume items pushed are absolute or relative)
|
|
7043
|
-
*
|
|
7044
|
-
* This function can't be called in restricted-execution mode.
|
|
7045
|
-
*
|
|
7046
|
-
*/
|
|
7047
|
-
getBoundingBox(): BlockBoundingBox;
|
|
7048
|
-
/**
|
|
7049
|
-
* @remarks
|
|
7050
|
-
* Get the max block location of the outermost bounding
|
|
7051
|
-
* rectangle which represents the volumes on the stack.
|
|
7052
|
-
* Note that the max location returned is in absolute world
|
|
7053
|
-
* space (irrespective of whether the compound volume items
|
|
7054
|
-
* pushed are absolute or relative)
|
|
7055
|
-
*
|
|
7056
|
-
* This function can't be called in restricted-execution mode.
|
|
7057
|
-
*
|
|
7058
|
-
*/
|
|
7059
|
-
getMax(): Vector3;
|
|
7060
|
-
/**
|
|
7061
|
-
* @remarks
|
|
7062
|
-
* Get the min block location of the outermost bounding
|
|
7063
|
-
* rectangle which represents the volumes on the stack.
|
|
7064
|
-
* Note that the min location returned is in absolute world
|
|
7065
|
-
* space (irrespective of whether the compound volume items
|
|
7066
|
-
* pushed are absolute or relative)
|
|
7067
|
-
*
|
|
7068
|
-
* This function can't be called in restricted-execution mode.
|
|
7069
|
-
*
|
|
7070
|
-
*/
|
|
7071
|
-
getMin(): Vector3;
|
|
7072
|
-
/**
|
|
7073
|
-
* @remarks
|
|
7074
|
-
* Fetch the origin in world space of the compound volume
|
|
7075
|
-
*
|
|
7076
|
-
* This function can't be called in restricted-execution mode.
|
|
7077
|
-
*
|
|
7078
|
-
*/
|
|
7079
|
-
getOrigin(): Vector3;
|
|
7080
|
-
/**
|
|
7081
|
-
* @remarks
|
|
7082
|
-
* Return a boolean which signals if there are any volume items
|
|
7083
|
-
* pushed to the volume
|
|
7084
|
-
*
|
|
7085
|
-
* This function can't be called in restricted-execution mode.
|
|
7086
|
-
*
|
|
7087
|
-
*/
|
|
7088
|
-
isEmpty(): boolean;
|
|
7089
|
-
/**
|
|
7090
|
-
* @remarks
|
|
7091
|
-
* Return a boolean representing whether or not a given
|
|
7092
|
-
* absolute world space block location is inside a positive
|
|
7093
|
-
* block volume.
|
|
7094
|
-
* E.g. if the stack contains a large cube followed by a
|
|
7095
|
-
* slightly smaller negative cube, and the test location is
|
|
7096
|
-
* within the negative cube - the function will return false
|
|
7097
|
-
* because it's not 'inside' a volume (it IS inside the
|
|
7098
|
-
* bounding rectangle, but it is not inside a positively
|
|
7099
|
-
* defined location)
|
|
7100
|
-
*
|
|
7101
|
-
* This function can't be called in restricted-execution mode.
|
|
7102
|
-
*
|
|
7103
|
-
*/
|
|
7104
|
-
isInside(worldLocation: Vector3): boolean;
|
|
7105
|
-
/**
|
|
7106
|
-
* @remarks
|
|
7107
|
-
* Inspect the last entry pushed to the volume stack without
|
|
7108
|
-
* affecting the stack contents.
|
|
7109
|
-
*
|
|
7110
|
-
* This function can't be called in restricted-execution mode.
|
|
7111
|
-
*
|
|
7112
|
-
* @param forceRelativity
|
|
7113
|
-
* Determine whether the function returns a
|
|
7114
|
-
* CompoundBlockVolumeItem which is forced into either relative
|
|
7115
|
-
* or absolute coordinate system.
|
|
7116
|
-
* `true` = force returned item to be relative to volume origin
|
|
7117
|
-
* `false` = force returned item to be absolute world space
|
|
7118
|
-
* location
|
|
7119
|
-
*
|
|
7120
|
-
* If no flag is specified, the item returned retains whatever
|
|
7121
|
-
* relativity it had when it was pushed
|
|
7122
|
-
* @returns
|
|
7123
|
-
* Returns undefined if the stack is empty
|
|
7124
|
-
*/
|
|
7125
|
-
peekLastVolume(forceRelativity?: CompoundBlockVolumePositionRelativity): CompoundBlockVolumeItem | undefined;
|
|
7126
|
-
/**
|
|
7127
|
-
* @remarks
|
|
7128
|
-
* Remove the last entry from the volume stack. This will
|
|
7129
|
-
* reduce the stack size by one
|
|
7130
|
-
*
|
|
7131
|
-
* This function can't be called in restricted-execution mode.
|
|
7132
|
-
*
|
|
7133
|
-
*/
|
|
7134
|
-
popVolume(): boolean;
|
|
7135
|
-
/**
|
|
7136
|
-
* @remarks
|
|
7137
|
-
* Push a volume item to the stack. The volume item contains
|
|
7138
|
-
* an 'action' parameter which determines whether this volume
|
|
7139
|
-
* is a positive or negative space.
|
|
7140
|
-
* The item also contains a `locationRelativity` which
|
|
7141
|
-
* determines whether it is relative or absolute to the
|
|
7142
|
-
* compound volume origin
|
|
7143
|
-
*
|
|
7144
|
-
* This function can't be called in restricted-execution mode.
|
|
7145
|
-
*
|
|
7146
|
-
* @param item
|
|
7147
|
-
* Item to push to the end of the stack
|
|
7148
|
-
*/
|
|
7149
|
-
pushVolume(item: CompoundBlockVolumeItem): void;
|
|
7150
|
-
/**
|
|
7151
|
-
* @remarks
|
|
7152
|
-
* If the volume stack is empty, this function will push the
|
|
7153
|
-
* specified item to the stack.
|
|
7154
|
-
* If the volume stack is NOT empty, this function will replace
|
|
7155
|
-
* the last item on the stack with the new item.
|
|
7156
|
-
*
|
|
7157
|
-
* This function can't be called in restricted-execution mode.
|
|
7158
|
-
*
|
|
7159
|
-
* @param item
|
|
7160
|
-
* Item to add or replace
|
|
7161
|
-
*/
|
|
7162
|
-
replaceOrAddLastVolume(item: CompoundBlockVolumeItem): boolean;
|
|
7163
|
-
/**
|
|
7164
|
-
* @remarks
|
|
7165
|
-
* Set the origin of the compound volume to an absolute world
|
|
7166
|
-
* space location
|
|
7167
|
-
*
|
|
7168
|
-
* This function can't be called in restricted-execution mode.
|
|
7169
|
-
*
|
|
7170
|
-
* @param preserveExistingVolumes
|
|
7171
|
-
* This optional boolean flag determines whether the relative
|
|
7172
|
-
* `CompoundBlockVolumeItem`'s are frozen in place, or are
|
|
7173
|
-
* affected by the new origin.
|
|
7174
|
-
* Imagine a scenario where you have a series of relative
|
|
7175
|
-
* locations around an origin which make up a sphere; all of
|
|
7176
|
-
* these locations are in the range of -2 to 2.
|
|
7177
|
-
* Push each of these locations to the compound volume as
|
|
7178
|
-
* relative items.
|
|
7179
|
-
* Now, move the origin and all of the locations representing
|
|
7180
|
-
* the sphere move accordingly.
|
|
7181
|
-
* However, let's say you want to add a 2nd sphere next to the
|
|
7182
|
-
* 1st.
|
|
7183
|
-
* In this case, set the new origin a few locations over, but
|
|
7184
|
-
* 'preserveExistingVolumes' = true.
|
|
7185
|
-
* This will set a new origin, but the existing sphere
|
|
7186
|
-
* locations will remain relative to the original origin.
|
|
7187
|
-
* Now, you can push the relative sphere locations again (this
|
|
7188
|
-
* time they will be relative to the new origin) - resulting in
|
|
7189
|
-
* 2 spheres next to each other.
|
|
7190
|
-
*/
|
|
7191
|
-
setOrigin(position: Vector3, preserveExistingVolumes?: boolean): void;
|
|
7192
|
-
/**
|
|
7193
|
-
* @remarks
|
|
7194
|
-
* Similar to {@link CompoundBlockVolume.setOrigin} - this
|
|
7195
|
-
* function will translate the origin by a given delta to a new
|
|
7196
|
-
* position
|
|
7197
|
-
*
|
|
7198
|
-
* This function can't be called in restricted-execution mode.
|
|
7199
|
-
*
|
|
7200
|
-
* @param preserveExistingVolumes
|
|
7201
|
-
* See the description for the arguments to {@link
|
|
7202
|
-
* CompoundBlockVolume.setOrigin}
|
|
7203
|
-
*/
|
|
7204
|
-
translateOrigin(delta: Vector3, preserveExistingVolumes?: boolean): void;
|
|
7205
|
-
}
|
|
7206
|
-
|
|
7207
|
-
/**
|
|
7208
|
-
* Represents a container that can hold sets of items. Used
|
|
7209
|
-
* with entities such as Players, Chest Minecarts, Llamas, and
|
|
7210
|
-
* more.
|
|
7211
|
-
* @example containers.ts
|
|
7212
|
-
* ```typescript
|
|
7213
|
-
* import { ItemStack, EntityInventoryComponent, BlockInventoryComponent, DimensionLocation } from '@minecraft/server';
|
|
7214
|
-
* import { MinecraftBlockTypes, MinecraftItemTypes, MinecraftEntityTypes } from '@minecraft/vanilla-data';
|
|
7215
|
-
*
|
|
7216
|
-
* function containers(log: (message: string, status?: number) => void, targetLocation: DimensionLocation) {
|
|
7217
|
-
* const xLocation = targetLocation; // left chest location
|
|
7218
|
-
* const xPlusTwoLocation = { x: targetLocation.x + 2, y: targetLocation.y, z: targetLocation.z }; // right chest
|
|
7219
|
-
*
|
|
7220
|
-
* const chestCart = targetLocation.dimension.spawnEntity(MinecraftEntityTypes.ChestMinecart, {
|
|
7221
|
-
* x: targetLocation.x + 4,
|
|
7222
|
-
* y: targetLocation.y,
|
|
7223
|
-
* z: targetLocation.z,
|
|
7224
|
-
* });
|
|
7225
|
-
*
|
|
7226
|
-
* const xChestBlock = targetLocation.dimension.getBlock(xLocation);
|
|
7227
|
-
* const xPlusTwoChestBlock = targetLocation.dimension.getBlock(xPlusTwoLocation);
|
|
7228
|
-
*
|
|
7229
|
-
* if (!xChestBlock || !xPlusTwoChestBlock) {
|
|
7230
|
-
* log('Could not retrieve chest blocks.');
|
|
7231
|
-
* return;
|
|
7232
|
-
* }
|
|
7233
|
-
*
|
|
7234
|
-
* xChestBlock.setType(MinecraftBlockTypes.Chest);
|
|
7235
|
-
* xPlusTwoChestBlock.setType(MinecraftBlockTypes.Chest);
|
|
7236
|
-
*
|
|
7237
|
-
* const xPlusTwoChestInventoryComp = xPlusTwoChestBlock.getComponent('inventory') as BlockInventoryComponent;
|
|
7238
|
-
* const xChestInventoryComponent = xChestBlock.getComponent('inventory') as BlockInventoryComponent;
|
|
7239
|
-
* const chestCartInventoryComp = chestCart.getComponent('inventory') as EntityInventoryComponent;
|
|
7240
|
-
*
|
|
7241
|
-
* const xPlusTwoChestContainer = xPlusTwoChestInventoryComp.container;
|
|
7242
|
-
* const xChestContainer = xChestInventoryComponent.container;
|
|
7243
|
-
* const chestCartContainer = chestCartInventoryComp.container;
|
|
7244
|
-
*
|
|
7245
|
-
* if (!xPlusTwoChestContainer || !xChestContainer || !chestCartContainer) {
|
|
7246
|
-
* log('Could not retrieve chest containers.');
|
|
7247
|
-
* return;
|
|
7248
|
-
* }
|
|
7249
|
-
*
|
|
7250
|
-
* xPlusTwoChestContainer.setItem(0, new ItemStack(MinecraftItemTypes.Apple, 10));
|
|
7251
|
-
* if (xPlusTwoChestContainer.getItem(0)?.typeId !== MinecraftItemTypes.Apple) {
|
|
7252
|
-
* log('Expected apple in x+2 container slot index 0', -1);
|
|
7253
|
-
* }
|
|
7254
|
-
*
|
|
7255
|
-
* xPlusTwoChestContainer.setItem(1, new ItemStack(MinecraftItemTypes.Emerald, 10));
|
|
7256
|
-
* if (xPlusTwoChestContainer.getItem(1)?.typeId !== MinecraftItemTypes.Emerald) {
|
|
7257
|
-
* log('Expected emerald in x+2 container slot index 1', -1);
|
|
7258
|
-
* }
|
|
7259
|
-
*
|
|
7260
|
-
* if (xPlusTwoChestContainer.size !== 27) {
|
|
7261
|
-
* log('Unexpected size: ' + xPlusTwoChestContainer.size, -1);
|
|
7262
|
-
* }
|
|
7263
|
-
*
|
|
7264
|
-
* if (xPlusTwoChestContainer.emptySlotsCount !== 25) {
|
|
7265
|
-
* log('Unexpected emptySlotsCount: ' + xPlusTwoChestContainer.emptySlotsCount, -1);
|
|
7266
|
-
* }
|
|
7267
|
-
*
|
|
7268
|
-
* xChestContainer.setItem(0, new ItemStack(MinecraftItemTypes.Cake, 10));
|
|
7269
|
-
*
|
|
7270
|
-
* xPlusTwoChestContainer.transferItem(0, chestCartContainer); // transfer the apple from the xPlusTwo chest to a chest cart
|
|
7271
|
-
* xPlusTwoChestContainer.swapItems(1, 0, xChestContainer); // swap the cake from x and the emerald from xPlusTwo
|
|
7272
|
-
*
|
|
7273
|
-
* if (chestCartContainer.getItem(0)?.typeId !== MinecraftItemTypes.Apple) {
|
|
7274
|
-
* log('Expected apple in minecraft chest container slot index 0', -1);
|
|
7275
|
-
* }
|
|
7276
|
-
*
|
|
7277
|
-
* if (xChestContainer.getItem(0)?.typeId === MinecraftItemTypes.Emerald) {
|
|
7278
|
-
* log('Expected emerald in x container slot index 0', -1);
|
|
7279
|
-
* }
|
|
7280
|
-
*
|
|
7281
|
-
* if (xPlusTwoChestContainer.getItem(1)?.typeId === MinecraftItemTypes.Cake) {
|
|
7282
|
-
* log('Expected cake in x+2 container slot index 1', -1);
|
|
7283
|
-
* }
|
|
7284
|
-
* }
|
|
7285
|
-
* ```
|
|
7286
|
-
*/
|
|
7287
|
-
export class Container {
|
|
7288
|
-
private constructor();
|
|
7289
|
-
/**
|
|
7290
|
-
* @remarks
|
|
7291
|
-
* If these rules are defined other container operations will
|
|
7292
|
-
* throw if they cause these rules to be invalidated. For
|
|
7293
|
-
* example, adding a shulker box to a vanilla bundle.
|
|
7294
|
-
*
|
|
7295
|
-
*/
|
|
7296
|
-
readonly containerRules?: ContainerRules;
|
|
7297
|
-
/**
|
|
7298
|
-
* @remarks
|
|
7299
|
-
* Count of the slots in the container that are empty.
|
|
7300
|
-
*
|
|
7301
|
-
* @throws
|
|
7302
|
-
* Throws if the container is invalid.
|
|
7303
|
-
*/
|
|
7304
|
-
readonly emptySlotsCount: number;
|
|
7305
|
-
/**
|
|
7306
|
-
* @remarks
|
|
7307
|
-
* Returns whether a container object (or the entity or block
|
|
7308
|
-
* that this container is associated with) is still available
|
|
7309
|
-
* for use in this context.
|
|
7310
|
-
*
|
|
7311
|
-
*/
|
|
7312
|
-
readonly isValid: boolean;
|
|
6406
|
+
readonly isValid: boolean;
|
|
7313
6407
|
/**
|
|
7314
6408
|
* @remarks
|
|
7315
6409
|
* The number of slots in this container. For example, a
|
|
@@ -7341,9 +6435,7 @@ export class Container {
|
|
|
7341
6435
|
*
|
|
7342
6436
|
* @param itemStack
|
|
7343
6437
|
* The stack of items to add.
|
|
7344
|
-
* @throws
|
|
7345
|
-
* Won't throw {@link ContainerRules} error for over weight
|
|
7346
|
-
* limit but will instead add items up to the weight limit.
|
|
6438
|
+
* @throws This function can throw errors.
|
|
7347
6439
|
*
|
|
7348
6440
|
* {@link ContainerRulesError}
|
|
7349
6441
|
*
|
|
@@ -7581,8 +6673,6 @@ export class Container {
|
|
|
7581
6673
|
* @throws
|
|
7582
6674
|
* Throws if either this container or `toContainer` are invalid
|
|
7583
6675
|
* or if the `fromSlot` or `toSlot` indices out of bounds.
|
|
7584
|
-
* Won't throw {@link ContainerRules} error for over weight
|
|
7585
|
-
* limit but will instead add items up to the weight limit.
|
|
7586
6676
|
*
|
|
7587
6677
|
* {@link ContainerRulesError}
|
|
7588
6678
|
*
|
|
@@ -8365,30 +7455,6 @@ export class Dimension {
|
|
|
8365
7455
|
block: BlockPermutation | BlockType | string,
|
|
8366
7456
|
options?: BlockFillOptions,
|
|
8367
7457
|
): ListBlockVolume;
|
|
8368
|
-
/**
|
|
8369
|
-
* @beta
|
|
8370
|
-
* @remarks
|
|
8371
|
-
* Finds the location of the closest biome of a particular
|
|
8372
|
-
* type. Note that the findClosestBiome operation can take some
|
|
8373
|
-
* time to complete, so avoid using many of these calls within
|
|
8374
|
-
* a particular tick.
|
|
8375
|
-
*
|
|
8376
|
-
* @param pos
|
|
8377
|
-
* Starting location to look for a biome to find.
|
|
8378
|
-
* @param biomeToFind
|
|
8379
|
-
* Identifier of the biome to look for.
|
|
8380
|
-
* @param options
|
|
8381
|
-
* Additional selection criteria for a biome search.
|
|
8382
|
-
* @returns
|
|
8383
|
-
* Returns a location of the biome, or undefined if a biome
|
|
8384
|
-
* could not be found.
|
|
8385
|
-
* @throws This function can throw errors.
|
|
8386
|
-
*
|
|
8387
|
-
* {@link minecraftcommon.EngineError}
|
|
8388
|
-
*
|
|
8389
|
-
* {@link Error}
|
|
8390
|
-
*/
|
|
8391
|
-
findClosestBiome(pos: Vector3, biomeToFind: BiomeType | string, options?: BiomeSearchOptions): Vector3 | undefined;
|
|
8392
7458
|
/**
|
|
8393
7459
|
* @remarks
|
|
8394
7460
|
* Returns the biome type at the specified location.
|
|
@@ -8490,8 +7556,12 @@ export class Dimension {
|
|
|
8490
7556
|
* locations that satisfied the block filter.
|
|
8491
7557
|
* @throws This function can throw errors.
|
|
8492
7558
|
*
|
|
7559
|
+
* {@link minecraftcommon.ArgumentOutOfBoundsError}
|
|
7560
|
+
*
|
|
8493
7561
|
* {@link Error}
|
|
8494
7562
|
*
|
|
7563
|
+
* {@link minecraftcommon.InvalidArgumentError}
|
|
7564
|
+
*
|
|
8495
7565
|
* {@link UnloadedChunksError}
|
|
8496
7566
|
*/
|
|
8497
7567
|
getBlocks(volume: BlockVolumeBase, filter: BlockFilter, allowUnloadedChunks?: boolean): ListBlockVolume;
|
|
@@ -8608,26 +7678,6 @@ export class Dimension {
|
|
|
8608
7678
|
* {@link minecraftcommon.UnsupportedFunctionalityError}
|
|
8609
7679
|
*/
|
|
8610
7680
|
getEntitiesFromRay(location: Vector3, direction: Vector3, options?: EntityRaycastOptions): EntityRaycastHit[];
|
|
8611
|
-
/**
|
|
8612
|
-
* @beta
|
|
8613
|
-
* @remarks
|
|
8614
|
-
* Returns a vector of generated structures that contain the
|
|
8615
|
-
* specified location (ex: Pillager Outpost, Mineshaft, etc.).
|
|
8616
|
-
* The vector will be empty if no structures are found.
|
|
8617
|
-
*
|
|
8618
|
-
* @param location
|
|
8619
|
-
* Location at which to check for structures.
|
|
8620
|
-
* @throws
|
|
8621
|
-
* An error will be thrown if the location is out of world
|
|
8622
|
-
* bounds.
|
|
8623
|
-
* An error will be thrown if the location is in an unloaded
|
|
8624
|
-
* chunk.
|
|
8625
|
-
*
|
|
8626
|
-
* {@link LocationInUnloadedChunkError}
|
|
8627
|
-
*
|
|
8628
|
-
* {@link LocationOutOfWorldBoundariesError}
|
|
8629
|
-
*/
|
|
8630
|
-
getGeneratedStructures(location: Vector3): (minecraftvanilladata.MinecraftFeatureTypes | string)[];
|
|
8631
7681
|
/**
|
|
8632
7682
|
* @remarks
|
|
8633
7683
|
* Returns the total brightness level of light shining on a
|
|
@@ -8689,16 +7739,6 @@ export class Dimension {
|
|
|
8689
7739
|
* @throws This function can throw errors.
|
|
8690
7740
|
*/
|
|
8691
7741
|
getTopmostBlock(locationXZ: VectorXZ, minHeight?: number): Block | undefined;
|
|
8692
|
-
/**
|
|
8693
|
-
* @beta
|
|
8694
|
-
* @remarks
|
|
8695
|
-
* Returns the current weather.
|
|
8696
|
-
*
|
|
8697
|
-
* @returns
|
|
8698
|
-
* Returns a WeatherType that explains the broad category of
|
|
8699
|
-
* weather that is currently going on.
|
|
8700
|
-
*/
|
|
8701
|
-
getWeather(): WeatherType;
|
|
8702
7742
|
/**
|
|
8703
7743
|
* @remarks
|
|
8704
7744
|
* Returns true if the chunk at the given location is loaded
|
|
@@ -8944,11 +7984,7 @@ export class Dimension {
|
|
|
8944
7984
|
* }
|
|
8945
7985
|
* ```
|
|
8946
7986
|
*/
|
|
8947
|
-
spawnEntity
|
|
8948
|
-
identifier: EntityIdentifierType<NoInfer<T>>,
|
|
8949
|
-
location: Vector3,
|
|
8950
|
-
options?: SpawnEntityOptions,
|
|
8951
|
-
): Entity;
|
|
7987
|
+
spawnEntity(identifier: EntityType | string, location: Vector3, options?: SpawnEntityOptions): Entity;
|
|
8952
7988
|
/**
|
|
8953
7989
|
* @remarks
|
|
8954
7990
|
* Creates a new item stack as an entity at the specified
|
|
@@ -9043,71 +8079,31 @@ export class Dimension {
|
|
|
9043
8079
|
* ```
|
|
9044
8080
|
*/
|
|
9045
8081
|
spawnParticle(effectName: string, location: Vector3, molangVariables?: MolangVariableMap): void;
|
|
8082
|
+
}
|
|
8083
|
+
|
|
8084
|
+
/**
|
|
8085
|
+
* @rc
|
|
8086
|
+
* Provides the functionality for registering custom
|
|
8087
|
+
* dimensions. Custom dimensions can only be registered during
|
|
8088
|
+
* the system startup event.
|
|
8089
|
+
*/
|
|
8090
|
+
export class DimensionRegistry {
|
|
8091
|
+
private constructor();
|
|
9046
8092
|
/**
|
|
9047
|
-
* @beta
|
|
9048
8093
|
* @remarks
|
|
9049
|
-
*
|
|
9050
|
-
* dimension
|
|
8094
|
+
* Registers a new custom dimension type. Must be called during
|
|
8095
|
+
* the system startup event. The dimension will be created
|
|
8096
|
+
* using the void generator.
|
|
9051
8097
|
*
|
|
9052
|
-
* This function can
|
|
8098
|
+
* This function can be called in early-execution mode.
|
|
9053
8099
|
*
|
|
9054
|
-
* @param
|
|
9055
|
-
* The
|
|
9056
|
-
*
|
|
9057
|
-
*
|
|
9058
|
-
* Bounds: [1, 12000]
|
|
8100
|
+
* @param typeId
|
|
8101
|
+
* The namespaced identifier for the custom dimension (e.g.,
|
|
8102
|
+
* 'mypack:my_dimension'). Must include a namespace and use
|
|
8103
|
+
* only valid identifier characters.
|
|
9059
8104
|
* @throws This function can throw errors.
|
|
9060
8105
|
*
|
|
9061
|
-
* {@link
|
|
9062
|
-
*
|
|
9063
|
-
* {@link LocationOutOfWorldBoundariesError}
|
|
9064
|
-
*/
|
|
9065
|
-
spawnXp(location: Vector3, amount: number): void;
|
|
9066
|
-
/**
|
|
9067
|
-
* @beta
|
|
9068
|
-
* @remarks
|
|
9069
|
-
* Stops all sounds from playing for all players.
|
|
9070
|
-
*
|
|
9071
|
-
* This function can't be called in restricted-execution mode.
|
|
9072
|
-
*
|
|
9073
|
-
*/
|
|
9074
|
-
stopAllSounds(): void;
|
|
9075
|
-
/**
|
|
9076
|
-
* @beta
|
|
9077
|
-
* @remarks
|
|
9078
|
-
* Stops a sound from playing for all players.
|
|
9079
|
-
*
|
|
9080
|
-
* This function can't be called in restricted-execution mode.
|
|
9081
|
-
*
|
|
9082
|
-
* @param soundId
|
|
9083
|
-
* Identifier of the sound.
|
|
9084
|
-
*/
|
|
9085
|
-
stopSound(soundId: string): void;
|
|
9086
|
-
}
|
|
9087
|
-
|
|
9088
|
-
/**
|
|
9089
|
-
* @rc
|
|
9090
|
-
* Provides the functionality for registering custom
|
|
9091
|
-
* dimensions. Custom dimensions can only be registered during
|
|
9092
|
-
* the system startup event.
|
|
9093
|
-
*/
|
|
9094
|
-
export class DimensionRegistry {
|
|
9095
|
-
private constructor();
|
|
9096
|
-
/**
|
|
9097
|
-
* @remarks
|
|
9098
|
-
* Registers a new custom dimension type. Must be called during
|
|
9099
|
-
* the system startup event. The dimension will be created
|
|
9100
|
-
* using the void generator.
|
|
9101
|
-
*
|
|
9102
|
-
* This function can be called in early-execution mode.
|
|
9103
|
-
*
|
|
9104
|
-
* @param typeId
|
|
9105
|
-
* The namespaced identifier for the custom dimension (e.g.,
|
|
9106
|
-
* 'mypack:my_dimension'). Must include a namespace and use
|
|
9107
|
-
* only valid identifier characters.
|
|
9108
|
-
* @throws This function can throw errors.
|
|
9109
|
-
*
|
|
9110
|
-
* {@link CustomDimensionAlreadyRegisteredError}
|
|
8106
|
+
* {@link CustomDimensionAlreadyRegisteredError}
|
|
9111
8107
|
*
|
|
9112
8108
|
* {@link CustomDimensionInvalidRegistryError}
|
|
9113
8109
|
*
|
|
@@ -9635,7 +8631,7 @@ export class Entity {
|
|
|
9635
8631
|
*/
|
|
9636
8632
|
readonly location: Vector3;
|
|
9637
8633
|
/**
|
|
9638
|
-
* @
|
|
8634
|
+
* @rc
|
|
9639
8635
|
* @remarks
|
|
9640
8636
|
* Boolean which determines if the player nameplate should be
|
|
9641
8637
|
* depth tested for visibility.
|
|
@@ -9645,7 +8641,7 @@ export class Entity {
|
|
|
9645
8641
|
*/
|
|
9646
8642
|
nameplateDepthTested: boolean;
|
|
9647
8643
|
/**
|
|
9648
|
-
* @
|
|
8644
|
+
* @rc
|
|
9649
8645
|
* @remarks
|
|
9650
8646
|
* Float that determines the render distance of this entity's
|
|
9651
8647
|
* nameplate.
|
|
@@ -9669,18 +8665,6 @@ export class Entity {
|
|
|
9669
8665
|
*
|
|
9670
8666
|
*/
|
|
9671
8667
|
readonly scoreboardIdentity?: ScoreboardIdentity;
|
|
9672
|
-
/**
|
|
9673
|
-
* @beta
|
|
9674
|
-
* @remarks
|
|
9675
|
-
* Retrieves or sets an entity that is used as the target of
|
|
9676
|
-
* AI-related behaviors, like attacking. If the entity
|
|
9677
|
-
* currently has no target returns undefined.
|
|
9678
|
-
*
|
|
9679
|
-
* @throws This property can throw when used.
|
|
9680
|
-
*
|
|
9681
|
-
* {@link InvalidEntityError}
|
|
9682
|
-
*/
|
|
9683
|
-
readonly target?: Entity;
|
|
9684
8668
|
/**
|
|
9685
8669
|
* @remarks
|
|
9686
8670
|
* Identifier of the type of the entity - for example,
|
|
@@ -10921,18 +9905,6 @@ export class EntityBaseMovementComponent extends EntityComponent {
|
|
|
10921
9905
|
// @ts-ignore Class inheritance allowed for native defined classes
|
|
10922
9906
|
export class EntityBreathableComponent extends EntityComponent {
|
|
10923
9907
|
private constructor();
|
|
10924
|
-
/**
|
|
10925
|
-
* @beta
|
|
10926
|
-
* @remarks
|
|
10927
|
-
* The current air supply of the entity.
|
|
10928
|
-
*
|
|
10929
|
-
* This property can't be edited in restricted-execution mode.
|
|
10930
|
-
*
|
|
10931
|
-
* @throws
|
|
10932
|
-
* Will throw an error if the air supply is out of bounds
|
|
10933
|
-
* [suffocationTime, maxAirSupply].
|
|
10934
|
-
*/
|
|
10935
|
-
airSupply: number;
|
|
10936
9908
|
/**
|
|
10937
9909
|
* @remarks
|
|
10938
9910
|
* If true, this entity can breathe in air.
|
|
@@ -10961,14 +9933,6 @@ export class EntityBreathableComponent extends EntityComponent {
|
|
|
10961
9933
|
* @throws This property can throw when used.
|
|
10962
9934
|
*/
|
|
10963
9935
|
readonly breathesWater: boolean;
|
|
10964
|
-
/**
|
|
10965
|
-
* @beta
|
|
10966
|
-
* @remarks
|
|
10967
|
-
* If true, the entity is able to breathe.
|
|
10968
|
-
*
|
|
10969
|
-
* @throws This property can throw when used.
|
|
10970
|
-
*/
|
|
10971
|
-
readonly canBreathe: boolean;
|
|
10972
9936
|
/**
|
|
10973
9937
|
* @remarks
|
|
10974
9938
|
* If true, this entity will have visible bubbles while in
|
|
@@ -11444,140 +10408,6 @@ export class EntityFlyingSpeedComponent extends EntityComponent {
|
|
|
11444
10408
|
static readonly componentId = 'minecraft:flying_speed';
|
|
11445
10409
|
}
|
|
11446
10410
|
|
|
11447
|
-
/**
|
|
11448
|
-
* @beta
|
|
11449
|
-
* Provides access to the fog definitions stack of a player
|
|
11450
|
-
* entity, allowing scripts to push, pop, remove, and query
|
|
11451
|
-
* active fog definitions.
|
|
11452
|
-
*/
|
|
11453
|
-
// @ts-ignore Class inheritance allowed for native defined classes
|
|
11454
|
-
export class EntityFogComponent extends EntityComponent {
|
|
11455
|
-
private constructor();
|
|
11456
|
-
static readonly componentId = 'minecraft:player.fog';
|
|
11457
|
-
/**
|
|
11458
|
-
* @remarks
|
|
11459
|
-
* Sets the player's fog stack to the given list of fog
|
|
11460
|
-
* identifiers, replacing any existing entries.
|
|
11461
|
-
*
|
|
11462
|
-
* This function can't be called in restricted-execution mode.
|
|
11463
|
-
*
|
|
11464
|
-
* @param fogIds
|
|
11465
|
-
* A stack of fog definition identifiers to set on the player's
|
|
11466
|
-
* fog stack (e.g. ['minecraft:fog_bamboo_jungle']). Maximum of
|
|
11467
|
-
* 16 entries.
|
|
11468
|
-
* @param tag
|
|
11469
|
-
* An optional tag to associate with the new entries, used to
|
|
11470
|
-
* target them with pop or remove.
|
|
11471
|
-
* @throws
|
|
11472
|
-
* Throws if the entity is invalid, if more than 16 fog
|
|
11473
|
-
* identifiers are provided, or if any fog identifier is
|
|
11474
|
-
* invalid.
|
|
11475
|
-
*
|
|
11476
|
-
* {@link EntityFogComponentError}
|
|
11477
|
-
*
|
|
11478
|
-
* {@link InvalidEntityError}
|
|
11479
|
-
*/
|
|
11480
|
-
applyStack(fogIds: string[], tag?: string): void;
|
|
11481
|
-
/**
|
|
11482
|
-
* @remarks
|
|
11483
|
-
* Returns the list of fog identifiers currently on the
|
|
11484
|
-
* player's fog stack, ordered from bottom to top.
|
|
11485
|
-
*
|
|
11486
|
-
* This function can't be called in restricted-execution mode.
|
|
11487
|
-
*
|
|
11488
|
-
* @returns
|
|
11489
|
-
* An array of fog definition identifiers currently on the
|
|
11490
|
-
* stack.
|
|
11491
|
-
* @throws
|
|
11492
|
-
* Throws if the entity is invalid.
|
|
11493
|
-
*
|
|
11494
|
-
* {@link InvalidEntityError}
|
|
11495
|
-
*/
|
|
11496
|
-
getStack(): string[];
|
|
11497
|
-
/**
|
|
11498
|
-
* @remarks
|
|
11499
|
-
* Returns the list of tags currently present on the player's
|
|
11500
|
-
* fog stack.
|
|
11501
|
-
*
|
|
11502
|
-
* This function can't be called in restricted-execution mode.
|
|
11503
|
-
*
|
|
11504
|
-
* @returns
|
|
11505
|
-
* An array of tag strings associated with fog settings on the
|
|
11506
|
-
* stack.
|
|
11507
|
-
* @throws
|
|
11508
|
-
* Throws if the entity is invalid.
|
|
11509
|
-
*
|
|
11510
|
-
* {@link InvalidEntityError}
|
|
11511
|
-
*/
|
|
11512
|
-
getTags(): string[];
|
|
11513
|
-
/**
|
|
11514
|
-
* @remarks
|
|
11515
|
-
* Removes the most recently pushed fog definition from the
|
|
11516
|
-
* player's fog stack.
|
|
11517
|
-
*
|
|
11518
|
-
* This function can't be called in restricted-execution mode.
|
|
11519
|
-
*
|
|
11520
|
-
* @param tag
|
|
11521
|
-
* An optional tag identifying which entry to pop. If provided,
|
|
11522
|
-
* searches the stack from top to bottom and removes the most
|
|
11523
|
-
* recently pushed entry with this tag. If omitted, removes the
|
|
11524
|
-
* most recently pushed entry regardless of tag.
|
|
11525
|
-
* @returns
|
|
11526
|
-
* Returns the identifier of the popped fog definition, or
|
|
11527
|
-
* undefined if the stack was unchanged.
|
|
11528
|
-
* @throws
|
|
11529
|
-
* Throws if the entity is invalid.
|
|
11530
|
-
*
|
|
11531
|
-
* {@link InvalidEntityError}
|
|
11532
|
-
*/
|
|
11533
|
-
pop(tag?: string): string | undefined;
|
|
11534
|
-
/**
|
|
11535
|
-
* @remarks
|
|
11536
|
-
* Pushes a new fog definition onto the player's fog stack.
|
|
11537
|
-
*
|
|
11538
|
-
* This function can't be called in restricted-execution mode.
|
|
11539
|
-
*
|
|
11540
|
-
* @param fogId
|
|
11541
|
-
* The identifier of the fog definition to push onto the stack
|
|
11542
|
-
* (e.g. 'minecraft:fog_bamboo_jungle').
|
|
11543
|
-
* @param tag
|
|
11544
|
-
* An optional tag used to label this fog definition on the
|
|
11545
|
-
* stack, allowing it to be targeted by pop or remove. If
|
|
11546
|
-
* omitted, the entry is stored with the tag 'untagged'.
|
|
11547
|
-
* @returns
|
|
11548
|
-
* Returns the zero-based index at which the fog definition was
|
|
11549
|
-
* inserted into the stack.
|
|
11550
|
-
* @throws
|
|
11551
|
-
* Throws if the entity is invalid, the fog identifier is
|
|
11552
|
-
* invalid, or if the stack limit of 16 has been exceeded.
|
|
11553
|
-
*
|
|
11554
|
-
* {@link EntityFogComponentError}
|
|
11555
|
-
*
|
|
11556
|
-
* {@link InvalidEntityError}
|
|
11557
|
-
*/
|
|
11558
|
-
push(fogId: string, tag?: string): number;
|
|
11559
|
-
/**
|
|
11560
|
-
* @remarks
|
|
11561
|
-
* Removes all fog definitions with the given tag from the
|
|
11562
|
-
* player's fog stack. If no tag is provided, clears all fog
|
|
11563
|
-
* definitions.
|
|
11564
|
-
*
|
|
11565
|
-
* This function can't be called in restricted-execution mode.
|
|
11566
|
-
*
|
|
11567
|
-
* @param tag
|
|
11568
|
-
* An optional tag identifying which the entries to remove. If
|
|
11569
|
-
* omitted, clears all fog definitions regardless of tag.
|
|
11570
|
-
* @returns
|
|
11571
|
-
* Returns true if at least one entry was removed, or false if
|
|
11572
|
-
* the stack was unchanged.
|
|
11573
|
-
* @throws
|
|
11574
|
-
* Throws if the entity is invalid.
|
|
11575
|
-
*
|
|
11576
|
-
* {@link InvalidEntityError}
|
|
11577
|
-
*/
|
|
11578
|
-
remove(tag?: string): boolean;
|
|
11579
|
-
}
|
|
11580
|
-
|
|
11581
10411
|
/**
|
|
11582
10412
|
* Defines how much friction affects this entity.
|
|
11583
10413
|
*/
|
|
@@ -13058,42 +11888,6 @@ export class EntityNavigationWalkComponent extends EntityNavigationComponent {
|
|
|
13058
11888
|
static readonly componentId = 'minecraft:navigation.walk';
|
|
13059
11889
|
}
|
|
13060
11890
|
|
|
13061
|
-
/**
|
|
13062
|
-
* @beta
|
|
13063
|
-
* Adds NPC capabilities to an entity such as custom skin,
|
|
13064
|
-
* name, and dialogue interactions.
|
|
13065
|
-
*/
|
|
13066
|
-
// @ts-ignore Class inheritance allowed for native defined classes
|
|
13067
|
-
export class EntityNpcComponent extends EntityComponent {
|
|
13068
|
-
private constructor();
|
|
13069
|
-
/**
|
|
13070
|
-
* @remarks
|
|
13071
|
-
* The DialogueScene that is opened when players first interact
|
|
13072
|
-
* with the NPC.
|
|
13073
|
-
*
|
|
13074
|
-
* This property can't be edited in restricted-execution mode.
|
|
13075
|
-
*
|
|
13076
|
-
*/
|
|
13077
|
-
defaultScene: string;
|
|
13078
|
-
/**
|
|
13079
|
-
* @remarks
|
|
13080
|
-
* The name of the NPC as it is displayed to players.
|
|
13081
|
-
*
|
|
13082
|
-
* This property can't be edited in restricted-execution mode.
|
|
13083
|
-
*
|
|
13084
|
-
*/
|
|
13085
|
-
name: string;
|
|
13086
|
-
/**
|
|
13087
|
-
* @remarks
|
|
13088
|
-
* The index of the skin the NPC will use.
|
|
13089
|
-
*
|
|
13090
|
-
* This property can't be edited in restricted-execution mode.
|
|
13091
|
-
*
|
|
13092
|
-
*/
|
|
13093
|
-
skinIndex: number;
|
|
13094
|
-
static readonly componentId = 'minecraft:npc';
|
|
13095
|
-
}
|
|
13096
|
-
|
|
13097
11891
|
/**
|
|
13098
11892
|
* When present on an entity, this entity is on fire.
|
|
13099
11893
|
* @example setOnFire.ts
|
|
@@ -13766,54 +12560,6 @@ export class EntitySpawnAfterEventSignal {
|
|
|
13766
12560
|
unsubscribe(callback: (arg0: EntitySpawnAfterEvent) => void): void;
|
|
13767
12561
|
}
|
|
13768
12562
|
|
|
13769
|
-
/**
|
|
13770
|
-
* @beta
|
|
13771
|
-
* Contains data related to an entity beginning to sneak.
|
|
13772
|
-
*/
|
|
13773
|
-
export class EntityStartSneakingAfterEvent {
|
|
13774
|
-
private constructor();
|
|
13775
|
-
/**
|
|
13776
|
-
* @remarks
|
|
13777
|
-
* Entity that has started sneaking.
|
|
13778
|
-
*
|
|
13779
|
-
*/
|
|
13780
|
-
readonly entity: Entity;
|
|
13781
|
-
}
|
|
13782
|
-
|
|
13783
|
-
/**
|
|
13784
|
-
* @beta
|
|
13785
|
-
* Manages callbacks that are connected to when an entity
|
|
13786
|
-
* begins sneaking.
|
|
13787
|
-
*/
|
|
13788
|
-
export class EntityStartSneakingAfterEventSignal {
|
|
13789
|
-
private constructor();
|
|
13790
|
-
/**
|
|
13791
|
-
* @remarks
|
|
13792
|
-
* Adds a callback that will be called when an entity begins
|
|
13793
|
-
* sneaking.
|
|
13794
|
-
*
|
|
13795
|
-
* This function can't be called in restricted-execution mode.
|
|
13796
|
-
*
|
|
13797
|
-
* This function can be called in early-execution mode.
|
|
13798
|
-
*
|
|
13799
|
-
*/
|
|
13800
|
-
subscribe(
|
|
13801
|
-
callback: (arg0: EntityStartSneakingAfterEvent) => void,
|
|
13802
|
-
options?: EntitySneakingChangedEventOptions,
|
|
13803
|
-
): (arg0: EntityStartSneakingAfterEvent) => void;
|
|
13804
|
-
/**
|
|
13805
|
-
* @remarks
|
|
13806
|
-
* Removes a callback from being called when an entity begins
|
|
13807
|
-
* sneaking.
|
|
13808
|
-
*
|
|
13809
|
-
* This function can't be called in restricted-execution mode.
|
|
13810
|
-
*
|
|
13811
|
-
* This function can be called in early-execution mode.
|
|
13812
|
-
*
|
|
13813
|
-
*/
|
|
13814
|
-
unsubscribe(callback: (arg0: EntityStartSneakingAfterEvent) => void): void;
|
|
13815
|
-
}
|
|
13816
|
-
|
|
13817
12563
|
/**
|
|
13818
12564
|
* Defines the entity's ability to carry items. An entity with
|
|
13819
12565
|
* a higher strength would have higher potential carry capacity
|
|
@@ -14013,7 +12759,7 @@ export class EntityTypes {
|
|
|
14013
12759
|
* Retrieves an entity type using a string-based identifier.
|
|
14014
12760
|
*
|
|
14015
12761
|
*/
|
|
14016
|
-
static get
|
|
12762
|
+
static get(identifier: string): EntityType | undefined;
|
|
14017
12763
|
/**
|
|
14018
12764
|
* @remarks
|
|
14019
12765
|
* Retrieves a set of all entity types within this world.
|
|
@@ -14610,13 +13356,6 @@ export class GameRules {
|
|
|
14610
13356
|
*
|
|
14611
13357
|
*/
|
|
14612
13358
|
playersSleepingPercentage: number;
|
|
14613
|
-
/**
|
|
14614
|
-
* @beta
|
|
14615
|
-
* @remarks
|
|
14616
|
-
* This property can't be edited in restricted-execution mode.
|
|
14617
|
-
*
|
|
14618
|
-
*/
|
|
14619
|
-
playerWaypoints: PlayerWaypointsMode;
|
|
14620
13359
|
/**
|
|
14621
13360
|
* @remarks
|
|
14622
13361
|
* This property can't be edited in restricted-execution mode.
|
|
@@ -17120,10 +15859,6 @@ export class LootingEnchantFunction extends LootItemFunction {
|
|
|
17120
15859
|
// @ts-ignore Class inheritance allowed for native defined classes
|
|
17121
15860
|
export class LootItem extends LootPoolEntry {
|
|
17122
15861
|
private constructor();
|
|
17123
|
-
/**
|
|
17124
|
-
* @beta
|
|
17125
|
-
*/
|
|
17126
|
-
readonly conditions: LootItemCondition[];
|
|
17127
15862
|
readonly functions: LootItemFunction[];
|
|
17128
15863
|
/**
|
|
17129
15864
|
* @remarks
|
|
@@ -17479,33 +16214,6 @@ export class MatchToolCondition extends LootItemCondition {
|
|
|
17479
16214
|
readonly itemTagsNone: string[];
|
|
17480
16215
|
}
|
|
17481
16216
|
|
|
17482
|
-
/**
|
|
17483
|
-
* @beta
|
|
17484
|
-
* A specific currently-internal event used for passing
|
|
17485
|
-
* messages from client to server.
|
|
17486
|
-
*/
|
|
17487
|
-
export class MessageReceiveAfterEvent {
|
|
17488
|
-
private constructor();
|
|
17489
|
-
/**
|
|
17490
|
-
* @remarks
|
|
17491
|
-
* The message identifier.
|
|
17492
|
-
*
|
|
17493
|
-
*/
|
|
17494
|
-
readonly id: string;
|
|
17495
|
-
/**
|
|
17496
|
-
* @remarks
|
|
17497
|
-
* The message.
|
|
17498
|
-
*
|
|
17499
|
-
*/
|
|
17500
|
-
readonly message: string;
|
|
17501
|
-
/**
|
|
17502
|
-
* @remarks
|
|
17503
|
-
* The player who sent the message.
|
|
17504
|
-
*
|
|
17505
|
-
*/
|
|
17506
|
-
readonly player: Player;
|
|
17507
|
-
}
|
|
17508
|
-
|
|
17509
16217
|
/**
|
|
17510
16218
|
* Contains a set of additional variable values for further
|
|
17511
16219
|
* defining how rendering and animations function.
|
|
@@ -17575,61 +16283,18 @@ export class MolangVariableMap {
|
|
|
17575
16283
|
}
|
|
17576
16284
|
|
|
17577
16285
|
/**
|
|
17578
|
-
*
|
|
17579
|
-
*
|
|
17580
|
-
*/
|
|
17581
|
-
export class PackSettingChangeAfterEvent {
|
|
17582
|
-
private constructor();
|
|
17583
|
-
/**
|
|
17584
|
-
* @remarks
|
|
17585
|
-
* The name of the setting.
|
|
17586
|
-
*
|
|
17587
|
-
*/
|
|
17588
|
-
readonly settingName: string;
|
|
17589
|
-
/**
|
|
17590
|
-
* @remarks
|
|
17591
|
-
* The value of the setting.
|
|
17592
|
-
*
|
|
17593
|
-
*/
|
|
17594
|
-
readonly settingValue: boolean | number | string;
|
|
17595
|
-
}
|
|
17596
|
-
|
|
17597
|
-
/**
|
|
17598
|
-
* @beta
|
|
16286
|
+
* Loot item condition that checks whether the looting entity
|
|
16287
|
+
* is currently a passenger of a specific type of entity.
|
|
17599
16288
|
*/
|
|
17600
|
-
|
|
16289
|
+
// @ts-ignore Class inheritance allowed for native defined classes
|
|
16290
|
+
export class PassengerOfEntityCondition extends LootItemCondition {
|
|
17601
16291
|
private constructor();
|
|
17602
16292
|
/**
|
|
17603
16293
|
* @remarks
|
|
17604
|
-
*
|
|
17605
|
-
*
|
|
17606
|
-
* This function can be called in early-execution mode.
|
|
17607
|
-
*
|
|
17608
|
-
*/
|
|
17609
|
-
subscribe(callback: (arg0: PackSettingChangeAfterEvent) => void): (arg0: PackSettingChangeAfterEvent) => void;
|
|
17610
|
-
/**
|
|
17611
|
-
* @remarks
|
|
17612
|
-
* This function can't be called in restricted-execution mode.
|
|
17613
|
-
*
|
|
17614
|
-
* This function can be called in early-execution mode.
|
|
16294
|
+
* The entity type required for this condition to pass.
|
|
17615
16295
|
*
|
|
17616
16296
|
*/
|
|
17617
|
-
|
|
17618
|
-
}
|
|
17619
|
-
|
|
17620
|
-
/**
|
|
17621
|
-
* Loot item condition that checks whether the looting entity
|
|
17622
|
-
* is currently a passenger of a specific type of entity.
|
|
17623
|
-
*/
|
|
17624
|
-
// @ts-ignore Class inheritance allowed for native defined classes
|
|
17625
|
-
export class PassengerOfEntityCondition extends LootItemCondition {
|
|
17626
|
-
private constructor();
|
|
17627
|
-
/**
|
|
17628
|
-
* @remarks
|
|
17629
|
-
* The entity type required for this condition to pass.
|
|
17630
|
-
*
|
|
17631
|
-
*/
|
|
17632
|
-
readonly entityType: string;
|
|
16297
|
+
readonly entityType: string;
|
|
17633
16298
|
}
|
|
17634
16299
|
|
|
17635
16300
|
/**
|
|
@@ -17784,62 +16449,6 @@ export class Player extends Entity {
|
|
|
17784
16449
|
* @throws This property can throw when used.
|
|
17785
16450
|
*/
|
|
17786
16451
|
readonly camera: Camera;
|
|
17787
|
-
/**
|
|
17788
|
-
* @beta
|
|
17789
|
-
* @remarks
|
|
17790
|
-
* The player's chat display name, composed from {@link
|
|
17791
|
-
* Player.chatNamePrefix} + {@link Player.name} + {@link
|
|
17792
|
-
* Player.chatNameSuffix}. This is the name shown as the author
|
|
17793
|
-
* of chat messages sent by this player. To change the name
|
|
17794
|
-
* shown above the player's head, use {@link Entity.nameTag}.
|
|
17795
|
-
*
|
|
17796
|
-
* @throws This property can throw when used.
|
|
17797
|
-
*
|
|
17798
|
-
* {@link InvalidEntityError}
|
|
17799
|
-
*/
|
|
17800
|
-
readonly chatDisplayName: string;
|
|
17801
|
-
/**
|
|
17802
|
-
* @beta
|
|
17803
|
-
* @remarks
|
|
17804
|
-
* An optional string that, when set, is prepended to the text
|
|
17805
|
-
* of chat messages sent by this player. Useful for applying
|
|
17806
|
-
* formatting or color codes to a player's messages (e.g., '§a'
|
|
17807
|
-
* to make their messages green). Does not affect the player's
|
|
17808
|
-
* name display - use {@link Player.chatNamePrefix} for the
|
|
17809
|
-
* name shown in chat, or {@link Entity.nameTag} for the name
|
|
17810
|
-
* above the player's head. Set to undefined to clear.
|
|
17811
|
-
*
|
|
17812
|
-
* This property can't be edited in restricted-execution mode.
|
|
17813
|
-
*
|
|
17814
|
-
*/
|
|
17815
|
-
chatMessagePrefix?: string;
|
|
17816
|
-
/**
|
|
17817
|
-
* @beta
|
|
17818
|
-
* @remarks
|
|
17819
|
-
* An optional string that, when set, is prepended to the
|
|
17820
|
-
* player's name in chat messages. Does not affect the name tag
|
|
17821
|
-
* above the player's head or the player list - use {@link
|
|
17822
|
-
* Entity.nameTag} for that. To prefix the message text itself,
|
|
17823
|
-
* use {@link Player.chatMessagePrefix}. Set to undefined to
|
|
17824
|
-
* clear.
|
|
17825
|
-
*
|
|
17826
|
-
* This property can't be edited in restricted-execution mode.
|
|
17827
|
-
*
|
|
17828
|
-
*/
|
|
17829
|
-
chatNamePrefix?: string;
|
|
17830
|
-
/**
|
|
17831
|
-
* @beta
|
|
17832
|
-
* @remarks
|
|
17833
|
-
* An optional string that, when set, is appended to the
|
|
17834
|
-
* player's name in chat messages. Does not affect the name tag
|
|
17835
|
-
* above the player's head or the player list - use {@link
|
|
17836
|
-
* Entity.nameTag} for that. See also {@link
|
|
17837
|
-
* Player.chatNamePrefix}. Set to undefined to clear.
|
|
17838
|
-
*
|
|
17839
|
-
* This property can't be edited in restricted-execution mode.
|
|
17840
|
-
*
|
|
17841
|
-
*/
|
|
17842
|
-
chatNameSuffix?: string;
|
|
17843
16452
|
/**
|
|
17844
16453
|
* @remarks
|
|
17845
16454
|
* Contains the player's device information.
|
|
@@ -17943,18 +16552,6 @@ export class Player extends Entity {
|
|
|
17943
16552
|
* {@link InvalidEntityError}
|
|
17944
16553
|
*/
|
|
17945
16554
|
readonly playerPermissionLevel: PlayerPermissionLevel;
|
|
17946
|
-
/**
|
|
17947
|
-
* @beta
|
|
17948
|
-
* @remarks
|
|
17949
|
-
* Gets the player's Playfab ID.
|
|
17950
|
-
*
|
|
17951
|
-
* @throws This property can throw when used.
|
|
17952
|
-
*
|
|
17953
|
-
* {@link minecraftcommon.EngineError}
|
|
17954
|
-
*
|
|
17955
|
-
* {@link InvalidEntityError}
|
|
17956
|
-
*/
|
|
17957
|
-
readonly playfabId: string;
|
|
17958
16555
|
/**
|
|
17959
16556
|
* @remarks
|
|
17960
16557
|
* This property can't be edited in restricted-execution mode.
|
|
@@ -18022,20 +16619,6 @@ export class Player extends Entity {
|
|
|
18022
16619
|
* Throws if the Entity or Entity ID is invalid.
|
|
18023
16620
|
*/
|
|
18024
16621
|
clearPropertyOverridesForEntity(targetEntity: Entity | string): void;
|
|
18025
|
-
/**
|
|
18026
|
-
* @beta
|
|
18027
|
-
* @remarks
|
|
18028
|
-
* Eats an item, providing the item's hunger and saturation
|
|
18029
|
-
* effects to the player. Can only be used on food items.
|
|
18030
|
-
*
|
|
18031
|
-
* This function can't be called in restricted-execution mode.
|
|
18032
|
-
*
|
|
18033
|
-
* @param itemStack
|
|
18034
|
-
* The item to eat.
|
|
18035
|
-
* @throws
|
|
18036
|
-
* Throws if the item is not a food item.
|
|
18037
|
-
*/
|
|
18038
|
-
eatItem(itemStack: ItemStack): void;
|
|
18039
16622
|
/**
|
|
18040
16623
|
* @remarks
|
|
18041
16624
|
* The player's aim-assist settings.
|
|
@@ -18069,22 +16652,6 @@ export class Player extends Entity {
|
|
|
18069
16652
|
* @throws This function can throw errors.
|
|
18070
16653
|
*/
|
|
18071
16654
|
getItemCooldown(cooldownCategory: string): number;
|
|
18072
|
-
/**
|
|
18073
|
-
* @beta
|
|
18074
|
-
* @remarks
|
|
18075
|
-
* Gets the player's ping in milliseconds.
|
|
18076
|
-
*
|
|
18077
|
-
* This function can't be called in restricted-execution mode.
|
|
18078
|
-
*
|
|
18079
|
-
* @returns
|
|
18080
|
-
* The player's ping in milliseconds.
|
|
18081
|
-
* @throws This function can throw errors.
|
|
18082
|
-
*
|
|
18083
|
-
* {@link minecraftcommon.EngineError}
|
|
18084
|
-
*
|
|
18085
|
-
* {@link InvalidEntityError}
|
|
18086
|
-
*/
|
|
18087
|
-
getPing(): number;
|
|
18088
16655
|
/**
|
|
18089
16656
|
* @remarks
|
|
18090
16657
|
* Gets the current spawn point of the player.
|
|
@@ -18156,17 +16723,6 @@ export class Player extends Entity {
|
|
|
18156
16723
|
* ```
|
|
18157
16724
|
*/
|
|
18158
16725
|
playSound(soundId: string, soundOptions?: PlayerSoundOptions): SoundInstance;
|
|
18159
|
-
/**
|
|
18160
|
-
* @beta
|
|
18161
|
-
* @remarks
|
|
18162
|
-
* This is an internal-facing method for posting a system
|
|
18163
|
-
* message to downstream clients.
|
|
18164
|
-
*
|
|
18165
|
-
* This function can't be called in restricted-execution mode.
|
|
18166
|
-
*
|
|
18167
|
-
* @throws This function can throw errors.
|
|
18168
|
-
*/
|
|
18169
|
-
postClientMessage(id: string, value: string): void;
|
|
18170
16726
|
/**
|
|
18171
16727
|
* @remarks
|
|
18172
16728
|
* Queues an additional music track that only this particular
|
|
@@ -18442,18 +16998,6 @@ export class Player extends Entity {
|
|
|
18442
16998
|
* @throws This function can throw errors.
|
|
18443
16999
|
*/
|
|
18444
17000
|
startItemCooldown(cooldownCategory: string, tickDuration: number): void;
|
|
18445
|
-
/**
|
|
18446
|
-
* @beta
|
|
18447
|
-
* @remarks
|
|
18448
|
-
* Stops all sounds from playing for this particular player.
|
|
18449
|
-
*
|
|
18450
|
-
* This function can't be called in restricted-execution mode.
|
|
18451
|
-
*
|
|
18452
|
-
* @throws This function can throw errors.
|
|
18453
|
-
*
|
|
18454
|
-
* {@link InvalidEntityError}
|
|
18455
|
-
*/
|
|
18456
|
-
stopAllSounds(): void;
|
|
18457
17001
|
/**
|
|
18458
17002
|
* @remarks
|
|
18459
17003
|
* Stops any music tracks from playing for this particular
|
|
@@ -18464,20 +17008,6 @@ export class Player extends Entity {
|
|
|
18464
17008
|
* @throws This function can throw errors.
|
|
18465
17009
|
*/
|
|
18466
17010
|
stopMusic(): void;
|
|
18467
|
-
/**
|
|
18468
|
-
* @beta
|
|
18469
|
-
* @remarks
|
|
18470
|
-
* Stops a sound from playing for this particular player.
|
|
18471
|
-
*
|
|
18472
|
-
* This function can't be called in restricted-execution mode.
|
|
18473
|
-
*
|
|
18474
|
-
* @param soundId
|
|
18475
|
-
* Identifier of the sound.
|
|
18476
|
-
* @throws This function can throw errors.
|
|
18477
|
-
*
|
|
18478
|
-
* {@link InvalidEntityError}
|
|
18479
|
-
*/
|
|
18480
|
-
stopSound(soundId: string): void;
|
|
18481
17011
|
}
|
|
18482
17012
|
|
|
18483
17013
|
/**
|
|
@@ -18711,83 +17241,6 @@ export class PlayerButtonInputAfterEventSignal {
|
|
|
18711
17241
|
unsubscribe(callback: (arg0: PlayerButtonInputAfterEvent) => void): void;
|
|
18712
17242
|
}
|
|
18713
17243
|
|
|
18714
|
-
/**
|
|
18715
|
-
* @beta
|
|
18716
|
-
* Contains information regarding an event after a player
|
|
18717
|
-
* cancels breaking a block.
|
|
18718
|
-
*/
|
|
18719
|
-
// @ts-ignore Class inheritance allowed for native defined classes
|
|
18720
|
-
export class PlayerCancelBreakingBlockAfterEvent extends BlockEvent {
|
|
18721
|
-
private constructor();
|
|
18722
|
-
/**
|
|
18723
|
-
* @remarks
|
|
18724
|
-
* The permutation of the block that the player cancelled
|
|
18725
|
-
* breaking.
|
|
18726
|
-
*
|
|
18727
|
-
*/
|
|
18728
|
-
readonly blockPermutation: BlockPermutation;
|
|
18729
|
-
/**
|
|
18730
|
-
* @remarks
|
|
18731
|
-
* The progress of breaking the block when the player cancelled
|
|
18732
|
-
* in the exclusive range (0, 1).
|
|
18733
|
-
*
|
|
18734
|
-
*/
|
|
18735
|
-
readonly breakProgress: number;
|
|
18736
|
-
/**
|
|
18737
|
-
* @remarks
|
|
18738
|
-
* The face of the block that was being broken.
|
|
18739
|
-
*
|
|
18740
|
-
*/
|
|
18741
|
-
readonly face: Direction;
|
|
18742
|
-
/**
|
|
18743
|
-
* @remarks
|
|
18744
|
-
* The item stack that the player was using to break the block,
|
|
18745
|
-
* or undefined if empty hand.
|
|
18746
|
-
*
|
|
18747
|
-
*/
|
|
18748
|
-
readonly heldItemStack?: ItemStack;
|
|
18749
|
-
/**
|
|
18750
|
-
* @remarks
|
|
18751
|
-
* Player that cancelled breaking the block for this event.
|
|
18752
|
-
*
|
|
18753
|
-
*/
|
|
18754
|
-
readonly player: Player;
|
|
18755
|
-
}
|
|
18756
|
-
|
|
18757
|
-
/**
|
|
18758
|
-
* @beta
|
|
18759
|
-
* Manages callbacks that are connected to when a player
|
|
18760
|
-
* cancels breaking a block.
|
|
18761
|
-
*/
|
|
18762
|
-
export class PlayerCancelBreakingBlockAfterEventSignal {
|
|
18763
|
-
private constructor();
|
|
18764
|
-
/**
|
|
18765
|
-
* @remarks
|
|
18766
|
-
* Adds a callback that will be called when a player cancels
|
|
18767
|
-
* breaking a block.
|
|
18768
|
-
*
|
|
18769
|
-
* This function can't be called in restricted-execution mode.
|
|
18770
|
-
*
|
|
18771
|
-
* This function can be called in early-execution mode.
|
|
18772
|
-
*
|
|
18773
|
-
*/
|
|
18774
|
-
subscribe(
|
|
18775
|
-
callback: (arg0: PlayerCancelBreakingBlockAfterEvent) => void,
|
|
18776
|
-
options?: PlayerBreakingBlockEventOptions,
|
|
18777
|
-
): (arg0: PlayerCancelBreakingBlockAfterEvent) => void;
|
|
18778
|
-
/**
|
|
18779
|
-
* @remarks
|
|
18780
|
-
* Removes a callback from being called when a player cancels
|
|
18781
|
-
* breaking a block.
|
|
18782
|
-
*
|
|
18783
|
-
* This function can't be called in restricted-execution mode.
|
|
18784
|
-
*
|
|
18785
|
-
* This function can be called in early-execution mode.
|
|
18786
|
-
*
|
|
18787
|
-
*/
|
|
18788
|
-
unsubscribe(callback: (arg0: PlayerCancelBreakingBlockAfterEvent) => void): void;
|
|
18789
|
-
}
|
|
18790
|
-
|
|
18791
17244
|
/**
|
|
18792
17245
|
* Represents the players cursor inventory. Used when moving
|
|
18793
17246
|
* items between between containers in the inventory UI. Not
|
|
@@ -19839,88 +18292,6 @@ export class PlayerPlaceBlockAfterEventSignal {
|
|
|
19839
18292
|
unsubscribe(callback: (arg0: PlayerPlaceBlockAfterEvent) => void): void;
|
|
19840
18293
|
}
|
|
19841
18294
|
|
|
19842
|
-
/**
|
|
19843
|
-
* @beta
|
|
19844
|
-
* Contains information regarding an event before a player
|
|
19845
|
-
* places a block.
|
|
19846
|
-
*/
|
|
19847
|
-
// @ts-ignore Class inheritance allowed for native defined classes
|
|
19848
|
-
export class PlayerPlaceBlockBeforeEvent extends BlockEvent {
|
|
19849
|
-
private constructor();
|
|
19850
|
-
/**
|
|
19851
|
-
* @remarks
|
|
19852
|
-
* If set to true, cancels the block place event.
|
|
19853
|
-
*
|
|
19854
|
-
*/
|
|
19855
|
-
cancel: boolean;
|
|
19856
|
-
/**
|
|
19857
|
-
* @remarks
|
|
19858
|
-
* The face of the block that the new block is being placed on.
|
|
19859
|
-
*
|
|
19860
|
-
*/
|
|
19861
|
-
readonly face: Direction;
|
|
19862
|
-
/**
|
|
19863
|
-
* @remarks
|
|
19864
|
-
* Location relative to the bottom north-west corner of the
|
|
19865
|
-
* block where the new block is being placed onto.
|
|
19866
|
-
*
|
|
19867
|
-
*/
|
|
19868
|
-
readonly faceLocation: Vector3;
|
|
19869
|
-
/**
|
|
19870
|
-
* @remarks
|
|
19871
|
-
* The block permutation that will be placed if the event is
|
|
19872
|
-
* not cancelled.
|
|
19873
|
-
*
|
|
19874
|
-
*/
|
|
19875
|
-
readonly permutationToPlace: BlockPermutation;
|
|
19876
|
-
/**
|
|
19877
|
-
* @remarks
|
|
19878
|
-
* Player that is placing the block for this event.
|
|
19879
|
-
*
|
|
19880
|
-
*/
|
|
19881
|
-
readonly player: Player;
|
|
19882
|
-
}
|
|
19883
|
-
|
|
19884
|
-
/**
|
|
19885
|
-
* @beta
|
|
19886
|
-
* Manages callbacks that are connected to before a block is
|
|
19887
|
-
* placed by a player.
|
|
19888
|
-
*/
|
|
19889
|
-
export class PlayerPlaceBlockBeforeEventSignal {
|
|
19890
|
-
private constructor();
|
|
19891
|
-
/**
|
|
19892
|
-
* @remarks
|
|
19893
|
-
* Adds a callback that will be called before a block is placed
|
|
19894
|
-
* by a player.
|
|
19895
|
-
*
|
|
19896
|
-
* This function can't be called in restricted-execution mode.
|
|
19897
|
-
*
|
|
19898
|
-
* This function can be called in early-execution mode.
|
|
19899
|
-
*
|
|
19900
|
-
* @param callback
|
|
19901
|
-
* This closure is called with restricted-execution privilege.
|
|
19902
|
-
* @returns
|
|
19903
|
-
* Closure that is called with restricted-execution privilege.
|
|
19904
|
-
*/
|
|
19905
|
-
subscribe(
|
|
19906
|
-
callback: (arg0: PlayerPlaceBlockBeforeEvent) => void,
|
|
19907
|
-
options?: BlockEventOptions,
|
|
19908
|
-
): (arg0: PlayerPlaceBlockBeforeEvent) => void;
|
|
19909
|
-
/**
|
|
19910
|
-
* @remarks
|
|
19911
|
-
* Removes a callback from being called before an block is
|
|
19912
|
-
* placed by a player.
|
|
19913
|
-
*
|
|
19914
|
-
* This function can't be called in restricted-execution mode.
|
|
19915
|
-
*
|
|
19916
|
-
* This function can be called in early-execution mode.
|
|
19917
|
-
*
|
|
19918
|
-
* @param callback
|
|
19919
|
-
* This closure is called with restricted-execution privilege.
|
|
19920
|
-
*/
|
|
19921
|
-
unsubscribe(callback: (arg0: PlayerPlaceBlockBeforeEvent) => void): void;
|
|
19922
|
-
}
|
|
19923
|
-
|
|
19924
18295
|
/**
|
|
19925
18296
|
* An event that contains more information about a player
|
|
19926
18297
|
* spawning.
|
|
@@ -19975,76 +18346,6 @@ export class PlayerSpawnAfterEventSignal {
|
|
|
19975
18346
|
unsubscribe(callback: (arg0: PlayerSpawnAfterEvent) => void): void;
|
|
19976
18347
|
}
|
|
19977
18348
|
|
|
19978
|
-
/**
|
|
19979
|
-
* @beta
|
|
19980
|
-
* Contains information regarding an event after a player
|
|
19981
|
-
* starts breaking a block.
|
|
19982
|
-
*/
|
|
19983
|
-
// @ts-ignore Class inheritance allowed for native defined classes
|
|
19984
|
-
export class PlayerStartBreakingBlockAfterEvent extends BlockEvent {
|
|
19985
|
-
private constructor();
|
|
19986
|
-
/**
|
|
19987
|
-
* @remarks
|
|
19988
|
-
* The permutation of the block that the player is starting to
|
|
19989
|
-
* break.
|
|
19990
|
-
*
|
|
19991
|
-
*/
|
|
19992
|
-
readonly blockPermutation: BlockPermutation;
|
|
19993
|
-
/**
|
|
19994
|
-
* @remarks
|
|
19995
|
-
* The face of the block being broken.
|
|
19996
|
-
*
|
|
19997
|
-
*/
|
|
19998
|
-
readonly face: Direction;
|
|
19999
|
-
/**
|
|
20000
|
-
* @remarks
|
|
20001
|
-
* The item stack that the player is using to break the block,
|
|
20002
|
-
* or undefined if empty hand.
|
|
20003
|
-
*
|
|
20004
|
-
*/
|
|
20005
|
-
readonly heldItemStack?: ItemStack;
|
|
20006
|
-
/**
|
|
20007
|
-
* @remarks
|
|
20008
|
-
* Player that started breaking the block for this event.
|
|
20009
|
-
*
|
|
20010
|
-
*/
|
|
20011
|
-
readonly player: Player;
|
|
20012
|
-
}
|
|
20013
|
-
|
|
20014
|
-
/**
|
|
20015
|
-
* @beta
|
|
20016
|
-
* Manages callbacks that are connected to when a player starts
|
|
20017
|
-
* breaking a block.
|
|
20018
|
-
*/
|
|
20019
|
-
export class PlayerStartBreakingBlockAfterEventSignal {
|
|
20020
|
-
private constructor();
|
|
20021
|
-
/**
|
|
20022
|
-
* @remarks
|
|
20023
|
-
* Adds a callback that will be called when a player starts
|
|
20024
|
-
* breaking a block.
|
|
20025
|
-
*
|
|
20026
|
-
* This function can't be called in restricted-execution mode.
|
|
20027
|
-
*
|
|
20028
|
-
* This function can be called in early-execution mode.
|
|
20029
|
-
*
|
|
20030
|
-
*/
|
|
20031
|
-
subscribe(
|
|
20032
|
-
callback: (arg0: PlayerStartBreakingBlockAfterEvent) => void,
|
|
20033
|
-
options?: PlayerBreakingBlockEventOptions,
|
|
20034
|
-
): (arg0: PlayerStartBreakingBlockAfterEvent) => void;
|
|
20035
|
-
/**
|
|
20036
|
-
* @remarks
|
|
20037
|
-
* Removes a callback from being called when a player starts
|
|
20038
|
-
* breaking a block.
|
|
20039
|
-
*
|
|
20040
|
-
* This function can't be called in restricted-execution mode.
|
|
20041
|
-
*
|
|
20042
|
-
* This function can be called in early-execution mode.
|
|
20043
|
-
*
|
|
20044
|
-
*/
|
|
20045
|
-
unsubscribe(callback: (arg0: PlayerStartBreakingBlockAfterEvent) => void): void;
|
|
20046
|
-
}
|
|
20047
|
-
|
|
20048
18349
|
/**
|
|
20049
18350
|
* Contains information regarding a player starting to swing
|
|
20050
18351
|
* their arm.
|
|
@@ -20060,127 +18361,53 @@ export class PlayerSwingStartAfterEvent {
|
|
|
20060
18361
|
readonly heldItemStack?: ItemStack;
|
|
20061
18362
|
/**
|
|
20062
18363
|
* @remarks
|
|
20063
|
-
* Source Player for this event.
|
|
20064
|
-
*
|
|
20065
|
-
*/
|
|
20066
|
-
readonly player: Player;
|
|
20067
|
-
/**
|
|
20068
|
-
* @remarks
|
|
20069
|
-
* The source of the Player swing, see {@link
|
|
20070
|
-
* EntitySwingSource}.
|
|
20071
|
-
*
|
|
20072
|
-
*/
|
|
20073
|
-
readonly swingSource: EntitySwingSource;
|
|
20074
|
-
}
|
|
20075
|
-
|
|
20076
|
-
/**
|
|
20077
|
-
* Manages callbacks that are connected to when a player starts
|
|
20078
|
-
* to swing their arm (e.g. attacking, using an item,
|
|
20079
|
-
* interacting).
|
|
20080
|
-
*/
|
|
20081
|
-
export class PlayerSwingStartAfterEventSignal {
|
|
20082
|
-
private constructor();
|
|
20083
|
-
/**
|
|
20084
|
-
* @remarks
|
|
20085
|
-
* Adds a callback that will be called when a player starts to
|
|
20086
|
-
* swing their arm (e.g. attacking, using an item,
|
|
20087
|
-
* interacting).
|
|
20088
|
-
*
|
|
20089
|
-
* This function can't be called in restricted-execution mode.
|
|
20090
|
-
*
|
|
20091
|
-
* This function can be called in early-execution mode.
|
|
20092
|
-
*
|
|
20093
|
-
*/
|
|
20094
|
-
subscribe(
|
|
20095
|
-
callback: (arg0: PlayerSwingStartAfterEvent) => void,
|
|
20096
|
-
options?: PlayerSwingEventOptions,
|
|
20097
|
-
): (arg0: PlayerSwingStartAfterEvent) => void;
|
|
20098
|
-
/**
|
|
20099
|
-
* @remarks
|
|
20100
|
-
* Removes a callback from being called when a player starts to
|
|
20101
|
-
* swing their arm (e.g. attacking, using an item,
|
|
20102
|
-
* interacting).
|
|
20103
|
-
*
|
|
20104
|
-
* This function can't be called in restricted-execution mode.
|
|
20105
|
-
*
|
|
20106
|
-
* This function can be called in early-execution mode.
|
|
20107
|
-
*
|
|
20108
|
-
*/
|
|
20109
|
-
unsubscribe(callback: (arg0: PlayerSwingStartAfterEvent) => void): void;
|
|
20110
|
-
}
|
|
20111
|
-
|
|
20112
|
-
/**
|
|
20113
|
-
* @beta
|
|
20114
|
-
* Contains information related to when a player successfully
|
|
20115
|
-
* names an Entity with a named Name Tag item.
|
|
20116
|
-
*/
|
|
20117
|
-
export class PlayerUseNameTagAfterEvent {
|
|
20118
|
-
private constructor();
|
|
20119
|
-
/**
|
|
20120
|
-
* @remarks
|
|
20121
|
-
* The entity that was named by the player.
|
|
20122
|
-
*
|
|
20123
|
-
* This property can't be edited in restricted-execution mode.
|
|
20124
|
-
*
|
|
20125
|
-
*/
|
|
20126
|
-
entityNamed: Entity;
|
|
20127
|
-
/**
|
|
20128
|
-
* @remarks
|
|
20129
|
-
* The new name that the player has given to the entity.
|
|
20130
|
-
*
|
|
20131
|
-
* This property can't be edited in restricted-execution mode.
|
|
20132
|
-
*
|
|
20133
|
-
*/
|
|
20134
|
-
newName: string;
|
|
20135
|
-
/**
|
|
20136
|
-
* @remarks
|
|
20137
|
-
* Handle to the player that used the name tag.
|
|
20138
|
-
*
|
|
20139
|
-
* This property can't be edited in restricted-execution mode.
|
|
18364
|
+
* Source Player for this event.
|
|
20140
18365
|
*
|
|
20141
18366
|
*/
|
|
20142
|
-
player: Player;
|
|
18367
|
+
readonly player: Player;
|
|
20143
18368
|
/**
|
|
20144
18369
|
* @remarks
|
|
20145
|
-
* The
|
|
20146
|
-
*
|
|
20147
|
-
* previously named.
|
|
20148
|
-
*
|
|
20149
|
-
* This property can't be edited in restricted-execution mode.
|
|
18370
|
+
* The source of the Player swing, see {@link
|
|
18371
|
+
* EntitySwingSource}.
|
|
20150
18372
|
*
|
|
20151
18373
|
*/
|
|
20152
|
-
|
|
18374
|
+
readonly swingSource: EntitySwingSource;
|
|
20153
18375
|
}
|
|
20154
18376
|
|
|
20155
18377
|
/**
|
|
20156
|
-
*
|
|
20157
|
-
*
|
|
20158
|
-
*
|
|
18378
|
+
* Manages callbacks that are connected to when a player starts
|
|
18379
|
+
* to swing their arm (e.g. attacking, using an item,
|
|
18380
|
+
* interacting).
|
|
20159
18381
|
*/
|
|
20160
|
-
export class
|
|
18382
|
+
export class PlayerSwingStartAfterEventSignal {
|
|
20161
18383
|
private constructor();
|
|
20162
18384
|
/**
|
|
20163
18385
|
* @remarks
|
|
20164
|
-
*
|
|
20165
|
-
*
|
|
18386
|
+
* Adds a callback that will be called when a player starts to
|
|
18387
|
+
* swing their arm (e.g. attacking, using an item,
|
|
18388
|
+
* interacting).
|
|
20166
18389
|
*
|
|
20167
18390
|
* This function can't be called in restricted-execution mode.
|
|
20168
18391
|
*
|
|
20169
18392
|
* This function can be called in early-execution mode.
|
|
20170
18393
|
*
|
|
20171
18394
|
*/
|
|
20172
|
-
subscribe(
|
|
18395
|
+
subscribe(
|
|
18396
|
+
callback: (arg0: PlayerSwingStartAfterEvent) => void,
|
|
18397
|
+
options?: PlayerSwingEventOptions,
|
|
18398
|
+
): (arg0: PlayerSwingStartAfterEvent) => void;
|
|
20173
18399
|
/**
|
|
20174
18400
|
* @remarks
|
|
20175
|
-
* Removes
|
|
20176
|
-
*
|
|
18401
|
+
* Removes a callback from being called when a player starts to
|
|
18402
|
+
* swing their arm (e.g. attacking, using an item,
|
|
18403
|
+
* interacting).
|
|
20177
18404
|
*
|
|
20178
18405
|
* This function can't be called in restricted-execution mode.
|
|
20179
18406
|
*
|
|
20180
18407
|
* This function can be called in early-execution mode.
|
|
20181
18408
|
*
|
|
20182
18409
|
*/
|
|
20183
|
-
unsubscribe(callback: (arg0:
|
|
18410
|
+
unsubscribe(callback: (arg0: PlayerSwingStartAfterEvent) => void): void;
|
|
20184
18411
|
}
|
|
20185
18412
|
|
|
20186
18413
|
/**
|
|
@@ -20299,10 +18526,10 @@ export class Potions {
|
|
|
20299
18526
|
*
|
|
20300
18527
|
* {@link InvalidPotionEffectTypeError}
|
|
20301
18528
|
*/
|
|
20302
|
-
static resolve
|
|
20303
|
-
|
|
20304
|
-
|
|
20305
|
-
|
|
18529
|
+
static resolve(
|
|
18530
|
+
potionEffectType: PotionEffectType | string,
|
|
18531
|
+
potionDeliveryType: PotionDeliveryType | string,
|
|
18532
|
+
): ItemStack;
|
|
20306
18533
|
}
|
|
20307
18534
|
|
|
20308
18535
|
/**
|
|
@@ -21511,38 +19738,6 @@ export class Seat {
|
|
|
21511
19738
|
readonly seatRotation: number;
|
|
21512
19739
|
}
|
|
21513
19740
|
|
|
21514
|
-
/**
|
|
21515
|
-
* @beta
|
|
21516
|
-
* Manages callbacks that are message passing to a server. This
|
|
21517
|
-
* event is not currently fully implemented, and should not be
|
|
21518
|
-
* used.
|
|
21519
|
-
*/
|
|
21520
|
-
export class ServerMessageAfterEventSignal {
|
|
21521
|
-
private constructor();
|
|
21522
|
-
/**
|
|
21523
|
-
* @remarks
|
|
21524
|
-
* Adds a callback that will be called when an internal message
|
|
21525
|
-
* is passed.
|
|
21526
|
-
*
|
|
21527
|
-
* This function can't be called in restricted-execution mode.
|
|
21528
|
-
*
|
|
21529
|
-
* This function can be called in early-execution mode.
|
|
21530
|
-
*
|
|
21531
|
-
*/
|
|
21532
|
-
subscribe(callback: (arg0: MessageReceiveAfterEvent) => void): (arg0: MessageReceiveAfterEvent) => void;
|
|
21533
|
-
/**
|
|
21534
|
-
* @remarks
|
|
21535
|
-
* Removes a callback from being called when an internal
|
|
21536
|
-
* message is passed.
|
|
21537
|
-
*
|
|
21538
|
-
* This function can't be called in restricted-execution mode.
|
|
21539
|
-
*
|
|
21540
|
-
* This function can be called in early-execution mode.
|
|
21541
|
-
*
|
|
21542
|
-
*/
|
|
21543
|
-
unsubscribe(callback: (arg0: MessageReceiveAfterEvent) => void): void;
|
|
21544
|
-
}
|
|
21545
|
-
|
|
21546
19741
|
/**
|
|
21547
19742
|
* Loot item function that modifies the trim on a dropped armor
|
|
21548
19743
|
* item.
|
|
@@ -21571,21 +19766,6 @@ export class SetArmorTrimFunction extends LootItemFunction {
|
|
|
21571
19766
|
// @ts-ignore Class inheritance allowed for native defined classes
|
|
21572
19767
|
export class SetBannerDetailsFunction extends LootItemFunction {
|
|
21573
19768
|
private constructor();
|
|
21574
|
-
/**
|
|
21575
|
-
* @beta
|
|
21576
|
-
* @remarks
|
|
21577
|
-
* The base color for the dropped banner.
|
|
21578
|
-
*
|
|
21579
|
-
*/
|
|
21580
|
-
readonly baseColor: string;
|
|
21581
|
-
/**
|
|
21582
|
-
* @beta
|
|
21583
|
-
* @remarks
|
|
21584
|
-
* An array of {@link BannerPattern} objects used to decorate
|
|
21585
|
-
* the banner, including color and pattern type.
|
|
21586
|
-
*
|
|
21587
|
-
*/
|
|
21588
|
-
readonly patterns: BannerPattern[];
|
|
21589
19769
|
/**
|
|
21590
19770
|
* @remarks
|
|
21591
19771
|
* The type of banner to drop.
|
|
@@ -21831,14 +20011,20 @@ export class SmeltItemFunction extends LootItemFunction {
|
|
|
21831
20011
|
}
|
|
21832
20012
|
|
|
21833
20013
|
/**
|
|
21834
|
-
*
|
|
21835
|
-
*
|
|
20014
|
+
* Represents a handle to a sound that has been played. The
|
|
20015
|
+
* handle is required to control the sound while it is playing
|
|
20016
|
+
* (for example, to call `stop`, `setVolume`, `setPitch`,
|
|
20017
|
+
* `fade`, or `seekTo`). Infinitely-looping sounds (started
|
|
20018
|
+
* with `loop: -1`) stop automatically when the last
|
|
20019
|
+
* `SoundInstance` reference is dropped; retain the handle for
|
|
20020
|
+
* as long as the sound should keep playing.
|
|
21836
20021
|
*/
|
|
21837
20022
|
export class SoundInstance {
|
|
21838
20023
|
private constructor();
|
|
21839
20024
|
/**
|
|
20025
|
+
* @rc
|
|
21840
20026
|
* @remarks
|
|
21841
|
-
* Stops this sound from playing.
|
|
20027
|
+
* Stops this sound instance from playing.
|
|
21842
20028
|
*
|
|
21843
20029
|
* This function can't be called in restricted-execution mode.
|
|
21844
20030
|
*
|
|
@@ -22561,19 +20747,6 @@ export class SystemBeforeEvents {
|
|
|
22561
20747
|
*
|
|
22562
20748
|
*/
|
|
22563
20749
|
readonly startup: StartupBeforeEventSignal;
|
|
22564
|
-
/**
|
|
22565
|
-
* @beta
|
|
22566
|
-
* @remarks
|
|
22567
|
-
* Fires when the scripting watchdog shuts down the server. The
|
|
22568
|
-
* can be due to using too much memory, or by causing
|
|
22569
|
-
* significant slowdown or hang.
|
|
22570
|
-
* To prevent shutdown, set the event's cancel property to
|
|
22571
|
-
* true.
|
|
22572
|
-
*
|
|
22573
|
-
* This property can be read in early-execution mode.
|
|
22574
|
-
*
|
|
22575
|
-
*/
|
|
22576
|
-
readonly watchdogTerminate: WatchdogTerminateBeforeEventSignal;
|
|
22577
20750
|
}
|
|
22578
20751
|
|
|
22579
20752
|
/**
|
|
@@ -22960,71 +21133,6 @@ export class TripWireTripAfterEventSignal {
|
|
|
22960
21133
|
unsubscribe(callback: (arg0: TripWireTripAfterEvent) => void): void;
|
|
22961
21134
|
}
|
|
22962
21135
|
|
|
22963
|
-
/**
|
|
22964
|
-
* @beta
|
|
22965
|
-
* Contains information related to a script watchdog
|
|
22966
|
-
* termination.
|
|
22967
|
-
*/
|
|
22968
|
-
export class WatchdogTerminateBeforeEvent {
|
|
22969
|
-
private constructor();
|
|
22970
|
-
/**
|
|
22971
|
-
* @remarks
|
|
22972
|
-
* If set to true, cancels the termination of the script
|
|
22973
|
-
* runtime. Note that depending on server configuration
|
|
22974
|
-
* settings, cancellation of the termination may not be
|
|
22975
|
-
* allowed.
|
|
22976
|
-
*
|
|
22977
|
-
*/
|
|
22978
|
-
cancel: boolean;
|
|
22979
|
-
/**
|
|
22980
|
-
* @remarks
|
|
22981
|
-
* Contains the reason why a script runtime is to be
|
|
22982
|
-
* terminated.
|
|
22983
|
-
*
|
|
22984
|
-
*/
|
|
22985
|
-
readonly terminateReason: WatchdogTerminateReason;
|
|
22986
|
-
}
|
|
22987
|
-
|
|
22988
|
-
/**
|
|
22989
|
-
* @beta
|
|
22990
|
-
* Manages callbacks that are connected to a callback that will
|
|
22991
|
-
* be called when a script runtime is being terminated due to a
|
|
22992
|
-
* violation of the performance watchdog system.
|
|
22993
|
-
*/
|
|
22994
|
-
export class WatchdogTerminateBeforeEventSignal {
|
|
22995
|
-
private constructor();
|
|
22996
|
-
/**
|
|
22997
|
-
* @remarks
|
|
22998
|
-
* Adds a callback that will be called when a script runtime is
|
|
22999
|
-
* being terminated due to a violation of the performance
|
|
23000
|
-
* watchdog system.
|
|
23001
|
-
*
|
|
23002
|
-
* This function can't be called in restricted-execution mode.
|
|
23003
|
-
*
|
|
23004
|
-
* This function can be called in early-execution mode.
|
|
23005
|
-
*
|
|
23006
|
-
* @param callback
|
|
23007
|
-
* This closure is called with restricted-execution privilege.
|
|
23008
|
-
* @returns
|
|
23009
|
-
* Closure that is called with restricted-execution privilege.
|
|
23010
|
-
*/
|
|
23011
|
-
subscribe(callback: (arg0: WatchdogTerminateBeforeEvent) => void): (arg0: WatchdogTerminateBeforeEvent) => void;
|
|
23012
|
-
/**
|
|
23013
|
-
* @remarks
|
|
23014
|
-
* Removes a callback from being called when a script runtime
|
|
23015
|
-
* is being terminated due to a violation of the performance
|
|
23016
|
-
* watchdog system.
|
|
23017
|
-
*
|
|
23018
|
-
* This function can't be called in restricted-execution mode.
|
|
23019
|
-
*
|
|
23020
|
-
* This function can be called in early-execution mode.
|
|
23021
|
-
*
|
|
23022
|
-
* @param callback
|
|
23023
|
-
* This closure is called with restricted-execution privilege.
|
|
23024
|
-
*/
|
|
23025
|
-
unsubscribe(callback: (arg0: WatchdogTerminateBeforeEvent) => void): void;
|
|
23026
|
-
}
|
|
23027
|
-
|
|
23028
21136
|
/**
|
|
23029
21137
|
* @rc
|
|
23030
21138
|
* Base class for waypoints displayed on the player's locator
|
|
@@ -23241,15 +21349,6 @@ export class World {
|
|
|
23241
21349
|
*
|
|
23242
21350
|
*/
|
|
23243
21351
|
readonly afterEvents: WorldAfterEvents;
|
|
23244
|
-
/**
|
|
23245
|
-
* @beta
|
|
23246
|
-
* @remarks
|
|
23247
|
-
* Enables or disables cheats.
|
|
23248
|
-
*
|
|
23249
|
-
* This property can't be edited in restricted-execution mode.
|
|
23250
|
-
*
|
|
23251
|
-
*/
|
|
23252
|
-
allowCheats: boolean;
|
|
23253
21352
|
/**
|
|
23254
21353
|
* @remarks
|
|
23255
21354
|
* Contains a set of events that are applicable to the entirety
|
|
@@ -23328,20 +21427,6 @@ export class World {
|
|
|
23328
21427
|
*
|
|
23329
21428
|
*/
|
|
23330
21429
|
readonly tickingAreaManager: TickingAreaManager;
|
|
23331
|
-
/**
|
|
23332
|
-
* @beta
|
|
23333
|
-
* @remarks
|
|
23334
|
-
* A method that is internal-only, used for broadcasting
|
|
23335
|
-
* specific messages between client and server.
|
|
23336
|
-
*
|
|
23337
|
-
* This function can't be called in restricted-execution mode.
|
|
23338
|
-
*
|
|
23339
|
-
* @param id
|
|
23340
|
-
* The message identifier.
|
|
23341
|
-
* @param value
|
|
23342
|
-
* The message.
|
|
23343
|
-
*/
|
|
23344
|
-
broadcastClientMessage(id: string, value: string): void;
|
|
23345
21430
|
/**
|
|
23346
21431
|
* @remarks
|
|
23347
21432
|
* Clears the set of dynamic properties declared for this
|
|
@@ -23834,16 +21919,6 @@ export class WorldAfterEvents {
|
|
|
23834
21919
|
*
|
|
23835
21920
|
*/
|
|
23836
21921
|
readonly buttonPush: ButtonPushAfterEventSignal;
|
|
23837
|
-
/**
|
|
23838
|
-
* @beta
|
|
23839
|
-
* @remarks
|
|
23840
|
-
* This event is triggered after a chat message has been
|
|
23841
|
-
* broadcast or sent to players.
|
|
23842
|
-
*
|
|
23843
|
-
* This property can be read in early-execution mode.
|
|
23844
|
-
*
|
|
23845
|
-
*/
|
|
23846
|
-
readonly chatSend: ChatSendAfterEventSignal;
|
|
23847
21922
|
/**
|
|
23848
21923
|
* @remarks
|
|
23849
21924
|
* This event is fired when an entity event has been triggered
|
|
@@ -23970,15 +22045,6 @@ export class WorldAfterEvents {
|
|
|
23970
22045
|
*
|
|
23971
22046
|
*/
|
|
23972
22047
|
readonly entitySpawn: EntitySpawnAfterEventSignal;
|
|
23973
|
-
/**
|
|
23974
|
-
* @beta
|
|
23975
|
-
* @remarks
|
|
23976
|
-
* This event fires when an entity starts sneaking.
|
|
23977
|
-
*
|
|
23978
|
-
* This property can be read in early-execution mode.
|
|
23979
|
-
*
|
|
23980
|
-
*/
|
|
23981
|
-
readonly entityStartSneaking: EntityStartSneakingAfterEventSignal;
|
|
23982
22048
|
/**
|
|
23983
22049
|
* @rc
|
|
23984
22050
|
* @remarks
|
|
@@ -24075,25 +22141,6 @@ export class WorldAfterEvents {
|
|
|
24075
22141
|
*
|
|
24076
22142
|
*/
|
|
24077
22143
|
readonly leverAction: LeverActionAfterEventSignal;
|
|
24078
|
-
/**
|
|
24079
|
-
* @beta
|
|
24080
|
-
* @remarks
|
|
24081
|
-
* This event is an internal implementation detail, and is
|
|
24082
|
-
* otherwise not currently functional.
|
|
24083
|
-
*
|
|
24084
|
-
* This property can be read in early-execution mode.
|
|
24085
|
-
*
|
|
24086
|
-
*/
|
|
24087
|
-
readonly messageReceive: ServerMessageAfterEventSignal;
|
|
24088
|
-
/**
|
|
24089
|
-
* @beta
|
|
24090
|
-
* @remarks
|
|
24091
|
-
* This event is triggered when a pack setting is changed.
|
|
24092
|
-
*
|
|
24093
|
-
* This property can be read in early-execution mode.
|
|
24094
|
-
*
|
|
24095
|
-
*/
|
|
24096
|
-
readonly packSettingChange: PackSettingChangeAfterEventSignal;
|
|
24097
22144
|
/**
|
|
24098
22145
|
* @remarks
|
|
24099
22146
|
* This event fires when a piston expands or retracts.
|
|
@@ -24119,15 +22166,6 @@ export class WorldAfterEvents {
|
|
|
24119
22166
|
*
|
|
24120
22167
|
*/
|
|
24121
22168
|
readonly playerButtonInput: PlayerButtonInputAfterEventSignal;
|
|
24122
|
-
/**
|
|
24123
|
-
* @beta
|
|
24124
|
-
* @remarks
|
|
24125
|
-
* This event fires when a player cancels breaking a block.
|
|
24126
|
-
*
|
|
24127
|
-
* This property can be read in early-execution mode.
|
|
24128
|
-
*
|
|
24129
|
-
*/
|
|
24130
|
-
readonly playerCancelBreakingBlock: PlayerCancelBreakingBlockAfterEventSignal;
|
|
24131
22169
|
/**
|
|
24132
22170
|
* @remarks
|
|
24133
22171
|
* Fires when a player moved to a different dimension.
|
|
@@ -24233,31 +22271,12 @@ export class WorldAfterEvents {
|
|
|
24233
22271
|
*
|
|
24234
22272
|
*/
|
|
24235
22273
|
readonly playerSpawn: PlayerSpawnAfterEventSignal;
|
|
24236
|
-
/**
|
|
24237
|
-
* @beta
|
|
24238
|
-
* @remarks
|
|
24239
|
-
* This event fires when a player starts breaking a block.
|
|
24240
|
-
*
|
|
24241
|
-
* This property can be read in early-execution mode.
|
|
24242
|
-
*
|
|
24243
|
-
*/
|
|
24244
|
-
readonly playerStartBreakingBlock: PlayerStartBreakingBlockAfterEventSignal;
|
|
24245
22274
|
/**
|
|
24246
22275
|
* @remarks
|
|
24247
22276
|
* This property can be read in early-execution mode.
|
|
24248
22277
|
*
|
|
24249
22278
|
*/
|
|
24250
22279
|
readonly playerSwingStart: PlayerSwingStartAfterEventSignal;
|
|
24251
|
-
/**
|
|
24252
|
-
* @beta
|
|
24253
|
-
* @remarks
|
|
24254
|
-
* An event for when a player uses a named name tag on an
|
|
24255
|
-
* entity.
|
|
24256
|
-
*
|
|
24257
|
-
* This property can be read in early-execution mode.
|
|
24258
|
-
*
|
|
24259
|
-
*/
|
|
24260
|
-
readonly playerUseNameTag: PlayerUseNameTagAfterEventSignal;
|
|
24261
22280
|
/**
|
|
24262
22281
|
* @remarks
|
|
24263
22282
|
* A pressure plate has popped back up (i.e., there are no
|
|
@@ -24334,43 +22353,6 @@ export class WorldAfterEvents {
|
|
|
24334
22353
|
*/
|
|
24335
22354
|
export class WorldBeforeEvents {
|
|
24336
22355
|
private constructor();
|
|
24337
|
-
/**
|
|
24338
|
-
* @beta
|
|
24339
|
-
* @remarks
|
|
24340
|
-
* This event is triggered after a chat message has been
|
|
24341
|
-
* broadcast or sent to players.
|
|
24342
|
-
*
|
|
24343
|
-
* This property can be read in early-execution mode.
|
|
24344
|
-
*
|
|
24345
|
-
* @example customCommand.ts
|
|
24346
|
-
* ```typescript
|
|
24347
|
-
* import { world, DimensionLocation } from '@minecraft/server';
|
|
24348
|
-
*
|
|
24349
|
-
* function customCommand(targetLocation: DimensionLocation) {
|
|
24350
|
-
* const chatCallback = world.beforeEvents.chatSend.subscribe(eventData => {
|
|
24351
|
-
* if (eventData.message.includes('cancel')) {
|
|
24352
|
-
* // Cancel event if the message contains "cancel"
|
|
24353
|
-
* eventData.cancel = true;
|
|
24354
|
-
* } else {
|
|
24355
|
-
* const args = eventData.message.split(' ');
|
|
24356
|
-
*
|
|
24357
|
-
* if (args.length > 0) {
|
|
24358
|
-
* switch (args[0].toLowerCase()) {
|
|
24359
|
-
* case 'echo':
|
|
24360
|
-
* // Send a modified version of chat message
|
|
24361
|
-
* world.sendMessage(`Echo '${eventData.message.substring(4).trim()}'`);
|
|
24362
|
-
* break;
|
|
24363
|
-
* case 'help':
|
|
24364
|
-
* world.sendMessage(`Available commands: echo <message>`);
|
|
24365
|
-
* break;
|
|
24366
|
-
* }
|
|
24367
|
-
* }
|
|
24368
|
-
* }
|
|
24369
|
-
* });
|
|
24370
|
-
* }
|
|
24371
|
-
* ```
|
|
24372
|
-
*/
|
|
24373
|
-
readonly chatSend: ChatSendBeforeEventSignal;
|
|
24374
22356
|
/**
|
|
24375
22357
|
* @remarks
|
|
24376
22358
|
* This event is triggered after an event has been added to an
|
|
@@ -24464,15 +22446,6 @@ export class WorldBeforeEvents {
|
|
|
24464
22446
|
*
|
|
24465
22447
|
*/
|
|
24466
22448
|
readonly playerLeave: PlayerLeaveBeforeEventSignal;
|
|
24467
|
-
/**
|
|
24468
|
-
* @beta
|
|
24469
|
-
* @remarks
|
|
24470
|
-
* This event fires before a block is placed by a player.
|
|
24471
|
-
*
|
|
24472
|
-
* This property can be read in early-execution mode.
|
|
24473
|
-
*
|
|
24474
|
-
*/
|
|
24475
|
-
readonly playerPlaceBlock: PlayerPlaceBlockBeforeEventSignal;
|
|
24476
22449
|
/**
|
|
24477
22450
|
* @remarks
|
|
24478
22451
|
* This property can be read in early-execution mode.
|
|
@@ -24550,27 +22523,13 @@ export interface BiomeFilter {
|
|
|
24550
22523
|
includeTags?: string[];
|
|
24551
22524
|
}
|
|
24552
22525
|
|
|
24553
|
-
/**
|
|
24554
|
-
* @beta
|
|
24555
|
-
* Contains additional options for searches for the
|
|
24556
|
-
* dimension.findNearestBiome API.
|
|
24557
|
-
*/
|
|
24558
|
-
export interface BiomeSearchOptions {
|
|
24559
|
-
/**
|
|
24560
|
-
* @remarks
|
|
24561
|
-
* Bounding volume size to look within.
|
|
24562
|
-
*
|
|
24563
|
-
*/
|
|
24564
|
-
boundingSize?: Vector3;
|
|
24565
|
-
}
|
|
24566
|
-
|
|
24567
22526
|
/**
|
|
24568
22527
|
* A BlockBoundingBox is an interface to an object which
|
|
24569
22528
|
* represents an AABB aligned rectangle.
|
|
24570
22529
|
* The BlockBoundingBox assumes that it was created in a valid
|
|
24571
22530
|
* state (min <= max) but cannot guarantee it (unless it was
|
|
24572
|
-
* created using the associated {@link
|
|
24573
|
-
* utility functions.
|
|
22531
|
+
* created using the associated {@link
|
|
22532
|
+
* @minecraft/server.BlockBoundingBoxUtils} utility functions.
|
|
24574
22533
|
* The min/max coordinates represent the diametrically opposite
|
|
24575
22534
|
* corners of the rectangle.
|
|
24576
22535
|
* The BlockBoundingBox is not a representation of blocks - it
|
|
@@ -25021,40 +22980,6 @@ export interface CameraTargetOptions {
|
|
|
25021
22980
|
targetEntity: Entity;
|
|
25022
22981
|
}
|
|
25023
22982
|
|
|
25024
|
-
/**
|
|
25025
|
-
* @beta
|
|
25026
|
-
* This interface defines an entry into the {@link
|
|
25027
|
-
* CompoundBlockVolume} which represents a volume of positive
|
|
25028
|
-
* or negative space.
|
|
25029
|
-
*
|
|
25030
|
-
*/
|
|
25031
|
-
export interface CompoundBlockVolumeItem {
|
|
25032
|
-
/**
|
|
25033
|
-
* @remarks
|
|
25034
|
-
* The 'action' defines how the block volume is represented in
|
|
25035
|
-
* the compound block volume stack.
|
|
25036
|
-
* 'Add' creates a block volume which is positively selected
|
|
25037
|
-
* 'Subtract' creates a block volume which represents a hole or
|
|
25038
|
-
* negative space in the overall compound block volume.
|
|
25039
|
-
*
|
|
25040
|
-
*/
|
|
25041
|
-
action?: CompoundBlockVolumeAction;
|
|
25042
|
-
/**
|
|
25043
|
-
* @remarks
|
|
25044
|
-
* The relativity enumeration determines whether the
|
|
25045
|
-
* BlockVolume specified is positioned relative to the parent
|
|
25046
|
-
* compound block volume origin, or in absolute world space.
|
|
25047
|
-
*
|
|
25048
|
-
*/
|
|
25049
|
-
locationRelativity?: CompoundBlockVolumePositionRelativity;
|
|
25050
|
-
/**
|
|
25051
|
-
* @remarks
|
|
25052
|
-
* The volume of space
|
|
25053
|
-
*
|
|
25054
|
-
*/
|
|
25055
|
-
volume: BlockVolume;
|
|
25056
|
-
}
|
|
25057
|
-
|
|
25058
22983
|
/**
|
|
25059
22984
|
* @rc
|
|
25060
22985
|
* Represents the source of a container access.
|
|
@@ -25166,15 +23091,6 @@ export interface CustomCommand {
|
|
|
25166
23091
|
* command.
|
|
25167
23092
|
*/
|
|
25168
23093
|
export interface CustomCommandParameter {
|
|
25169
|
-
/**
|
|
25170
|
-
* @beta
|
|
25171
|
-
* @remarks
|
|
25172
|
-
* Can be used to reference the enum name when {@link
|
|
25173
|
-
* CustomCommandParamType} is 'Enum'. Allows the parameter name
|
|
25174
|
-
* to be different from the enum name.
|
|
25175
|
-
*
|
|
25176
|
-
*/
|
|
25177
|
-
enumName?: string;
|
|
25178
23094
|
/**
|
|
25179
23095
|
* @remarks
|
|
25180
23096
|
* The name of parameter as it appears on the command line.
|
|
@@ -25256,14 +23172,6 @@ export interface DefinitionModifier {
|
|
|
25256
23172
|
*
|
|
25257
23173
|
*/
|
|
25258
23174
|
removedComponentGroups: string[];
|
|
25259
|
-
/**
|
|
25260
|
-
* @beta
|
|
25261
|
-
* @remarks
|
|
25262
|
-
* The list of entity definition events that will be fired via
|
|
25263
|
-
* this update.
|
|
25264
|
-
*
|
|
25265
|
-
*/
|
|
25266
|
-
triggers: Trigger[];
|
|
25267
23175
|
}
|
|
25268
23176
|
|
|
25269
23177
|
/**
|
|
@@ -26065,15 +23973,6 @@ export interface EntityRaycastOptions extends EntityFilter {
|
|
|
26065
23973
|
maxDistance?: number;
|
|
26066
23974
|
}
|
|
26067
23975
|
|
|
26068
|
-
/**
|
|
26069
|
-
* @beta
|
|
26070
|
-
* Options used to filter entity start sneaking and stop
|
|
26071
|
-
* sneaking events.
|
|
26072
|
-
*/
|
|
26073
|
-
export interface EntitySneakingChangedEventOptions {
|
|
26074
|
-
entityFilter?: EntityFilter;
|
|
26075
|
-
}
|
|
26076
|
-
|
|
26077
23976
|
/**
|
|
26078
23977
|
* @rc
|
|
26079
23978
|
* Controls when a waypoint is visible based on the state of
|
|
@@ -26580,33 +24479,6 @@ export interface PlayerAimAssistSettings {
|
|
|
26580
24479
|
viewAngle?: Vector2;
|
|
26581
24480
|
}
|
|
26582
24481
|
|
|
26583
|
-
/**
|
|
26584
|
-
* @beta
|
|
26585
|
-
* An interface that is passed into {@link
|
|
26586
|
-
* PlayerStartBreakingBlockAfterEventSignal.subscribe} or
|
|
26587
|
-
* {@link PlayerCancelBreakingBlockAfterEventSignal.subscribe}
|
|
26588
|
-
* that filters out which events are passed to the provided
|
|
26589
|
-
* callback.
|
|
26590
|
-
*/
|
|
26591
|
-
export interface PlayerBreakingBlockEventOptions {
|
|
26592
|
-
/**
|
|
26593
|
-
* @remarks
|
|
26594
|
-
* The {@link BlockFilter} that the callback should be called
|
|
26595
|
-
* for. If undefined, the callback will be called for all
|
|
26596
|
-
* blocks.
|
|
26597
|
-
*
|
|
26598
|
-
*/
|
|
26599
|
-
blockFilter?: BlockFilter;
|
|
26600
|
-
/**
|
|
26601
|
-
* @remarks
|
|
26602
|
-
* The {@link EntityFilter} that the callback should be called
|
|
26603
|
-
* for. If undefined, the callback will be called for all
|
|
26604
|
-
* players.
|
|
26605
|
-
*
|
|
26606
|
-
*/
|
|
26607
|
-
playerFilter?: EntityFilter;
|
|
26608
|
-
}
|
|
26609
|
-
|
|
26610
24482
|
/**
|
|
26611
24483
|
* Additional options for how a sound plays for a player.
|
|
26612
24484
|
*/
|
|
@@ -27632,17 +25504,6 @@ export class EnchantmentTypeUnknownIdError extends Error {
|
|
|
27632
25504
|
private constructor();
|
|
27633
25505
|
}
|
|
27634
25506
|
|
|
27635
|
-
/**
|
|
27636
|
-
* @beta
|
|
27637
|
-
* Error thrown by {@link EntityFogComponent} operations when
|
|
27638
|
-
* the fog stack limit is exceeded or an invalid fog identifier
|
|
27639
|
-
* is provided.
|
|
27640
|
-
*/
|
|
27641
|
-
// @ts-ignore Class inheritance allowed for native defined classes
|
|
27642
|
-
export class EntityFogComponentError extends Error {
|
|
27643
|
-
private constructor();
|
|
27644
|
-
}
|
|
27645
|
-
|
|
27646
25507
|
// @ts-ignore Class inheritance allowed for native defined classes
|
|
27647
25508
|
export class EntitySpawnError extends Error {
|
|
27648
25509
|
private constructor();
|