@minecraft/server 2.10.0-beta.1.26.40-preview.31 → 2.10.0-rc.1.26.50-preview.22
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 +113 -2185
- 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.10.0
|
|
19
|
+
* "version": "2.10.0"
|
|
20
20
|
* }
|
|
21
21
|
* ```
|
|
22
22
|
*
|
|
@@ -48,12 +48,12 @@ export enum AimAssistTargetMode {
|
|
|
48
48
|
*/
|
|
49
49
|
export enum BlockComponentTypes {
|
|
50
50
|
/**
|
|
51
|
-
* @
|
|
51
|
+
* @rc
|
|
52
52
|
*/
|
|
53
53
|
DynamicProperties = 'minecraft:dynamic_properties',
|
|
54
54
|
FluidContainer = 'minecraft:fluid_container',
|
|
55
55
|
/**
|
|
56
|
-
* @
|
|
56
|
+
* @rc
|
|
57
57
|
*/
|
|
58
58
|
Instrument = 'minecraft:instrument_sound',
|
|
59
59
|
/**
|
|
@@ -202,7 +202,7 @@ export enum ButtonState {
|
|
|
202
202
|
}
|
|
203
203
|
|
|
204
204
|
/**
|
|
205
|
-
* @
|
|
205
|
+
* @rc
|
|
206
206
|
* Represents the type of shake to apply to the camera.
|
|
207
207
|
*/
|
|
208
208
|
export enum CameraShakeType {
|
|
@@ -220,34 +220,6 @@ export enum CameraShakeType {
|
|
|
220
220
|
Rotational = 'Rotational',
|
|
221
221
|
}
|
|
222
222
|
|
|
223
|
-
/**
|
|
224
|
-
* @beta
|
|
225
|
-
* An enumeration for the clone modes used when cloning blocks.
|
|
226
|
-
*/
|
|
227
|
-
export enum CloneMode {
|
|
228
|
-
/**
|
|
229
|
-
* @remarks
|
|
230
|
-
* Clones the blocks from the source region to the destination,
|
|
231
|
-
* leaving the source intact.
|
|
232
|
-
*
|
|
233
|
-
*/
|
|
234
|
-
Copy = 0,
|
|
235
|
-
/**
|
|
236
|
-
* @remarks
|
|
237
|
-
* Clones the blocks from the source region to the destination,
|
|
238
|
-
* allowing the source and destination regions to overlap.
|
|
239
|
-
*
|
|
240
|
-
*/
|
|
241
|
-
ForceCopy = 1,
|
|
242
|
-
/**
|
|
243
|
-
* @remarks
|
|
244
|
-
* Clones the blocks from the source region to the destination
|
|
245
|
-
* and replaces the source region with air.
|
|
246
|
-
*
|
|
247
|
-
*/
|
|
248
|
-
Move = 2,
|
|
249
|
-
}
|
|
250
|
-
|
|
251
223
|
/**
|
|
252
224
|
* The required permission level to execute the custom command.
|
|
253
225
|
*/
|
|
@@ -284,55 +256,6 @@ export enum CommandPermissionLevel {
|
|
|
284
256
|
Owner = 4,
|
|
285
257
|
}
|
|
286
258
|
|
|
287
|
-
/**
|
|
288
|
-
* @beta
|
|
289
|
-
* The Action enum determines how the CompoundBlockVolume
|
|
290
|
-
* considers the associated CompoundBlockVolumeItem when
|
|
291
|
-
* performing inside/outside calculations.
|
|
292
|
-
*/
|
|
293
|
-
export enum CompoundBlockVolumeAction {
|
|
294
|
-
/**
|
|
295
|
-
* @remarks
|
|
296
|
-
* The associated BlockVolume is considered a positive space,
|
|
297
|
-
* and any intersection tests are considered hits
|
|
298
|
-
*
|
|
299
|
-
*/
|
|
300
|
-
Add = 0,
|
|
301
|
-
/**
|
|
302
|
-
* @remarks
|
|
303
|
-
* The associated BlockVolume is considered a negative or void
|
|
304
|
-
* space, and any intersection tests are considered misses.
|
|
305
|
-
* Using the Subtract action, it is possible to `punch holes`
|
|
306
|
-
* in block volumes so that any intersection tests may pass
|
|
307
|
-
* through such spaces
|
|
308
|
-
*
|
|
309
|
-
*/
|
|
310
|
-
Subtract = 1,
|
|
311
|
-
}
|
|
312
|
-
|
|
313
|
-
/**
|
|
314
|
-
* @beta
|
|
315
|
-
* An enum describing the relativity of the
|
|
316
|
-
* CompoundBlockVolumeItem, relative to the parent
|
|
317
|
-
* CompoundVolume.
|
|
318
|
-
*/
|
|
319
|
-
export enum CompoundBlockVolumePositionRelativity {
|
|
320
|
-
/**
|
|
321
|
-
* @remarks
|
|
322
|
-
* The locations within the associated BlockVolume are relative
|
|
323
|
-
* to the CompoundBlockVolume to which they were added
|
|
324
|
-
*
|
|
325
|
-
*/
|
|
326
|
-
Relative = 0,
|
|
327
|
-
/**
|
|
328
|
-
* @remarks
|
|
329
|
-
* The locations within the associated BlockVolume are in
|
|
330
|
-
* absolute world space
|
|
331
|
-
*
|
|
332
|
-
*/
|
|
333
|
-
Absolute = 1,
|
|
334
|
-
}
|
|
335
|
-
|
|
336
259
|
/**
|
|
337
260
|
* Reasons that the {@link
|
|
338
261
|
* @minecraft/server.ContainerRulesError} was thrown.
|
|
@@ -435,13 +358,6 @@ export enum CustomCommandErrorReason {
|
|
|
435
358
|
*
|
|
436
359
|
*/
|
|
437
360
|
RegistryReadOnly = 'RegistryReadOnly',
|
|
438
|
-
/**
|
|
439
|
-
* @beta
|
|
440
|
-
* @remarks
|
|
441
|
-
* Non enum type command parameters cannot use enumName.
|
|
442
|
-
*
|
|
443
|
-
*/
|
|
444
|
-
UnexpectedEnumName = 'UnexpectedEnumName',
|
|
445
361
|
}
|
|
446
362
|
|
|
447
363
|
/**
|
|
@@ -1178,14 +1094,6 @@ export enum EntityComponentTypes {
|
|
|
1178
1094
|
*
|
|
1179
1095
|
*/
|
|
1180
1096
|
NavigationWalk = 'minecraft:navigation.walk',
|
|
1181
|
-
/**
|
|
1182
|
-
* @beta
|
|
1183
|
-
* @remarks
|
|
1184
|
-
* Adds NPC capabilities to an entity such as custom skin,
|
|
1185
|
-
* name, and dialogue interactions.
|
|
1186
|
-
*
|
|
1187
|
-
*/
|
|
1188
|
-
Npc = 'minecraft:npc',
|
|
1189
1097
|
/**
|
|
1190
1098
|
* @remarks
|
|
1191
1099
|
* When present on an entity, this entity is on fire.
|
|
@@ -1669,14 +1577,6 @@ export enum EntitySwingSource {
|
|
|
1669
1577
|
* and mainhand slots.
|
|
1670
1578
|
*/
|
|
1671
1579
|
export enum EquipmentSlot {
|
|
1672
|
-
/**
|
|
1673
|
-
* @beta
|
|
1674
|
-
* @remarks
|
|
1675
|
-
* The body slot. This slot is used to hold armor for
|
|
1676
|
-
* non-humanoid mobs.
|
|
1677
|
-
*
|
|
1678
|
-
*/
|
|
1679
|
-
Body = 'Body',
|
|
1680
1580
|
/**
|
|
1681
1581
|
* @remarks
|
|
1682
1582
|
* The chest slot. This slot is used to hold items such as
|
|
@@ -1946,14 +1846,6 @@ export enum GameRule {
|
|
|
1946
1846
|
*
|
|
1947
1847
|
*/
|
|
1948
1848
|
PlayersSleepingPercentage = 'playersSleepingPercentage',
|
|
1949
|
-
/**
|
|
1950
|
-
* @beta
|
|
1951
|
-
* @remarks
|
|
1952
|
-
* Controls which player waypoints are automatically added to
|
|
1953
|
-
* the players locator bar.
|
|
1954
|
-
*
|
|
1955
|
-
*/
|
|
1956
|
-
PlayerWaypoints = 'playerWaypoints',
|
|
1957
1849
|
/**
|
|
1958
1850
|
* @remarks
|
|
1959
1851
|
* Controls whether projectiles (entities with a projectile
|
|
@@ -2304,7 +2196,7 @@ export enum InputPermissionCategory {
|
|
|
2304
2196
|
*/
|
|
2305
2197
|
export enum ItemComponentTypes {
|
|
2306
2198
|
/**
|
|
2307
|
-
* @
|
|
2199
|
+
* @rc
|
|
2308
2200
|
*/
|
|
2309
2201
|
BlockDynamicProperties = 'minecraft:block_actor_dynamic_properties',
|
|
2310
2202
|
/**
|
|
@@ -2779,14 +2671,6 @@ export enum PlayerSplitScreenSlot {
|
|
|
2779
2671
|
Third = 'Third',
|
|
2780
2672
|
}
|
|
2781
2673
|
|
|
2782
|
-
/**
|
|
2783
|
-
* @beta
|
|
2784
|
-
*/
|
|
2785
|
-
export enum PlayerWaypointsMode {
|
|
2786
|
-
Everyone = 'Everyone',
|
|
2787
|
-
Off = 'Off',
|
|
2788
|
-
}
|
|
2789
|
-
|
|
2790
2674
|
/**
|
|
2791
2675
|
* Contains objectives and participants for the scoreboard.
|
|
2792
2676
|
*/
|
|
@@ -3113,29 +2997,6 @@ export enum TintMethod {
|
|
|
3113
2997
|
Water = 'Water',
|
|
3114
2998
|
}
|
|
3115
2999
|
|
|
3116
|
-
/**
|
|
3117
|
-
* @beta
|
|
3118
|
-
* An enumeration with the reason that a watchdog is deciding
|
|
3119
|
-
* to terminate execution of a behavior packs' script.
|
|
3120
|
-
*/
|
|
3121
|
-
export enum WatchdogTerminateReason {
|
|
3122
|
-
/**
|
|
3123
|
-
* @remarks
|
|
3124
|
-
* Script runtime for a behavior pack is terminated due to
|
|
3125
|
-
* non-responsiveness from script (a hang or infinite loop).
|
|
3126
|
-
*
|
|
3127
|
-
*/
|
|
3128
|
-
Hang = 'Hang',
|
|
3129
|
-
/**
|
|
3130
|
-
* @remarks
|
|
3131
|
-
* Script runtime for a behavior pack is terminated due to a
|
|
3132
|
-
* stack overflow (a long, and potentially infinite) chain of
|
|
3133
|
-
* function calls.
|
|
3134
|
-
*
|
|
3135
|
-
*/
|
|
3136
|
-
StackOverflow = 'StackOverflow',
|
|
3137
|
-
}
|
|
3138
|
-
|
|
3139
3000
|
/**
|
|
3140
3001
|
* Enum representing different texture icons that can be
|
|
3141
3002
|
* displayed for waypoints on the locator bar.
|
|
@@ -3324,7 +3185,6 @@ export type EntityComponentTypeMap = {
|
|
|
3324
3185
|
'minecraft:navigation.generic': EntityNavigationGenericComponent;
|
|
3325
3186
|
'minecraft:navigation.hover': EntityNavigationHoverComponent;
|
|
3326
3187
|
'minecraft:navigation.walk': EntityNavigationWalkComponent;
|
|
3327
|
-
'minecraft:npc': EntityNpcComponent;
|
|
3328
3188
|
'minecraft:onfire': EntityOnFireComponent;
|
|
3329
3189
|
'minecraft:player.exhaustion': EntityExhaustionComponent;
|
|
3330
3190
|
'minecraft:player.hunger': EntityHungerComponent;
|
|
@@ -3358,7 +3218,6 @@ export type EntityComponentTypeMap = {
|
|
|
3358
3218
|
'navigation.generic': EntityNavigationGenericComponent;
|
|
3359
3219
|
'navigation.hover': EntityNavigationHoverComponent;
|
|
3360
3220
|
'navigation.walk': EntityNavigationWalkComponent;
|
|
3361
|
-
npc: EntityNpcComponent;
|
|
3362
3221
|
onfire: EntityOnFireComponent;
|
|
3363
3222
|
'player.exhaustion': EntityExhaustionComponent;
|
|
3364
3223
|
'player.hunger': EntityHungerComponent;
|
|
@@ -3378,15 +3237,6 @@ export type EntityComponentTypeMap = {
|
|
|
3378
3237
|
wants_jockey: EntityWantsJockeyComponent;
|
|
3379
3238
|
};
|
|
3380
3239
|
|
|
3381
|
-
/**
|
|
3382
|
-
* @beta
|
|
3383
|
-
*/
|
|
3384
|
-
export type EntityIdentifierType<T> = [T] extends [never]
|
|
3385
|
-
? VanillaEntityIdentifier
|
|
3386
|
-
: T extends string
|
|
3387
|
-
? VanillaEntityIdentifier | T
|
|
3388
|
-
: never;
|
|
3389
|
-
|
|
3390
3240
|
export type ItemComponentReturnType<T extends string> = T extends keyof ItemComponentTypeMap
|
|
3391
3241
|
? ItemComponentTypeMap[T]
|
|
3392
3242
|
: ItemCustomComponentInstance;
|
|
@@ -3414,15 +3264,6 @@ export type ItemComponentTypeMap = {
|
|
|
3414
3264
|
potion: ItemPotionComponent;
|
|
3415
3265
|
};
|
|
3416
3266
|
|
|
3417
|
-
/**
|
|
3418
|
-
* @beta
|
|
3419
|
-
*/
|
|
3420
|
-
export type VanillaEntityIdentifier =
|
|
3421
|
-
| EntityType
|
|
3422
|
-
| minecraftvanilladata.MinecraftEntityTypes
|
|
3423
|
-
| `${minecraftvanilladata.MinecraftEntityTypes}`
|
|
3424
|
-
| `${minecraftvanilladata.MinecraftEntityTypes}<${string}>`;
|
|
3425
|
-
|
|
3426
3267
|
/**
|
|
3427
3268
|
* Handle to an aim-assist category that exists in the
|
|
3428
3269
|
* world.aimAssist registry.
|
|
@@ -3580,9 +3421,7 @@ export class AimAssistCategorySettings {
|
|
|
3580
3421
|
* A record mapping block Ids to their priority settings.
|
|
3581
3422
|
* Larger numbers have greater priority.
|
|
3582
3423
|
*/
|
|
3583
|
-
setBlockPriorities(
|
|
3584
|
-
blockPriorities: Record<keyof typeof minecraftvanilladata.MinecraftBlockTypes | string, number>,
|
|
3585
|
-
): void;
|
|
3424
|
+
setBlockPriorities(blockPriorities: Record<string, number>): void;
|
|
3586
3425
|
/**
|
|
3587
3426
|
* @remarks
|
|
3588
3427
|
* Sets the priority settings used for block targeting.
|
|
@@ -3601,9 +3440,7 @@ export class AimAssistCategorySettings {
|
|
|
3601
3440
|
* A record mapping entity Ids to their priority settings.
|
|
3602
3441
|
* Larger numbers have greater priority.
|
|
3603
3442
|
*/
|
|
3604
|
-
setEntityPriorities(
|
|
3605
|
-
entityPriorities: Record<keyof typeof minecraftvanilladata.MinecraftEntityTypes | string, number>,
|
|
3606
|
-
): void;
|
|
3443
|
+
setEntityPriorities(entityPriorities: Record<string, number>): void;
|
|
3607
3444
|
/**
|
|
3608
3445
|
* @remarks
|
|
3609
3446
|
* Sets the priority settings used for entity targeting.
|
|
@@ -3802,10 +3639,8 @@ export class AimAssistPresetSettings {
|
|
|
3802
3639
|
*
|
|
3803
3640
|
* This function can't be called in restricted-execution mode.
|
|
3804
3641
|
*
|
|
3805
|
-
* @param targets
|
|
3806
|
-
* An array of block tags.
|
|
3807
3642
|
*/
|
|
3808
|
-
setExcludedBlockTagTargets(
|
|
3643
|
+
setExcludedBlockTagTargets(blockTagTargets?: string[]): void;
|
|
3809
3644
|
/**
|
|
3810
3645
|
* @remarks
|
|
3811
3646
|
* Sets the list of block Ids to exclude from aim assist
|
|
@@ -3813,10 +3648,8 @@ export class AimAssistPresetSettings {
|
|
|
3813
3648
|
*
|
|
3814
3649
|
* This function can't be called in restricted-execution mode.
|
|
3815
3650
|
*
|
|
3816
|
-
* @param targets
|
|
3817
|
-
* An array of block Ids.
|
|
3818
3651
|
*/
|
|
3819
|
-
setExcludedBlockTargets(
|
|
3652
|
+
setExcludedBlockTargets(blockTargets?: string[]): void;
|
|
3820
3653
|
/**
|
|
3821
3654
|
* @remarks
|
|
3822
3655
|
* Sets the list of entity Ids to exclude from aim assist
|
|
@@ -3824,10 +3657,8 @@ export class AimAssistPresetSettings {
|
|
|
3824
3657
|
*
|
|
3825
3658
|
* This function can't be called in restricted-execution mode.
|
|
3826
3659
|
*
|
|
3827
|
-
* @param targets
|
|
3828
|
-
* An array of entity Ids.
|
|
3829
3660
|
*/
|
|
3830
|
-
setExcludedEntityTargets(
|
|
3661
|
+
setExcludedEntityTargets(entityTargets?: string[]): void;
|
|
3831
3662
|
/**
|
|
3832
3663
|
* @remarks
|
|
3833
3664
|
* Sets the list of entity type families to exclude from aim
|
|
@@ -3835,10 +3666,8 @@ export class AimAssistPresetSettings {
|
|
|
3835
3666
|
*
|
|
3836
3667
|
* This function can't be called in restricted-execution mode.
|
|
3837
3668
|
*
|
|
3838
|
-
* @param targets
|
|
3839
|
-
* An array of entity type families.
|
|
3840
3669
|
*/
|
|
3841
|
-
setExcludedEntityTypeFamilyTargets(
|
|
3670
|
+
setExcludedEntityTypeFamilyTargets(entityTypeFamilyTargets?: string[]): void;
|
|
3842
3671
|
/**
|
|
3843
3672
|
* @remarks
|
|
3844
3673
|
* Sets the per-item aim-assist category Ids.
|
|
@@ -3849,7 +3678,7 @@ export class AimAssistPresetSettings {
|
|
|
3849
3678
|
* A record mapping item Ids to aim-assist category Ids.
|
|
3850
3679
|
* Category Ids must have a namespace.
|
|
3851
3680
|
*/
|
|
3852
|
-
setItemSettings(itemSettings: Record<
|
|
3681
|
+
setItemSettings(itemSettings: Record<string, string>): void;
|
|
3853
3682
|
/**
|
|
3854
3683
|
* @remarks
|
|
3855
3684
|
* Sets the list of item Ids that will target liquid blocks
|
|
@@ -3860,7 +3689,7 @@ export class AimAssistPresetSettings {
|
|
|
3860
3689
|
* @param items
|
|
3861
3690
|
* An array of item Ids.
|
|
3862
3691
|
*/
|
|
3863
|
-
setLiquidTargetingItems(items?:
|
|
3692
|
+
setLiquidTargetingItems(items?: string[]): void;
|
|
3864
3693
|
}
|
|
3865
3694
|
|
|
3866
3695
|
/**
|
|
@@ -3966,28 +3795,6 @@ export class AimAssistRegistry {
|
|
|
3966
3795
|
getPresets(): AimAssistPreset[];
|
|
3967
3796
|
}
|
|
3968
3797
|
|
|
3969
|
-
/**
|
|
3970
|
-
* @beta
|
|
3971
|
-
* Describes a single banner pattern, which includes a colour
|
|
3972
|
-
* and a pattern type.
|
|
3973
|
-
*/
|
|
3974
|
-
export class BannerPattern {
|
|
3975
|
-
private constructor();
|
|
3976
|
-
/**
|
|
3977
|
-
* @remarks
|
|
3978
|
-
* The color to apply to this banner pattern.
|
|
3979
|
-
*
|
|
3980
|
-
*/
|
|
3981
|
-
readonly color: string;
|
|
3982
|
-
/**
|
|
3983
|
-
* @remarks
|
|
3984
|
-
* The pattern type (e.g. gradient, chevron, cross, etc.) to
|
|
3985
|
-
* apply to the banner.
|
|
3986
|
-
*
|
|
3987
|
-
*/
|
|
3988
|
-
readonly pattern: string;
|
|
3989
|
-
}
|
|
3990
|
-
|
|
3991
3798
|
/**
|
|
3992
3799
|
* Describes a type of biome.
|
|
3993
3800
|
*/
|
|
@@ -4081,20 +3888,6 @@ export class Block {
|
|
|
4081
3888
|
* {@link LocationOutOfWorldBoundariesError}
|
|
4082
3889
|
*/
|
|
4083
3890
|
readonly isLiquid: boolean;
|
|
4084
|
-
/**
|
|
4085
|
-
* @beta
|
|
4086
|
-
* @remarks
|
|
4087
|
-
* Returns true if this block is solid and impassible - (e.g.,
|
|
4088
|
-
* a cobblestone block and a diamond block are solid, while a
|
|
4089
|
-
* ladder block and a fence block are not).
|
|
4090
|
-
*
|
|
4091
|
-
* @throws This property can throw when used.
|
|
4092
|
-
*
|
|
4093
|
-
* {@link LocationInUnloadedChunkError}
|
|
4094
|
-
*
|
|
4095
|
-
* {@link LocationOutOfWorldBoundariesError}
|
|
4096
|
-
*/
|
|
4097
|
-
readonly isSolid: boolean;
|
|
4098
3891
|
/**
|
|
4099
3892
|
* @remarks
|
|
4100
3893
|
* Returns true if this reference to a block is still valid
|
|
@@ -4260,30 +4053,6 @@ export class Block {
|
|
|
4260
4053
|
* {@link LocationOutOfWorldBoundariesError}
|
|
4261
4054
|
*/
|
|
4262
4055
|
canContainLiquid(liquidType: LiquidType): boolean;
|
|
4263
|
-
/**
|
|
4264
|
-
* @beta
|
|
4265
|
-
* @remarks
|
|
4266
|
-
* Checks to see whether it is valid to place the specified
|
|
4267
|
-
* block type or block permutation, on a specified face on this
|
|
4268
|
-
* block.
|
|
4269
|
-
*
|
|
4270
|
-
* @param blockToPlace
|
|
4271
|
-
* Block type or block permutation to check placement for.
|
|
4272
|
-
* @param faceToPlaceOn
|
|
4273
|
-
* Optional specific face of this block to check placement
|
|
4274
|
-
* against.
|
|
4275
|
-
* @returns
|
|
4276
|
-
* Returns `true` if the block type or permutation can be
|
|
4277
|
-
* placed on this block, else `false`.
|
|
4278
|
-
* @throws This function can throw errors.
|
|
4279
|
-
*
|
|
4280
|
-
* {@link Error}
|
|
4281
|
-
*
|
|
4282
|
-
* {@link LocationInUnloadedChunkError}
|
|
4283
|
-
*
|
|
4284
|
-
* {@link LocationOutOfWorldBoundariesError}
|
|
4285
|
-
*/
|
|
4286
|
-
canPlace(blockToPlace: BlockPermutation | BlockType | string, faceToPlaceOn?: Direction): boolean;
|
|
4287
4056
|
/**
|
|
4288
4057
|
* @remarks
|
|
4289
4058
|
* Returns the {@link Vector3} of the center of this block on
|
|
@@ -4380,15 +4149,6 @@ export class Block {
|
|
|
4380
4149
|
* {@link LocationInUnloadedChunkError}
|
|
4381
4150
|
*/
|
|
4382
4151
|
getLightLevel(): number;
|
|
4383
|
-
/**
|
|
4384
|
-
* @beta
|
|
4385
|
-
* @throws This function can throw errors.
|
|
4386
|
-
*
|
|
4387
|
-
* {@link LocationInUnloadedChunkError}
|
|
4388
|
-
*
|
|
4389
|
-
* {@link LocationOutOfWorldBoundariesError}
|
|
4390
|
-
*/
|
|
4391
|
-
getMapColor(): RGBA;
|
|
4392
4152
|
/**
|
|
4393
4153
|
* @rc
|
|
4394
4154
|
* @remarks
|
|
@@ -4670,27 +4430,6 @@ export class Block {
|
|
|
4670
4430
|
* {@link LocationOutOfWorldBoundariesError}
|
|
4671
4431
|
*/
|
|
4672
4432
|
south(steps?: number): Block | undefined;
|
|
4673
|
-
/**
|
|
4674
|
-
* @beta
|
|
4675
|
-
* @remarks
|
|
4676
|
-
* Tries to set the block in the dimension to the state of the
|
|
4677
|
-
* permutation by first checking if the placement is valid.
|
|
4678
|
-
*
|
|
4679
|
-
* This function can't be called in restricted-execution mode.
|
|
4680
|
-
*
|
|
4681
|
-
* @param permutation
|
|
4682
|
-
* Permutation that contains a set of property states for the
|
|
4683
|
-
* Block.
|
|
4684
|
-
* @returns
|
|
4685
|
-
* Returns `true` if the block permutation data was
|
|
4686
|
-
* successfully set, else `false`.
|
|
4687
|
-
* @throws This function can throw errors.
|
|
4688
|
-
*
|
|
4689
|
-
* {@link LocationInUnloadedChunkError}
|
|
4690
|
-
*
|
|
4691
|
-
* {@link LocationOutOfWorldBoundariesError}
|
|
4692
|
-
*/
|
|
4693
|
-
trySetPermutation(permutation: BlockPermutation): boolean;
|
|
4694
4433
|
/**
|
|
4695
4434
|
* @remarks
|
|
4696
4435
|
* Returns the {@link Block} to the west of this block
|
|
@@ -4708,137 +4447,6 @@ export class Block {
|
|
|
4708
4447
|
west(steps?: number): Block | undefined;
|
|
4709
4448
|
}
|
|
4710
4449
|
|
|
4711
|
-
/**
|
|
4712
|
-
* @beta
|
|
4713
|
-
* Bounding Box Utils is a utility class that provides a number
|
|
4714
|
-
* of useful functions for the creation and utility of {@link
|
|
4715
|
-
* BlockBoundingBox} objects
|
|
4716
|
-
*/
|
|
4717
|
-
export class BlockBoundingBoxUtils {
|
|
4718
|
-
private constructor();
|
|
4719
|
-
/**
|
|
4720
|
-
* @remarks
|
|
4721
|
-
* Create a validated instance of a {@link BlockBoundingBox}
|
|
4722
|
-
* where the min and max components are guaranteed to be (min
|
|
4723
|
-
* <= max)
|
|
4724
|
-
*
|
|
4725
|
-
* This function can't be called in restricted-execution mode.
|
|
4726
|
-
*
|
|
4727
|
-
* @param min
|
|
4728
|
-
* A corner world location
|
|
4729
|
-
* @param max
|
|
4730
|
-
* A corner world location diametrically opposite
|
|
4731
|
-
*/
|
|
4732
|
-
static createValid(min: Vector3, max: Vector3): BlockBoundingBox;
|
|
4733
|
-
/**
|
|
4734
|
-
* @remarks
|
|
4735
|
-
* Expand a {@link BlockBoundingBox} by a given amount along
|
|
4736
|
-
* each axis.
|
|
4737
|
-
* Sizes can be negative to perform contraction.
|
|
4738
|
-
* Note: corners can be inverted if the contraction size is
|
|
4739
|
-
* greater than the span, but the min/max relationship will
|
|
4740
|
-
* remain correct
|
|
4741
|
-
*
|
|
4742
|
-
* This function can't be called in restricted-execution mode.
|
|
4743
|
-
*
|
|
4744
|
-
* @returns
|
|
4745
|
-
* Return a new {@link BlockBoundingBox} object representing
|
|
4746
|
-
* the changes
|
|
4747
|
-
*/
|
|
4748
|
-
static dilate(box: BlockBoundingBox, size: Vector3): BlockBoundingBox;
|
|
4749
|
-
/**
|
|
4750
|
-
* @remarks
|
|
4751
|
-
* Check if two {@link BlockBoundingBox} objects are identical
|
|
4752
|
-
*
|
|
4753
|
-
* This function can't be called in restricted-execution mode.
|
|
4754
|
-
*
|
|
4755
|
-
*/
|
|
4756
|
-
static equals(box: BlockBoundingBox, other: BlockBoundingBox): boolean;
|
|
4757
|
-
/**
|
|
4758
|
-
* @remarks
|
|
4759
|
-
* Expand the initial box object bounds to include the 2nd box
|
|
4760
|
-
* argument. The resultant {@link BlockBoundingBox} object
|
|
4761
|
-
* will be a BlockBoundingBox which exactly encompasses the two
|
|
4762
|
-
* boxes.
|
|
4763
|
-
*
|
|
4764
|
-
* This function can't be called in restricted-execution mode.
|
|
4765
|
-
*
|
|
4766
|
-
* @returns
|
|
4767
|
-
* A new {@link BlockBoundingBox} instance representing the
|
|
4768
|
-
* smallest possible bounding box which can encompass both
|
|
4769
|
-
*/
|
|
4770
|
-
static expand(box: BlockBoundingBox, other: BlockBoundingBox): BlockBoundingBox;
|
|
4771
|
-
/**
|
|
4772
|
-
* @remarks
|
|
4773
|
-
* Calculate the center block of a given {@link
|
|
4774
|
-
* BlockBoundingBox} object.
|
|
4775
|
-
*
|
|
4776
|
-
* This function can't be called in restricted-execution mode.
|
|
4777
|
-
*
|
|
4778
|
-
* @returns
|
|
4779
|
-
* Note that {@link BlockBoundingBox} objects represent whole
|
|
4780
|
-
* blocks, so the center of boxes which have odd numbered
|
|
4781
|
-
* bounds are not mathematically centered...
|
|
4782
|
-
* i.e. a BlockBoundingBox( 0,0,0 -> 3,3,3 ) would have a
|
|
4783
|
-
* center of (1,1,1) (not (1.5, 1.5, 1.5) as expected)
|
|
4784
|
-
*/
|
|
4785
|
-
static getCenter(box: BlockBoundingBox): Vector3;
|
|
4786
|
-
/**
|
|
4787
|
-
* @remarks
|
|
4788
|
-
* Calculate the BlockBoundingBox which represents the union
|
|
4789
|
-
* area of two intersecting BlockBoundingBoxes
|
|
4790
|
-
*
|
|
4791
|
-
* This function can't be called in restricted-execution mode.
|
|
4792
|
-
*
|
|
4793
|
-
*/
|
|
4794
|
-
static getIntersection(box: BlockBoundingBox, other: BlockBoundingBox): BlockBoundingBox | undefined;
|
|
4795
|
-
/**
|
|
4796
|
-
* @remarks
|
|
4797
|
-
* Get the Span of each of the BlockBoundingBox Axis components
|
|
4798
|
-
*
|
|
4799
|
-
* This function can't be called in restricted-execution mode.
|
|
4800
|
-
*
|
|
4801
|
-
*/
|
|
4802
|
-
static getSpan(box: BlockBoundingBox): Vector3;
|
|
4803
|
-
/**
|
|
4804
|
-
* @remarks
|
|
4805
|
-
* Check to see if two BlockBoundingBox objects intersect
|
|
4806
|
-
*
|
|
4807
|
-
* This function can't be called in restricted-execution mode.
|
|
4808
|
-
*
|
|
4809
|
-
*/
|
|
4810
|
-
static intersects(box: BlockBoundingBox, other: BlockBoundingBox): boolean;
|
|
4811
|
-
/**
|
|
4812
|
-
* @remarks
|
|
4813
|
-
* Check to see if a given coordinate is inside a
|
|
4814
|
-
* BlockBoundingBox
|
|
4815
|
-
*
|
|
4816
|
-
* This function can't be called in restricted-execution mode.
|
|
4817
|
-
*
|
|
4818
|
-
*/
|
|
4819
|
-
static isInside(box: BlockBoundingBox, pos: Vector3): boolean;
|
|
4820
|
-
/**
|
|
4821
|
-
* @remarks
|
|
4822
|
-
* Check to see if a BlockBoundingBox is valid (i.e. (min <=
|
|
4823
|
-
* max))
|
|
4824
|
-
*
|
|
4825
|
-
* This function can't be called in restricted-execution mode.
|
|
4826
|
-
*
|
|
4827
|
-
*/
|
|
4828
|
-
static isValid(box: BlockBoundingBox): boolean;
|
|
4829
|
-
/**
|
|
4830
|
-
* @remarks
|
|
4831
|
-
* Move a BlockBoundingBox by a given amount
|
|
4832
|
-
*
|
|
4833
|
-
* This function can't be called in restricted-execution mode.
|
|
4834
|
-
*
|
|
4835
|
-
* @returns
|
|
4836
|
-
* Return a new BlockBoundingBox object which represents the
|
|
4837
|
-
* change
|
|
4838
|
-
*/
|
|
4839
|
-
static translate(box: BlockBoundingBox, delta: Vector3): BlockBoundingBox;
|
|
4840
|
-
}
|
|
4841
|
-
|
|
4842
4450
|
/**
|
|
4843
4451
|
* Base type for components associated with blocks.
|
|
4844
4452
|
*/
|
|
@@ -5061,13 +4669,6 @@ export class BlockComponentRandomTickEvent extends BlockEvent {
|
|
|
5061
4669
|
// @ts-ignore Class inheritance allowed for native defined classes
|
|
5062
4670
|
export class BlockComponentRedstoneUpdateEvent extends BlockEvent {
|
|
5063
4671
|
private constructor();
|
|
5064
|
-
/**
|
|
5065
|
-
* @beta
|
|
5066
|
-
* @remarks
|
|
5067
|
-
* The first update event for the redstone component.
|
|
5068
|
-
*
|
|
5069
|
-
*/
|
|
5070
|
-
readonly firstUpdate: boolean;
|
|
5071
4672
|
/**
|
|
5072
4673
|
* @remarks
|
|
5073
4674
|
* The redstone signal strength passing through this block. It
|
|
@@ -5260,7 +4861,7 @@ export class BlockCustomComponentInstance extends BlockComponent {
|
|
|
5260
4861
|
}
|
|
5261
4862
|
|
|
5262
4863
|
/**
|
|
5263
|
-
* @
|
|
4864
|
+
* @rc
|
|
5264
4865
|
* Represents the dynamic properties of a block in the world.
|
|
5265
4866
|
* Only available with block entities. Up to 1KB per content
|
|
5266
4867
|
* pack, per block entity in their dynamic properties storage.
|
|
@@ -5500,7 +5101,7 @@ export class BlockFluidContainerComponent extends BlockComponent {
|
|
|
5500
5101
|
}
|
|
5501
5102
|
|
|
5502
5103
|
/**
|
|
5503
|
-
* @
|
|
5104
|
+
* @rc
|
|
5504
5105
|
* Represents the instruments a block can have assigned to it's
|
|
5505
5106
|
* up and down faces.
|
|
5506
5107
|
*/
|
|
@@ -5624,18 +5225,6 @@ export class BlockLocationIterator implements Iterable<Vector3> {
|
|
|
5624
5225
|
*
|
|
5625
5226
|
*/
|
|
5626
5227
|
[Symbol.iterator](): Iterator<Vector3>;
|
|
5627
|
-
/**
|
|
5628
|
-
* @beta
|
|
5629
|
-
* @remarks
|
|
5630
|
-
* Checks if the underlining block volume has been invalidated.
|
|
5631
|
-
* Will return false if the block volume was modified between
|
|
5632
|
-
* creating the iterator and iterating it, and true otherwise.
|
|
5633
|
-
*
|
|
5634
|
-
* @throws This function can throw errors.
|
|
5635
|
-
*
|
|
5636
|
-
* {@link minecraftcommon.EngineError}
|
|
5637
|
-
*/
|
|
5638
|
-
isValid(): boolean;
|
|
5639
5228
|
/**
|
|
5640
5229
|
* @remarks
|
|
5641
5230
|
* This function can't be called in restricted-execution mode.
|
|
@@ -6551,15 +6140,6 @@ export class BlockVolumeBase {
|
|
|
6551
6140
|
*
|
|
6552
6141
|
*/
|
|
6553
6142
|
getBlockLocationIterator(): BlockLocationIterator;
|
|
6554
|
-
/**
|
|
6555
|
-
* @beta
|
|
6556
|
-
* @remarks
|
|
6557
|
-
* Return a {@link BlockBoundingBox} object which represents
|
|
6558
|
-
* the validated min and max coordinates of the volume
|
|
6559
|
-
*
|
|
6560
|
-
* @throws This function can throw errors.
|
|
6561
|
-
*/
|
|
6562
|
-
getBoundingBox(): BlockBoundingBox;
|
|
6563
6143
|
/**
|
|
6564
6144
|
* @remarks
|
|
6565
6145
|
* Return the capacity (volume) of the BlockVolume (W*D*H)
|
|
@@ -6567,7 +6147,7 @@ export class BlockVolumeBase {
|
|
|
6567
6147
|
*/
|
|
6568
6148
|
getCapacity(): number;
|
|
6569
6149
|
/**
|
|
6570
|
-
* @
|
|
6150
|
+
* @rc
|
|
6571
6151
|
* @remarks
|
|
6572
6152
|
* Returns a list of block positions within the volume that are
|
|
6573
6153
|
* closest to a given location, sorted by distance (nearest
|
|
@@ -6583,7 +6163,7 @@ export class BlockVolumeBase {
|
|
|
6583
6163
|
*/
|
|
6584
6164
|
getClosest(count: number, location: Vector3): Vector3[];
|
|
6585
6165
|
/**
|
|
6586
|
-
* @
|
|
6166
|
+
* @rc
|
|
6587
6167
|
* @remarks
|
|
6588
6168
|
* Returns a list of block positions within the volume that are
|
|
6589
6169
|
* farthest from a given location, sorted by distance (farthest
|
|
@@ -6758,7 +6338,7 @@ export class Camera {
|
|
|
6758
6338
|
*/
|
|
6759
6339
|
readonly isValid: boolean;
|
|
6760
6340
|
/**
|
|
6761
|
-
* @
|
|
6341
|
+
* @rc
|
|
6762
6342
|
* @remarks
|
|
6763
6343
|
* This function can't be called in restricted-execution mode.
|
|
6764
6344
|
*
|
|
@@ -6834,23 +6414,6 @@ export class Camera {
|
|
|
6834
6414
|
| CameraSetRotOptions
|
|
6835
6415
|
| CameraTargetOptions,
|
|
6836
6416
|
): void;
|
|
6837
|
-
/**
|
|
6838
|
-
* @beta
|
|
6839
|
-
* @remarks
|
|
6840
|
-
* Sets the current active camera with easing.
|
|
6841
|
-
*
|
|
6842
|
-
* This function can't be called in restricted-execution mode.
|
|
6843
|
-
*
|
|
6844
|
-
* @param cameraPreset
|
|
6845
|
-
* Identifier of a camera preset file defined within JSON.
|
|
6846
|
-
* @param easeOptions
|
|
6847
|
-
* Options to ease the camera from the previous camera to the
|
|
6848
|
-
* current one.
|
|
6849
|
-
* @throws
|
|
6850
|
-
* Throws when easing to minecraft:first_person presets
|
|
6851
|
-
* currently without the experimental cameras toggle enabled.
|
|
6852
|
-
*/
|
|
6853
|
-
setCameraWithEase(cameraPreset: string, easeOptions: EaseOptions): void;
|
|
6854
6417
|
/**
|
|
6855
6418
|
* @remarks
|
|
6856
6419
|
* Sets the current active camera for the specified player and
|
|
@@ -6875,7 +6438,7 @@ export class Camera {
|
|
|
6875
6438
|
*/
|
|
6876
6439
|
setFov(fovCameraOptions?: CameraFovOptions): void;
|
|
6877
6440
|
/**
|
|
6878
|
-
* @
|
|
6441
|
+
* @rc
|
|
6879
6442
|
* @remarks
|
|
6880
6443
|
* This function can't be called in restricted-execution mode.
|
|
6881
6444
|
*
|
|
@@ -6887,30 +6450,12 @@ export class Camera {
|
|
|
6887
6450
|
}
|
|
6888
6451
|
|
|
6889
6452
|
/**
|
|
6890
|
-
*
|
|
6891
|
-
* Loot item function that will try to copy the block entity
|
|
6892
|
-
* data from the destroyed block to the dropped item.
|
|
6453
|
+
* CatmullRom spline creation.
|
|
6893
6454
|
*/
|
|
6894
|
-
|
|
6895
|
-
export class CarryOverBlockEntityDataFunction extends LootItemFunction {
|
|
6896
|
-
private constructor();
|
|
6455
|
+
export class CatmullRomSpline {
|
|
6897
6456
|
/**
|
|
6898
6457
|
* @remarks
|
|
6899
|
-
*
|
|
6900
|
-
* function will copy the dynamic properties from the block
|
|
6901
|
-
* entity to the dropped item.
|
|
6902
|
-
*
|
|
6903
|
-
*/
|
|
6904
|
-
readonly dynamicProperties: boolean;
|
|
6905
|
-
}
|
|
6906
|
-
|
|
6907
|
-
/**
|
|
6908
|
-
* CatmullRom spline creation.
|
|
6909
|
-
*/
|
|
6910
|
-
export class CatmullRomSpline {
|
|
6911
|
-
/**
|
|
6912
|
-
* @remarks
|
|
6913
|
-
* Control points for the CatmullRom curve.
|
|
6458
|
+
* Control points for the CatmullRom curve.
|
|
6914
6459
|
*
|
|
6915
6460
|
* This property can't be edited in restricted-execution mode.
|
|
6916
6461
|
*
|
|
@@ -6918,164 +6463,6 @@ export class CatmullRomSpline {
|
|
|
6918
6463
|
controlPoints: Vector3[];
|
|
6919
6464
|
}
|
|
6920
6465
|
|
|
6921
|
-
/**
|
|
6922
|
-
* @beta
|
|
6923
|
-
* An event that fires as players enter chat messages.
|
|
6924
|
-
*/
|
|
6925
|
-
export class ChatSendAfterEvent {
|
|
6926
|
-
private constructor();
|
|
6927
|
-
/**
|
|
6928
|
-
* @remarks
|
|
6929
|
-
* Message that is being broadcast.
|
|
6930
|
-
*
|
|
6931
|
-
*/
|
|
6932
|
-
readonly message: string;
|
|
6933
|
-
/**
|
|
6934
|
-
* @remarks
|
|
6935
|
-
* Player that sent the chat message.
|
|
6936
|
-
*
|
|
6937
|
-
*/
|
|
6938
|
-
readonly sender: Player;
|
|
6939
|
-
/**
|
|
6940
|
-
* @remarks
|
|
6941
|
-
* Optional list of players that will receive this message. If
|
|
6942
|
-
* defined, this message is directly targeted to one or more
|
|
6943
|
-
* players (i.e., is not broadcast.)
|
|
6944
|
-
*
|
|
6945
|
-
*/
|
|
6946
|
-
readonly targets?: Player[];
|
|
6947
|
-
}
|
|
6948
|
-
|
|
6949
|
-
/**
|
|
6950
|
-
* @beta
|
|
6951
|
-
* Manages callbacks that are connected to chat messages being
|
|
6952
|
-
* sent.
|
|
6953
|
-
*/
|
|
6954
|
-
export class ChatSendAfterEventSignal {
|
|
6955
|
-
private constructor();
|
|
6956
|
-
/**
|
|
6957
|
-
* @remarks
|
|
6958
|
-
* Adds a callback that will be called when new chat messages
|
|
6959
|
-
* are sent.
|
|
6960
|
-
*
|
|
6961
|
-
* This function can't be called in restricted-execution mode.
|
|
6962
|
-
*
|
|
6963
|
-
* This function can be called in early-execution mode.
|
|
6964
|
-
*
|
|
6965
|
-
*/
|
|
6966
|
-
subscribe(callback: (arg0: ChatSendAfterEvent) => void): (arg0: ChatSendAfterEvent) => void;
|
|
6967
|
-
/**
|
|
6968
|
-
* @remarks
|
|
6969
|
-
* Removes a callback from being called when new chat messages
|
|
6970
|
-
* are sent.
|
|
6971
|
-
*
|
|
6972
|
-
* This function can't be called in restricted-execution mode.
|
|
6973
|
-
*
|
|
6974
|
-
* This function can be called in early-execution mode.
|
|
6975
|
-
*
|
|
6976
|
-
*/
|
|
6977
|
-
unsubscribe(callback: (arg0: ChatSendAfterEvent) => void): void;
|
|
6978
|
-
}
|
|
6979
|
-
|
|
6980
|
-
/**
|
|
6981
|
-
* @beta
|
|
6982
|
-
* An event that fires as players enter chat messages.
|
|
6983
|
-
*/
|
|
6984
|
-
export class ChatSendBeforeEvent {
|
|
6985
|
-
private constructor();
|
|
6986
|
-
/**
|
|
6987
|
-
* @remarks
|
|
6988
|
-
* If set to true in a beforeChat event handler, this message
|
|
6989
|
-
* is not broadcast out.
|
|
6990
|
-
*
|
|
6991
|
-
*/
|
|
6992
|
-
cancel: boolean;
|
|
6993
|
-
/**
|
|
6994
|
-
* @remarks
|
|
6995
|
-
* Message that is being broadcast.
|
|
6996
|
-
*
|
|
6997
|
-
*/
|
|
6998
|
-
readonly message: string;
|
|
6999
|
-
/**
|
|
7000
|
-
* @remarks
|
|
7001
|
-
* Player that sent the chat message.
|
|
7002
|
-
*
|
|
7003
|
-
*/
|
|
7004
|
-
readonly sender: Player;
|
|
7005
|
-
/**
|
|
7006
|
-
* @remarks
|
|
7007
|
-
* Optional list of players that will receive this message. If
|
|
7008
|
-
* defined, this message is directly targeted to one or more
|
|
7009
|
-
* players (i.e., is not broadcast.)
|
|
7010
|
-
*
|
|
7011
|
-
*/
|
|
7012
|
-
readonly targets?: Player[];
|
|
7013
|
-
}
|
|
7014
|
-
|
|
7015
|
-
/**
|
|
7016
|
-
* @beta
|
|
7017
|
-
* Manages callbacks that are connected to an event that fires
|
|
7018
|
-
* before chat messages are sent.
|
|
7019
|
-
* @example customCommand.ts
|
|
7020
|
-
* ```typescript
|
|
7021
|
-
* import { world, DimensionLocation } from '@minecraft/server';
|
|
7022
|
-
*
|
|
7023
|
-
* function customCommand(targetLocation: DimensionLocation) {
|
|
7024
|
-
* const chatCallback = world.beforeEvents.chatSend.subscribe(eventData => {
|
|
7025
|
-
* if (eventData.message.includes('cancel')) {
|
|
7026
|
-
* // Cancel event if the message contains "cancel"
|
|
7027
|
-
* eventData.cancel = true;
|
|
7028
|
-
* } else {
|
|
7029
|
-
* const args = eventData.message.split(' ');
|
|
7030
|
-
*
|
|
7031
|
-
* if (args.length > 0) {
|
|
7032
|
-
* switch (args[0].toLowerCase()) {
|
|
7033
|
-
* case 'echo':
|
|
7034
|
-
* // Send a modified version of chat message
|
|
7035
|
-
* world.sendMessage(`Echo '${eventData.message.substring(4).trim()}'`);
|
|
7036
|
-
* break;
|
|
7037
|
-
* case 'help':
|
|
7038
|
-
* world.sendMessage(`Available commands: echo <message>`);
|
|
7039
|
-
* break;
|
|
7040
|
-
* }
|
|
7041
|
-
* }
|
|
7042
|
-
* }
|
|
7043
|
-
* });
|
|
7044
|
-
* }
|
|
7045
|
-
* ```
|
|
7046
|
-
*/
|
|
7047
|
-
export class ChatSendBeforeEventSignal {
|
|
7048
|
-
private constructor();
|
|
7049
|
-
/**
|
|
7050
|
-
* @remarks
|
|
7051
|
-
* Adds a callback that will be called before new chat messages
|
|
7052
|
-
* are sent.
|
|
7053
|
-
*
|
|
7054
|
-
* This function can't be called in restricted-execution mode.
|
|
7055
|
-
*
|
|
7056
|
-
* This function can be called in early-execution mode.
|
|
7057
|
-
*
|
|
7058
|
-
* @param callback
|
|
7059
|
-
* This closure is called with restricted-execution privilege.
|
|
7060
|
-
* @returns
|
|
7061
|
-
* Closure that is called with restricted-execution privilege.
|
|
7062
|
-
*/
|
|
7063
|
-
subscribe(callback: (arg0: ChatSendBeforeEvent) => void): (arg0: ChatSendBeforeEvent) => void;
|
|
7064
|
-
/**
|
|
7065
|
-
* @remarks
|
|
7066
|
-
* Removes a callback from being called before new chat
|
|
7067
|
-
* messages are sent.
|
|
7068
|
-
*
|
|
7069
|
-
* This function can't be called in restricted-execution mode.
|
|
7070
|
-
*
|
|
7071
|
-
* This function can be called in early-execution mode.
|
|
7072
|
-
*
|
|
7073
|
-
* @param callback
|
|
7074
|
-
* This closure is called with restricted-execution privilege.
|
|
7075
|
-
*/
|
|
7076
|
-
unsubscribe(callback: (arg0: ChatSendBeforeEvent) => void): void;
|
|
7077
|
-
}
|
|
7078
|
-
|
|
7079
6466
|
/**
|
|
7080
6467
|
* Contains the device information for a client instance.
|
|
7081
6468
|
*/
|
|
@@ -7147,258 +6534,6 @@ export class Component {
|
|
|
7147
6534
|
readonly typeId: string;
|
|
7148
6535
|
}
|
|
7149
6536
|
|
|
7150
|
-
/**
|
|
7151
|
-
* @beta
|
|
7152
|
-
* The Compound Block Volume is a collection of individual
|
|
7153
|
-
* block volume definitions which, as a collection, define a
|
|
7154
|
-
* larger volume of (sometimes non-contiguous) irregular
|
|
7155
|
-
* shapes.
|
|
7156
|
-
* This class is loosely based on the concept of CSG
|
|
7157
|
-
* (Computational Solid Geometry) and allows a user to create
|
|
7158
|
-
* complex volumes by building a stack of volumes and voids to
|
|
7159
|
-
* make a larger single volume.
|
|
7160
|
-
* For example - normally a creator would create a hollow cube
|
|
7161
|
-
* by creating 6 "wall" surfaces for each face.
|
|
7162
|
-
* With a Compound Block Volume, a creator can define a hollow
|
|
7163
|
-
* cube by creating a single outer solid cube, and then
|
|
7164
|
-
* defining a further single 'void' cube inside the larger one.
|
|
7165
|
-
* Similarly, the Compound Block Volume can represent irregular
|
|
7166
|
-
* shaped volumes (e.g. a tree consists of a trunk and lots of
|
|
7167
|
-
* leaf cubes which are not necessarily contiguously placed).
|
|
7168
|
-
* Each of the volumes added to the CompoundBlockVolume are (by
|
|
7169
|
-
* default) relative to the origin set (either at construction
|
|
7170
|
-
* or via one of the set functions).
|
|
7171
|
-
* However, it is also possible to push volumes to the compound
|
|
7172
|
-
* collection which are absolute in nature and are not affected
|
|
7173
|
-
* by origin changes.
|
|
7174
|
-
*/
|
|
7175
|
-
export class CompoundBlockVolume {
|
|
7176
|
-
/**
|
|
7177
|
-
* @remarks
|
|
7178
|
-
* Return the 'capacity' of the bounding rectangle which
|
|
7179
|
-
* represents the collection of volumes in the stack
|
|
7180
|
-
*
|
|
7181
|
-
*/
|
|
7182
|
-
readonly capacity: number;
|
|
7183
|
-
readonly items: CompoundBlockVolumeItem[];
|
|
7184
|
-
readonly itemsAbsolute: CompoundBlockVolumeItem[];
|
|
7185
|
-
/**
|
|
7186
|
-
* @remarks
|
|
7187
|
-
* Return the number of volumes (positive and negative) in the
|
|
7188
|
-
* volume stack
|
|
7189
|
-
*
|
|
7190
|
-
*/
|
|
7191
|
-
readonly volumeCount: number;
|
|
7192
|
-
/**
|
|
7193
|
-
* @remarks
|
|
7194
|
-
* Create a CompoundBlockVolume object
|
|
7195
|
-
*
|
|
7196
|
-
* @param origin
|
|
7197
|
-
* An optional world space origin on which to center the
|
|
7198
|
-
* compound volume.
|
|
7199
|
-
* If not specified, the origin is set to (0,0,0)
|
|
7200
|
-
*/
|
|
7201
|
-
constructor(origin?: Vector3);
|
|
7202
|
-
/**
|
|
7203
|
-
* @remarks
|
|
7204
|
-
* Clear the contents of the volume stack
|
|
7205
|
-
*
|
|
7206
|
-
* This function can't be called in restricted-execution mode.
|
|
7207
|
-
*
|
|
7208
|
-
*/
|
|
7209
|
-
clear(): void;
|
|
7210
|
-
/**
|
|
7211
|
-
* @remarks
|
|
7212
|
-
* Fetch a Block Location Iterator for the Compound Block
|
|
7213
|
-
* Volume. This iterator will allow a creator to iterate
|
|
7214
|
-
* across all of the selected volumes within the larger
|
|
7215
|
-
* bounding area.
|
|
7216
|
-
* Areas of a volume which have been overridden by a
|
|
7217
|
-
* subtractive volume will not be included in the iterator
|
|
7218
|
-
* step.
|
|
7219
|
-
* (i.e. if you push a cube to the stack, and then push a
|
|
7220
|
-
* subtractive volume to the same location, then the iterator
|
|
7221
|
-
* will step over the initial volume because it is considered
|
|
7222
|
-
* negative space)
|
|
7223
|
-
* Note that the Block Locations returned by this iterator are
|
|
7224
|
-
* in absolute world space (irrespective of whether the
|
|
7225
|
-
* compound volume items pushed are absolute or relative)
|
|
7226
|
-
*
|
|
7227
|
-
* This function can't be called in restricted-execution mode.
|
|
7228
|
-
*
|
|
7229
|
-
*/
|
|
7230
|
-
getBlockLocationIterator(): BlockLocationIterator;
|
|
7231
|
-
/**
|
|
7232
|
-
* @remarks
|
|
7233
|
-
* Get the largest bounding box that represents a container for
|
|
7234
|
-
* all of the volumes on the stack
|
|
7235
|
-
* Note that the bounding box returned is represented in
|
|
7236
|
-
* absolute world space (irrespective of whether the compound
|
|
7237
|
-
* volume items pushed are absolute or relative)
|
|
7238
|
-
*
|
|
7239
|
-
* This function can't be called in restricted-execution mode.
|
|
7240
|
-
*
|
|
7241
|
-
*/
|
|
7242
|
-
getBoundingBox(): BlockBoundingBox;
|
|
7243
|
-
/**
|
|
7244
|
-
* @remarks
|
|
7245
|
-
* Get the max block location of the outermost bounding
|
|
7246
|
-
* rectangle which represents the volumes on the stack.
|
|
7247
|
-
* Note that the max location returned is in absolute world
|
|
7248
|
-
* space (irrespective of whether the compound volume items
|
|
7249
|
-
* pushed are absolute or relative)
|
|
7250
|
-
*
|
|
7251
|
-
* This function can't be called in restricted-execution mode.
|
|
7252
|
-
*
|
|
7253
|
-
*/
|
|
7254
|
-
getMax(): Vector3;
|
|
7255
|
-
/**
|
|
7256
|
-
* @remarks
|
|
7257
|
-
* Get the min block location of the outermost bounding
|
|
7258
|
-
* rectangle which represents the volumes on the stack.
|
|
7259
|
-
* Note that the min location returned is in absolute world
|
|
7260
|
-
* space (irrespective of whether the compound volume items
|
|
7261
|
-
* pushed are absolute or relative)
|
|
7262
|
-
*
|
|
7263
|
-
* This function can't be called in restricted-execution mode.
|
|
7264
|
-
*
|
|
7265
|
-
*/
|
|
7266
|
-
getMin(): Vector3;
|
|
7267
|
-
/**
|
|
7268
|
-
* @remarks
|
|
7269
|
-
* Fetch the origin in world space of the compound volume
|
|
7270
|
-
*
|
|
7271
|
-
* This function can't be called in restricted-execution mode.
|
|
7272
|
-
*
|
|
7273
|
-
*/
|
|
7274
|
-
getOrigin(): Vector3;
|
|
7275
|
-
/**
|
|
7276
|
-
* @remarks
|
|
7277
|
-
* Return a boolean which signals if there are any volume items
|
|
7278
|
-
* pushed to the volume
|
|
7279
|
-
*
|
|
7280
|
-
* This function can't be called in restricted-execution mode.
|
|
7281
|
-
*
|
|
7282
|
-
*/
|
|
7283
|
-
isEmpty(): boolean;
|
|
7284
|
-
/**
|
|
7285
|
-
* @remarks
|
|
7286
|
-
* Return a boolean representing whether or not a given
|
|
7287
|
-
* absolute world space block location is inside a positive
|
|
7288
|
-
* block volume.
|
|
7289
|
-
* E.g. if the stack contains a large cube followed by a
|
|
7290
|
-
* slightly smaller negative cube, and the test location is
|
|
7291
|
-
* within the negative cube - the function will return false
|
|
7292
|
-
* because it's not 'inside' a volume (it IS inside the
|
|
7293
|
-
* bounding rectangle, but it is not inside a positively
|
|
7294
|
-
* defined location)
|
|
7295
|
-
*
|
|
7296
|
-
* This function can't be called in restricted-execution mode.
|
|
7297
|
-
*
|
|
7298
|
-
*/
|
|
7299
|
-
isInside(worldLocation: Vector3): boolean;
|
|
7300
|
-
/**
|
|
7301
|
-
* @remarks
|
|
7302
|
-
* Inspect the last entry pushed to the volume stack without
|
|
7303
|
-
* affecting the stack contents.
|
|
7304
|
-
*
|
|
7305
|
-
* This function can't be called in restricted-execution mode.
|
|
7306
|
-
*
|
|
7307
|
-
* @param forceRelativity
|
|
7308
|
-
* Determine whether the function returns a
|
|
7309
|
-
* CompoundBlockVolumeItem which is forced into either relative
|
|
7310
|
-
* or absolute coordinate system.
|
|
7311
|
-
* `true` = force returned item to be relative to volume origin
|
|
7312
|
-
* `false` = force returned item to be absolute world space
|
|
7313
|
-
* location
|
|
7314
|
-
*
|
|
7315
|
-
* If no flag is specified, the item returned retains whatever
|
|
7316
|
-
* relativity it had when it was pushed
|
|
7317
|
-
* @returns
|
|
7318
|
-
* Returns undefined if the stack is empty
|
|
7319
|
-
*/
|
|
7320
|
-
peekLastVolume(forceRelativity?: CompoundBlockVolumePositionRelativity): CompoundBlockVolumeItem | undefined;
|
|
7321
|
-
/**
|
|
7322
|
-
* @remarks
|
|
7323
|
-
* Remove the last entry from the volume stack. This will
|
|
7324
|
-
* reduce the stack size by one
|
|
7325
|
-
*
|
|
7326
|
-
* This function can't be called in restricted-execution mode.
|
|
7327
|
-
*
|
|
7328
|
-
*/
|
|
7329
|
-
popVolume(): boolean;
|
|
7330
|
-
/**
|
|
7331
|
-
* @remarks
|
|
7332
|
-
* Push a volume item to the stack. The volume item contains
|
|
7333
|
-
* an 'action' parameter which determines whether this volume
|
|
7334
|
-
* is a positive or negative space.
|
|
7335
|
-
* The item also contains a `locationRelativity` which
|
|
7336
|
-
* determines whether it is relative or absolute to the
|
|
7337
|
-
* compound volume origin
|
|
7338
|
-
*
|
|
7339
|
-
* This function can't be called in restricted-execution mode.
|
|
7340
|
-
*
|
|
7341
|
-
* @param item
|
|
7342
|
-
* Item to push to the end of the stack
|
|
7343
|
-
*/
|
|
7344
|
-
pushVolume(item: CompoundBlockVolumeItem): void;
|
|
7345
|
-
/**
|
|
7346
|
-
* @remarks
|
|
7347
|
-
* If the volume stack is empty, this function will push the
|
|
7348
|
-
* specified item to the stack.
|
|
7349
|
-
* If the volume stack is NOT empty, this function will replace
|
|
7350
|
-
* the last item on the stack with the new item.
|
|
7351
|
-
*
|
|
7352
|
-
* This function can't be called in restricted-execution mode.
|
|
7353
|
-
*
|
|
7354
|
-
* @param item
|
|
7355
|
-
* Item to add or replace
|
|
7356
|
-
*/
|
|
7357
|
-
replaceOrAddLastVolume(item: CompoundBlockVolumeItem): boolean;
|
|
7358
|
-
/**
|
|
7359
|
-
* @remarks
|
|
7360
|
-
* Set the origin of the compound volume to an absolute world
|
|
7361
|
-
* space location
|
|
7362
|
-
*
|
|
7363
|
-
* This function can't be called in restricted-execution mode.
|
|
7364
|
-
*
|
|
7365
|
-
* @param preserveExistingVolumes
|
|
7366
|
-
* This optional boolean flag determines whether the relative
|
|
7367
|
-
* `CompoundBlockVolumeItem`'s are frozen in place, or are
|
|
7368
|
-
* affected by the new origin.
|
|
7369
|
-
* Imagine a scenario where you have a series of relative
|
|
7370
|
-
* locations around an origin which make up a sphere; all of
|
|
7371
|
-
* these locations are in the range of -2 to 2.
|
|
7372
|
-
* Push each of these locations to the compound volume as
|
|
7373
|
-
* relative items.
|
|
7374
|
-
* Now, move the origin and all of the locations representing
|
|
7375
|
-
* the sphere move accordingly.
|
|
7376
|
-
* However, let's say you want to add a 2nd sphere next to the
|
|
7377
|
-
* 1st.
|
|
7378
|
-
* In this case, set the new origin a few locations over, but
|
|
7379
|
-
* 'preserveExistingVolumes' = true.
|
|
7380
|
-
* This will set a new origin, but the existing sphere
|
|
7381
|
-
* locations will remain relative to the original origin.
|
|
7382
|
-
* Now, you can push the relative sphere locations again (this
|
|
7383
|
-
* time they will be relative to the new origin) - resulting in
|
|
7384
|
-
* 2 spheres next to each other.
|
|
7385
|
-
*/
|
|
7386
|
-
setOrigin(position: Vector3, preserveExistingVolumes?: boolean): void;
|
|
7387
|
-
/**
|
|
7388
|
-
* @remarks
|
|
7389
|
-
* Similar to {@link CompoundBlockVolume.setOrigin} - this
|
|
7390
|
-
* function will translate the origin by a given delta to a new
|
|
7391
|
-
* position
|
|
7392
|
-
*
|
|
7393
|
-
* This function can't be called in restricted-execution mode.
|
|
7394
|
-
*
|
|
7395
|
-
* @param preserveExistingVolumes
|
|
7396
|
-
* See the description for the arguments to {@link
|
|
7397
|
-
* CompoundBlockVolume.setOrigin}
|
|
7398
|
-
*/
|
|
7399
|
-
translateOrigin(delta: Vector3, preserveExistingVolumes?: boolean): void;
|
|
7400
|
-
}
|
|
7401
|
-
|
|
7402
6537
|
/**
|
|
7403
6538
|
* Represents a container that can hold sets of items. Used
|
|
7404
6539
|
* with entities such as Players, Chest Minecarts, Llamas, and
|
|
@@ -7536,9 +6671,7 @@ export class Container {
|
|
|
7536
6671
|
*
|
|
7537
6672
|
* @param itemStack
|
|
7538
6673
|
* The stack of items to add.
|
|
7539
|
-
* @throws
|
|
7540
|
-
* Won't throw {@link ContainerRules} error for over weight
|
|
7541
|
-
* limit but will instead add items up to the weight limit.
|
|
6674
|
+
* @throws This function can throw errors.
|
|
7542
6675
|
*
|
|
7543
6676
|
* {@link ContainerRulesError}
|
|
7544
6677
|
*
|
|
@@ -7776,8 +6909,6 @@ export class Container {
|
|
|
7776
6909
|
* @throws
|
|
7777
6910
|
* Throws if either this container or `toContainer` are invalid
|
|
7778
6911
|
* or if the `fromSlot` or `toSlot` indices out of bounds.
|
|
7779
|
-
* Won't throw {@link ContainerRules} error for over weight
|
|
7780
|
-
* limit but will instead add items up to the weight limit.
|
|
7781
6912
|
*
|
|
7782
6913
|
* {@link ContainerRulesError}
|
|
7783
6914
|
*
|
|
@@ -8436,40 +7567,6 @@ export class Dimension {
|
|
|
8436
7567
|
biomeToFind: BiomeType | string,
|
|
8437
7568
|
options?: BiomeSearchOptions,
|
|
8438
7569
|
): Vector3 | undefined;
|
|
8439
|
-
/**
|
|
8440
|
-
* @beta
|
|
8441
|
-
* @remarks
|
|
8442
|
-
* Clones a region of blocks from one area of the dimension to
|
|
8443
|
-
* another.
|
|
8444
|
-
*
|
|
8445
|
-
* This function can't be called in restricted-execution mode.
|
|
8446
|
-
*
|
|
8447
|
-
* @param beginLocation
|
|
8448
|
-
* The lower northwest starting corner of the area to clone
|
|
8449
|
-
* from.
|
|
8450
|
-
* @param endLocation
|
|
8451
|
-
* The upper southeast ending corner of the area to clone from.
|
|
8452
|
-
* @param destination
|
|
8453
|
-
* The lower northwest starting corner of the area to clone to.
|
|
8454
|
-
* @param cloneMode
|
|
8455
|
-
* Specifies how the cloned blocks should be placed at the
|
|
8456
|
-
* destination.
|
|
8457
|
-
* @param filter
|
|
8458
|
-
* An optional block filter used to include only matching
|
|
8459
|
-
* blocks from the source area.
|
|
8460
|
-
* @throws This function can throw errors.
|
|
8461
|
-
*
|
|
8462
|
-
* {@link Error}
|
|
8463
|
-
*
|
|
8464
|
-
* {@link LocationOutOfWorldBoundariesError}
|
|
8465
|
-
*/
|
|
8466
|
-
cloneBlocks(
|
|
8467
|
-
beginLocation: Vector3,
|
|
8468
|
-
endLocation: Vector3,
|
|
8469
|
-
destination: Vector3,
|
|
8470
|
-
cloneMode: CloneMode,
|
|
8471
|
-
filter?: BlockFilter,
|
|
8472
|
-
): void;
|
|
8473
7570
|
/**
|
|
8474
7571
|
* @remarks
|
|
8475
7572
|
* Checks if an area contains the specified biomes. If the area
|
|
@@ -8708,15 +7805,12 @@ export class Dimension {
|
|
|
8708
7805
|
*/
|
|
8709
7806
|
getBlockFromRay(location: Vector3, direction: Vector3, options?: BlockRaycastOptions): BlockRaycastHit | undefined;
|
|
8710
7807
|
/**
|
|
7808
|
+
* @rc
|
|
8711
7809
|
* @remarks
|
|
8712
|
-
* Gets all the blocks in a volume that satisfy the
|
|
8713
|
-
* options.
|
|
7810
|
+
* Gets all the blocks in a volume that satisfy the filter.
|
|
8714
7811
|
*
|
|
8715
7812
|
* @param volume
|
|
8716
7813
|
* Volume of blocks that will be checked.
|
|
8717
|
-
* @param options
|
|
8718
|
-
* Block query options including filter criteria and optional
|
|
8719
|
-
* closest/farthest distance sorting from a location.
|
|
8720
7814
|
* @param allowUnloadedChunks
|
|
8721
7815
|
* If set to true will suppress the UnloadedChunksError if some
|
|
8722
7816
|
* or all of the block volume is outside of the loaded chunks.
|
|
@@ -8725,7 +7819,7 @@ export class Dimension {
|
|
|
8725
7819
|
* Defaults to: false
|
|
8726
7820
|
* @returns
|
|
8727
7821
|
* Returns the ListBlockVolume that contains all the block
|
|
8728
|
-
* locations that satisfied the block
|
|
7822
|
+
* locations that satisfied the block filter.
|
|
8729
7823
|
* @throws This function can throw errors.
|
|
8730
7824
|
*
|
|
8731
7825
|
* {@link minecraftcommon.ArgumentOutOfBoundsError}
|
|
@@ -8850,26 +7944,6 @@ export class Dimension {
|
|
|
8850
7944
|
* {@link minecraftcommon.UnsupportedFunctionalityError}
|
|
8851
7945
|
*/
|
|
8852
7946
|
getEntitiesFromRay(location: Vector3, direction: Vector3, options?: EntityRaycastOptions): EntityRaycastHit[];
|
|
8853
|
-
/**
|
|
8854
|
-
* @beta
|
|
8855
|
-
* @remarks
|
|
8856
|
-
* Returns a vector of generated structures that contain the
|
|
8857
|
-
* specified location (ex: Pillager Outpost, Mineshaft, etc.).
|
|
8858
|
-
* The vector will be empty if no structures are found.
|
|
8859
|
-
*
|
|
8860
|
-
* @param location
|
|
8861
|
-
* Location at which to check for structures.
|
|
8862
|
-
* @throws
|
|
8863
|
-
* An error will be thrown if the location is out of world
|
|
8864
|
-
* bounds.
|
|
8865
|
-
* An error will be thrown if the location is in an unloaded
|
|
8866
|
-
* chunk.
|
|
8867
|
-
*
|
|
8868
|
-
* {@link LocationInUnloadedChunkError}
|
|
8869
|
-
*
|
|
8870
|
-
* {@link LocationOutOfWorldBoundariesError}
|
|
8871
|
-
*/
|
|
8872
|
-
getGeneratedStructures(location: Vector3): (minecraftvanilladata.MinecraftFeatureTypes | string)[];
|
|
8873
7947
|
/**
|
|
8874
7948
|
* @remarks
|
|
8875
7949
|
* Returns the total brightness level of light shining on a
|
|
@@ -8931,16 +8005,6 @@ export class Dimension {
|
|
|
8931
8005
|
* @throws This function can throw errors.
|
|
8932
8006
|
*/
|
|
8933
8007
|
getTopmostBlock(locationXZ: VectorXZ, minHeight?: number): Block | undefined;
|
|
8934
|
-
/**
|
|
8935
|
-
* @beta
|
|
8936
|
-
* @remarks
|
|
8937
|
-
* Returns the current weather.
|
|
8938
|
-
*
|
|
8939
|
-
* @returns
|
|
8940
|
-
* Returns a WeatherType that explains the broad category of
|
|
8941
|
-
* weather that is currently going on.
|
|
8942
|
-
*/
|
|
8943
|
-
getWeather(): WeatherType;
|
|
8944
8008
|
/**
|
|
8945
8009
|
* @remarks
|
|
8946
8010
|
* Returns true if the chunk at the given location is loaded
|
|
@@ -9186,11 +8250,7 @@ export class Dimension {
|
|
|
9186
8250
|
* }
|
|
9187
8251
|
* ```
|
|
9188
8252
|
*/
|
|
9189
|
-
spawnEntity
|
|
9190
|
-
identifier: EntityIdentifierType<NoInfer<T>>,
|
|
9191
|
-
location: Vector3,
|
|
9192
|
-
options?: SpawnEntityOptions,
|
|
9193
|
-
): Entity;
|
|
8253
|
+
spawnEntity(identifier: EntityType | string, location: Vector3, options?: SpawnEntityOptions): Entity;
|
|
9194
8254
|
/**
|
|
9195
8255
|
* @remarks
|
|
9196
8256
|
* Creates a new item stack as an entity at the specified
|
|
@@ -9285,46 +8345,6 @@ export class Dimension {
|
|
|
9285
8345
|
* ```
|
|
9286
8346
|
*/
|
|
9287
8347
|
spawnParticle(effectName: string, location: Vector3, molangVariables?: MolangVariableMap): void;
|
|
9288
|
-
/**
|
|
9289
|
-
* @beta
|
|
9290
|
-
* @remarks
|
|
9291
|
-
* Spawns an experience orb at a specified location in the
|
|
9292
|
-
* dimension.
|
|
9293
|
-
*
|
|
9294
|
-
* This function can't be called in restricted-execution mode.
|
|
9295
|
-
*
|
|
9296
|
-
* @param location
|
|
9297
|
-
* The location at which to spawn the experience orb.
|
|
9298
|
-
* @param amount
|
|
9299
|
-
* The amount of experience to give the experience orb.
|
|
9300
|
-
* Bounds: [1, 12000]
|
|
9301
|
-
* @throws This function can throw errors.
|
|
9302
|
-
*
|
|
9303
|
-
* {@link LocationInUnloadedChunkError}
|
|
9304
|
-
*
|
|
9305
|
-
* {@link LocationOutOfWorldBoundariesError}
|
|
9306
|
-
*/
|
|
9307
|
-
spawnXp(location: Vector3, amount: number): void;
|
|
9308
|
-
/**
|
|
9309
|
-
* @beta
|
|
9310
|
-
* @remarks
|
|
9311
|
-
* Stops all sounds from playing for all players.
|
|
9312
|
-
*
|
|
9313
|
-
* This function can't be called in restricted-execution mode.
|
|
9314
|
-
*
|
|
9315
|
-
*/
|
|
9316
|
-
stopAllSounds(): void;
|
|
9317
|
-
/**
|
|
9318
|
-
* @beta
|
|
9319
|
-
* @remarks
|
|
9320
|
-
* Stops a sound from playing for all players.
|
|
9321
|
-
*
|
|
9322
|
-
* This function can't be called in restricted-execution mode.
|
|
9323
|
-
*
|
|
9324
|
-
* @param soundId
|
|
9325
|
-
* Identifier of the sound.
|
|
9326
|
-
*/
|
|
9327
|
-
stopSound(soundId: string): void;
|
|
9328
8348
|
}
|
|
9329
8349
|
|
|
9330
8350
|
/**
|
|
@@ -9599,8 +8619,6 @@ export class EffectTypes {
|
|
|
9599
8619
|
* @remarks
|
|
9600
8620
|
* Effect type for the given identifier.
|
|
9601
8621
|
*
|
|
9602
|
-
* This function can't be called in restricted-execution mode.
|
|
9603
|
-
*
|
|
9604
8622
|
* @param identifier
|
|
9605
8623
|
* The identifier for the effect.
|
|
9606
8624
|
* @returns
|
|
@@ -9612,8 +8630,6 @@ export class EffectTypes {
|
|
|
9612
8630
|
* @remarks
|
|
9613
8631
|
* Gets all effects.
|
|
9614
8632
|
*
|
|
9615
|
-
* This function can't be called in restricted-execution mode.
|
|
9616
|
-
*
|
|
9617
8633
|
* @returns
|
|
9618
8634
|
* A list of all effects.
|
|
9619
8635
|
*/
|
|
@@ -9908,18 +8924,6 @@ export class Entity {
|
|
|
9908
8924
|
*
|
|
9909
8925
|
*/
|
|
9910
8926
|
readonly scoreboardIdentity?: ScoreboardIdentity;
|
|
9911
|
-
/**
|
|
9912
|
-
* @beta
|
|
9913
|
-
* @remarks
|
|
9914
|
-
* Retrieves or sets an entity that is used as the target of
|
|
9915
|
-
* AI-related behaviors, like attacking. If the entity
|
|
9916
|
-
* currently has no target returns undefined.
|
|
9917
|
-
*
|
|
9918
|
-
* @throws This property can throw when used.
|
|
9919
|
-
*
|
|
9920
|
-
* {@link InvalidEntityError}
|
|
9921
|
-
*/
|
|
9922
|
-
readonly target?: Entity;
|
|
9923
8927
|
/**
|
|
9924
8928
|
* @remarks
|
|
9925
8929
|
* Identifier of the type of the entity - for example,
|
|
@@ -11160,18 +10164,6 @@ export class EntityBaseMovementComponent extends EntityComponent {
|
|
|
11160
10164
|
// @ts-ignore Class inheritance allowed for native defined classes
|
|
11161
10165
|
export class EntityBreathableComponent extends EntityComponent {
|
|
11162
10166
|
private constructor();
|
|
11163
|
-
/**
|
|
11164
|
-
* @beta
|
|
11165
|
-
* @remarks
|
|
11166
|
-
* The current air supply of the entity.
|
|
11167
|
-
*
|
|
11168
|
-
* This property can't be edited in restricted-execution mode.
|
|
11169
|
-
*
|
|
11170
|
-
* @throws
|
|
11171
|
-
* Will throw an error if the air supply is out of bounds
|
|
11172
|
-
* [suffocationTime, maxAirSupply].
|
|
11173
|
-
*/
|
|
11174
|
-
airSupply: number;
|
|
11175
10167
|
/**
|
|
11176
10168
|
* @remarks
|
|
11177
10169
|
* If true, this entity can breathe in air.
|
|
@@ -11192,22 +10184,14 @@ export class EntityBreathableComponent extends EntityComponent {
|
|
|
11192
10184
|
*
|
|
11193
10185
|
* @throws This property can throw when used.
|
|
11194
10186
|
*/
|
|
11195
|
-
readonly breathesSolids: boolean;
|
|
11196
|
-
/**
|
|
11197
|
-
* @remarks
|
|
11198
|
-
* If true, this entity can breathe in water.
|
|
11199
|
-
*
|
|
11200
|
-
* @throws This property can throw when used.
|
|
11201
|
-
*/
|
|
11202
|
-
readonly breathesWater: boolean;
|
|
10187
|
+
readonly breathesSolids: boolean;
|
|
11203
10188
|
/**
|
|
11204
|
-
* @beta
|
|
11205
10189
|
* @remarks
|
|
11206
|
-
* If true,
|
|
10190
|
+
* If true, this entity can breathe in water.
|
|
11207
10191
|
*
|
|
11208
10192
|
* @throws This property can throw when used.
|
|
11209
10193
|
*/
|
|
11210
|
-
readonly
|
|
10194
|
+
readonly breathesWater: boolean;
|
|
11211
10195
|
/**
|
|
11212
10196
|
* @remarks
|
|
11213
10197
|
* If true, this entity will have visible bubbles while in
|
|
@@ -13158,42 +12142,6 @@ export class EntityNavigationWalkComponent extends EntityNavigationComponent {
|
|
|
13158
12142
|
static readonly componentId = 'minecraft:navigation.walk';
|
|
13159
12143
|
}
|
|
13160
12144
|
|
|
13161
|
-
/**
|
|
13162
|
-
* @beta
|
|
13163
|
-
* Adds NPC capabilities to an entity such as custom skin,
|
|
13164
|
-
* name, and dialogue interactions.
|
|
13165
|
-
*/
|
|
13166
|
-
// @ts-ignore Class inheritance allowed for native defined classes
|
|
13167
|
-
export class EntityNpcComponent extends EntityComponent {
|
|
13168
|
-
private constructor();
|
|
13169
|
-
/**
|
|
13170
|
-
* @remarks
|
|
13171
|
-
* The DialogueScene that is opened when players first interact
|
|
13172
|
-
* with the NPC.
|
|
13173
|
-
*
|
|
13174
|
-
* This property can't be edited in restricted-execution mode.
|
|
13175
|
-
*
|
|
13176
|
-
*/
|
|
13177
|
-
defaultScene: string;
|
|
13178
|
-
/**
|
|
13179
|
-
* @remarks
|
|
13180
|
-
* The name of the NPC as it is displayed to players.
|
|
13181
|
-
*
|
|
13182
|
-
* This property can't be edited in restricted-execution mode.
|
|
13183
|
-
*
|
|
13184
|
-
*/
|
|
13185
|
-
name: string;
|
|
13186
|
-
/**
|
|
13187
|
-
* @remarks
|
|
13188
|
-
* The index of the skin the NPC will use.
|
|
13189
|
-
*
|
|
13190
|
-
* This property can't be edited in restricted-execution mode.
|
|
13191
|
-
*
|
|
13192
|
-
*/
|
|
13193
|
-
skinIndex: number;
|
|
13194
|
-
static readonly componentId = 'minecraft:npc';
|
|
13195
|
-
}
|
|
13196
|
-
|
|
13197
12145
|
/**
|
|
13198
12146
|
* When present on an entity, this entity is on fire.
|
|
13199
12147
|
* @example setOnFire.ts
|
|
@@ -13867,7 +12815,7 @@ export class EntitySpawnAfterEventSignal {
|
|
|
13867
12815
|
}
|
|
13868
12816
|
|
|
13869
12817
|
/**
|
|
13870
|
-
* @
|
|
12818
|
+
* @rc
|
|
13871
12819
|
* Contains data related to an entity beginning to sneak.
|
|
13872
12820
|
*/
|
|
13873
12821
|
export class EntityStartSneakingAfterEvent {
|
|
@@ -13881,7 +12829,7 @@ export class EntityStartSneakingAfterEvent {
|
|
|
13881
12829
|
}
|
|
13882
12830
|
|
|
13883
12831
|
/**
|
|
13884
|
-
* @
|
|
12832
|
+
* @rc
|
|
13885
12833
|
* Manages callbacks that are connected to when an entity
|
|
13886
12834
|
* begins sneaking.
|
|
13887
12835
|
*/
|
|
@@ -13915,7 +12863,7 @@ export class EntityStartSneakingAfterEventSignal {
|
|
|
13915
12863
|
}
|
|
13916
12864
|
|
|
13917
12865
|
/**
|
|
13918
|
-
* @
|
|
12866
|
+
* @rc
|
|
13919
12867
|
* Contains data related to an entity stopping sneaking.
|
|
13920
12868
|
*/
|
|
13921
12869
|
export class EntityStopSneakingAfterEvent {
|
|
@@ -13929,7 +12877,7 @@ export class EntityStopSneakingAfterEvent {
|
|
|
13929
12877
|
}
|
|
13930
12878
|
|
|
13931
12879
|
/**
|
|
13932
|
-
* @
|
|
12880
|
+
* @rc
|
|
13933
12881
|
* Manages callbacks that are connected to when an entity stops
|
|
13934
12882
|
* sneaking.
|
|
13935
12883
|
*/
|
|
@@ -14050,7 +12998,7 @@ export class EntityTameableComponent extends EntityComponent {
|
|
|
14050
12998
|
}
|
|
14051
12999
|
|
|
14052
13000
|
/**
|
|
14053
|
-
* @
|
|
13001
|
+
* @rc
|
|
14054
13002
|
* Contains data related to an entity being tamed.
|
|
14055
13003
|
*/
|
|
14056
13004
|
export class EntityTamedAfterEvent {
|
|
@@ -14060,7 +13008,7 @@ export class EntityTamedAfterEvent {
|
|
|
14060
13008
|
}
|
|
14061
13009
|
|
|
14062
13010
|
/**
|
|
14063
|
-
* @
|
|
13011
|
+
* @rc
|
|
14064
13012
|
* Manages callbacks that are connected to when an entity is
|
|
14065
13013
|
* tamed.
|
|
14066
13014
|
*/
|
|
@@ -14075,7 +13023,7 @@ export class EntityTamedAfterEventSignal {
|
|
|
14075
13023
|
*/
|
|
14076
13024
|
subscribe(
|
|
14077
13025
|
callback: (arg0: EntityTamedAfterEvent) => void,
|
|
14078
|
-
options?:
|
|
13026
|
+
options?: EntityTamedEventOptions,
|
|
14079
13027
|
): (arg0: EntityTamedAfterEvent) => void;
|
|
14080
13028
|
/**
|
|
14081
13029
|
* @remarks
|
|
@@ -14088,7 +13036,7 @@ export class EntityTamedAfterEventSignal {
|
|
|
14088
13036
|
}
|
|
14089
13037
|
|
|
14090
13038
|
/**
|
|
14091
|
-
* @
|
|
13039
|
+
* @rc
|
|
14092
13040
|
* Contains information regarding an event before an entity is
|
|
14093
13041
|
* tamed.
|
|
14094
13042
|
*/
|
|
@@ -14115,7 +13063,7 @@ export class EntityTamedBeforeEvent {
|
|
|
14115
13063
|
}
|
|
14116
13064
|
|
|
14117
13065
|
/**
|
|
14118
|
-
* @
|
|
13066
|
+
* @rc
|
|
14119
13067
|
* Manages callbacks that are connected to before an entity is
|
|
14120
13068
|
* tamed.
|
|
14121
13069
|
*/
|
|
@@ -14134,7 +13082,7 @@ export class EntityTamedBeforeEventSignal {
|
|
|
14134
13082
|
*/
|
|
14135
13083
|
subscribe(
|
|
14136
13084
|
callback: (arg0: EntityTamedBeforeEvent) => void,
|
|
14137
|
-
options?:
|
|
13085
|
+
options?: EntityTamedEventOptions,
|
|
14138
13086
|
): (arg0: EntityTamedBeforeEvent) => void;
|
|
14139
13087
|
/**
|
|
14140
13088
|
* @remarks
|
|
@@ -14260,7 +13208,7 @@ export class EntityTypes {
|
|
|
14260
13208
|
* Retrieves an entity type using a string-based identifier.
|
|
14261
13209
|
*
|
|
14262
13210
|
*/
|
|
14263
|
-
static get
|
|
13211
|
+
static get(identifier: string): EntityType | undefined;
|
|
14264
13212
|
/**
|
|
14265
13213
|
* @remarks
|
|
14266
13214
|
* Retrieves a set of all entity types within this world.
|
|
@@ -14666,7 +13614,7 @@ export class FluidContainer {
|
|
|
14666
13614
|
}
|
|
14667
13615
|
|
|
14668
13616
|
/**
|
|
14669
|
-
* @
|
|
13617
|
+
* @rc
|
|
14670
13618
|
* Provides access to the fog definitions stack of a player
|
|
14671
13619
|
* entity, allowing scripts to push, pop, remove, and query
|
|
14672
13620
|
* active fog definitions.
|
|
@@ -14986,13 +13934,6 @@ export class GameRules {
|
|
|
14986
13934
|
*
|
|
14987
13935
|
*/
|
|
14988
13936
|
playersSleepingPercentage: number;
|
|
14989
|
-
/**
|
|
14990
|
-
* @beta
|
|
14991
|
-
* @remarks
|
|
14992
|
-
* This property can't be edited in restricted-execution mode.
|
|
14993
|
-
*
|
|
14994
|
-
*/
|
|
14995
|
-
playerWaypoints: PlayerWaypointsMode;
|
|
14996
13937
|
/**
|
|
14997
13938
|
* @remarks
|
|
14998
13939
|
* This property can't be edited in restricted-execution mode.
|
|
@@ -15141,7 +14082,7 @@ export class ISerializable {
|
|
|
15141
14082
|
}
|
|
15142
14083
|
|
|
15143
14084
|
/**
|
|
15144
|
-
* @
|
|
14085
|
+
* @rc
|
|
15145
14086
|
* Represents the dynamic properties of a block. Only available
|
|
15146
14087
|
* from block entities. Up to 1KBytes of data can be stored per
|
|
15147
14088
|
* content pack per block entity in their dynamic properties
|
|
@@ -17909,33 +16850,6 @@ export class MatchToolCondition extends LootItemCondition {
|
|
|
17909
16850
|
readonly itemTagsNone: string[];
|
|
17910
16851
|
}
|
|
17911
16852
|
|
|
17912
|
-
/**
|
|
17913
|
-
* @beta
|
|
17914
|
-
* A specific currently-internal event used for passing
|
|
17915
|
-
* messages from client to server.
|
|
17916
|
-
*/
|
|
17917
|
-
export class MessageReceiveAfterEvent {
|
|
17918
|
-
private constructor();
|
|
17919
|
-
/**
|
|
17920
|
-
* @remarks
|
|
17921
|
-
* The message identifier.
|
|
17922
|
-
*
|
|
17923
|
-
*/
|
|
17924
|
-
readonly id: string;
|
|
17925
|
-
/**
|
|
17926
|
-
* @remarks
|
|
17927
|
-
* The message.
|
|
17928
|
-
*
|
|
17929
|
-
*/
|
|
17930
|
-
readonly message: string;
|
|
17931
|
-
/**
|
|
17932
|
-
* @remarks
|
|
17933
|
-
* The player who sent the message.
|
|
17934
|
-
*
|
|
17935
|
-
*/
|
|
17936
|
-
readonly player: Player;
|
|
17937
|
-
}
|
|
17938
|
-
|
|
17939
16853
|
/**
|
|
17940
16854
|
* Contains a set of additional variable values for further
|
|
17941
16855
|
* defining how rendering and animations function.
|
|
@@ -18004,49 +16918,6 @@ export class MolangVariableMap {
|
|
|
18004
16918
|
setVector3(variableName: string, vector: Vector3): void;
|
|
18005
16919
|
}
|
|
18006
16920
|
|
|
18007
|
-
/**
|
|
18008
|
-
* @beta
|
|
18009
|
-
* Pack setting name and value that changed.
|
|
18010
|
-
*/
|
|
18011
|
-
export class PackSettingChangeAfterEvent {
|
|
18012
|
-
private constructor();
|
|
18013
|
-
/**
|
|
18014
|
-
* @remarks
|
|
18015
|
-
* The name of the setting.
|
|
18016
|
-
*
|
|
18017
|
-
*/
|
|
18018
|
-
readonly settingName: string;
|
|
18019
|
-
/**
|
|
18020
|
-
* @remarks
|
|
18021
|
-
* The value of the setting.
|
|
18022
|
-
*
|
|
18023
|
-
*/
|
|
18024
|
-
readonly settingValue: boolean | number | string;
|
|
18025
|
-
}
|
|
18026
|
-
|
|
18027
|
-
/**
|
|
18028
|
-
* @beta
|
|
18029
|
-
*/
|
|
18030
|
-
export class PackSettingChangeAfterEventSignal {
|
|
18031
|
-
private constructor();
|
|
18032
|
-
/**
|
|
18033
|
-
* @remarks
|
|
18034
|
-
* This function can't be called in restricted-execution mode.
|
|
18035
|
-
*
|
|
18036
|
-
* This function can be called in early-execution mode.
|
|
18037
|
-
*
|
|
18038
|
-
*/
|
|
18039
|
-
subscribe(callback: (arg0: PackSettingChangeAfterEvent) => void): (arg0: PackSettingChangeAfterEvent) => void;
|
|
18040
|
-
/**
|
|
18041
|
-
* @remarks
|
|
18042
|
-
* This function can't be called in restricted-execution mode.
|
|
18043
|
-
*
|
|
18044
|
-
* This function can be called in early-execution mode.
|
|
18045
|
-
*
|
|
18046
|
-
*/
|
|
18047
|
-
unsubscribe(callback: (arg0: PackSettingChangeAfterEvent) => void): void;
|
|
18048
|
-
}
|
|
18049
|
-
|
|
18050
16921
|
/**
|
|
18051
16922
|
* Loot item condition that checks whether the looting entity
|
|
18052
16923
|
* is currently a passenger of a specific type of entity.
|
|
@@ -18214,62 +17085,6 @@ export class Player extends Entity {
|
|
|
18214
17085
|
* @throws This property can throw when used.
|
|
18215
17086
|
*/
|
|
18216
17087
|
readonly camera: Camera;
|
|
18217
|
-
/**
|
|
18218
|
-
* @beta
|
|
18219
|
-
* @remarks
|
|
18220
|
-
* The player's chat display name, composed from {@link
|
|
18221
|
-
* Player.chatNamePrefix} + {@link Player.name} + {@link
|
|
18222
|
-
* Player.chatNameSuffix}. This is the name shown as the author
|
|
18223
|
-
* of chat messages sent by this player. To change the name
|
|
18224
|
-
* shown above the player's head, use {@link Entity.nameTag}.
|
|
18225
|
-
*
|
|
18226
|
-
* @throws This property can throw when used.
|
|
18227
|
-
*
|
|
18228
|
-
* {@link InvalidEntityError}
|
|
18229
|
-
*/
|
|
18230
|
-
readonly chatDisplayName: string;
|
|
18231
|
-
/**
|
|
18232
|
-
* @beta
|
|
18233
|
-
* @remarks
|
|
18234
|
-
* An optional string that, when set, is prepended to the text
|
|
18235
|
-
* of chat messages sent by this player. Useful for applying
|
|
18236
|
-
* formatting or color codes to a player's messages (e.g., '§a'
|
|
18237
|
-
* to make their messages green). Does not affect the player's
|
|
18238
|
-
* name display - use {@link Player.chatNamePrefix} for the
|
|
18239
|
-
* name shown in chat, or {@link Entity.nameTag} for the name
|
|
18240
|
-
* above the player's head. Set to undefined to clear.
|
|
18241
|
-
*
|
|
18242
|
-
* This property can't be edited in restricted-execution mode.
|
|
18243
|
-
*
|
|
18244
|
-
*/
|
|
18245
|
-
chatMessagePrefix?: string;
|
|
18246
|
-
/**
|
|
18247
|
-
* @beta
|
|
18248
|
-
* @remarks
|
|
18249
|
-
* An optional string that, when set, is prepended to the
|
|
18250
|
-
* player's name in chat messages. Does not affect the name tag
|
|
18251
|
-
* above the player's head or the player list - use {@link
|
|
18252
|
-
* Entity.nameTag} for that. To prefix the message text itself,
|
|
18253
|
-
* use {@link Player.chatMessagePrefix}. Set to undefined to
|
|
18254
|
-
* clear.
|
|
18255
|
-
*
|
|
18256
|
-
* This property can't be edited in restricted-execution mode.
|
|
18257
|
-
*
|
|
18258
|
-
*/
|
|
18259
|
-
chatNamePrefix?: string;
|
|
18260
|
-
/**
|
|
18261
|
-
* @beta
|
|
18262
|
-
* @remarks
|
|
18263
|
-
* An optional string that, when set, is appended to the
|
|
18264
|
-
* player's name in chat messages. Does not affect the name tag
|
|
18265
|
-
* above the player's head or the player list - use {@link
|
|
18266
|
-
* Entity.nameTag} for that. See also {@link
|
|
18267
|
-
* Player.chatNamePrefix}. Set to undefined to clear.
|
|
18268
|
-
*
|
|
18269
|
-
* This property can't be edited in restricted-execution mode.
|
|
18270
|
-
*
|
|
18271
|
-
*/
|
|
18272
|
-
chatNameSuffix?: string;
|
|
18273
17088
|
/**
|
|
18274
17089
|
* @remarks
|
|
18275
17090
|
* Contains the player's device information.
|
|
@@ -18284,7 +17099,7 @@ export class Player extends Entity {
|
|
|
18284
17099
|
*/
|
|
18285
17100
|
commandPermissionLevel: CommandPermissionLevel;
|
|
18286
17101
|
/**
|
|
18287
|
-
* @
|
|
17102
|
+
* @rc
|
|
18288
17103
|
* @remarks
|
|
18289
17104
|
* Contains methods for manipulating the render distance fog
|
|
18290
17105
|
* settings of a Player.
|
|
@@ -18374,19 +17189,6 @@ export class Player extends Entity {
|
|
|
18374
17189
|
* @throws This property can throw when used.
|
|
18375
17190
|
*/
|
|
18376
17191
|
readonly onScreenDisplay: ScreenDisplay;
|
|
18377
|
-
/**
|
|
18378
|
-
* @beta
|
|
18379
|
-
* @remarks
|
|
18380
|
-
* An identifier that can be used to identify a player across
|
|
18381
|
-
* sessions.
|
|
18382
|
-
*
|
|
18383
|
-
* @throws This property can throw when used.
|
|
18384
|
-
*
|
|
18385
|
-
* {@link minecraftcommon.EngineError}
|
|
18386
|
-
*
|
|
18387
|
-
* {@link InvalidEntityError}
|
|
18388
|
-
*/
|
|
18389
|
-
readonly persistentId: string;
|
|
18390
17192
|
/**
|
|
18391
17193
|
* @throws This property can throw when used.
|
|
18392
17194
|
*
|
|
@@ -18460,20 +17262,6 @@ export class Player extends Entity {
|
|
|
18460
17262
|
* Throws if the Entity or Entity ID is invalid.
|
|
18461
17263
|
*/
|
|
18462
17264
|
clearPropertyOverridesForEntity(targetEntity: Entity | string): void;
|
|
18463
|
-
/**
|
|
18464
|
-
* @beta
|
|
18465
|
-
* @remarks
|
|
18466
|
-
* Eats an item, providing the item's hunger and saturation
|
|
18467
|
-
* effects to the player. Can only be used on food items.
|
|
18468
|
-
*
|
|
18469
|
-
* This function can't be called in restricted-execution mode.
|
|
18470
|
-
*
|
|
18471
|
-
* @param itemStack
|
|
18472
|
-
* The item to eat.
|
|
18473
|
-
* @throws
|
|
18474
|
-
* Throws if the item is not a food item.
|
|
18475
|
-
*/
|
|
18476
|
-
eatItem(itemStack: ItemStack): void;
|
|
18477
17265
|
/**
|
|
18478
17266
|
* @remarks
|
|
18479
17267
|
* The player's aim-assist settings.
|
|
@@ -18507,20 +17295,6 @@ export class Player extends Entity {
|
|
|
18507
17295
|
* @throws This function can throw errors.
|
|
18508
17296
|
*/
|
|
18509
17297
|
getItemCooldown(cooldownCategory: string): number;
|
|
18510
|
-
/**
|
|
18511
|
-
* @beta
|
|
18512
|
-
* @remarks
|
|
18513
|
-
* Gets the player's ping in milliseconds.
|
|
18514
|
-
*
|
|
18515
|
-
* @returns
|
|
18516
|
-
* The player's ping in milliseconds.
|
|
18517
|
-
* @throws This function can throw errors.
|
|
18518
|
-
*
|
|
18519
|
-
* {@link minecraftcommon.EngineError}
|
|
18520
|
-
*
|
|
18521
|
-
* {@link InvalidEntityError}
|
|
18522
|
-
*/
|
|
18523
|
-
getPing(): number;
|
|
18524
17298
|
/**
|
|
18525
17299
|
* @remarks
|
|
18526
17300
|
* Gets the current spawn point of the player.
|
|
@@ -18528,21 +17302,6 @@ export class Player extends Entity {
|
|
|
18528
17302
|
* @throws This function can throw errors.
|
|
18529
17303
|
*/
|
|
18530
17304
|
getSpawnPoint(): DimensionLocation | undefined;
|
|
18531
|
-
/**
|
|
18532
|
-
* @beta
|
|
18533
|
-
* @remarks
|
|
18534
|
-
* Returns the split screen slot of the player.
|
|
18535
|
-
*
|
|
18536
|
-
* @returns
|
|
18537
|
-
* The split screen slot of the player or undefined if the
|
|
18538
|
-
* player is not in a split screen session.
|
|
18539
|
-
* @throws This function can throw errors.
|
|
18540
|
-
*
|
|
18541
|
-
* {@link minecraftcommon.EngineError}
|
|
18542
|
-
*
|
|
18543
|
-
* {@link InvalidEntityError}
|
|
18544
|
-
*/
|
|
18545
|
-
getSplitScreenSlot(): PlayerSplitScreenSlot | undefined;
|
|
18546
17305
|
/**
|
|
18547
17306
|
* @remarks
|
|
18548
17307
|
* Gets the total experience of the Player.
|
|
@@ -18606,18 +17365,7 @@ export class Player extends Entity {
|
|
|
18606
17365
|
* }
|
|
18607
17366
|
* ```
|
|
18608
17367
|
*/
|
|
18609
|
-
playSound(soundId:
|
|
18610
|
-
/**
|
|
18611
|
-
* @beta
|
|
18612
|
-
* @remarks
|
|
18613
|
-
* This is an internal-facing method for posting a system
|
|
18614
|
-
* message to downstream clients.
|
|
18615
|
-
*
|
|
18616
|
-
* This function can't be called in restricted-execution mode.
|
|
18617
|
-
*
|
|
18618
|
-
* @throws This function can throw errors.
|
|
18619
|
-
*/
|
|
18620
|
-
postClientMessage(id: string, value: string): void;
|
|
17368
|
+
playSound(soundId: string, soundOptions?: PlayerSoundOptions): SoundInstance;
|
|
18621
17369
|
/**
|
|
18622
17370
|
* @remarks
|
|
18623
17371
|
* Queues an additional music track that only this particular
|
|
@@ -18893,18 +17641,6 @@ export class Player extends Entity {
|
|
|
18893
17641
|
* @throws This function can throw errors.
|
|
18894
17642
|
*/
|
|
18895
17643
|
startItemCooldown(cooldownCategory: string, tickDuration: number): void;
|
|
18896
|
-
/**
|
|
18897
|
-
* @beta
|
|
18898
|
-
* @remarks
|
|
18899
|
-
* Stops all sounds from playing for this particular player.
|
|
18900
|
-
*
|
|
18901
|
-
* This function can't be called in restricted-execution mode.
|
|
18902
|
-
*
|
|
18903
|
-
* @throws This function can throw errors.
|
|
18904
|
-
*
|
|
18905
|
-
* {@link InvalidEntityError}
|
|
18906
|
-
*/
|
|
18907
|
-
stopAllSounds(): void;
|
|
18908
17644
|
/**
|
|
18909
17645
|
* @remarks
|
|
18910
17646
|
* Stops any music tracks from playing for this particular
|
|
@@ -18915,20 +17651,6 @@ export class Player extends Entity {
|
|
|
18915
17651
|
* @throws This function can throw errors.
|
|
18916
17652
|
*/
|
|
18917
17653
|
stopMusic(): void;
|
|
18918
|
-
/**
|
|
18919
|
-
* @beta
|
|
18920
|
-
* @remarks
|
|
18921
|
-
* Stops a sound from playing for this particular player.
|
|
18922
|
-
*
|
|
18923
|
-
* This function can't be called in restricted-execution mode.
|
|
18924
|
-
*
|
|
18925
|
-
* @param soundId
|
|
18926
|
-
* Identifier of the sound.
|
|
18927
|
-
* @throws This function can throw errors.
|
|
18928
|
-
*
|
|
18929
|
-
* {@link InvalidEntityError}
|
|
18930
|
-
*/
|
|
18931
|
-
stopSound(soundId: string): void;
|
|
18932
17654
|
}
|
|
18933
17655
|
|
|
18934
17656
|
/**
|
|
@@ -20270,106 +18992,24 @@ export class PlayerPlaceBlockAfterEventSignal {
|
|
|
20270
18992
|
*
|
|
20271
18993
|
* This function can't be called in restricted-execution mode.
|
|
20272
18994
|
*
|
|
20273
|
-
* This function can be called in early-execution mode.
|
|
20274
|
-
*
|
|
20275
|
-
*/
|
|
20276
|
-
subscribe(
|
|
20277
|
-
callback: (arg0: PlayerPlaceBlockAfterEvent) => void,
|
|
20278
|
-
options?: BlockEventOptions,
|
|
20279
|
-
): (arg0: PlayerPlaceBlockAfterEvent) => void;
|
|
20280
|
-
/**
|
|
20281
|
-
* @remarks
|
|
20282
|
-
* Removes a callback from being called when an block is placed
|
|
20283
|
-
* by a player.
|
|
20284
|
-
*
|
|
20285
|
-
* This function can't be called in restricted-execution mode.
|
|
20286
|
-
*
|
|
20287
|
-
* This function can be called in early-execution mode.
|
|
20288
|
-
*
|
|
20289
|
-
*/
|
|
20290
|
-
unsubscribe(callback: (arg0: PlayerPlaceBlockAfterEvent) => void): void;
|
|
20291
|
-
}
|
|
20292
|
-
|
|
20293
|
-
/**
|
|
20294
|
-
* @beta
|
|
20295
|
-
* Contains information regarding an event before a player
|
|
20296
|
-
* places a block.
|
|
20297
|
-
*/
|
|
20298
|
-
// @ts-ignore Class inheritance allowed for native defined classes
|
|
20299
|
-
export class PlayerPlaceBlockBeforeEvent extends BlockEvent {
|
|
20300
|
-
private constructor();
|
|
20301
|
-
/**
|
|
20302
|
-
* @remarks
|
|
20303
|
-
* If set to true, cancels the block place event.
|
|
20304
|
-
*
|
|
20305
|
-
*/
|
|
20306
|
-
cancel: boolean;
|
|
20307
|
-
/**
|
|
20308
|
-
* @remarks
|
|
20309
|
-
* The face of the block that the new block is being placed on.
|
|
20310
|
-
*
|
|
20311
|
-
*/
|
|
20312
|
-
readonly face: Direction;
|
|
20313
|
-
/**
|
|
20314
|
-
* @remarks
|
|
20315
|
-
* Location relative to the bottom north-west corner of the
|
|
20316
|
-
* block where the new block is being placed onto.
|
|
20317
|
-
*
|
|
20318
|
-
*/
|
|
20319
|
-
readonly faceLocation: Vector3;
|
|
20320
|
-
/**
|
|
20321
|
-
* @remarks
|
|
20322
|
-
* The block permutation that will be placed if the event is
|
|
20323
|
-
* not cancelled.
|
|
20324
|
-
*
|
|
20325
|
-
*/
|
|
20326
|
-
readonly permutationToPlace: BlockPermutation;
|
|
20327
|
-
/**
|
|
20328
|
-
* @remarks
|
|
20329
|
-
* Player that is placing the block for this event.
|
|
20330
|
-
*
|
|
20331
|
-
*/
|
|
20332
|
-
readonly player: Player;
|
|
20333
|
-
}
|
|
20334
|
-
|
|
20335
|
-
/**
|
|
20336
|
-
* @beta
|
|
20337
|
-
* Manages callbacks that are connected to before a block is
|
|
20338
|
-
* placed by a player.
|
|
20339
|
-
*/
|
|
20340
|
-
export class PlayerPlaceBlockBeforeEventSignal {
|
|
20341
|
-
private constructor();
|
|
20342
|
-
/**
|
|
20343
|
-
* @remarks
|
|
20344
|
-
* Adds a callback that will be called before a block is placed
|
|
20345
|
-
* by a player.
|
|
20346
|
-
*
|
|
20347
|
-
* This function can't be called in restricted-execution mode.
|
|
20348
|
-
*
|
|
20349
|
-
* This function can be called in early-execution mode.
|
|
20350
|
-
*
|
|
20351
|
-
* @param callback
|
|
20352
|
-
* This closure is called with restricted-execution privilege.
|
|
20353
|
-
* @returns
|
|
20354
|
-
* Closure that is called with restricted-execution privilege.
|
|
18995
|
+
* This function can be called in early-execution mode.
|
|
18996
|
+
*
|
|
20355
18997
|
*/
|
|
20356
18998
|
subscribe(
|
|
20357
|
-
callback: (arg0:
|
|
18999
|
+
callback: (arg0: PlayerPlaceBlockAfterEvent) => void,
|
|
20358
19000
|
options?: BlockEventOptions,
|
|
20359
|
-
): (arg0:
|
|
19001
|
+
): (arg0: PlayerPlaceBlockAfterEvent) => void;
|
|
20360
19002
|
/**
|
|
20361
19003
|
* @remarks
|
|
20362
|
-
* Removes a callback from being called
|
|
20363
|
-
*
|
|
19004
|
+
* Removes a callback from being called when an block is placed
|
|
19005
|
+
* by a player.
|
|
20364
19006
|
*
|
|
20365
19007
|
* This function can't be called in restricted-execution mode.
|
|
20366
19008
|
*
|
|
20367
19009
|
* This function can be called in early-execution mode.
|
|
20368
19010
|
*
|
|
20369
|
-
* @param callback
|
|
20370
|
-
* This closure is called with restricted-execution privilege.
|
|
20371
19011
|
*/
|
|
20372
|
-
unsubscribe(callback: (arg0:
|
|
19012
|
+
unsubscribe(callback: (arg0: PlayerPlaceBlockAfterEvent) => void): void;
|
|
20373
19013
|
}
|
|
20374
19014
|
|
|
20375
19015
|
/**
|
|
@@ -20560,80 +19200,6 @@ export class PlayerSwingStartAfterEventSignal {
|
|
|
20560
19200
|
unsubscribe(callback: (arg0: PlayerSwingStartAfterEvent) => void): void;
|
|
20561
19201
|
}
|
|
20562
19202
|
|
|
20563
|
-
/**
|
|
20564
|
-
* @beta
|
|
20565
|
-
* Contains information related to when a player successfully
|
|
20566
|
-
* names an Entity with a named Name Tag item.
|
|
20567
|
-
*/
|
|
20568
|
-
export class PlayerUseNameTagAfterEvent {
|
|
20569
|
-
private constructor();
|
|
20570
|
-
/**
|
|
20571
|
-
* @remarks
|
|
20572
|
-
* The entity that was named by the player.
|
|
20573
|
-
*
|
|
20574
|
-
* This property can't be edited in restricted-execution mode.
|
|
20575
|
-
*
|
|
20576
|
-
*/
|
|
20577
|
-
entityNamed: Entity;
|
|
20578
|
-
/**
|
|
20579
|
-
* @remarks
|
|
20580
|
-
* The new name that the player has given to the entity.
|
|
20581
|
-
*
|
|
20582
|
-
* This property can't be edited in restricted-execution mode.
|
|
20583
|
-
*
|
|
20584
|
-
*/
|
|
20585
|
-
newName: string;
|
|
20586
|
-
/**
|
|
20587
|
-
* @remarks
|
|
20588
|
-
* Handle to the player that used the name tag.
|
|
20589
|
-
*
|
|
20590
|
-
* This property can't be edited in restricted-execution mode.
|
|
20591
|
-
*
|
|
20592
|
-
*/
|
|
20593
|
-
player: Player;
|
|
20594
|
-
/**
|
|
20595
|
-
* @remarks
|
|
20596
|
-
* The previous name of the entity before the player used the
|
|
20597
|
-
* name tag. This will be undefined if the entity was not
|
|
20598
|
-
* previously named.
|
|
20599
|
-
*
|
|
20600
|
-
* This property can't be edited in restricted-execution mode.
|
|
20601
|
-
*
|
|
20602
|
-
*/
|
|
20603
|
-
previousName?: string;
|
|
20604
|
-
}
|
|
20605
|
-
|
|
20606
|
-
/**
|
|
20607
|
-
* @beta
|
|
20608
|
-
* Manages callbacks that are connected to when a player
|
|
20609
|
-
* successfully names an Entity with a named Name Tag item.
|
|
20610
|
-
*/
|
|
20611
|
-
export class PlayerUseNameTagAfterEventSignal {
|
|
20612
|
-
private constructor();
|
|
20613
|
-
/**
|
|
20614
|
-
* @remarks
|
|
20615
|
-
* Subscribes the specified callback to a player use name tag
|
|
20616
|
-
* after event.
|
|
20617
|
-
*
|
|
20618
|
-
* This function can't be called in restricted-execution mode.
|
|
20619
|
-
*
|
|
20620
|
-
* This function can be called in early-execution mode.
|
|
20621
|
-
*
|
|
20622
|
-
*/
|
|
20623
|
-
subscribe(callback: (arg0: PlayerUseNameTagAfterEvent) => void): (arg0: PlayerUseNameTagAfterEvent) => void;
|
|
20624
|
-
/**
|
|
20625
|
-
* @remarks
|
|
20626
|
-
* Removes the specified callback from a player use name tag
|
|
20627
|
-
* after event.
|
|
20628
|
-
*
|
|
20629
|
-
* This function can't be called in restricted-execution mode.
|
|
20630
|
-
*
|
|
20631
|
-
* This function can be called in early-execution mode.
|
|
20632
|
-
*
|
|
20633
|
-
*/
|
|
20634
|
-
unsubscribe(callback: (arg0: PlayerUseNameTagAfterEvent) => void): void;
|
|
20635
|
-
}
|
|
20636
|
-
|
|
20637
19203
|
/**
|
|
20638
19204
|
* Waypoint that tracks a player's position. Extends {@link
|
|
20639
19205
|
* EntityWaypoint} with additional player-specific visibility
|
|
@@ -20749,10 +19315,10 @@ export class Potions {
|
|
|
20749
19315
|
*
|
|
20750
19316
|
* {@link InvalidPotionEffectTypeError}
|
|
20751
19317
|
*/
|
|
20752
|
-
static resolve
|
|
20753
|
-
|
|
20754
|
-
|
|
20755
|
-
|
|
19318
|
+
static resolve(
|
|
19319
|
+
potionEffectType: PotionEffectType | string,
|
|
19320
|
+
potionDeliveryType: PotionDeliveryType | string,
|
|
19321
|
+
): ItemStack;
|
|
20756
19322
|
}
|
|
20757
19323
|
|
|
20758
19324
|
/**
|
|
@@ -20995,18 +19561,6 @@ export class PrimitiveShapesManager {
|
|
|
20995
19561
|
* {@link PrimitiveShapeError}
|
|
20996
19562
|
*/
|
|
20997
19563
|
addText(text: TextPrimitive, dimension?: Dimension): void;
|
|
20998
|
-
/**
|
|
20999
|
-
* @beta
|
|
21000
|
-
* @remarks
|
|
21001
|
-
* Fetches and queries all primitive shapes stored in the
|
|
21002
|
-
* manager and returns the results as an array of shape
|
|
21003
|
-
* handles.
|
|
21004
|
-
*
|
|
21005
|
-
* @param options
|
|
21006
|
-
* Optional options for querying existing shapes to narrow down
|
|
21007
|
-
* the results.
|
|
21008
|
-
*/
|
|
21009
|
-
getShapes(options?: PrimitiveShapeQueryOptions): PrimitiveShape[];
|
|
21010
19564
|
/**
|
|
21011
19565
|
* @remarks
|
|
21012
19566
|
* Removes all text primitives from the world.
|
|
@@ -21971,38 +20525,6 @@ export class Seat {
|
|
|
21971
20525
|
readonly seatRotation: number;
|
|
21972
20526
|
}
|
|
21973
20527
|
|
|
21974
|
-
/**
|
|
21975
|
-
* @beta
|
|
21976
|
-
* Manages callbacks that are message passing to a server. This
|
|
21977
|
-
* event is not currently fully implemented, and should not be
|
|
21978
|
-
* used.
|
|
21979
|
-
*/
|
|
21980
|
-
export class ServerMessageAfterEventSignal {
|
|
21981
|
-
private constructor();
|
|
21982
|
-
/**
|
|
21983
|
-
* @remarks
|
|
21984
|
-
* Adds a callback that will be called when an internal message
|
|
21985
|
-
* is passed.
|
|
21986
|
-
*
|
|
21987
|
-
* This function can't be called in restricted-execution mode.
|
|
21988
|
-
*
|
|
21989
|
-
* This function can be called in early-execution mode.
|
|
21990
|
-
*
|
|
21991
|
-
*/
|
|
21992
|
-
subscribe(callback: (arg0: MessageReceiveAfterEvent) => void): (arg0: MessageReceiveAfterEvent) => void;
|
|
21993
|
-
/**
|
|
21994
|
-
* @remarks
|
|
21995
|
-
* Removes a callback from being called when an internal
|
|
21996
|
-
* message is passed.
|
|
21997
|
-
*
|
|
21998
|
-
* This function can't be called in restricted-execution mode.
|
|
21999
|
-
*
|
|
22000
|
-
* This function can be called in early-execution mode.
|
|
22001
|
-
*
|
|
22002
|
-
*/
|
|
22003
|
-
unsubscribe(callback: (arg0: MessageReceiveAfterEvent) => void): void;
|
|
22004
|
-
}
|
|
22005
|
-
|
|
22006
20528
|
/**
|
|
22007
20529
|
* Loot item function that modifies the trim on a dropped armor
|
|
22008
20530
|
* item.
|
|
@@ -22031,21 +20553,6 @@ export class SetArmorTrimFunction extends LootItemFunction {
|
|
|
22031
20553
|
// @ts-ignore Class inheritance allowed for native defined classes
|
|
22032
20554
|
export class SetBannerDetailsFunction extends LootItemFunction {
|
|
22033
20555
|
private constructor();
|
|
22034
|
-
/**
|
|
22035
|
-
* @beta
|
|
22036
|
-
* @remarks
|
|
22037
|
-
* The base color for the dropped banner.
|
|
22038
|
-
*
|
|
22039
|
-
*/
|
|
22040
|
-
readonly baseColor: string;
|
|
22041
|
-
/**
|
|
22042
|
-
* @beta
|
|
22043
|
-
* @remarks
|
|
22044
|
-
* An array of {@link BannerPattern} objects used to decorate
|
|
22045
|
-
* the banner, including color and pattern type.
|
|
22046
|
-
*
|
|
22047
|
-
*/
|
|
22048
|
-
readonly patterns: BannerPattern[];
|
|
22049
20556
|
/**
|
|
22050
20557
|
* @remarks
|
|
22051
20558
|
* The type of banner to drop.
|
|
@@ -22291,7 +20798,7 @@ export class SmeltItemFunction extends LootItemFunction {
|
|
|
22291
20798
|
}
|
|
22292
20799
|
|
|
22293
20800
|
/**
|
|
22294
|
-
* @
|
|
20801
|
+
* @rc
|
|
22295
20802
|
* Contains information about a sound thats declared duration
|
|
22296
20803
|
* elapsed.
|
|
22297
20804
|
*/
|
|
@@ -22308,7 +20815,7 @@ export class SoundCompletedAfterEvent {
|
|
|
22308
20815
|
}
|
|
22309
20816
|
|
|
22310
20817
|
/**
|
|
22311
|
-
* @
|
|
20818
|
+
* @rc
|
|
22312
20819
|
* Manages callbacks that are invoked when a tracked sound's
|
|
22313
20820
|
* declared duration elapses.
|
|
22314
20821
|
*/
|
|
@@ -22339,74 +20846,7 @@ export class SoundCompletedAfterEventSignal {
|
|
|
22339
20846
|
}
|
|
22340
20847
|
|
|
22341
20848
|
/**
|
|
22342
|
-
* @
|
|
22343
|
-
* Static metadata about a sound declared in a
|
|
22344
|
-
* sound_definitions.json file.
|
|
22345
|
-
*/
|
|
22346
|
-
export class SoundDefinition {
|
|
22347
|
-
private constructor();
|
|
22348
|
-
/**
|
|
22349
|
-
* @remarks
|
|
22350
|
-
* Duration metadata declared for this sound. Undefined when
|
|
22351
|
-
* the sound definition does not specify a duration.
|
|
22352
|
-
*
|
|
22353
|
-
*/
|
|
22354
|
-
readonly durationInfo?: SoundDefinitionDurationInfo;
|
|
22355
|
-
/**
|
|
22356
|
-
* @remarks
|
|
22357
|
-
* Music metadata declared for this sound. Undefined when the
|
|
22358
|
-
* sound definition does not specify a music_info block.
|
|
22359
|
-
*
|
|
22360
|
-
*/
|
|
22361
|
-
readonly musicInfo?: SoundDefinitionMusicInfo;
|
|
22362
|
-
/**
|
|
22363
|
-
* @remarks
|
|
22364
|
-
* Identifier of the sound event this definition declares, in
|
|
22365
|
-
* the form 'namespace:name'.
|
|
22366
|
-
*
|
|
22367
|
-
*/
|
|
22368
|
-
readonly soundEventId: string;
|
|
22369
|
-
/**
|
|
22370
|
-
* @remarks
|
|
22371
|
-
* Tag metadata declared for this sound, as a record mapping
|
|
22372
|
-
* each tag name to its declared values. A tag declared with a
|
|
22373
|
-
* single string value is exposed as a single-element array.
|
|
22374
|
-
* Undefined when the sound definition does not specify any
|
|
22375
|
-
* tags.
|
|
22376
|
-
*
|
|
22377
|
-
*/
|
|
22378
|
-
readonly tags?: Record<string, string[]>;
|
|
22379
|
-
}
|
|
22380
|
-
|
|
22381
|
-
/**
|
|
22382
|
-
* @beta
|
|
22383
|
-
* Provides read-only access to the sound definitions loaded
|
|
22384
|
-
* for the current world.
|
|
22385
|
-
*/
|
|
22386
|
-
export class SoundDefinitionRegistry {
|
|
22387
|
-
private constructor();
|
|
22388
|
-
/**
|
|
22389
|
-
* @remarks
|
|
22390
|
-
* Returns the sound definitions in the registry, optionally
|
|
22391
|
-
* narrowed by a filter.
|
|
22392
|
-
*
|
|
22393
|
-
* @param filter
|
|
22394
|
-
* Optional filter applied to each definition. When omitted,
|
|
22395
|
-
* every definition is returned.
|
|
22396
|
-
* @returns
|
|
22397
|
-
* All sound definitions matching the filter, or every sound
|
|
22398
|
-
* definition when no filter is supplied.
|
|
22399
|
-
* @throws
|
|
22400
|
-
* An error will be thrown if filter.minDuration is greater
|
|
22401
|
-
* than filter.maxDuration.
|
|
22402
|
-
*
|
|
22403
|
-
* {@link minecraftcommon.InvalidArgumentError}
|
|
22404
|
-
*/
|
|
22405
|
-
getDefinitions(filter?: SoundDefinitionFilter): SoundDefinition[];
|
|
22406
|
-
}
|
|
22407
|
-
|
|
22408
|
-
/**
|
|
22409
|
-
* @beta
|
|
20849
|
+
* @rc
|
|
22410
20850
|
* Provides duration and playback information for a sound whose
|
|
22411
20851
|
* definition declares a duration.
|
|
22412
20852
|
*/
|
|
@@ -22450,112 +20890,34 @@ export class SoundDurationInfo {
|
|
|
22450
20890
|
export class SoundInstance {
|
|
22451
20891
|
private constructor();
|
|
22452
20892
|
/**
|
|
22453
|
-
* @
|
|
20893
|
+
* @rc
|
|
22454
20894
|
* @remarks
|
|
22455
20895
|
* Gets duration and playback information for this sound.
|
|
22456
20896
|
*
|
|
22457
20897
|
*/
|
|
22458
20898
|
readonly durationInfo?: SoundDurationInfo;
|
|
22459
20899
|
/**
|
|
22460
|
-
* @
|
|
20900
|
+
* @rc
|
|
22461
20901
|
* @remarks
|
|
22462
20902
|
* Unique identifier of this sound instance.
|
|
22463
20903
|
*
|
|
22464
20904
|
*/
|
|
22465
20905
|
readonly id: string;
|
|
22466
20906
|
/**
|
|
22467
|
-
* @
|
|
20907
|
+
* @rc
|
|
22468
20908
|
* @remarks
|
|
22469
20909
|
* Gets the player this sound was played for.
|
|
22470
20910
|
*
|
|
22471
20911
|
*/
|
|
22472
20912
|
readonly recipient?: Player;
|
|
22473
20913
|
/**
|
|
22474
|
-
* @
|
|
20914
|
+
* @rc
|
|
22475
20915
|
* @remarks
|
|
22476
20916
|
* Gets the identifier of the sound event this instance was
|
|
22477
20917
|
* started with.
|
|
22478
20918
|
*
|
|
22479
20919
|
*/
|
|
22480
20920
|
readonly soundEventId: string;
|
|
22481
|
-
/**
|
|
22482
|
-
* @beta
|
|
22483
|
-
* @remarks
|
|
22484
|
-
* Fades this sound instance from its current volume to the
|
|
22485
|
-
* target volume over the specified duration. To fade in from
|
|
22486
|
-
* silence, call `setVolume(0.0)` first; to fade out, pass a
|
|
22487
|
-
* target volume of `0.0`.
|
|
22488
|
-
*
|
|
22489
|
-
* This function can't be called in restricted-execution mode.
|
|
22490
|
-
*
|
|
22491
|
-
* @param duration
|
|
22492
|
-
* Duration of the fade in seconds. Must be non-negative.
|
|
22493
|
-
* Minimum value: 0
|
|
22494
|
-
* @param targetVolume
|
|
22495
|
-
* Volume to fade to. Must be non-negative.
|
|
22496
|
-
* Minimum value: 0
|
|
22497
|
-
*/
|
|
22498
|
-
fade(duration: number, targetVolume: number): void;
|
|
22499
|
-
/**
|
|
22500
|
-
* @beta
|
|
22501
|
-
* @remarks
|
|
22502
|
-
* Pauses this sound.
|
|
22503
|
-
*
|
|
22504
|
-
* This function can't be called in restricted-execution mode.
|
|
22505
|
-
*
|
|
22506
|
-
*/
|
|
22507
|
-
pause(): void;
|
|
22508
|
-
/**
|
|
22509
|
-
* @beta
|
|
22510
|
-
* @remarks
|
|
22511
|
-
* Resumes this sound after a pause.
|
|
22512
|
-
*
|
|
22513
|
-
* This function can't be called in restricted-execution mode.
|
|
22514
|
-
*
|
|
22515
|
-
*/
|
|
22516
|
-
resume(): void;
|
|
22517
|
-
/**
|
|
22518
|
-
* @beta
|
|
22519
|
-
* @remarks
|
|
22520
|
-
* Sets the playback position of this sound instance.
|
|
22521
|
-
*
|
|
22522
|
-
* This function can't be called in restricted-execution mode.
|
|
22523
|
-
*
|
|
22524
|
-
* @param seconds
|
|
22525
|
-
* Position to seek to in seconds. Must be non-negative.
|
|
22526
|
-
* Bounds: [0, 107374184]
|
|
22527
|
-
* @throws
|
|
22528
|
-
* Throws if `seconds` is negative, or if the sound has a known
|
|
22529
|
-
* duration and `seconds` is greater than that duration.
|
|
22530
|
-
*
|
|
22531
|
-
* {@link minecraftcommon.ArgumentOutOfBoundsError}
|
|
22532
|
-
*/
|
|
22533
|
-
seekTo(seconds: number): void;
|
|
22534
|
-
/**
|
|
22535
|
-
* @beta
|
|
22536
|
-
* @remarks
|
|
22537
|
-
* Sets the pitch of this sound instance.
|
|
22538
|
-
*
|
|
22539
|
-
* This function can't be called in restricted-execution mode.
|
|
22540
|
-
*
|
|
22541
|
-
* @param pitch
|
|
22542
|
-
* Pitch multiplier between 0.01 and 10.0. A value of 1.0 is
|
|
22543
|
-
* normal pitch.
|
|
22544
|
-
* Bounds: [0.009999999776482582, 10]
|
|
22545
|
-
*/
|
|
22546
|
-
setPitch(pitch: number): void;
|
|
22547
|
-
/**
|
|
22548
|
-
* @beta
|
|
22549
|
-
* @remarks
|
|
22550
|
-
* Sets the volume of this sound instance.
|
|
22551
|
-
*
|
|
22552
|
-
* This function can't be called in restricted-execution mode.
|
|
22553
|
-
*
|
|
22554
|
-
* @param volume
|
|
22555
|
-
* Volume level between 0.0 and 10.0.
|
|
22556
|
-
* Bounds: [0, 10]
|
|
22557
|
-
*/
|
|
22558
|
-
setVolume(volume: number): void;
|
|
22559
20921
|
/**
|
|
22560
20922
|
* @rc
|
|
22561
20923
|
* @remarks
|
|
@@ -23280,19 +21642,6 @@ export class SystemBeforeEvents {
|
|
|
23280
21642
|
*
|
|
23281
21643
|
*/
|
|
23282
21644
|
readonly startup: StartupBeforeEventSignal;
|
|
23283
|
-
/**
|
|
23284
|
-
* @beta
|
|
23285
|
-
* @remarks
|
|
23286
|
-
* Fires when the scripting watchdog shuts down the server. The
|
|
23287
|
-
* can be due to using too much memory, or by causing
|
|
23288
|
-
* significant slowdown or hang.
|
|
23289
|
-
* To prevent shutdown, set the event's cancel property to
|
|
23290
|
-
* true.
|
|
23291
|
-
*
|
|
23292
|
-
* This property can be read in early-execution mode.
|
|
23293
|
-
*
|
|
23294
|
-
*/
|
|
23295
|
-
readonly watchdogTerminate: WatchdogTerminateBeforeEventSignal;
|
|
23296
21645
|
}
|
|
23297
21646
|
|
|
23298
21647
|
/**
|
|
@@ -23626,121 +21975,56 @@ export class TripWireTripAfterEvent extends BlockEvent {
|
|
|
23626
21975
|
* const redstone = targetLocation.dimension.getBlock({
|
|
23627
21976
|
* x: targetLocation.x,
|
|
23628
21977
|
* y: targetLocation.y - 1,
|
|
23629
|
-
* z: targetLocation.z,
|
|
23630
|
-
* });
|
|
23631
|
-
* const tripwire = targetLocation.dimension.getBlock(targetLocation);
|
|
23632
|
-
*
|
|
23633
|
-
* if (redstone === undefined || tripwire === undefined) {
|
|
23634
|
-
* log('Could not find block at location.');
|
|
23635
|
-
* return -1;
|
|
23636
|
-
* }
|
|
23637
|
-
*
|
|
23638
|
-
* redstone.setPermutation(BlockPermutation.resolve(MinecraftBlockTypes.RedstoneBlock));
|
|
23639
|
-
* tripwire.setPermutation(BlockPermutation.resolve(MinecraftBlockTypes.TripWire));
|
|
23640
|
-
*
|
|
23641
|
-
* world.afterEvents.tripWireTrip.subscribe((tripWireTripEvent: TripWireTripAfterEvent) => {
|
|
23642
|
-
* const eventLoc = tripWireTripEvent.block.location;
|
|
23643
|
-
*
|
|
23644
|
-
* if (eventLoc.x === targetLocation.x && eventLoc.y === targetLocation.y && eventLoc.z === targetLocation.z) {
|
|
23645
|
-
* log(
|
|
23646
|
-
* 'Tripwire trip event at tick ' +
|
|
23647
|
-
* system.currentTick +
|
|
23648
|
-
* (tripWireTripEvent.sources.length > 0 ? ' by entity ' + tripWireTripEvent.sources[0].id : '')
|
|
23649
|
-
* );
|
|
23650
|
-
* }
|
|
23651
|
-
* });
|
|
23652
|
-
* }
|
|
23653
|
-
* ```
|
|
23654
|
-
*/
|
|
23655
|
-
export class TripWireTripAfterEventSignal {
|
|
23656
|
-
private constructor();
|
|
23657
|
-
/**
|
|
23658
|
-
* @remarks
|
|
23659
|
-
* Adds a callback that will be called when a trip wire is
|
|
23660
|
-
* tripped.
|
|
23661
|
-
*
|
|
23662
|
-
* This function can't be called in restricted-execution mode.
|
|
23663
|
-
*
|
|
23664
|
-
* This function can be called in early-execution mode.
|
|
23665
|
-
*
|
|
23666
|
-
*/
|
|
23667
|
-
subscribe(callback: (arg0: TripWireTripAfterEvent) => void): (arg0: TripWireTripAfterEvent) => void;
|
|
23668
|
-
/**
|
|
23669
|
-
* @remarks
|
|
23670
|
-
* Removes a callback from being called when a trip wire is
|
|
23671
|
-
* tripped.
|
|
23672
|
-
*
|
|
23673
|
-
* This function can't be called in restricted-execution mode.
|
|
23674
|
-
*
|
|
23675
|
-
* This function can be called in early-execution mode.
|
|
23676
|
-
*
|
|
23677
|
-
*/
|
|
23678
|
-
unsubscribe(callback: (arg0: TripWireTripAfterEvent) => void): void;
|
|
23679
|
-
}
|
|
23680
|
-
|
|
23681
|
-
/**
|
|
23682
|
-
* @beta
|
|
23683
|
-
* Contains information related to a script watchdog
|
|
23684
|
-
* termination.
|
|
23685
|
-
*/
|
|
23686
|
-
export class WatchdogTerminateBeforeEvent {
|
|
23687
|
-
private constructor();
|
|
23688
|
-
/**
|
|
23689
|
-
* @remarks
|
|
23690
|
-
* If set to true, cancels the termination of the script
|
|
23691
|
-
* runtime. Note that depending on server configuration
|
|
23692
|
-
* settings, cancellation of the termination may not be
|
|
23693
|
-
* allowed.
|
|
23694
|
-
*
|
|
23695
|
-
*/
|
|
23696
|
-
cancel: boolean;
|
|
23697
|
-
/**
|
|
23698
|
-
* @remarks
|
|
23699
|
-
* Contains the reason why a script runtime is to be
|
|
23700
|
-
* terminated.
|
|
23701
|
-
*
|
|
23702
|
-
*/
|
|
23703
|
-
readonly terminateReason: WatchdogTerminateReason;
|
|
23704
|
-
}
|
|
23705
|
-
|
|
23706
|
-
/**
|
|
23707
|
-
* @beta
|
|
23708
|
-
* Manages callbacks that are connected to a callback that will
|
|
23709
|
-
* be called when a script runtime is being terminated due to a
|
|
23710
|
-
* violation of the performance watchdog system.
|
|
21978
|
+
* z: targetLocation.z,
|
|
21979
|
+
* });
|
|
21980
|
+
* const tripwire = targetLocation.dimension.getBlock(targetLocation);
|
|
21981
|
+
*
|
|
21982
|
+
* if (redstone === undefined || tripwire === undefined) {
|
|
21983
|
+
* log('Could not find block at location.');
|
|
21984
|
+
* return -1;
|
|
21985
|
+
* }
|
|
21986
|
+
*
|
|
21987
|
+
* redstone.setPermutation(BlockPermutation.resolve(MinecraftBlockTypes.RedstoneBlock));
|
|
21988
|
+
* tripwire.setPermutation(BlockPermutation.resolve(MinecraftBlockTypes.TripWire));
|
|
21989
|
+
*
|
|
21990
|
+
* world.afterEvents.tripWireTrip.subscribe((tripWireTripEvent: TripWireTripAfterEvent) => {
|
|
21991
|
+
* const eventLoc = tripWireTripEvent.block.location;
|
|
21992
|
+
*
|
|
21993
|
+
* if (eventLoc.x === targetLocation.x && eventLoc.y === targetLocation.y && eventLoc.z === targetLocation.z) {
|
|
21994
|
+
* log(
|
|
21995
|
+
* 'Tripwire trip event at tick ' +
|
|
21996
|
+
* system.currentTick +
|
|
21997
|
+
* (tripWireTripEvent.sources.length > 0 ? ' by entity ' + tripWireTripEvent.sources[0].id : '')
|
|
21998
|
+
* );
|
|
21999
|
+
* }
|
|
22000
|
+
* });
|
|
22001
|
+
* }
|
|
22002
|
+
* ```
|
|
23711
22003
|
*/
|
|
23712
|
-
export class
|
|
22004
|
+
export class TripWireTripAfterEventSignal {
|
|
23713
22005
|
private constructor();
|
|
23714
22006
|
/**
|
|
23715
22007
|
* @remarks
|
|
23716
|
-
* Adds a callback that will be called when a
|
|
23717
|
-
*
|
|
23718
|
-
* watchdog system.
|
|
22008
|
+
* Adds a callback that will be called when a trip wire is
|
|
22009
|
+
* tripped.
|
|
23719
22010
|
*
|
|
23720
22011
|
* This function can't be called in restricted-execution mode.
|
|
23721
22012
|
*
|
|
23722
22013
|
* This function can be called in early-execution mode.
|
|
23723
22014
|
*
|
|
23724
|
-
* @param callback
|
|
23725
|
-
* This closure is called with restricted-execution privilege.
|
|
23726
|
-
* @returns
|
|
23727
|
-
* Closure that is called with restricted-execution privilege.
|
|
23728
22015
|
*/
|
|
23729
|
-
subscribe(callback: (arg0:
|
|
22016
|
+
subscribe(callback: (arg0: TripWireTripAfterEvent) => void): (arg0: TripWireTripAfterEvent) => void;
|
|
23730
22017
|
/**
|
|
23731
22018
|
* @remarks
|
|
23732
|
-
* Removes a callback from being called when a
|
|
23733
|
-
*
|
|
23734
|
-
* watchdog system.
|
|
22019
|
+
* Removes a callback from being called when a trip wire is
|
|
22020
|
+
* tripped.
|
|
23735
22021
|
*
|
|
23736
22022
|
* This function can't be called in restricted-execution mode.
|
|
23737
22023
|
*
|
|
23738
22024
|
* This function can be called in early-execution mode.
|
|
23739
22025
|
*
|
|
23740
|
-
* @param callback
|
|
23741
|
-
* This closure is called with restricted-execution privilege.
|
|
23742
22026
|
*/
|
|
23743
|
-
unsubscribe(callback: (arg0:
|
|
22027
|
+
unsubscribe(callback: (arg0: TripWireTripAfterEvent) => void): void;
|
|
23744
22028
|
}
|
|
23745
22029
|
|
|
23746
22030
|
/**
|
|
@@ -23958,15 +22242,6 @@ export class World {
|
|
|
23958
22242
|
*
|
|
23959
22243
|
*/
|
|
23960
22244
|
readonly afterEvents: WorldAfterEvents;
|
|
23961
|
-
/**
|
|
23962
|
-
* @beta
|
|
23963
|
-
* @remarks
|
|
23964
|
-
* Enables or disables cheats.
|
|
23965
|
-
*
|
|
23966
|
-
* This property can't be edited in restricted-execution mode.
|
|
23967
|
-
*
|
|
23968
|
-
*/
|
|
23969
|
-
allowCheats: boolean;
|
|
23970
22245
|
/**
|
|
23971
22246
|
* @remarks
|
|
23972
22247
|
* Contains a set of events that are applicable to the entirety
|
|
@@ -24031,14 +22306,6 @@ export class World {
|
|
|
24031
22306
|
*
|
|
24032
22307
|
*/
|
|
24033
22308
|
readonly seed: string;
|
|
24034
|
-
/**
|
|
24035
|
-
* @beta
|
|
24036
|
-
* @remarks
|
|
24037
|
-
* Provides read-only access to the sound definitions loaded
|
|
24038
|
-
* for this world.
|
|
24039
|
-
*
|
|
24040
|
-
*/
|
|
24041
|
-
readonly soundDefinitionRegistry: SoundDefinitionRegistry;
|
|
24042
22309
|
/**
|
|
24043
22310
|
* @remarks
|
|
24044
22311
|
* Returns the manager for {@link Structure} related APIs.
|
|
@@ -24052,20 +22319,6 @@ export class World {
|
|
|
24052
22319
|
*
|
|
24053
22320
|
*/
|
|
24054
22321
|
readonly tickingAreaManager: TickingAreaManager;
|
|
24055
|
-
/**
|
|
24056
|
-
* @beta
|
|
24057
|
-
* @remarks
|
|
24058
|
-
* A method that is internal-only, used for broadcasting
|
|
24059
|
-
* specific messages between client and server.
|
|
24060
|
-
*
|
|
24061
|
-
* This function can't be called in restricted-execution mode.
|
|
24062
|
-
*
|
|
24063
|
-
* @param id
|
|
24064
|
-
* The message identifier.
|
|
24065
|
-
* @param value
|
|
24066
|
-
* The message.
|
|
24067
|
-
*/
|
|
24068
|
-
broadcastClientMessage(id: string, value: string): void;
|
|
24069
22322
|
/**
|
|
24070
22323
|
* @remarks
|
|
24071
22324
|
* Clears the set of dynamic properties declared for this
|
|
@@ -24555,16 +22808,6 @@ export class WorldAfterEvents {
|
|
|
24555
22808
|
*
|
|
24556
22809
|
*/
|
|
24557
22810
|
readonly buttonPush: ButtonPushAfterEventSignal;
|
|
24558
|
-
/**
|
|
24559
|
-
* @beta
|
|
24560
|
-
* @remarks
|
|
24561
|
-
* This event is triggered after a chat message has been
|
|
24562
|
-
* broadcast or sent to players.
|
|
24563
|
-
*
|
|
24564
|
-
* This property can be read in early-execution mode.
|
|
24565
|
-
*
|
|
24566
|
-
*/
|
|
24567
|
-
readonly chatSend: ChatSendAfterEventSignal;
|
|
24568
22811
|
/**
|
|
24569
22812
|
* @remarks
|
|
24570
22813
|
* This event is fired when an entity event has been triggered
|
|
@@ -24690,7 +22933,7 @@ export class WorldAfterEvents {
|
|
|
24690
22933
|
*/
|
|
24691
22934
|
readonly entitySpawn: EntitySpawnAfterEventSignal;
|
|
24692
22935
|
/**
|
|
24693
|
-
* @
|
|
22936
|
+
* @rc
|
|
24694
22937
|
* @remarks
|
|
24695
22938
|
* This event fires when an entity starts sneaking.
|
|
24696
22939
|
*
|
|
@@ -24699,7 +22942,7 @@ export class WorldAfterEvents {
|
|
|
24699
22942
|
*/
|
|
24700
22943
|
readonly entityStartSneaking: EntityStartSneakingAfterEventSignal;
|
|
24701
22944
|
/**
|
|
24702
|
-
* @
|
|
22945
|
+
* @rc
|
|
24703
22946
|
* @remarks
|
|
24704
22947
|
* This event fires when an entity stops sneaking.
|
|
24705
22948
|
*
|
|
@@ -24708,7 +22951,7 @@ export class WorldAfterEvents {
|
|
|
24708
22951
|
*/
|
|
24709
22952
|
readonly entityStopSneaking: EntityStopSneakingAfterEventSignal;
|
|
24710
22953
|
/**
|
|
24711
|
-
* @
|
|
22954
|
+
* @rc
|
|
24712
22955
|
* @remarks
|
|
24713
22956
|
* This event fires when an entity is tamed.
|
|
24714
22957
|
*
|
|
@@ -24811,25 +23054,6 @@ export class WorldAfterEvents {
|
|
|
24811
23054
|
*
|
|
24812
23055
|
*/
|
|
24813
23056
|
readonly leverAction: LeverActionAfterEventSignal;
|
|
24814
|
-
/**
|
|
24815
|
-
* @beta
|
|
24816
|
-
* @remarks
|
|
24817
|
-
* This event is an internal implementation detail, and is
|
|
24818
|
-
* otherwise not currently functional.
|
|
24819
|
-
*
|
|
24820
|
-
* This property can be read in early-execution mode.
|
|
24821
|
-
*
|
|
24822
|
-
*/
|
|
24823
|
-
readonly messageReceive: ServerMessageAfterEventSignal;
|
|
24824
|
-
/**
|
|
24825
|
-
* @beta
|
|
24826
|
-
* @remarks
|
|
24827
|
-
* This event is triggered when a pack setting is changed.
|
|
24828
|
-
*
|
|
24829
|
-
* This property can be read in early-execution mode.
|
|
24830
|
-
*
|
|
24831
|
-
*/
|
|
24832
|
-
readonly packSettingChange: PackSettingChangeAfterEventSignal;
|
|
24833
23057
|
/**
|
|
24834
23058
|
* @remarks
|
|
24835
23059
|
* This event fires when a piston expands or retracts.
|
|
@@ -24984,16 +23208,6 @@ export class WorldAfterEvents {
|
|
|
24984
23208
|
*
|
|
24985
23209
|
*/
|
|
24986
23210
|
readonly playerSwingStart: PlayerSwingStartAfterEventSignal;
|
|
24987
|
-
/**
|
|
24988
|
-
* @beta
|
|
24989
|
-
* @remarks
|
|
24990
|
-
* An event for when a player uses a named name tag on an
|
|
24991
|
-
* entity.
|
|
24992
|
-
*
|
|
24993
|
-
* This property can be read in early-execution mode.
|
|
24994
|
-
*
|
|
24995
|
-
*/
|
|
24996
|
-
readonly playerUseNameTag: PlayerUseNameTagAfterEventSignal;
|
|
24997
23211
|
/**
|
|
24998
23212
|
* @remarks
|
|
24999
23213
|
* A pressure plate has popped back up (i.e., there are no
|
|
@@ -25029,7 +23243,7 @@ export class WorldAfterEvents {
|
|
|
25029
23243
|
*/
|
|
25030
23244
|
readonly projectileHitEntity: ProjectileHitEntityAfterEventSignal;
|
|
25031
23245
|
/**
|
|
25032
|
-
* @
|
|
23246
|
+
* @rc
|
|
25033
23247
|
* @remarks
|
|
25034
23248
|
* A tracked sound's declared duration elapsed.
|
|
25035
23249
|
*
|
|
@@ -25079,43 +23293,6 @@ export class WorldAfterEvents {
|
|
|
25079
23293
|
*/
|
|
25080
23294
|
export class WorldBeforeEvents {
|
|
25081
23295
|
private constructor();
|
|
25082
|
-
/**
|
|
25083
|
-
* @beta
|
|
25084
|
-
* @remarks
|
|
25085
|
-
* This event is triggered after a chat message has been
|
|
25086
|
-
* broadcast or sent to players.
|
|
25087
|
-
*
|
|
25088
|
-
* This property can be read in early-execution mode.
|
|
25089
|
-
*
|
|
25090
|
-
* @example customCommand.ts
|
|
25091
|
-
* ```typescript
|
|
25092
|
-
* import { world, DimensionLocation } from '@minecraft/server';
|
|
25093
|
-
*
|
|
25094
|
-
* function customCommand(targetLocation: DimensionLocation) {
|
|
25095
|
-
* const chatCallback = world.beforeEvents.chatSend.subscribe(eventData => {
|
|
25096
|
-
* if (eventData.message.includes('cancel')) {
|
|
25097
|
-
* // Cancel event if the message contains "cancel"
|
|
25098
|
-
* eventData.cancel = true;
|
|
25099
|
-
* } else {
|
|
25100
|
-
* const args = eventData.message.split(' ');
|
|
25101
|
-
*
|
|
25102
|
-
* if (args.length > 0) {
|
|
25103
|
-
* switch (args[0].toLowerCase()) {
|
|
25104
|
-
* case 'echo':
|
|
25105
|
-
* // Send a modified version of chat message
|
|
25106
|
-
* world.sendMessage(`Echo '${eventData.message.substring(4).trim()}'`);
|
|
25107
|
-
* break;
|
|
25108
|
-
* case 'help':
|
|
25109
|
-
* world.sendMessage(`Available commands: echo <message>`);
|
|
25110
|
-
* break;
|
|
25111
|
-
* }
|
|
25112
|
-
* }
|
|
25113
|
-
* }
|
|
25114
|
-
* });
|
|
25115
|
-
* }
|
|
25116
|
-
* ```
|
|
25117
|
-
*/
|
|
25118
|
-
readonly chatSend: ChatSendBeforeEventSignal;
|
|
25119
23296
|
/**
|
|
25120
23297
|
* @remarks
|
|
25121
23298
|
* This event is triggered after an event has been added to an
|
|
@@ -25155,7 +23332,7 @@ export class WorldBeforeEvents {
|
|
|
25155
23332
|
*/
|
|
25156
23333
|
readonly entityRemove: EntityRemoveBeforeEventSignal;
|
|
25157
23334
|
/**
|
|
25158
|
-
* @
|
|
23335
|
+
* @rc
|
|
25159
23336
|
* @remarks
|
|
25160
23337
|
* Fires before an entity is tamed.
|
|
25161
23338
|
*
|
|
@@ -25218,15 +23395,6 @@ export class WorldBeforeEvents {
|
|
|
25218
23395
|
*
|
|
25219
23396
|
*/
|
|
25220
23397
|
readonly playerLeave: PlayerLeaveBeforeEventSignal;
|
|
25221
|
-
/**
|
|
25222
|
-
* @beta
|
|
25223
|
-
* @remarks
|
|
25224
|
-
* This event fires before a block is placed by a player.
|
|
25225
|
-
*
|
|
25226
|
-
* This property can be read in early-execution mode.
|
|
25227
|
-
*
|
|
25228
|
-
*/
|
|
25229
|
-
readonly playerPlaceBlock: PlayerPlaceBlockBeforeEventSignal;
|
|
25230
23398
|
/**
|
|
25231
23399
|
* @remarks
|
|
25232
23400
|
* This property can be read in early-execution mode.
|
|
@@ -25323,8 +23491,8 @@ export interface BiomeSearchOptions {
|
|
|
25323
23491
|
* represents an AABB aligned rectangle.
|
|
25324
23492
|
* The BlockBoundingBox assumes that it was created in a valid
|
|
25325
23493
|
* state (min <= max) but cannot guarantee it (unless it was
|
|
25326
|
-
* created using the associated {@link
|
|
25327
|
-
* utility functions.
|
|
23494
|
+
* created using the associated {@link
|
|
23495
|
+
* @minecraft/server.BlockBoundingBoxUtils} utility functions.
|
|
25328
23496
|
* The min/max coordinates represent the diametrically opposite
|
|
25329
23497
|
* corners of the rectangle.
|
|
25330
23498
|
* The BlockBoundingBox is not a representation of blocks - it
|
|
@@ -25584,7 +23752,7 @@ export interface BlockHitInformation {
|
|
|
25584
23752
|
}
|
|
25585
23753
|
|
|
25586
23754
|
/**
|
|
25587
|
-
* @
|
|
23755
|
+
* @rc
|
|
25588
23756
|
* Options for querying blocks in a volume. Extends BlockFilter
|
|
25589
23757
|
* with additional sorting and limiting options based on
|
|
25590
23758
|
* distance from a location.
|
|
@@ -25788,7 +23956,7 @@ export interface CameraSetRotOptions {
|
|
|
25788
23956
|
}
|
|
25789
23957
|
|
|
25790
23958
|
/**
|
|
25791
|
-
* @
|
|
23959
|
+
* @rc
|
|
25792
23960
|
* Options for applying a camera shake effect to a player's
|
|
25793
23961
|
* camera via `Camera.addShake`. Each call to `addShake` queues
|
|
25794
23962
|
* a new independent shake event for the specified `type`;
|
|
@@ -25843,40 +24011,6 @@ export interface CameraTargetOptions {
|
|
|
25843
24011
|
targetEntity: Entity;
|
|
25844
24012
|
}
|
|
25845
24013
|
|
|
25846
|
-
/**
|
|
25847
|
-
* @beta
|
|
25848
|
-
* This interface defines an entry into the {@link
|
|
25849
|
-
* CompoundBlockVolume} which represents a volume of positive
|
|
25850
|
-
* or negative space.
|
|
25851
|
-
*
|
|
25852
|
-
*/
|
|
25853
|
-
export interface CompoundBlockVolumeItem {
|
|
25854
|
-
/**
|
|
25855
|
-
* @remarks
|
|
25856
|
-
* The 'action' defines how the block volume is represented in
|
|
25857
|
-
* the compound block volume stack.
|
|
25858
|
-
* 'Add' creates a block volume which is positively selected
|
|
25859
|
-
* 'Subtract' creates a block volume which represents a hole or
|
|
25860
|
-
* negative space in the overall compound block volume.
|
|
25861
|
-
*
|
|
25862
|
-
*/
|
|
25863
|
-
action?: CompoundBlockVolumeAction;
|
|
25864
|
-
/**
|
|
25865
|
-
* @remarks
|
|
25866
|
-
* The relativity enumeration determines whether the
|
|
25867
|
-
* BlockVolume specified is positioned relative to the parent
|
|
25868
|
-
* compound block volume origin, or in absolute world space.
|
|
25869
|
-
*
|
|
25870
|
-
*/
|
|
25871
|
-
locationRelativity?: CompoundBlockVolumePositionRelativity;
|
|
25872
|
-
/**
|
|
25873
|
-
* @remarks
|
|
25874
|
-
* The volume of space
|
|
25875
|
-
*
|
|
25876
|
-
*/
|
|
25877
|
-
volume: BlockVolume;
|
|
25878
|
-
}
|
|
25879
|
-
|
|
25880
24014
|
/**
|
|
25881
24015
|
* Represents the source of a container access.
|
|
25882
24016
|
*/
|
|
@@ -25986,15 +24120,6 @@ export interface CustomCommand {
|
|
|
25986
24120
|
* command.
|
|
25987
24121
|
*/
|
|
25988
24122
|
export interface CustomCommandParameter {
|
|
25989
|
-
/**
|
|
25990
|
-
* @beta
|
|
25991
|
-
* @remarks
|
|
25992
|
-
* Can be used to reference the enum name when {@link
|
|
25993
|
-
* CustomCommandParamType} is 'Enum'. Allows the parameter name
|
|
25994
|
-
* to be different from the enum name.
|
|
25995
|
-
*
|
|
25996
|
-
*/
|
|
25997
|
-
enumName?: string;
|
|
25998
24123
|
/**
|
|
25999
24124
|
* @remarks
|
|
26000
24125
|
* The name of parameter as it appears on the command line.
|
|
@@ -26073,14 +24198,6 @@ export interface DefinitionModifier {
|
|
|
26073
24198
|
*
|
|
26074
24199
|
*/
|
|
26075
24200
|
removedComponentGroups: string[];
|
|
26076
|
-
/**
|
|
26077
|
-
* @beta
|
|
26078
|
-
* @remarks
|
|
26079
|
-
* The list of entity definition events that will be fired via
|
|
26080
|
-
* this update.
|
|
26081
|
-
*
|
|
26082
|
-
*/
|
|
26083
|
-
triggers: Trigger[];
|
|
26084
24201
|
}
|
|
26085
24202
|
|
|
26086
24203
|
/**
|
|
@@ -26882,7 +24999,7 @@ export interface EntityRaycastOptions extends EntityFilter {
|
|
|
26882
24999
|
}
|
|
26883
25000
|
|
|
26884
25001
|
/**
|
|
26885
|
-
* @
|
|
25002
|
+
* @rc
|
|
26886
25003
|
* Options used to filter entity start sneaking and stop
|
|
26887
25004
|
* sneaking events.
|
|
26888
25005
|
*/
|
|
@@ -26891,10 +25008,10 @@ export interface EntitySneakingChangedEventOptions {
|
|
|
26891
25008
|
}
|
|
26892
25009
|
|
|
26893
25010
|
/**
|
|
26894
|
-
* @
|
|
25011
|
+
* @rc
|
|
26895
25012
|
* Contains options for filtering entity tamed events.
|
|
26896
25013
|
*/
|
|
26897
|
-
export interface
|
|
25014
|
+
export interface EntityTamedEventOptions {
|
|
26898
25015
|
entityFilter?: EntityFilter;
|
|
26899
25016
|
tamingEntityFilter?: EntityFilter;
|
|
26900
25017
|
}
|
|
@@ -27442,19 +25559,6 @@ export interface PlayerSoundOptions {
|
|
|
27442
25559
|
*
|
|
27443
25560
|
*/
|
|
27444
25561
|
location?: Vector3;
|
|
27445
|
-
/**
|
|
27446
|
-
* @beta
|
|
27447
|
-
* @remarks
|
|
27448
|
-
* Number of additional times to repeat the sound after the
|
|
27449
|
-
* initial play. `0` (the default) plays the sound once, `-1`
|
|
27450
|
-
* loops it forever, and a positive integer `N` plays the sound
|
|
27451
|
-
* `N + 1` times in total. For example, `loopCount: 1` plays
|
|
27452
|
-
* the sound twice. The loop count is fixed when the sound
|
|
27453
|
-
* starts and cannot be changed afterward. When using `-1`, see
|
|
27454
|
-
* `SoundInstance` for handle lifetime requirements.
|
|
27455
|
-
*
|
|
27456
|
-
*/
|
|
27457
|
-
loopCount?: number;
|
|
27458
25562
|
/**
|
|
27459
25563
|
* @remarks
|
|
27460
25564
|
* Optional pitch of the sound.
|
|
@@ -27526,43 +25630,6 @@ export interface PlayerVisibilityRules extends EntityVisibilityRules {
|
|
|
27526
25630
|
showSpectatorToSpectator?: boolean;
|
|
27527
25631
|
}
|
|
27528
25632
|
|
|
27529
|
-
/**
|
|
27530
|
-
* @beta
|
|
27531
|
-
* Contains optional filters that control which primitive
|
|
27532
|
-
* shapes are returned from a primitive shapes query.
|
|
27533
|
-
*/
|
|
27534
|
-
export interface PrimitiveShapeQueryOptions {
|
|
27535
|
-
/**
|
|
27536
|
-
* @remarks
|
|
27537
|
-
* If specified, only returns shapes attached to this entity.
|
|
27538
|
-
*
|
|
27539
|
-
*/
|
|
27540
|
-
attachedTo?: Entity;
|
|
27541
|
-
/**
|
|
27542
|
-
* @remarks
|
|
27543
|
-
* Adds a seed location to the query that is used in
|
|
27544
|
-
* conjunction with distance properties.
|
|
27545
|
-
*
|
|
27546
|
-
*/
|
|
27547
|
-
location?: Vector3;
|
|
27548
|
-
/**
|
|
27549
|
-
* @remarks
|
|
27550
|
-
* If specified, only includes shapes that are less than this
|
|
27551
|
-
* distance away from the location specified in the location
|
|
27552
|
-
* property.
|
|
27553
|
-
*
|
|
27554
|
-
*/
|
|
27555
|
-
maxDistance?: number;
|
|
27556
|
-
/**
|
|
27557
|
-
* @remarks
|
|
27558
|
-
* If specified, only includes shapes that are at least this
|
|
27559
|
-
* distance away from the location specified in the location
|
|
27560
|
-
* property.
|
|
27561
|
-
*
|
|
27562
|
-
*/
|
|
27563
|
-
minDistance?: number;
|
|
27564
|
-
}
|
|
27565
|
-
|
|
27566
25633
|
/**
|
|
27567
25634
|
* Key frame that holds the progress of the camera animation.
|
|
27568
25635
|
*/
|
|
@@ -27884,136 +25951,6 @@ export interface ScriptEventMessageFilterOptions {
|
|
|
27884
25951
|
namespaces: string[];
|
|
27885
25952
|
}
|
|
27886
25953
|
|
|
27887
|
-
/**
|
|
27888
|
-
* @beta
|
|
27889
|
-
* Duration metadata declared in a sound definition.
|
|
27890
|
-
*/
|
|
27891
|
-
export interface SoundDefinitionDurationInfo {
|
|
27892
|
-
/**
|
|
27893
|
-
* @remarks
|
|
27894
|
-
* Total duration of the sound in seconds, as declared in the
|
|
27895
|
-
* sound definition.
|
|
27896
|
-
*
|
|
27897
|
-
*/
|
|
27898
|
-
duration: number;
|
|
27899
|
-
}
|
|
27900
|
-
|
|
27901
|
-
/**
|
|
27902
|
-
* @beta
|
|
27903
|
-
* Criteria used to narrow a set of sound definitions. Each
|
|
27904
|
-
* field is optional and applies its constraint only when
|
|
27905
|
-
* defined; a definition must satisfy every defined field to
|
|
27906
|
-
* pass.
|
|
27907
|
-
*/
|
|
27908
|
-
export interface SoundDefinitionFilter {
|
|
27909
|
-
/**
|
|
27910
|
-
* @remarks
|
|
27911
|
-
* Artist names to match against the definition's
|
|
27912
|
-
* music_info.artist. Comparison is case-insensitive. When
|
|
27913
|
-
* defined as a non-empty array, a definition passes only when
|
|
27914
|
-
* its declared artist matches one of the supplied values. When
|
|
27915
|
-
* undefined, no constraint on artist is applied.
|
|
27916
|
-
*
|
|
27917
|
-
*/
|
|
27918
|
-
artists?: string[];
|
|
27919
|
-
/**
|
|
27920
|
-
* @remarks
|
|
27921
|
-
* Genres to match against the definition's music_info.genres.
|
|
27922
|
-
* Comparison is case-insensitive. When defined as a non-empty
|
|
27923
|
-
* array, a definition passes only when at least one of its
|
|
27924
|
-
* declared genres matches one of the supplied values. When
|
|
27925
|
-
* undefined, no constraint on genres is applied.
|
|
27926
|
-
*
|
|
27927
|
-
*/
|
|
27928
|
-
genres?: string[];
|
|
27929
|
-
/**
|
|
27930
|
-
* @remarks
|
|
27931
|
-
* Upper bound in seconds, inclusive. When defined, definitions
|
|
27932
|
-
* with a longer duration and definitions without a declared
|
|
27933
|
-
* duration are excluded. When undefined, no upper bound is
|
|
27934
|
-
* applied.
|
|
27935
|
-
*
|
|
27936
|
-
*/
|
|
27937
|
-
maxDuration?: number;
|
|
27938
|
-
/**
|
|
27939
|
-
* @remarks
|
|
27940
|
-
* Lower bound in seconds, inclusive. When defined, definitions
|
|
27941
|
-
* with a shorter duration and definitions without a declared
|
|
27942
|
-
* duration are excluded. When undefined, no lower bound is
|
|
27943
|
-
* applied.
|
|
27944
|
-
*
|
|
27945
|
-
*/
|
|
27946
|
-
minDuration?: number;
|
|
27947
|
-
/**
|
|
27948
|
-
* @remarks
|
|
27949
|
-
* Moods to match against the definition's music_info.moods.
|
|
27950
|
-
* Comparison is case-insensitive. When defined as a non-empty
|
|
27951
|
-
* array, a definition passes only when at least one of its
|
|
27952
|
-
* declared moods matches one of the supplied values. When
|
|
27953
|
-
* undefined, no constraint on moods is applied.
|
|
27954
|
-
*
|
|
27955
|
-
*/
|
|
27956
|
-
moods?: string[];
|
|
27957
|
-
/**
|
|
27958
|
-
* @remarks
|
|
27959
|
-
* Tag constraints to match against the definition's tags.
|
|
27960
|
-
* Comparisons of tag names and values are case-insensitive.
|
|
27961
|
-
* When defined as a non-empty record, a definition passes only
|
|
27962
|
-
* when, for each entry with a non-empty value array, the tag
|
|
27963
|
-
* name is present on the definition with at least one matching
|
|
27964
|
-
* value. When undefined, no constraint on tags is applied.
|
|
27965
|
-
*
|
|
27966
|
-
*/
|
|
27967
|
-
tags?: Record<string, string[]>;
|
|
27968
|
-
/**
|
|
27969
|
-
* @remarks
|
|
27970
|
-
* Titles to match against the definition's music_info.title.
|
|
27971
|
-
* Comparison is case-insensitive. When defined as a non-empty
|
|
27972
|
-
* array, a definition passes only when its declared title
|
|
27973
|
-
* matches one of the supplied values. When undefined, no
|
|
27974
|
-
* constraint on title is applied.
|
|
27975
|
-
*
|
|
27976
|
-
*/
|
|
27977
|
-
titles?: string[];
|
|
27978
|
-
}
|
|
27979
|
-
|
|
27980
|
-
/**
|
|
27981
|
-
* @beta
|
|
27982
|
-
* Music metadata declared on a sound definition. Each field is
|
|
27983
|
-
* optional and is undefined when the sound definition does not
|
|
27984
|
-
* declare a value for it.
|
|
27985
|
-
*/
|
|
27986
|
-
export interface SoundDefinitionMusicInfo {
|
|
27987
|
-
/**
|
|
27988
|
-
* @remarks
|
|
27989
|
-
* Artist declared for this sound. Undefined when no artist was
|
|
27990
|
-
* declared.
|
|
27991
|
-
*
|
|
27992
|
-
*/
|
|
27993
|
-
artist?: string;
|
|
27994
|
-
/**
|
|
27995
|
-
* @remarks
|
|
27996
|
-
* Genres declared for this sound. Undefined when no genres
|
|
27997
|
-
* were declared.
|
|
27998
|
-
*
|
|
27999
|
-
*/
|
|
28000
|
-
genres?: string[];
|
|
28001
|
-
/**
|
|
28002
|
-
* @remarks
|
|
28003
|
-
* Moods declared for this sound. Undefined when no moods were
|
|
28004
|
-
* declared.
|
|
28005
|
-
*
|
|
28006
|
-
*/
|
|
28007
|
-
moods?: string[];
|
|
28008
|
-
/**
|
|
28009
|
-
* @remarks
|
|
28010
|
-
* Title declared for this sound. Undefined when no title was
|
|
28011
|
-
* declared.
|
|
28012
|
-
*
|
|
28013
|
-
*/
|
|
28014
|
-
title?: string;
|
|
28015
|
-
}
|
|
28016
|
-
|
|
28017
25954
|
/**
|
|
28018
25955
|
* Contains additional options for spawning an Entity.
|
|
28019
25956
|
*/
|
|
@@ -28226,6 +26163,10 @@ export interface TeleportOptions {
|
|
|
28226
26163
|
*
|
|
28227
26164
|
*/
|
|
28228
26165
|
facingLocation?: Vector3;
|
|
26166
|
+
/**
|
|
26167
|
+
* @rc
|
|
26168
|
+
*/
|
|
26169
|
+
forceProvidedPositionOnDimensionChange?: boolean;
|
|
28229
26170
|
/**
|
|
28230
26171
|
* @remarks
|
|
28231
26172
|
* Whether to retain the entities velocity after teleport.
|
|
@@ -28445,19 +26386,6 @@ export interface WaypointTextureSelector {
|
|
|
28445
26386
|
* Contains additional options for a playSound occurrence.
|
|
28446
26387
|
*/
|
|
28447
26388
|
export interface WorldSoundOptions {
|
|
28448
|
-
/**
|
|
28449
|
-
* @beta
|
|
28450
|
-
* @remarks
|
|
28451
|
-
* Number of additional times to repeat the sound after the
|
|
28452
|
-
* initial play. `0` (the default) plays the sound once, `-1`
|
|
28453
|
-
* loops it forever, and a positive integer `N` plays the sound
|
|
28454
|
-
* `N + 1` times in total. For example, `loopCount: 1` plays
|
|
28455
|
-
* the sound twice. The loop count is fixed when the sound
|
|
28456
|
-
* starts and cannot be changed afterward. When using `-1`, see
|
|
28457
|
-
* `SoundInstance` for handle lifetime requirements.
|
|
28458
|
-
*
|
|
28459
|
-
*/
|
|
28460
|
-
loopCount?: number;
|
|
28461
26389
|
/**
|
|
28462
26390
|
* @remarks
|
|
28463
26391
|
* Pitch of the sound played.
|
|
@@ -28648,7 +26576,7 @@ export class EntitySpawnError extends Error {
|
|
|
28648
26576
|
}
|
|
28649
26577
|
|
|
28650
26578
|
/**
|
|
28651
|
-
* @
|
|
26579
|
+
* @rc
|
|
28652
26580
|
* Error thrown by {@link FogSettings} operations when the fog
|
|
28653
26581
|
* stack limit is exceeded or an invalid fog identifier is
|
|
28654
26582
|
* provided.
|