@minecraft/server 2.10.0-beta.1.26.40-preview.30 → 2.10.0-rc.1.26.50-preview.20
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 +99 -2621
- 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
|
*
|
|
@@ -47,13 +47,9 @@ export enum AimAssistTargetMode {
|
|
|
47
47
|
* function Block.getComponent.
|
|
48
48
|
*/
|
|
49
49
|
export enum BlockComponentTypes {
|
|
50
|
-
/**
|
|
51
|
-
* @beta
|
|
52
|
-
*/
|
|
53
|
-
DynamicProperties = 'minecraft:dynamic_properties',
|
|
54
50
|
FluidContainer = 'minecraft:fluid_container',
|
|
55
51
|
/**
|
|
56
|
-
* @
|
|
52
|
+
* @rc
|
|
57
53
|
*/
|
|
58
54
|
Instrument = 'minecraft:instrument_sound',
|
|
59
55
|
/**
|
|
@@ -202,7 +198,7 @@ export enum ButtonState {
|
|
|
202
198
|
}
|
|
203
199
|
|
|
204
200
|
/**
|
|
205
|
-
* @
|
|
201
|
+
* @rc
|
|
206
202
|
* Represents the type of shake to apply to the camera.
|
|
207
203
|
*/
|
|
208
204
|
export enum CameraShakeType {
|
|
@@ -220,34 +216,6 @@ export enum CameraShakeType {
|
|
|
220
216
|
Rotational = 'Rotational',
|
|
221
217
|
}
|
|
222
218
|
|
|
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
219
|
/**
|
|
252
220
|
* The required permission level to execute the custom command.
|
|
253
221
|
*/
|
|
@@ -284,55 +252,6 @@ export enum CommandPermissionLevel {
|
|
|
284
252
|
Owner = 4,
|
|
285
253
|
}
|
|
286
254
|
|
|
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
255
|
/**
|
|
337
256
|
* Reasons that the {@link
|
|
338
257
|
* @minecraft/server.ContainerRulesError} was thrown.
|
|
@@ -435,13 +354,6 @@ export enum CustomCommandErrorReason {
|
|
|
435
354
|
*
|
|
436
355
|
*/
|
|
437
356
|
RegistryReadOnly = 'RegistryReadOnly',
|
|
438
|
-
/**
|
|
439
|
-
* @beta
|
|
440
|
-
* @remarks
|
|
441
|
-
* Non enum type command parameters cannot use enumName.
|
|
442
|
-
*
|
|
443
|
-
*/
|
|
444
|
-
UnexpectedEnumName = 'UnexpectedEnumName',
|
|
445
357
|
}
|
|
446
358
|
|
|
447
359
|
/**
|
|
@@ -1178,14 +1090,6 @@ export enum EntityComponentTypes {
|
|
|
1178
1090
|
*
|
|
1179
1091
|
*/
|
|
1180
1092
|
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
1093
|
/**
|
|
1190
1094
|
* @remarks
|
|
1191
1095
|
* When present on an entity, this entity is on fire.
|
|
@@ -1669,14 +1573,6 @@ export enum EntitySwingSource {
|
|
|
1669
1573
|
* and mainhand slots.
|
|
1670
1574
|
*/
|
|
1671
1575
|
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
1576
|
/**
|
|
1681
1577
|
* @remarks
|
|
1682
1578
|
* The chest slot. This slot is used to hold items such as
|
|
@@ -1946,14 +1842,6 @@ export enum GameRule {
|
|
|
1946
1842
|
*
|
|
1947
1843
|
*/
|
|
1948
1844
|
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
1845
|
/**
|
|
1958
1846
|
* @remarks
|
|
1959
1847
|
* Controls whether projectiles (entities with a projectile
|
|
@@ -2303,10 +2191,6 @@ export enum InputPermissionCategory {
|
|
|
2303
2191
|
* function ItemStack.getComponent.
|
|
2304
2192
|
*/
|
|
2305
2193
|
export enum ItemComponentTypes {
|
|
2306
|
-
/**
|
|
2307
|
-
* @beta
|
|
2308
|
-
*/
|
|
2309
|
-
BlockDynamicProperties = 'minecraft:block_actor_dynamic_properties',
|
|
2310
2194
|
/**
|
|
2311
2195
|
* @remarks
|
|
2312
2196
|
* The minecraft:book component.
|
|
@@ -2779,14 +2663,6 @@ export enum PlayerSplitScreenSlot {
|
|
|
2779
2663
|
Third = 'Third',
|
|
2780
2664
|
}
|
|
2781
2665
|
|
|
2782
|
-
/**
|
|
2783
|
-
* @beta
|
|
2784
|
-
*/
|
|
2785
|
-
export enum PlayerWaypointsMode {
|
|
2786
|
-
Everyone = 'Everyone',
|
|
2787
|
-
Off = 'Off',
|
|
2788
|
-
}
|
|
2789
|
-
|
|
2790
2666
|
/**
|
|
2791
2667
|
* Contains objectives and participants for the scoreboard.
|
|
2792
2668
|
*/
|
|
@@ -3113,29 +2989,6 @@ export enum TintMethod {
|
|
|
3113
2989
|
Water = 'Water',
|
|
3114
2990
|
}
|
|
3115
2991
|
|
|
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
2992
|
/**
|
|
3140
2993
|
* Enum representing different texture icons that can be
|
|
3141
2994
|
* displayed for waypoints on the locator bar.
|
|
@@ -3197,12 +3050,10 @@ export type BlockComponentReturnType<T extends string> = T extends keyof BlockCo
|
|
|
3197
3050
|
: BlockCustomComponentInstance;
|
|
3198
3051
|
|
|
3199
3052
|
export type BlockComponentTypeMap = {
|
|
3200
|
-
dynamic_properties: BlockDynamicPropertiesComponent;
|
|
3201
3053
|
fluid_container: BlockFluidContainerComponent;
|
|
3202
3054
|
instrument_sound: BlockInstrumentComponent;
|
|
3203
3055
|
inventory: BlockInventoryComponent;
|
|
3204
3056
|
map_color: BlockMapColorComponent;
|
|
3205
|
-
'minecraft:dynamic_properties': BlockDynamicPropertiesComponent;
|
|
3206
3057
|
'minecraft:fluid_container': BlockFluidContainerComponent;
|
|
3207
3058
|
'minecraft:instrument_sound': BlockInstrumentComponent;
|
|
3208
3059
|
'minecraft:inventory': BlockInventoryComponent;
|
|
@@ -3324,7 +3175,6 @@ export type EntityComponentTypeMap = {
|
|
|
3324
3175
|
'minecraft:navigation.generic': EntityNavigationGenericComponent;
|
|
3325
3176
|
'minecraft:navigation.hover': EntityNavigationHoverComponent;
|
|
3326
3177
|
'minecraft:navigation.walk': EntityNavigationWalkComponent;
|
|
3327
|
-
'minecraft:npc': EntityNpcComponent;
|
|
3328
3178
|
'minecraft:onfire': EntityOnFireComponent;
|
|
3329
3179
|
'minecraft:player.exhaustion': EntityExhaustionComponent;
|
|
3330
3180
|
'minecraft:player.hunger': EntityHungerComponent;
|
|
@@ -3358,7 +3208,6 @@ export type EntityComponentTypeMap = {
|
|
|
3358
3208
|
'navigation.generic': EntityNavigationGenericComponent;
|
|
3359
3209
|
'navigation.hover': EntityNavigationHoverComponent;
|
|
3360
3210
|
'navigation.walk': EntityNavigationWalkComponent;
|
|
3361
|
-
npc: EntityNpcComponent;
|
|
3362
3211
|
onfire: EntityOnFireComponent;
|
|
3363
3212
|
'player.exhaustion': EntityExhaustionComponent;
|
|
3364
3213
|
'player.hunger': EntityHungerComponent;
|
|
@@ -3378,21 +3227,11 @@ export type EntityComponentTypeMap = {
|
|
|
3378
3227
|
wants_jockey: EntityWantsJockeyComponent;
|
|
3379
3228
|
};
|
|
3380
3229
|
|
|
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
3230
|
export type ItemComponentReturnType<T extends string> = T extends keyof ItemComponentTypeMap
|
|
3391
3231
|
? ItemComponentTypeMap[T]
|
|
3392
3232
|
: ItemCustomComponentInstance;
|
|
3393
3233
|
|
|
3394
3234
|
export type ItemComponentTypeMap = {
|
|
3395
|
-
block_actor_dynamic_properties: ItemBlockDynamicPropertiesComponent;
|
|
3396
3235
|
book: ItemBookComponent;
|
|
3397
3236
|
compostable: ItemCompostableComponent;
|
|
3398
3237
|
cooldown: ItemCooldownComponent;
|
|
@@ -3401,7 +3240,6 @@ export type ItemComponentTypeMap = {
|
|
|
3401
3240
|
enchantable: ItemEnchantableComponent;
|
|
3402
3241
|
food: ItemFoodComponent;
|
|
3403
3242
|
inventory: ItemInventoryComponent;
|
|
3404
|
-
'minecraft:block_actor_dynamic_properties': ItemBlockDynamicPropertiesComponent;
|
|
3405
3243
|
'minecraft:book': ItemBookComponent;
|
|
3406
3244
|
'minecraft:compostable': ItemCompostableComponent;
|
|
3407
3245
|
'minecraft:cooldown': ItemCooldownComponent;
|
|
@@ -3414,15 +3252,6 @@ export type ItemComponentTypeMap = {
|
|
|
3414
3252
|
potion: ItemPotionComponent;
|
|
3415
3253
|
};
|
|
3416
3254
|
|
|
3417
|
-
/**
|
|
3418
|
-
* @beta
|
|
3419
|
-
*/
|
|
3420
|
-
export type VanillaEntityIdentifier =
|
|
3421
|
-
| EntityType
|
|
3422
|
-
| minecraftvanilladata.MinecraftEntityTypes
|
|
3423
|
-
| `${minecraftvanilladata.MinecraftEntityTypes}`
|
|
3424
|
-
| `${minecraftvanilladata.MinecraftEntityTypes}<${string}>`;
|
|
3425
|
-
|
|
3426
3255
|
/**
|
|
3427
3256
|
* Handle to an aim-assist category that exists in the
|
|
3428
3257
|
* world.aimAssist registry.
|
|
@@ -3580,9 +3409,7 @@ export class AimAssistCategorySettings {
|
|
|
3580
3409
|
* A record mapping block Ids to their priority settings.
|
|
3581
3410
|
* Larger numbers have greater priority.
|
|
3582
3411
|
*/
|
|
3583
|
-
setBlockPriorities(
|
|
3584
|
-
blockPriorities: Record<keyof typeof minecraftvanilladata.MinecraftBlockTypes | string, number>,
|
|
3585
|
-
): void;
|
|
3412
|
+
setBlockPriorities(blockPriorities: Record<string, number>): void;
|
|
3586
3413
|
/**
|
|
3587
3414
|
* @remarks
|
|
3588
3415
|
* Sets the priority settings used for block targeting.
|
|
@@ -3601,9 +3428,7 @@ export class AimAssistCategorySettings {
|
|
|
3601
3428
|
* A record mapping entity Ids to their priority settings.
|
|
3602
3429
|
* Larger numbers have greater priority.
|
|
3603
3430
|
*/
|
|
3604
|
-
setEntityPriorities(
|
|
3605
|
-
entityPriorities: Record<keyof typeof minecraftvanilladata.MinecraftEntityTypes | string, number>,
|
|
3606
|
-
): void;
|
|
3431
|
+
setEntityPriorities(entityPriorities: Record<string, number>): void;
|
|
3607
3432
|
/**
|
|
3608
3433
|
* @remarks
|
|
3609
3434
|
* Sets the priority settings used for entity targeting.
|
|
@@ -3802,10 +3627,8 @@ export class AimAssistPresetSettings {
|
|
|
3802
3627
|
*
|
|
3803
3628
|
* This function can't be called in restricted-execution mode.
|
|
3804
3629
|
*
|
|
3805
|
-
* @param targets
|
|
3806
|
-
* An array of block tags.
|
|
3807
3630
|
*/
|
|
3808
|
-
setExcludedBlockTagTargets(
|
|
3631
|
+
setExcludedBlockTagTargets(blockTagTargets?: string[]): void;
|
|
3809
3632
|
/**
|
|
3810
3633
|
* @remarks
|
|
3811
3634
|
* Sets the list of block Ids to exclude from aim assist
|
|
@@ -3813,10 +3636,8 @@ export class AimAssistPresetSettings {
|
|
|
3813
3636
|
*
|
|
3814
3637
|
* This function can't be called in restricted-execution mode.
|
|
3815
3638
|
*
|
|
3816
|
-
* @param targets
|
|
3817
|
-
* An array of block Ids.
|
|
3818
3639
|
*/
|
|
3819
|
-
setExcludedBlockTargets(
|
|
3640
|
+
setExcludedBlockTargets(blockTargets?: string[]): void;
|
|
3820
3641
|
/**
|
|
3821
3642
|
* @remarks
|
|
3822
3643
|
* Sets the list of entity Ids to exclude from aim assist
|
|
@@ -3824,10 +3645,8 @@ export class AimAssistPresetSettings {
|
|
|
3824
3645
|
*
|
|
3825
3646
|
* This function can't be called in restricted-execution mode.
|
|
3826
3647
|
*
|
|
3827
|
-
* @param targets
|
|
3828
|
-
* An array of entity Ids.
|
|
3829
3648
|
*/
|
|
3830
|
-
setExcludedEntityTargets(
|
|
3649
|
+
setExcludedEntityTargets(entityTargets?: string[]): void;
|
|
3831
3650
|
/**
|
|
3832
3651
|
* @remarks
|
|
3833
3652
|
* Sets the list of entity type families to exclude from aim
|
|
@@ -3835,10 +3654,8 @@ export class AimAssistPresetSettings {
|
|
|
3835
3654
|
*
|
|
3836
3655
|
* This function can't be called in restricted-execution mode.
|
|
3837
3656
|
*
|
|
3838
|
-
* @param targets
|
|
3839
|
-
* An array of entity type families.
|
|
3840
3657
|
*/
|
|
3841
|
-
setExcludedEntityTypeFamilyTargets(
|
|
3658
|
+
setExcludedEntityTypeFamilyTargets(entityTypeFamilyTargets?: string[]): void;
|
|
3842
3659
|
/**
|
|
3843
3660
|
* @remarks
|
|
3844
3661
|
* Sets the per-item aim-assist category Ids.
|
|
@@ -3849,7 +3666,7 @@ export class AimAssistPresetSettings {
|
|
|
3849
3666
|
* A record mapping item Ids to aim-assist category Ids.
|
|
3850
3667
|
* Category Ids must have a namespace.
|
|
3851
3668
|
*/
|
|
3852
|
-
setItemSettings(itemSettings: Record<
|
|
3669
|
+
setItemSettings(itemSettings: Record<string, string>): void;
|
|
3853
3670
|
/**
|
|
3854
3671
|
* @remarks
|
|
3855
3672
|
* Sets the list of item Ids that will target liquid blocks
|
|
@@ -3860,7 +3677,7 @@ export class AimAssistPresetSettings {
|
|
|
3860
3677
|
* @param items
|
|
3861
3678
|
* An array of item Ids.
|
|
3862
3679
|
*/
|
|
3863
|
-
setLiquidTargetingItems(items?:
|
|
3680
|
+
setLiquidTargetingItems(items?: string[]): void;
|
|
3864
3681
|
}
|
|
3865
3682
|
|
|
3866
3683
|
/**
|
|
@@ -3966,28 +3783,6 @@ export class AimAssistRegistry {
|
|
|
3966
3783
|
getPresets(): AimAssistPreset[];
|
|
3967
3784
|
}
|
|
3968
3785
|
|
|
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
3786
|
/**
|
|
3992
3787
|
* Describes a type of biome.
|
|
3993
3788
|
*/
|
|
@@ -4081,20 +3876,6 @@ export class Block {
|
|
|
4081
3876
|
* {@link LocationOutOfWorldBoundariesError}
|
|
4082
3877
|
*/
|
|
4083
3878
|
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
3879
|
/**
|
|
4099
3880
|
* @remarks
|
|
4100
3881
|
* Returns true if this reference to a block is still valid
|
|
@@ -4260,30 +4041,6 @@ export class Block {
|
|
|
4260
4041
|
* {@link LocationOutOfWorldBoundariesError}
|
|
4261
4042
|
*/
|
|
4262
4043
|
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
4044
|
/**
|
|
4288
4045
|
* @remarks
|
|
4289
4046
|
* Returns the {@link Vector3} of the center of this block on
|
|
@@ -4380,15 +4137,6 @@ export class Block {
|
|
|
4380
4137
|
* {@link LocationInUnloadedChunkError}
|
|
4381
4138
|
*/
|
|
4382
4139
|
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
4140
|
/**
|
|
4393
4141
|
* @rc
|
|
4394
4142
|
* @remarks
|
|
@@ -4670,27 +4418,6 @@ export class Block {
|
|
|
4670
4418
|
* {@link LocationOutOfWorldBoundariesError}
|
|
4671
4419
|
*/
|
|
4672
4420
|
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
4421
|
/**
|
|
4695
4422
|
* @remarks
|
|
4696
4423
|
* Returns the {@link Block} to the west of this block
|
|
@@ -4708,137 +4435,6 @@ export class Block {
|
|
|
4708
4435
|
west(steps?: number): Block | undefined;
|
|
4709
4436
|
}
|
|
4710
4437
|
|
|
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
4438
|
/**
|
|
4843
4439
|
* Base type for components associated with blocks.
|
|
4844
4440
|
*/
|
|
@@ -5061,13 +4657,6 @@ export class BlockComponentRandomTickEvent extends BlockEvent {
|
|
|
5061
4657
|
// @ts-ignore Class inheritance allowed for native defined classes
|
|
5062
4658
|
export class BlockComponentRedstoneUpdateEvent extends BlockEvent {
|
|
5063
4659
|
private constructor();
|
|
5064
|
-
/**
|
|
5065
|
-
* @beta
|
|
5066
|
-
* @remarks
|
|
5067
|
-
* The first update event for the redstone component.
|
|
5068
|
-
*
|
|
5069
|
-
*/
|
|
5070
|
-
readonly firstUpdate: boolean;
|
|
5071
4660
|
/**
|
|
5072
4661
|
* @remarks
|
|
5073
4662
|
* The redstone signal strength passing through this block. It
|
|
@@ -5260,125 +4849,21 @@ export class BlockCustomComponentInstance extends BlockComponent {
|
|
|
5260
4849
|
}
|
|
5261
4850
|
|
|
5262
4851
|
/**
|
|
5263
|
-
*
|
|
5264
|
-
*
|
|
5265
|
-
* Only available with block entities. Up to 1KB per content
|
|
5266
|
-
* pack, per block entity in their dynamic properties storage.
|
|
5267
|
-
* @example rememberPlayerInteraction.ts
|
|
5268
|
-
* ```typescript
|
|
5269
|
-
* import { system } from '@minecraft/server-v2';
|
|
5270
|
-
*
|
|
5271
|
-
* system.beforeEvents.startup.subscribe(initEvent => {
|
|
5272
|
-
* initEvent.blockComponentRegistry.registerCustomComponent('scripting_demo_pack:block_entity_onPlayerInteract', {
|
|
5273
|
-
* onPlayerInteract: e => {
|
|
5274
|
-
* if (e.player === undefined) {
|
|
5275
|
-
* return;
|
|
5276
|
-
* }
|
|
5277
|
-
*
|
|
5278
|
-
* const dynamicProperties = e.block.getComponent('minecraft:dynamic_properties');
|
|
5279
|
-
* if (!dynamicProperties) {
|
|
5280
|
-
* return;
|
|
5281
|
-
* }
|
|
5282
|
-
*
|
|
5283
|
-
* const lastInteractorValue = dynamicProperties.get('last_interactor');
|
|
5284
|
-
* const lastVisitor = typeof lastInteractorValue === 'string' ? lastInteractorValue : 'unknown';
|
|
5285
|
-
* const lastTick = Number(dynamicProperties.get('last_interact_tick') ?? system.currentTick);
|
|
5286
|
-
* const ticksAgo = Math.max(0, system.currentTick - lastTick);
|
|
5287
|
-
*
|
|
5288
|
-
* if (lastVisitor === e.player.name) {
|
|
5289
|
-
* e.player.sendMessage("do you remember that player? I 'member, it was here " + String(ticksAgo) + ' ticks ago!');
|
|
5290
|
-
* } else {
|
|
5291
|
-
* e.player.sendMessage("oh, I don't remember that player");
|
|
5292
|
-
* }
|
|
5293
|
-
*
|
|
5294
|
-
* dynamicProperties.set('last_interactor', e.player.name);
|
|
5295
|
-
* dynamicProperties.set('last_interact_tick', system.currentTick);
|
|
5296
|
-
* },
|
|
5297
|
-
* });
|
|
5298
|
-
* });
|
|
5299
|
-
* ```
|
|
4852
|
+
* Contains information regarding an event that impacts a
|
|
4853
|
+
* specific block.
|
|
5300
4854
|
*/
|
|
5301
|
-
|
|
5302
|
-
export class BlockDynamicPropertiesComponent extends BlockComponent {
|
|
4855
|
+
export class BlockEvent {
|
|
5303
4856
|
private constructor();
|
|
5304
|
-
static readonly componentId = 'minecraft:dynamic_properties';
|
|
5305
4857
|
/**
|
|
5306
4858
|
* @remarks
|
|
5307
|
-
*
|
|
5308
|
-
* key. Keys are unique to each content pack and cannot be used
|
|
5309
|
-
* to retrieve dynamic properties set from other content packs.
|
|
5310
|
-
* Returns undefined if the key was not found.
|
|
5311
|
-
*
|
|
5312
|
-
* @throws This function can throw errors.
|
|
5313
|
-
*
|
|
5314
|
-
* {@link Error}
|
|
5315
|
-
*
|
|
5316
|
-
* {@link InvalidBlockComponentError}
|
|
5317
|
-
*
|
|
5318
|
-
* {@link LocationInUnloadedChunkError}
|
|
4859
|
+
* Block currently in the world at the location of this event.
|
|
5319
4860
|
*
|
|
5320
|
-
* {@link LocationOutOfWorldBoundariesError}
|
|
5321
4861
|
*/
|
|
5322
|
-
|
|
4862
|
+
readonly block: Block;
|
|
5323
4863
|
/**
|
|
5324
4864
|
* @remarks
|
|
5325
|
-
*
|
|
5326
|
-
*
|
|
5327
|
-
* set dynamic properties for other content packs. Values can
|
|
5328
|
-
* be either a Number, a String or a Vector3. Setting a
|
|
5329
|
-
* property with an undefined value will remove it from the
|
|
5330
|
-
* storage. Storage size usage is counted towards the 1KBytes
|
|
5331
|
-
* limit per content pack.
|
|
5332
|
-
*
|
|
5333
|
-
* This function can't be called in restricted-execution mode.
|
|
5334
|
-
*
|
|
5335
|
-
* @throws This function can throw errors.
|
|
5336
|
-
*
|
|
5337
|
-
* {@link Error}
|
|
5338
|
-
*
|
|
5339
|
-
* {@link InvalidBlockComponentError}
|
|
5340
|
-
*
|
|
5341
|
-
* {@link LocationInUnloadedChunkError}
|
|
5342
|
-
*
|
|
5343
|
-
* {@link LocationOutOfWorldBoundariesError}
|
|
5344
|
-
*/
|
|
5345
|
-
set(key: string, value?: boolean | number | string | Vector3): void;
|
|
5346
|
-
/**
|
|
5347
|
-
* @remarks
|
|
5348
|
-
* Returns the current size, in bytes, of the dynamic
|
|
5349
|
-
* properties storage for this block entity. The byte count
|
|
5350
|
-
* only accounts for properties set by your content pack. The
|
|
5351
|
-
* 1KBytes limit is per content pack.
|
|
5352
|
-
*
|
|
5353
|
-
* @throws This function can throw errors.
|
|
5354
|
-
*
|
|
5355
|
-
* {@link Error}
|
|
5356
|
-
*
|
|
5357
|
-
* {@link InvalidBlockComponentError}
|
|
5358
|
-
*
|
|
5359
|
-
* {@link LocationInUnloadedChunkError}
|
|
5360
|
-
*
|
|
5361
|
-
* {@link LocationOutOfWorldBoundariesError}
|
|
5362
|
-
*/
|
|
5363
|
-
totalByteCount(): number;
|
|
5364
|
-
}
|
|
5365
|
-
|
|
5366
|
-
/**
|
|
5367
|
-
* Contains information regarding an event that impacts a
|
|
5368
|
-
* specific block.
|
|
5369
|
-
*/
|
|
5370
|
-
export class BlockEvent {
|
|
5371
|
-
private constructor();
|
|
5372
|
-
/**
|
|
5373
|
-
* @remarks
|
|
5374
|
-
* Block currently in the world at the location of this event.
|
|
5375
|
-
*
|
|
5376
|
-
*/
|
|
5377
|
-
readonly block: Block;
|
|
5378
|
-
/**
|
|
5379
|
-
* @remarks
|
|
5380
|
-
* Dimension that contains the block that is the subject of
|
|
5381
|
-
* this event.
|
|
4865
|
+
* Dimension that contains the block that is the subject of
|
|
4866
|
+
* this event.
|
|
5382
4867
|
*
|
|
5383
4868
|
*/
|
|
5384
4869
|
readonly dimension: Dimension;
|
|
@@ -5500,7 +4985,7 @@ export class BlockFluidContainerComponent extends BlockComponent {
|
|
|
5500
4985
|
}
|
|
5501
4986
|
|
|
5502
4987
|
/**
|
|
5503
|
-
* @
|
|
4988
|
+
* @rc
|
|
5504
4989
|
* Represents the instruments a block can have assigned to it's
|
|
5505
4990
|
* up and down faces.
|
|
5506
4991
|
*/
|
|
@@ -5624,18 +5109,6 @@ export class BlockLocationIterator implements Iterable<Vector3> {
|
|
|
5624
5109
|
*
|
|
5625
5110
|
*/
|
|
5626
5111
|
[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
5112
|
/**
|
|
5640
5113
|
* @remarks
|
|
5641
5114
|
* This function can't be called in restricted-execution mode.
|
|
@@ -6551,15 +6024,6 @@ export class BlockVolumeBase {
|
|
|
6551
6024
|
*
|
|
6552
6025
|
*/
|
|
6553
6026
|
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
6027
|
/**
|
|
6564
6028
|
* @remarks
|
|
6565
6029
|
* Return the capacity (volume) of the BlockVolume (W*D*H)
|
|
@@ -6567,7 +6031,7 @@ export class BlockVolumeBase {
|
|
|
6567
6031
|
*/
|
|
6568
6032
|
getCapacity(): number;
|
|
6569
6033
|
/**
|
|
6570
|
-
* @
|
|
6034
|
+
* @rc
|
|
6571
6035
|
* @remarks
|
|
6572
6036
|
* Returns a list of block positions within the volume that are
|
|
6573
6037
|
* closest to a given location, sorted by distance (nearest
|
|
@@ -6583,7 +6047,7 @@ export class BlockVolumeBase {
|
|
|
6583
6047
|
*/
|
|
6584
6048
|
getClosest(count: number, location: Vector3): Vector3[];
|
|
6585
6049
|
/**
|
|
6586
|
-
* @
|
|
6050
|
+
* @rc
|
|
6587
6051
|
* @remarks
|
|
6588
6052
|
* Returns a list of block positions within the volume that are
|
|
6589
6053
|
* farthest from a given location, sorted by distance (farthest
|
|
@@ -6758,7 +6222,7 @@ export class Camera {
|
|
|
6758
6222
|
*/
|
|
6759
6223
|
readonly isValid: boolean;
|
|
6760
6224
|
/**
|
|
6761
|
-
* @
|
|
6225
|
+
* @rc
|
|
6762
6226
|
* @remarks
|
|
6763
6227
|
* This function can't be called in restricted-execution mode.
|
|
6764
6228
|
*
|
|
@@ -6834,23 +6298,6 @@ export class Camera {
|
|
|
6834
6298
|
| CameraSetRotOptions
|
|
6835
6299
|
| CameraTargetOptions,
|
|
6836
6300
|
): 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
6301
|
/**
|
|
6855
6302
|
* @remarks
|
|
6856
6303
|
* Sets the current active camera for the specified player and
|
|
@@ -6875,7 +6322,7 @@ export class Camera {
|
|
|
6875
6322
|
*/
|
|
6876
6323
|
setFov(fovCameraOptions?: CameraFovOptions): void;
|
|
6877
6324
|
/**
|
|
6878
|
-
* @
|
|
6325
|
+
* @rc
|
|
6879
6326
|
* @remarks
|
|
6880
6327
|
* This function can't be called in restricted-execution mode.
|
|
6881
6328
|
*
|
|
@@ -6886,24 +6333,6 @@ export class Camera {
|
|
|
6886
6333
|
stopShaking(): void;
|
|
6887
6334
|
}
|
|
6888
6335
|
|
|
6889
|
-
/**
|
|
6890
|
-
* @beta
|
|
6891
|
-
* Loot item function that will try to copy the block entity
|
|
6892
|
-
* data from the destroyed block to the dropped item.
|
|
6893
|
-
*/
|
|
6894
|
-
// @ts-ignore Class inheritance allowed for native defined classes
|
|
6895
|
-
export class CarryOverBlockEntityDataFunction extends LootItemFunction {
|
|
6896
|
-
private constructor();
|
|
6897
|
-
/**
|
|
6898
|
-
* @remarks
|
|
6899
|
-
* If true, and if the block entity had dynamic_properties, the
|
|
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
6336
|
/**
|
|
6908
6337
|
* CatmullRom spline creation.
|
|
6909
6338
|
*/
|
|
@@ -6918,164 +6347,6 @@ export class CatmullRomSpline {
|
|
|
6918
6347
|
controlPoints: Vector3[];
|
|
6919
6348
|
}
|
|
6920
6349
|
|
|
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
6350
|
/**
|
|
7080
6351
|
* Contains the device information for a client instance.
|
|
7081
6352
|
*/
|
|
@@ -7147,258 +6418,6 @@ export class Component {
|
|
|
7147
6418
|
readonly typeId: string;
|
|
7148
6419
|
}
|
|
7149
6420
|
|
|
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
6421
|
/**
|
|
7403
6422
|
* Represents a container that can hold sets of items. Used
|
|
7404
6423
|
* with entities such as Players, Chest Minecarts, Llamas, and
|
|
@@ -7536,9 +6555,7 @@ export class Container {
|
|
|
7536
6555
|
*
|
|
7537
6556
|
* @param itemStack
|
|
7538
6557
|
* 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.
|
|
6558
|
+
* @throws This function can throw errors.
|
|
7542
6559
|
*
|
|
7543
6560
|
* {@link ContainerRulesError}
|
|
7544
6561
|
*
|
|
@@ -7776,8 +6793,6 @@ export class Container {
|
|
|
7776
6793
|
* @throws
|
|
7777
6794
|
* Throws if either this container or `toContainer` are invalid
|
|
7778
6795
|
* 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
6796
|
*
|
|
7782
6797
|
* {@link ContainerRulesError}
|
|
7783
6798
|
*
|
|
@@ -8429,47 +7444,13 @@ export class Dimension {
|
|
|
8429
7444
|
*
|
|
8430
7445
|
* {@link minecraftcommon.EngineError}
|
|
8431
7446
|
*
|
|
8432
|
-
* {@link Error}
|
|
8433
|
-
*/
|
|
8434
|
-
calculateClosestBiomeFromSeed(
|
|
8435
|
-
pos: Vector3,
|
|
8436
|
-
biomeToFind: BiomeType | string,
|
|
8437
|
-
options?: BiomeSearchOptions,
|
|
8438
|
-
): 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}
|
|
7447
|
+
* {@link Error}
|
|
8465
7448
|
*/
|
|
8466
|
-
|
|
8467
|
-
|
|
8468
|
-
|
|
8469
|
-
|
|
8470
|
-
|
|
8471
|
-
filter?: BlockFilter,
|
|
8472
|
-
): void;
|
|
7449
|
+
calculateClosestBiomeFromSeed(
|
|
7450
|
+
pos: Vector3,
|
|
7451
|
+
biomeToFind: BiomeType | string,
|
|
7452
|
+
options?: BiomeSearchOptions,
|
|
7453
|
+
): Vector3 | undefined;
|
|
8473
7454
|
/**
|
|
8474
7455
|
* @remarks
|
|
8475
7456
|
* Checks if an area contains the specified biomes. If the area
|
|
@@ -8708,15 +7689,12 @@ export class Dimension {
|
|
|
8708
7689
|
*/
|
|
8709
7690
|
getBlockFromRay(location: Vector3, direction: Vector3, options?: BlockRaycastOptions): BlockRaycastHit | undefined;
|
|
8710
7691
|
/**
|
|
7692
|
+
* @rc
|
|
8711
7693
|
* @remarks
|
|
8712
|
-
* Gets all the blocks in a volume that satisfy the
|
|
8713
|
-
* options.
|
|
7694
|
+
* Gets all the blocks in a volume that satisfy the filter.
|
|
8714
7695
|
*
|
|
8715
7696
|
* @param volume
|
|
8716
7697
|
* 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
7698
|
* @param allowUnloadedChunks
|
|
8721
7699
|
* If set to true will suppress the UnloadedChunksError if some
|
|
8722
7700
|
* or all of the block volume is outside of the loaded chunks.
|
|
@@ -8725,7 +7703,7 @@ export class Dimension {
|
|
|
8725
7703
|
* Defaults to: false
|
|
8726
7704
|
* @returns
|
|
8727
7705
|
* Returns the ListBlockVolume that contains all the block
|
|
8728
|
-
* locations that satisfied the block
|
|
7706
|
+
* locations that satisfied the block filter.
|
|
8729
7707
|
* @throws This function can throw errors.
|
|
8730
7708
|
*
|
|
8731
7709
|
* {@link minecraftcommon.ArgumentOutOfBoundsError}
|
|
@@ -8850,26 +7828,6 @@ export class Dimension {
|
|
|
8850
7828
|
* {@link minecraftcommon.UnsupportedFunctionalityError}
|
|
8851
7829
|
*/
|
|
8852
7830
|
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
7831
|
/**
|
|
8874
7832
|
* @remarks
|
|
8875
7833
|
* Returns the total brightness level of light shining on a
|
|
@@ -8931,16 +7889,6 @@ export class Dimension {
|
|
|
8931
7889
|
* @throws This function can throw errors.
|
|
8932
7890
|
*/
|
|
8933
7891
|
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
7892
|
/**
|
|
8945
7893
|
* @remarks
|
|
8946
7894
|
* Returns true if the chunk at the given location is loaded
|
|
@@ -9186,11 +8134,7 @@ export class Dimension {
|
|
|
9186
8134
|
* }
|
|
9187
8135
|
* ```
|
|
9188
8136
|
*/
|
|
9189
|
-
spawnEntity
|
|
9190
|
-
identifier: EntityIdentifierType<NoInfer<T>>,
|
|
9191
|
-
location: Vector3,
|
|
9192
|
-
options?: SpawnEntityOptions,
|
|
9193
|
-
): Entity;
|
|
8137
|
+
spawnEntity(identifier: EntityType | string, location: Vector3, options?: SpawnEntityOptions): Entity;
|
|
9194
8138
|
/**
|
|
9195
8139
|
* @remarks
|
|
9196
8140
|
* Creates a new item stack as an entity at the specified
|
|
@@ -9285,46 +8229,6 @@ export class Dimension {
|
|
|
9285
8229
|
* ```
|
|
9286
8230
|
*/
|
|
9287
8231
|
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
8232
|
}
|
|
9329
8233
|
|
|
9330
8234
|
/**
|
|
@@ -9599,8 +8503,6 @@ export class EffectTypes {
|
|
|
9599
8503
|
* @remarks
|
|
9600
8504
|
* Effect type for the given identifier.
|
|
9601
8505
|
*
|
|
9602
|
-
* This function can't be called in restricted-execution mode.
|
|
9603
|
-
*
|
|
9604
8506
|
* @param identifier
|
|
9605
8507
|
* The identifier for the effect.
|
|
9606
8508
|
* @returns
|
|
@@ -9612,8 +8514,6 @@ export class EffectTypes {
|
|
|
9612
8514
|
* @remarks
|
|
9613
8515
|
* Gets all effects.
|
|
9614
8516
|
*
|
|
9615
|
-
* This function can't be called in restricted-execution mode.
|
|
9616
|
-
*
|
|
9617
8517
|
* @returns
|
|
9618
8518
|
* A list of all effects.
|
|
9619
8519
|
*/
|
|
@@ -9908,18 +8808,6 @@ export class Entity {
|
|
|
9908
8808
|
*
|
|
9909
8809
|
*/
|
|
9910
8810
|
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
8811
|
/**
|
|
9924
8812
|
* @remarks
|
|
9925
8813
|
* Identifier of the type of the entity - for example,
|
|
@@ -11160,18 +10048,6 @@ export class EntityBaseMovementComponent extends EntityComponent {
|
|
|
11160
10048
|
// @ts-ignore Class inheritance allowed for native defined classes
|
|
11161
10049
|
export class EntityBreathableComponent extends EntityComponent {
|
|
11162
10050
|
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
10051
|
/**
|
|
11176
10052
|
* @remarks
|
|
11177
10053
|
* If true, this entity can breathe in air.
|
|
@@ -11200,14 +10076,6 @@ export class EntityBreathableComponent extends EntityComponent {
|
|
|
11200
10076
|
* @throws This property can throw when used.
|
|
11201
10077
|
*/
|
|
11202
10078
|
readonly breathesWater: boolean;
|
|
11203
|
-
/**
|
|
11204
|
-
* @beta
|
|
11205
|
-
* @remarks
|
|
11206
|
-
* If true, the entity is able to breathe.
|
|
11207
|
-
*
|
|
11208
|
-
* @throws This property can throw when used.
|
|
11209
|
-
*/
|
|
11210
|
-
readonly canBreathe: boolean;
|
|
11211
10079
|
/**
|
|
11212
10080
|
* @remarks
|
|
11213
10081
|
* If true, this entity will have visible bubbles while in
|
|
@@ -13158,42 +12026,6 @@ export class EntityNavigationWalkComponent extends EntityNavigationComponent {
|
|
|
13158
12026
|
static readonly componentId = 'minecraft:navigation.walk';
|
|
13159
12027
|
}
|
|
13160
12028
|
|
|
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
12029
|
/**
|
|
13198
12030
|
* When present on an entity, this entity is on fire.
|
|
13199
12031
|
* @example setOnFire.ts
|
|
@@ -13866,102 +12698,6 @@ export class EntitySpawnAfterEventSignal {
|
|
|
13866
12698
|
unsubscribe(callback: (arg0: EntitySpawnAfterEvent) => void): void;
|
|
13867
12699
|
}
|
|
13868
12700
|
|
|
13869
|
-
/**
|
|
13870
|
-
* @beta
|
|
13871
|
-
* Contains data related to an entity beginning to sneak.
|
|
13872
|
-
*/
|
|
13873
|
-
export class EntityStartSneakingAfterEvent {
|
|
13874
|
-
private constructor();
|
|
13875
|
-
/**
|
|
13876
|
-
* @remarks
|
|
13877
|
-
* Entity that has started sneaking.
|
|
13878
|
-
*
|
|
13879
|
-
*/
|
|
13880
|
-
readonly entity: Entity;
|
|
13881
|
-
}
|
|
13882
|
-
|
|
13883
|
-
/**
|
|
13884
|
-
* @beta
|
|
13885
|
-
* Manages callbacks that are connected to when an entity
|
|
13886
|
-
* begins sneaking.
|
|
13887
|
-
*/
|
|
13888
|
-
export class EntityStartSneakingAfterEventSignal {
|
|
13889
|
-
private constructor();
|
|
13890
|
-
/**
|
|
13891
|
-
* @remarks
|
|
13892
|
-
* Adds a callback that will be called when an entity begins
|
|
13893
|
-
* sneaking.
|
|
13894
|
-
*
|
|
13895
|
-
* This function can't be called in restricted-execution mode.
|
|
13896
|
-
*
|
|
13897
|
-
* This function can be called in early-execution mode.
|
|
13898
|
-
*
|
|
13899
|
-
*/
|
|
13900
|
-
subscribe(
|
|
13901
|
-
callback: (arg0: EntityStartSneakingAfterEvent) => void,
|
|
13902
|
-
options?: EntitySneakingChangedEventOptions,
|
|
13903
|
-
): (arg0: EntityStartSneakingAfterEvent) => void;
|
|
13904
|
-
/**
|
|
13905
|
-
* @remarks
|
|
13906
|
-
* Removes a callback from being called when an entity begins
|
|
13907
|
-
* sneaking.
|
|
13908
|
-
*
|
|
13909
|
-
* This function can't be called in restricted-execution mode.
|
|
13910
|
-
*
|
|
13911
|
-
* This function can be called in early-execution mode.
|
|
13912
|
-
*
|
|
13913
|
-
*/
|
|
13914
|
-
unsubscribe(callback: (arg0: EntityStartSneakingAfterEvent) => void): void;
|
|
13915
|
-
}
|
|
13916
|
-
|
|
13917
|
-
/**
|
|
13918
|
-
* @beta
|
|
13919
|
-
* Contains data related to an entity stopping sneaking.
|
|
13920
|
-
*/
|
|
13921
|
-
export class EntityStopSneakingAfterEvent {
|
|
13922
|
-
private constructor();
|
|
13923
|
-
/**
|
|
13924
|
-
* @remarks
|
|
13925
|
-
* Entity that has stopped sneaking.
|
|
13926
|
-
*
|
|
13927
|
-
*/
|
|
13928
|
-
readonly entity: Entity;
|
|
13929
|
-
}
|
|
13930
|
-
|
|
13931
|
-
/**
|
|
13932
|
-
* @beta
|
|
13933
|
-
* Manages callbacks that are connected to when an entity stops
|
|
13934
|
-
* sneaking.
|
|
13935
|
-
*/
|
|
13936
|
-
export class EntityStopSneakingAfterEventSignal {
|
|
13937
|
-
private constructor();
|
|
13938
|
-
/**
|
|
13939
|
-
* @remarks
|
|
13940
|
-
* Adds a callback that will be called when an entity stops
|
|
13941
|
-
* sneaking.
|
|
13942
|
-
*
|
|
13943
|
-
* This function can't be called in restricted-execution mode.
|
|
13944
|
-
*
|
|
13945
|
-
* This function can be called in early-execution mode.
|
|
13946
|
-
*
|
|
13947
|
-
*/
|
|
13948
|
-
subscribe(
|
|
13949
|
-
callback: (arg0: EntityStopSneakingAfterEvent) => void,
|
|
13950
|
-
options?: EntitySneakingChangedEventOptions,
|
|
13951
|
-
): (arg0: EntityStopSneakingAfterEvent) => void;
|
|
13952
|
-
/**
|
|
13953
|
-
* @remarks
|
|
13954
|
-
* Removes a callback from being called when an entity stops
|
|
13955
|
-
* sneaking.
|
|
13956
|
-
*
|
|
13957
|
-
* This function can't be called in restricted-execution mode.
|
|
13958
|
-
*
|
|
13959
|
-
* This function can be called in early-execution mode.
|
|
13960
|
-
*
|
|
13961
|
-
*/
|
|
13962
|
-
unsubscribe(callback: (arg0: EntityStopSneakingAfterEvent) => void): void;
|
|
13963
|
-
}
|
|
13964
|
-
|
|
13965
12701
|
/**
|
|
13966
12702
|
* Defines the entity's ability to carry items. An entity with
|
|
13967
12703
|
* a higher strength would have higher potential carry capacity
|
|
@@ -14050,7 +12786,7 @@ export class EntityTameableComponent extends EntityComponent {
|
|
|
14050
12786
|
}
|
|
14051
12787
|
|
|
14052
12788
|
/**
|
|
14053
|
-
* @
|
|
12789
|
+
* @rc
|
|
14054
12790
|
* Contains data related to an entity being tamed.
|
|
14055
12791
|
*/
|
|
14056
12792
|
export class EntityTamedAfterEvent {
|
|
@@ -14060,7 +12796,7 @@ export class EntityTamedAfterEvent {
|
|
|
14060
12796
|
}
|
|
14061
12797
|
|
|
14062
12798
|
/**
|
|
14063
|
-
* @
|
|
12799
|
+
* @rc
|
|
14064
12800
|
* Manages callbacks that are connected to when an entity is
|
|
14065
12801
|
* tamed.
|
|
14066
12802
|
*/
|
|
@@ -14075,7 +12811,7 @@ export class EntityTamedAfterEventSignal {
|
|
|
14075
12811
|
*/
|
|
14076
12812
|
subscribe(
|
|
14077
12813
|
callback: (arg0: EntityTamedAfterEvent) => void,
|
|
14078
|
-
options?:
|
|
12814
|
+
options?: EntityTamedEventOptions,
|
|
14079
12815
|
): (arg0: EntityTamedAfterEvent) => void;
|
|
14080
12816
|
/**
|
|
14081
12817
|
* @remarks
|
|
@@ -14088,7 +12824,7 @@ export class EntityTamedAfterEventSignal {
|
|
|
14088
12824
|
}
|
|
14089
12825
|
|
|
14090
12826
|
/**
|
|
14091
|
-
* @
|
|
12827
|
+
* @rc
|
|
14092
12828
|
* Contains information regarding an event before an entity is
|
|
14093
12829
|
* tamed.
|
|
14094
12830
|
*/
|
|
@@ -14115,7 +12851,7 @@ export class EntityTamedBeforeEvent {
|
|
|
14115
12851
|
}
|
|
14116
12852
|
|
|
14117
12853
|
/**
|
|
14118
|
-
* @
|
|
12854
|
+
* @rc
|
|
14119
12855
|
* Manages callbacks that are connected to before an entity is
|
|
14120
12856
|
* tamed.
|
|
14121
12857
|
*/
|
|
@@ -14134,7 +12870,7 @@ export class EntityTamedBeforeEventSignal {
|
|
|
14134
12870
|
*/
|
|
14135
12871
|
subscribe(
|
|
14136
12872
|
callback: (arg0: EntityTamedBeforeEvent) => void,
|
|
14137
|
-
options?:
|
|
12873
|
+
options?: EntityTamedEventOptions,
|
|
14138
12874
|
): (arg0: EntityTamedBeforeEvent) => void;
|
|
14139
12875
|
/**
|
|
14140
12876
|
* @remarks
|
|
@@ -14260,7 +12996,7 @@ export class EntityTypes {
|
|
|
14260
12996
|
* Retrieves an entity type using a string-based identifier.
|
|
14261
12997
|
*
|
|
14262
12998
|
*/
|
|
14263
|
-
static get
|
|
12999
|
+
static get(identifier: string): EntityType | undefined;
|
|
14264
13000
|
/**
|
|
14265
13001
|
* @remarks
|
|
14266
13002
|
* Retrieves a set of all entity types within this world.
|
|
@@ -14665,138 +13401,6 @@ export class FluidContainer {
|
|
|
14665
13401
|
static readonly minFillLevel = 0;
|
|
14666
13402
|
}
|
|
14667
13403
|
|
|
14668
|
-
/**
|
|
14669
|
-
* @beta
|
|
14670
|
-
* Provides access to the fog definitions stack of a player
|
|
14671
|
-
* entity, allowing scripts to push, pop, remove, and query
|
|
14672
|
-
* active fog definitions.
|
|
14673
|
-
*/
|
|
14674
|
-
export class FogSettings {
|
|
14675
|
-
private constructor();
|
|
14676
|
-
/**
|
|
14677
|
-
* @remarks
|
|
14678
|
-
* Returns the list of fog identifiers currently on the
|
|
14679
|
-
* player's fog stack, ordered from bottom to top.
|
|
14680
|
-
*
|
|
14681
|
-
* This function can't be called in restricted-execution mode.
|
|
14682
|
-
*
|
|
14683
|
-
* @returns
|
|
14684
|
-
* An array of fog definition identifiers currently on the
|
|
14685
|
-
* stack.
|
|
14686
|
-
* @throws
|
|
14687
|
-
* Throws if the entity is invalid.
|
|
14688
|
-
*
|
|
14689
|
-
* {@link InvalidEntityError}
|
|
14690
|
-
*/
|
|
14691
|
-
getStack(): string[];
|
|
14692
|
-
/**
|
|
14693
|
-
* @remarks
|
|
14694
|
-
* Returns the list of tags currently present on the player's
|
|
14695
|
-
* fog stack.
|
|
14696
|
-
*
|
|
14697
|
-
* This function can't be called in restricted-execution mode.
|
|
14698
|
-
*
|
|
14699
|
-
* @returns
|
|
14700
|
-
* An array of tag strings associated with fog settings on the
|
|
14701
|
-
* stack.
|
|
14702
|
-
* @throws
|
|
14703
|
-
* Throws if the entity is invalid.
|
|
14704
|
-
*
|
|
14705
|
-
* {@link InvalidEntityError}
|
|
14706
|
-
*/
|
|
14707
|
-
getTags(): string[];
|
|
14708
|
-
/**
|
|
14709
|
-
* @remarks
|
|
14710
|
-
* Removes the most recently pushed fog definition from the
|
|
14711
|
-
* player's fog stack.
|
|
14712
|
-
*
|
|
14713
|
-
* This function can't be called in restricted-execution mode.
|
|
14714
|
-
*
|
|
14715
|
-
* @param tag
|
|
14716
|
-
* An optional tag identifying which entry to pop. If provided,
|
|
14717
|
-
* searches the stack from top to bottom and removes the most
|
|
14718
|
-
* recently pushed entry with this tag. If omitted, removes the
|
|
14719
|
-
* most recently pushed entry regardless of tag.
|
|
14720
|
-
* @returns
|
|
14721
|
-
* Returns the identifier of the popped fog definition, or
|
|
14722
|
-
* undefined if the stack was unchanged.
|
|
14723
|
-
* @throws
|
|
14724
|
-
* Throws if the entity is invalid.
|
|
14725
|
-
*
|
|
14726
|
-
* {@link InvalidEntityError}
|
|
14727
|
-
*/
|
|
14728
|
-
pop(tag?: string): string | undefined;
|
|
14729
|
-
/**
|
|
14730
|
-
* @remarks
|
|
14731
|
-
* Pushes a new fog definition onto the player's fog stack.
|
|
14732
|
-
*
|
|
14733
|
-
* This function can't be called in restricted-execution mode.
|
|
14734
|
-
*
|
|
14735
|
-
* @param fogId
|
|
14736
|
-
* The identifier of the fog definition to push onto the stack
|
|
14737
|
-
* (e.g. 'minecraft:fog_bamboo_jungle').
|
|
14738
|
-
* @param tag
|
|
14739
|
-
* An optional tag used to label this fog definition on the
|
|
14740
|
-
* stack, allowing it to be targeted by pop or remove. If
|
|
14741
|
-
* omitted, the entry is stored with the tag 'untagged'.
|
|
14742
|
-
* @returns
|
|
14743
|
-
* Returns the zero-based index at which the fog definition was
|
|
14744
|
-
* inserted into the stack.
|
|
14745
|
-
* @throws
|
|
14746
|
-
* Throws if the entity is invalid, the fog identifier is
|
|
14747
|
-
* invalid, or if the stack limit of 16 has been exceeded.
|
|
14748
|
-
*
|
|
14749
|
-
* {@link FogSettingsError}
|
|
14750
|
-
*
|
|
14751
|
-
* {@link InvalidEntityError}
|
|
14752
|
-
*/
|
|
14753
|
-
push(fogId: string, tag?: string): number;
|
|
14754
|
-
/**
|
|
14755
|
-
* @remarks
|
|
14756
|
-
* Removes all fog definitions with the given tag from the
|
|
14757
|
-
* player's fog stack. If no tag is provided, clears all fog
|
|
14758
|
-
* definitions.
|
|
14759
|
-
*
|
|
14760
|
-
* This function can't be called in restricted-execution mode.
|
|
14761
|
-
*
|
|
14762
|
-
* @param tag
|
|
14763
|
-
* An optional tag identifying which the entries to remove. If
|
|
14764
|
-
* omitted, clears all fog definitions regardless of tag.
|
|
14765
|
-
* @returns
|
|
14766
|
-
* Returns true if at least one entry was removed, or false if
|
|
14767
|
-
* the stack was unchanged.
|
|
14768
|
-
* @throws
|
|
14769
|
-
* Throws if the entity is invalid.
|
|
14770
|
-
*
|
|
14771
|
-
* {@link InvalidEntityError}
|
|
14772
|
-
*/
|
|
14773
|
-
remove(tag?: string): boolean;
|
|
14774
|
-
/**
|
|
14775
|
-
* @remarks
|
|
14776
|
-
* Sets the player's fog stack to the given list of fog
|
|
14777
|
-
* identifiers, replacing any existing entries.
|
|
14778
|
-
*
|
|
14779
|
-
* This function can't be called in restricted-execution mode.
|
|
14780
|
-
*
|
|
14781
|
-
* @param fogIds
|
|
14782
|
-
* A stack of fog definition identifiers to set on the player's
|
|
14783
|
-
* fog stack (e.g. ['minecraft:fog_bamboo_jungle']). Maximum of
|
|
14784
|
-
* 16 entries.
|
|
14785
|
-
* @param tag
|
|
14786
|
-
* An optional tag to associate with the new entries, used to
|
|
14787
|
-
* target them with pop or remove.
|
|
14788
|
-
* @throws
|
|
14789
|
-
* Throws if the entity is invalid, if more than 16 fog
|
|
14790
|
-
* identifiers are provided, or if any fog identifier is
|
|
14791
|
-
* invalid.
|
|
14792
|
-
*
|
|
14793
|
-
* {@link FogSettingsError}
|
|
14794
|
-
*
|
|
14795
|
-
* {@link InvalidEntityError}
|
|
14796
|
-
*/
|
|
14797
|
-
setStack(fogIds: string[], tag?: string): void;
|
|
14798
|
-
}
|
|
14799
|
-
|
|
14800
13404
|
/**
|
|
14801
13405
|
* Contains information regarding a changed world.gameRules
|
|
14802
13406
|
* property.
|
|
@@ -14985,14 +13589,7 @@ export class GameRules {
|
|
|
14985
13589
|
* This property can't be edited in restricted-execution mode.
|
|
14986
13590
|
*
|
|
14987
13591
|
*/
|
|
14988
|
-
playersSleepingPercentage: number;
|
|
14989
|
-
/**
|
|
14990
|
-
* @beta
|
|
14991
|
-
* @remarks
|
|
14992
|
-
* This property can't be edited in restricted-execution mode.
|
|
14993
|
-
*
|
|
14994
|
-
*/
|
|
14995
|
-
playerWaypoints: PlayerWaypointsMode;
|
|
13592
|
+
playersSleepingPercentage: number;
|
|
14996
13593
|
/**
|
|
14997
13594
|
* @remarks
|
|
14998
13595
|
* This property can't be edited in restricted-execution mode.
|
|
@@ -15140,62 +13737,6 @@ export class ISerializable {
|
|
|
15140
13737
|
private constructor();
|
|
15141
13738
|
}
|
|
15142
13739
|
|
|
15143
|
-
/**
|
|
15144
|
-
* @beta
|
|
15145
|
-
* Represents the dynamic properties of a block. Only available
|
|
15146
|
-
* from block entities. Up to 1KBytes of data can be stored per
|
|
15147
|
-
* content pack per block entity in their dynamic properties
|
|
15148
|
-
* storage.
|
|
15149
|
-
*/
|
|
15150
|
-
// @ts-ignore Class inheritance allowed for native defined classes
|
|
15151
|
-
export class ItemBlockDynamicPropertiesComponent extends ItemComponent {
|
|
15152
|
-
private constructor();
|
|
15153
|
-
static readonly componentId = 'minecraft:block_actor_dynamic_properties';
|
|
15154
|
-
/**
|
|
15155
|
-
* @remarks
|
|
15156
|
-
* Returns a DynamicProperty that was stored with the provided
|
|
15157
|
-
* key. Keys are unique to each content pack and cannot be used
|
|
15158
|
-
* to retrieve dynamic properties set from other content packs.
|
|
15159
|
-
* Returns undefined if the key was not found.
|
|
15160
|
-
*
|
|
15161
|
-
* @throws This function can throw errors.
|
|
15162
|
-
*
|
|
15163
|
-
* {@link Error}
|
|
15164
|
-
*
|
|
15165
|
-
* {@link InvalidItemStackError}
|
|
15166
|
-
*/
|
|
15167
|
-
get(key: string): boolean | number | string | Vector3 | undefined;
|
|
15168
|
-
/**
|
|
15169
|
-
* @remarks
|
|
15170
|
-
* Sets a dynamic property with the provided key and value.
|
|
15171
|
-
* Keys are unique to each content pack and cannot be used to
|
|
15172
|
-
* set dynamic properties for other content packs. Values can
|
|
15173
|
-
* be either a Number, a String or a Vector3. Setting a
|
|
15174
|
-
* property with an undefined value will remove it from the
|
|
15175
|
-
* storage. Storage size usage is counted towards the 1KBytes
|
|
15176
|
-
* limit per content pack.
|
|
15177
|
-
*
|
|
15178
|
-
* @throws This function can throw errors.
|
|
15179
|
-
*
|
|
15180
|
-
* {@link Error}
|
|
15181
|
-
*
|
|
15182
|
-
* {@link InvalidItemStackError}
|
|
15183
|
-
*/
|
|
15184
|
-
set(key: string, value?: boolean | number | string | Vector3): void;
|
|
15185
|
-
/**
|
|
15186
|
-
* @remarks
|
|
15187
|
-
* Returns the current size, in bytes, of the dynamic
|
|
15188
|
-
* properties storage for this block. The byte count only
|
|
15189
|
-
* accounts for properties set by your content pack. The
|
|
15190
|
-
* 1KBytes limit is per content pack.
|
|
15191
|
-
*
|
|
15192
|
-
* @throws This function can throw errors.
|
|
15193
|
-
*
|
|
15194
|
-
* {@link InvalidItemStackError}
|
|
15195
|
-
*/
|
|
15196
|
-
totalByteCount(): number;
|
|
15197
|
-
}
|
|
15198
|
-
|
|
15199
13740
|
/**
|
|
15200
13741
|
* When present on an item, this item is a book item. Can
|
|
15201
13742
|
* access and modify the contents of the book and sign it.
|
|
@@ -17909,33 +16450,6 @@ export class MatchToolCondition extends LootItemCondition {
|
|
|
17909
16450
|
readonly itemTagsNone: string[];
|
|
17910
16451
|
}
|
|
17911
16452
|
|
|
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
16453
|
/**
|
|
17940
16454
|
* Contains a set of additional variable values for further
|
|
17941
16455
|
* defining how rendering and animations function.
|
|
@@ -18004,49 +16518,6 @@ export class MolangVariableMap {
|
|
|
18004
16518
|
setVector3(variableName: string, vector: Vector3): void;
|
|
18005
16519
|
}
|
|
18006
16520
|
|
|
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
16521
|
/**
|
|
18051
16522
|
* Loot item condition that checks whether the looting entity
|
|
18052
16523
|
* is currently a passenger of a specific type of entity.
|
|
@@ -18214,62 +16685,6 @@ export class Player extends Entity {
|
|
|
18214
16685
|
* @throws This property can throw when used.
|
|
18215
16686
|
*/
|
|
18216
16687
|
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
16688
|
/**
|
|
18274
16689
|
* @remarks
|
|
18275
16690
|
* Contains the player's device information.
|
|
@@ -18283,14 +16698,6 @@ export class Player extends Entity {
|
|
|
18283
16698
|
*
|
|
18284
16699
|
*/
|
|
18285
16700
|
commandPermissionLevel: CommandPermissionLevel;
|
|
18286
|
-
/**
|
|
18287
|
-
* @beta
|
|
18288
|
-
* @remarks
|
|
18289
|
-
* Contains methods for manipulating the render distance fog
|
|
18290
|
-
* settings of a Player.
|
|
18291
|
-
*
|
|
18292
|
-
*/
|
|
18293
|
-
readonly fogSettings: FogSettings;
|
|
18294
16701
|
/**
|
|
18295
16702
|
* @remarks
|
|
18296
16703
|
* Gets the current graphics mode of the player's client. This
|
|
@@ -18374,19 +16781,6 @@ export class Player extends Entity {
|
|
|
18374
16781
|
* @throws This property can throw when used.
|
|
18375
16782
|
*/
|
|
18376
16783
|
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
16784
|
/**
|
|
18391
16785
|
* @throws This property can throw when used.
|
|
18392
16786
|
*
|
|
@@ -18460,20 +16854,6 @@ export class Player extends Entity {
|
|
|
18460
16854
|
* Throws if the Entity or Entity ID is invalid.
|
|
18461
16855
|
*/
|
|
18462
16856
|
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
16857
|
/**
|
|
18478
16858
|
* @remarks
|
|
18479
16859
|
* The player's aim-assist settings.
|
|
@@ -18507,20 +16887,6 @@ export class Player extends Entity {
|
|
|
18507
16887
|
* @throws This function can throw errors.
|
|
18508
16888
|
*/
|
|
18509
16889
|
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
16890
|
/**
|
|
18525
16891
|
* @remarks
|
|
18526
16892
|
* Gets the current spawn point of the player.
|
|
@@ -18528,21 +16894,6 @@ export class Player extends Entity {
|
|
|
18528
16894
|
* @throws This function can throw errors.
|
|
18529
16895
|
*/
|
|
18530
16896
|
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
16897
|
/**
|
|
18547
16898
|
* @remarks
|
|
18548
16899
|
* Gets the total experience of the Player.
|
|
@@ -18606,18 +16957,7 @@ export class Player extends Entity {
|
|
|
18606
16957
|
* }
|
|
18607
16958
|
* ```
|
|
18608
16959
|
*/
|
|
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;
|
|
16960
|
+
playSound(soundId: string, soundOptions?: PlayerSoundOptions): SoundInstance;
|
|
18621
16961
|
/**
|
|
18622
16962
|
* @remarks
|
|
18623
16963
|
* Queues an additional music track that only this particular
|
|
@@ -18893,18 +17233,6 @@ export class Player extends Entity {
|
|
|
18893
17233
|
* @throws This function can throw errors.
|
|
18894
17234
|
*/
|
|
18895
17235
|
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
17236
|
/**
|
|
18909
17237
|
* @remarks
|
|
18910
17238
|
* Stops any music tracks from playing for this particular
|
|
@@ -18915,20 +17243,6 @@ export class Player extends Entity {
|
|
|
18915
17243
|
* @throws This function can throw errors.
|
|
18916
17244
|
*/
|
|
18917
17245
|
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
17246
|
}
|
|
18933
17247
|
|
|
18934
17248
|
/**
|
|
@@ -20239,137 +18553,55 @@ export class PlayerLeaveBeforeEventSignal {
|
|
|
20239
18553
|
* @param callback
|
|
20240
18554
|
* This closure is called with restricted-execution privilege.
|
|
20241
18555
|
*/
|
|
20242
|
-
unsubscribe(callback: (arg0: PlayerLeaveBeforeEvent) => void): void;
|
|
20243
|
-
}
|
|
20244
|
-
|
|
20245
|
-
/**
|
|
20246
|
-
* Contains information regarding an event where a player
|
|
20247
|
-
* places a block.
|
|
20248
|
-
*/
|
|
20249
|
-
// @ts-ignore Class inheritance allowed for native defined classes
|
|
20250
|
-
export class PlayerPlaceBlockAfterEvent extends BlockEvent {
|
|
20251
|
-
private constructor();
|
|
20252
|
-
/**
|
|
20253
|
-
* @remarks
|
|
20254
|
-
* Player that placed the block for this event.
|
|
20255
|
-
*
|
|
20256
|
-
*/
|
|
20257
|
-
readonly player: Player;
|
|
20258
|
-
}
|
|
20259
|
-
|
|
20260
|
-
/**
|
|
20261
|
-
* Manages callbacks that are connected to when a block is
|
|
20262
|
-
* placed by a player.
|
|
20263
|
-
*/
|
|
20264
|
-
export class PlayerPlaceBlockAfterEventSignal {
|
|
20265
|
-
private constructor();
|
|
20266
|
-
/**
|
|
20267
|
-
* @remarks
|
|
20268
|
-
* Adds a callback that will be called when a block is placed
|
|
20269
|
-
* by a player.
|
|
20270
|
-
*
|
|
20271
|
-
* This function can't be called in restricted-execution mode.
|
|
20272
|
-
*
|
|
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;
|
|
18556
|
+
unsubscribe(callback: (arg0: PlayerLeaveBeforeEvent) => void): void;
|
|
18557
|
+
}
|
|
18558
|
+
|
|
18559
|
+
/**
|
|
18560
|
+
* Contains information regarding an event where a player
|
|
18561
|
+
* places a block.
|
|
18562
|
+
*/
|
|
18563
|
+
// @ts-ignore Class inheritance allowed for native defined classes
|
|
18564
|
+
export class PlayerPlaceBlockAfterEvent extends BlockEvent {
|
|
18565
|
+
private constructor();
|
|
20327
18566
|
/**
|
|
20328
18567
|
* @remarks
|
|
20329
|
-
* Player that
|
|
18568
|
+
* Player that placed the block for this event.
|
|
20330
18569
|
*
|
|
20331
18570
|
*/
|
|
20332
18571
|
readonly player: Player;
|
|
20333
18572
|
}
|
|
20334
18573
|
|
|
20335
18574
|
/**
|
|
20336
|
-
*
|
|
20337
|
-
* Manages callbacks that are connected to before a block is
|
|
18575
|
+
* Manages callbacks that are connected to when a block is
|
|
20338
18576
|
* placed by a player.
|
|
20339
18577
|
*/
|
|
20340
|
-
export class
|
|
18578
|
+
export class PlayerPlaceBlockAfterEventSignal {
|
|
20341
18579
|
private constructor();
|
|
20342
18580
|
/**
|
|
20343
18581
|
* @remarks
|
|
20344
|
-
* Adds a callback that will be called
|
|
18582
|
+
* Adds a callback that will be called when a block is placed
|
|
20345
18583
|
* by a player.
|
|
20346
18584
|
*
|
|
20347
18585
|
* This function can't be called in restricted-execution mode.
|
|
20348
18586
|
*
|
|
20349
18587
|
* This function can be called in early-execution mode.
|
|
20350
18588
|
*
|
|
20351
|
-
* @param callback
|
|
20352
|
-
* This closure is called with restricted-execution privilege.
|
|
20353
|
-
* @returns
|
|
20354
|
-
* Closure that is called with restricted-execution privilege.
|
|
20355
18589
|
*/
|
|
20356
18590
|
subscribe(
|
|
20357
|
-
callback: (arg0:
|
|
18591
|
+
callback: (arg0: PlayerPlaceBlockAfterEvent) => void,
|
|
20358
18592
|
options?: BlockEventOptions,
|
|
20359
|
-
): (arg0:
|
|
18593
|
+
): (arg0: PlayerPlaceBlockAfterEvent) => void;
|
|
20360
18594
|
/**
|
|
20361
18595
|
* @remarks
|
|
20362
|
-
* Removes a callback from being called
|
|
20363
|
-
*
|
|
18596
|
+
* Removes a callback from being called when an block is placed
|
|
18597
|
+
* by a player.
|
|
20364
18598
|
*
|
|
20365
18599
|
* This function can't be called in restricted-execution mode.
|
|
20366
18600
|
*
|
|
20367
18601
|
* This function can be called in early-execution mode.
|
|
20368
18602
|
*
|
|
20369
|
-
* @param callback
|
|
20370
|
-
* This closure is called with restricted-execution privilege.
|
|
20371
18603
|
*/
|
|
20372
|
-
unsubscribe(callback: (arg0:
|
|
18604
|
+
unsubscribe(callback: (arg0: PlayerPlaceBlockAfterEvent) => void): void;
|
|
20373
18605
|
}
|
|
20374
18606
|
|
|
20375
18607
|
/**
|
|
@@ -20560,80 +18792,6 @@ export class PlayerSwingStartAfterEventSignal {
|
|
|
20560
18792
|
unsubscribe(callback: (arg0: PlayerSwingStartAfterEvent) => void): void;
|
|
20561
18793
|
}
|
|
20562
18794
|
|
|
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
18795
|
/**
|
|
20638
18796
|
* Waypoint that tracks a player's position. Extends {@link
|
|
20639
18797
|
* EntityWaypoint} with additional player-specific visibility
|
|
@@ -20749,10 +18907,10 @@ export class Potions {
|
|
|
20749
18907
|
*
|
|
20750
18908
|
* {@link InvalidPotionEffectTypeError}
|
|
20751
18909
|
*/
|
|
20752
|
-
static resolve
|
|
20753
|
-
|
|
20754
|
-
|
|
20755
|
-
|
|
18910
|
+
static resolve(
|
|
18911
|
+
potionEffectType: PotionEffectType | string,
|
|
18912
|
+
potionDeliveryType: PotionDeliveryType | string,
|
|
18913
|
+
): ItemStack;
|
|
20756
18914
|
}
|
|
20757
18915
|
|
|
20758
18916
|
/**
|
|
@@ -20995,18 +19153,6 @@ export class PrimitiveShapesManager {
|
|
|
20995
19153
|
* {@link PrimitiveShapeError}
|
|
20996
19154
|
*/
|
|
20997
19155
|
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
19156
|
/**
|
|
21011
19157
|
* @remarks
|
|
21012
19158
|
* Removes all text primitives from the world.
|
|
@@ -21971,38 +20117,6 @@ export class Seat {
|
|
|
21971
20117
|
readonly seatRotation: number;
|
|
21972
20118
|
}
|
|
21973
20119
|
|
|
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
20120
|
/**
|
|
22007
20121
|
* Loot item function that modifies the trim on a dropped armor
|
|
22008
20122
|
* item.
|
|
@@ -22031,21 +20145,6 @@ export class SetArmorTrimFunction extends LootItemFunction {
|
|
|
22031
20145
|
// @ts-ignore Class inheritance allowed for native defined classes
|
|
22032
20146
|
export class SetBannerDetailsFunction extends LootItemFunction {
|
|
22033
20147
|
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
20148
|
/**
|
|
22050
20149
|
* @remarks
|
|
22051
20150
|
* The type of banner to drop.
|
|
@@ -22291,7 +20390,7 @@ export class SmeltItemFunction extends LootItemFunction {
|
|
|
22291
20390
|
}
|
|
22292
20391
|
|
|
22293
20392
|
/**
|
|
22294
|
-
* @
|
|
20393
|
+
* @rc
|
|
22295
20394
|
* Contains information about a sound thats declared duration
|
|
22296
20395
|
* elapsed.
|
|
22297
20396
|
*/
|
|
@@ -22308,7 +20407,7 @@ export class SoundCompletedAfterEvent {
|
|
|
22308
20407
|
}
|
|
22309
20408
|
|
|
22310
20409
|
/**
|
|
22311
|
-
* @
|
|
20410
|
+
* @rc
|
|
22312
20411
|
* Manages callbacks that are invoked when a tracked sound's
|
|
22313
20412
|
* declared duration elapses.
|
|
22314
20413
|
*/
|
|
@@ -22339,74 +20438,7 @@ export class SoundCompletedAfterEventSignal {
|
|
|
22339
20438
|
}
|
|
22340
20439
|
|
|
22341
20440
|
/**
|
|
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
|
|
20441
|
+
* @rc
|
|
22410
20442
|
* Provides duration and playback information for a sound whose
|
|
22411
20443
|
* definition declares a duration.
|
|
22412
20444
|
*/
|
|
@@ -22450,112 +20482,34 @@ export class SoundDurationInfo {
|
|
|
22450
20482
|
export class SoundInstance {
|
|
22451
20483
|
private constructor();
|
|
22452
20484
|
/**
|
|
22453
|
-
* @
|
|
20485
|
+
* @rc
|
|
22454
20486
|
* @remarks
|
|
22455
20487
|
* Gets duration and playback information for this sound.
|
|
22456
20488
|
*
|
|
22457
20489
|
*/
|
|
22458
20490
|
readonly durationInfo?: SoundDurationInfo;
|
|
22459
20491
|
/**
|
|
22460
|
-
* @
|
|
20492
|
+
* @rc
|
|
22461
20493
|
* @remarks
|
|
22462
20494
|
* Unique identifier of this sound instance.
|
|
22463
20495
|
*
|
|
22464
20496
|
*/
|
|
22465
20497
|
readonly id: string;
|
|
22466
20498
|
/**
|
|
22467
|
-
* @
|
|
20499
|
+
* @rc
|
|
22468
20500
|
* @remarks
|
|
22469
20501
|
* Gets the player this sound was played for.
|
|
22470
20502
|
*
|
|
22471
20503
|
*/
|
|
22472
20504
|
readonly recipient?: Player;
|
|
22473
20505
|
/**
|
|
22474
|
-
* @
|
|
20506
|
+
* @rc
|
|
22475
20507
|
* @remarks
|
|
22476
20508
|
* Gets the identifier of the sound event this instance was
|
|
22477
20509
|
* started with.
|
|
22478
20510
|
*
|
|
22479
20511
|
*/
|
|
22480
20512
|
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
20513
|
/**
|
|
22560
20514
|
* @rc
|
|
22561
20515
|
* @remarks
|
|
@@ -23280,19 +21234,6 @@ export class SystemBeforeEvents {
|
|
|
23280
21234
|
*
|
|
23281
21235
|
*/
|
|
23282
21236
|
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
21237
|
}
|
|
23297
21238
|
|
|
23298
21239
|
/**
|
|
@@ -23642,105 +21583,40 @@ export class TripWireTripAfterEvent extends BlockEvent {
|
|
|
23642
21583
|
* const eventLoc = tripWireTripEvent.block.location;
|
|
23643
21584
|
*
|
|
23644
21585
|
* 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.
|
|
21586
|
+
* log(
|
|
21587
|
+
* 'Tripwire trip event at tick ' +
|
|
21588
|
+
* system.currentTick +
|
|
21589
|
+
* (tripWireTripEvent.sources.length > 0 ? ' by entity ' + tripWireTripEvent.sources[0].id : '')
|
|
21590
|
+
* );
|
|
21591
|
+
* }
|
|
21592
|
+
* });
|
|
21593
|
+
* }
|
|
21594
|
+
* ```
|
|
23711
21595
|
*/
|
|
23712
|
-
export class
|
|
21596
|
+
export class TripWireTripAfterEventSignal {
|
|
23713
21597
|
private constructor();
|
|
23714
21598
|
/**
|
|
23715
21599
|
* @remarks
|
|
23716
|
-
* Adds a callback that will be called when a
|
|
23717
|
-
*
|
|
23718
|
-
* watchdog system.
|
|
21600
|
+
* Adds a callback that will be called when a trip wire is
|
|
21601
|
+
* tripped.
|
|
23719
21602
|
*
|
|
23720
21603
|
* This function can't be called in restricted-execution mode.
|
|
23721
21604
|
*
|
|
23722
21605
|
* This function can be called in early-execution mode.
|
|
23723
21606
|
*
|
|
23724
|
-
* @param callback
|
|
23725
|
-
* This closure is called with restricted-execution privilege.
|
|
23726
|
-
* @returns
|
|
23727
|
-
* Closure that is called with restricted-execution privilege.
|
|
23728
21607
|
*/
|
|
23729
|
-
subscribe(callback: (arg0:
|
|
21608
|
+
subscribe(callback: (arg0: TripWireTripAfterEvent) => void): (arg0: TripWireTripAfterEvent) => void;
|
|
23730
21609
|
/**
|
|
23731
21610
|
* @remarks
|
|
23732
|
-
* Removes a callback from being called when a
|
|
23733
|
-
*
|
|
23734
|
-
* watchdog system.
|
|
21611
|
+
* Removes a callback from being called when a trip wire is
|
|
21612
|
+
* tripped.
|
|
23735
21613
|
*
|
|
23736
21614
|
* This function can't be called in restricted-execution mode.
|
|
23737
21615
|
*
|
|
23738
21616
|
* This function can be called in early-execution mode.
|
|
23739
21617
|
*
|
|
23740
|
-
* @param callback
|
|
23741
|
-
* This closure is called with restricted-execution privilege.
|
|
23742
21618
|
*/
|
|
23743
|
-
unsubscribe(callback: (arg0:
|
|
21619
|
+
unsubscribe(callback: (arg0: TripWireTripAfterEvent) => void): void;
|
|
23744
21620
|
}
|
|
23745
21621
|
|
|
23746
21622
|
/**
|
|
@@ -23958,15 +21834,6 @@ export class World {
|
|
|
23958
21834
|
*
|
|
23959
21835
|
*/
|
|
23960
21836
|
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
21837
|
/**
|
|
23971
21838
|
* @remarks
|
|
23972
21839
|
* Contains a set of events that are applicable to the entirety
|
|
@@ -24031,14 +21898,6 @@ export class World {
|
|
|
24031
21898
|
*
|
|
24032
21899
|
*/
|
|
24033
21900
|
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
21901
|
/**
|
|
24043
21902
|
* @remarks
|
|
24044
21903
|
* Returns the manager for {@link Structure} related APIs.
|
|
@@ -24052,20 +21911,6 @@ export class World {
|
|
|
24052
21911
|
*
|
|
24053
21912
|
*/
|
|
24054
21913
|
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
21914
|
/**
|
|
24070
21915
|
* @remarks
|
|
24071
21916
|
* Clears the set of dynamic properties declared for this
|
|
@@ -24555,16 +22400,6 @@ export class WorldAfterEvents {
|
|
|
24555
22400
|
*
|
|
24556
22401
|
*/
|
|
24557
22402
|
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
22403
|
/**
|
|
24569
22404
|
* @remarks
|
|
24570
22405
|
* This event is fired when an entity event has been triggered
|
|
@@ -24690,25 +22525,7 @@ export class WorldAfterEvents {
|
|
|
24690
22525
|
*/
|
|
24691
22526
|
readonly entitySpawn: EntitySpawnAfterEventSignal;
|
|
24692
22527
|
/**
|
|
24693
|
-
* @
|
|
24694
|
-
* @remarks
|
|
24695
|
-
* This event fires when an entity starts sneaking.
|
|
24696
|
-
*
|
|
24697
|
-
* This property can be read in early-execution mode.
|
|
24698
|
-
*
|
|
24699
|
-
*/
|
|
24700
|
-
readonly entityStartSneaking: EntityStartSneakingAfterEventSignal;
|
|
24701
|
-
/**
|
|
24702
|
-
* @beta
|
|
24703
|
-
* @remarks
|
|
24704
|
-
* This event fires when an entity stops sneaking.
|
|
24705
|
-
*
|
|
24706
|
-
* This property can be read in early-execution mode.
|
|
24707
|
-
*
|
|
24708
|
-
*/
|
|
24709
|
-
readonly entityStopSneaking: EntityStopSneakingAfterEventSignal;
|
|
24710
|
-
/**
|
|
24711
|
-
* @beta
|
|
22528
|
+
* @rc
|
|
24712
22529
|
* @remarks
|
|
24713
22530
|
* This event fires when an entity is tamed.
|
|
24714
22531
|
*
|
|
@@ -24811,25 +22628,6 @@ export class WorldAfterEvents {
|
|
|
24811
22628
|
*
|
|
24812
22629
|
*/
|
|
24813
22630
|
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
22631
|
/**
|
|
24834
22632
|
* @remarks
|
|
24835
22633
|
* This event fires when a piston expands or retracts.
|
|
@@ -24984,16 +22782,6 @@ export class WorldAfterEvents {
|
|
|
24984
22782
|
*
|
|
24985
22783
|
*/
|
|
24986
22784
|
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
22785
|
/**
|
|
24998
22786
|
* @remarks
|
|
24999
22787
|
* A pressure plate has popped back up (i.e., there are no
|
|
@@ -25029,7 +22817,7 @@ export class WorldAfterEvents {
|
|
|
25029
22817
|
*/
|
|
25030
22818
|
readonly projectileHitEntity: ProjectileHitEntityAfterEventSignal;
|
|
25031
22819
|
/**
|
|
25032
|
-
* @
|
|
22820
|
+
* @rc
|
|
25033
22821
|
* @remarks
|
|
25034
22822
|
* A tracked sound's declared duration elapsed.
|
|
25035
22823
|
*
|
|
@@ -25079,43 +22867,6 @@ export class WorldAfterEvents {
|
|
|
25079
22867
|
*/
|
|
25080
22868
|
export class WorldBeforeEvents {
|
|
25081
22869
|
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
22870
|
/**
|
|
25120
22871
|
* @remarks
|
|
25121
22872
|
* This event is triggered after an event has been added to an
|
|
@@ -25155,7 +22906,7 @@ export class WorldBeforeEvents {
|
|
|
25155
22906
|
*/
|
|
25156
22907
|
readonly entityRemove: EntityRemoveBeforeEventSignal;
|
|
25157
22908
|
/**
|
|
25158
|
-
* @
|
|
22909
|
+
* @rc
|
|
25159
22910
|
* @remarks
|
|
25160
22911
|
* Fires before an entity is tamed.
|
|
25161
22912
|
*
|
|
@@ -25218,15 +22969,6 @@ export class WorldBeforeEvents {
|
|
|
25218
22969
|
*
|
|
25219
22970
|
*/
|
|
25220
22971
|
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
22972
|
/**
|
|
25231
22973
|
* @remarks
|
|
25232
22974
|
* This property can be read in early-execution mode.
|
|
@@ -25323,8 +23065,8 @@ export interface BiomeSearchOptions {
|
|
|
25323
23065
|
* represents an AABB aligned rectangle.
|
|
25324
23066
|
* The BlockBoundingBox assumes that it was created in a valid
|
|
25325
23067
|
* state (min <= max) but cannot guarantee it (unless it was
|
|
25326
|
-
* created using the associated {@link
|
|
25327
|
-
* utility functions.
|
|
23068
|
+
* created using the associated {@link
|
|
23069
|
+
* @minecraft/server.BlockBoundingBoxUtils} utility functions.
|
|
25328
23070
|
* The min/max coordinates represent the diametrically opposite
|
|
25329
23071
|
* corners of the rectangle.
|
|
25330
23072
|
* The BlockBoundingBox is not a representation of blocks - it
|
|
@@ -25584,7 +23326,7 @@ export interface BlockHitInformation {
|
|
|
25584
23326
|
}
|
|
25585
23327
|
|
|
25586
23328
|
/**
|
|
25587
|
-
* @
|
|
23329
|
+
* @rc
|
|
25588
23330
|
* Options for querying blocks in a volume. Extends BlockFilter
|
|
25589
23331
|
* with additional sorting and limiting options based on
|
|
25590
23332
|
* distance from a location.
|
|
@@ -25788,7 +23530,7 @@ export interface CameraSetRotOptions {
|
|
|
25788
23530
|
}
|
|
25789
23531
|
|
|
25790
23532
|
/**
|
|
25791
|
-
* @
|
|
23533
|
+
* @rc
|
|
25792
23534
|
* Options for applying a camera shake effect to a player's
|
|
25793
23535
|
* camera via `Camera.addShake`. Each call to `addShake` queues
|
|
25794
23536
|
* a new independent shake event for the specified `type`;
|
|
@@ -25843,40 +23585,6 @@ export interface CameraTargetOptions {
|
|
|
25843
23585
|
targetEntity: Entity;
|
|
25844
23586
|
}
|
|
25845
23587
|
|
|
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
23588
|
/**
|
|
25881
23589
|
* Represents the source of a container access.
|
|
25882
23590
|
*/
|
|
@@ -25986,15 +23694,6 @@ export interface CustomCommand {
|
|
|
25986
23694
|
* command.
|
|
25987
23695
|
*/
|
|
25988
23696
|
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
23697
|
/**
|
|
25999
23698
|
* @remarks
|
|
26000
23699
|
* The name of parameter as it appears on the command line.
|
|
@@ -26073,14 +23772,6 @@ export interface DefinitionModifier {
|
|
|
26073
23772
|
*
|
|
26074
23773
|
*/
|
|
26075
23774
|
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
23775
|
}
|
|
26085
23776
|
|
|
26086
23777
|
/**
|
|
@@ -26882,19 +24573,10 @@ export interface EntityRaycastOptions extends EntityFilter {
|
|
|
26882
24573
|
}
|
|
26883
24574
|
|
|
26884
24575
|
/**
|
|
26885
|
-
* @
|
|
26886
|
-
* Options used to filter entity start sneaking and stop
|
|
26887
|
-
* sneaking events.
|
|
26888
|
-
*/
|
|
26889
|
-
export interface EntitySneakingChangedEventOptions {
|
|
26890
|
-
entityFilter?: EntityFilter;
|
|
26891
|
-
}
|
|
26892
|
-
|
|
26893
|
-
/**
|
|
26894
|
-
* @beta
|
|
24576
|
+
* @rc
|
|
26895
24577
|
* Contains options for filtering entity tamed events.
|
|
26896
24578
|
*/
|
|
26897
|
-
export interface
|
|
24579
|
+
export interface EntityTamedEventOptions {
|
|
26898
24580
|
entityFilter?: EntityFilter;
|
|
26899
24581
|
tamingEntityFilter?: EntityFilter;
|
|
26900
24582
|
}
|
|
@@ -27442,19 +25124,6 @@ export interface PlayerSoundOptions {
|
|
|
27442
25124
|
*
|
|
27443
25125
|
*/
|
|
27444
25126
|
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
25127
|
/**
|
|
27459
25128
|
* @remarks
|
|
27460
25129
|
* Optional pitch of the sound.
|
|
@@ -27526,43 +25195,6 @@ export interface PlayerVisibilityRules extends EntityVisibilityRules {
|
|
|
27526
25195
|
showSpectatorToSpectator?: boolean;
|
|
27527
25196
|
}
|
|
27528
25197
|
|
|
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
25198
|
/**
|
|
27567
25199
|
* Key frame that holds the progress of the camera animation.
|
|
27568
25200
|
*/
|
|
@@ -27884,136 +25516,6 @@ export interface ScriptEventMessageFilterOptions {
|
|
|
27884
25516
|
namespaces: string[];
|
|
27885
25517
|
}
|
|
27886
25518
|
|
|
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
25519
|
/**
|
|
28018
25520
|
* Contains additional options for spawning an Entity.
|
|
28019
25521
|
*/
|
|
@@ -28445,19 +25947,6 @@ export interface WaypointTextureSelector {
|
|
|
28445
25947
|
* Contains additional options for a playSound occurrence.
|
|
28446
25948
|
*/
|
|
28447
25949
|
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
25950
|
/**
|
|
28462
25951
|
* @remarks
|
|
28463
25952
|
* Pitch of the sound played.
|
|
@@ -28647,17 +26136,6 @@ export class EntitySpawnError extends Error {
|
|
|
28647
26136
|
private constructor();
|
|
28648
26137
|
}
|
|
28649
26138
|
|
|
28650
|
-
/**
|
|
28651
|
-
* @beta
|
|
28652
|
-
* Error thrown by {@link FogSettings} operations when the fog
|
|
28653
|
-
* stack limit is exceeded or an invalid fog identifier is
|
|
28654
|
-
* provided.
|
|
28655
|
-
*/
|
|
28656
|
-
// @ts-ignore Class inheritance allowed for native defined classes
|
|
28657
|
-
export class FogSettingsError extends Error {
|
|
28658
|
-
private constructor();
|
|
28659
|
-
}
|
|
28660
|
-
|
|
28661
26139
|
/**
|
|
28662
26140
|
* The error can occur when a block is invalid. This can also
|
|
28663
26141
|
* occur when accessing components on a block that doesn't have
|