@minecraft/server 2.7.0-beta.1.26.10-preview.26 → 2.7.0-rc.1.26.20-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 +109 -2282
- 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.7.0
|
|
19
|
+
* "version": "2.7.0"
|
|
20
20
|
* }
|
|
21
21
|
* ```
|
|
22
22
|
*
|
|
@@ -25,7 +25,7 @@ import * as minecraftcommon from '@minecraft/common';
|
|
|
25
25
|
// @ts-ignore Optional types-only package, will decay to any if @minecraft/vanilla-data isn't installed
|
|
26
26
|
import type * as minecraftvanilladata from '@minecraft/vanilla-data';
|
|
27
27
|
/**
|
|
28
|
-
* @
|
|
28
|
+
* @rc
|
|
29
29
|
* Specifies different targeting modes for use in aim-assist.
|
|
30
30
|
*/
|
|
31
31
|
export enum AimAssistTargetMode {
|
|
@@ -230,55 +230,6 @@ export enum CommandPermissionLevel {
|
|
|
230
230
|
Owner = 4,
|
|
231
231
|
}
|
|
232
232
|
|
|
233
|
-
/**
|
|
234
|
-
* @beta
|
|
235
|
-
* The Action enum determines how the CompoundBlockVolume
|
|
236
|
-
* considers the associated CompoundBlockVolumeItem when
|
|
237
|
-
* performing inside/outside calculations.
|
|
238
|
-
*/
|
|
239
|
-
export enum CompoundBlockVolumeAction {
|
|
240
|
-
/**
|
|
241
|
-
* @remarks
|
|
242
|
-
* The associated BlockVolume is considered a positive space,
|
|
243
|
-
* and any intersection tests are considered hits
|
|
244
|
-
*
|
|
245
|
-
*/
|
|
246
|
-
Add = 0,
|
|
247
|
-
/**
|
|
248
|
-
* @remarks
|
|
249
|
-
* The associated BlockVolume is considered a negative or void
|
|
250
|
-
* space, and any intersection tests are considered misses.
|
|
251
|
-
* Using the Subtract action, it is possible to `punch holes`
|
|
252
|
-
* in block volumes so that any intersection tests may pass
|
|
253
|
-
* through such spaces
|
|
254
|
-
*
|
|
255
|
-
*/
|
|
256
|
-
Subtract = 1,
|
|
257
|
-
}
|
|
258
|
-
|
|
259
|
-
/**
|
|
260
|
-
* @beta
|
|
261
|
-
* An enum describing the relativity of the
|
|
262
|
-
* CompoundBlockVolumeItem, relative to the parent
|
|
263
|
-
* CompoundVolume.
|
|
264
|
-
*/
|
|
265
|
-
export enum CompoundBlockVolumePositionRelativity {
|
|
266
|
-
/**
|
|
267
|
-
* @remarks
|
|
268
|
-
* The locations within the associated BlockVolume are relative
|
|
269
|
-
* to the CompoundBlockVolume to which they were added
|
|
270
|
-
*
|
|
271
|
-
*/
|
|
272
|
-
Relative = 0,
|
|
273
|
-
/**
|
|
274
|
-
* @remarks
|
|
275
|
-
* The locations within the associated BlockVolume are in
|
|
276
|
-
* absolute world space
|
|
277
|
-
*
|
|
278
|
-
*/
|
|
279
|
-
Absolute = 1,
|
|
280
|
-
}
|
|
281
|
-
|
|
282
233
|
/**
|
|
283
234
|
* Reasons that the {@link
|
|
284
235
|
* @minecraft/server.ContainerRulesError} was thrown.
|
|
@@ -381,13 +332,6 @@ export enum CustomCommandErrorReason {
|
|
|
381
332
|
*
|
|
382
333
|
*/
|
|
383
334
|
RegistryReadOnly = 'RegistryReadOnly',
|
|
384
|
-
/**
|
|
385
|
-
* @beta
|
|
386
|
-
* @remarks
|
|
387
|
-
* Non enum type command parameters cannot use enumName.
|
|
388
|
-
*
|
|
389
|
-
*/
|
|
390
|
-
UnexpectedEnumName = 'UnexpectedEnumName',
|
|
391
335
|
}
|
|
392
336
|
|
|
393
337
|
/**
|
|
@@ -1119,14 +1063,6 @@ export enum EntityComponentTypes {
|
|
|
1119
1063
|
*
|
|
1120
1064
|
*/
|
|
1121
1065
|
NavigationWalk = 'minecraft:navigation.walk',
|
|
1122
|
-
/**
|
|
1123
|
-
* @beta
|
|
1124
|
-
* @remarks
|
|
1125
|
-
* Adds NPC capabilities to an entity such as custom skin,
|
|
1126
|
-
* name, and dialogue interactions.
|
|
1127
|
-
*
|
|
1128
|
-
*/
|
|
1129
|
-
Npc = 'minecraft:npc',
|
|
1130
1066
|
/**
|
|
1131
1067
|
* @remarks
|
|
1132
1068
|
* When present on an entity, this entity is on fire.
|
|
@@ -1605,14 +1541,6 @@ export enum EntitySwingSource {
|
|
|
1605
1541
|
* and mainhand slots.
|
|
1606
1542
|
*/
|
|
1607
1543
|
export enum EquipmentSlot {
|
|
1608
|
-
/**
|
|
1609
|
-
* @beta
|
|
1610
|
-
* @remarks
|
|
1611
|
-
* The body slot. This slot is used to hold armor for
|
|
1612
|
-
* non-humanoid mobs.
|
|
1613
|
-
*
|
|
1614
|
-
*/
|
|
1615
|
-
Body = 'Body',
|
|
1616
1544
|
/**
|
|
1617
1545
|
* @remarks
|
|
1618
1546
|
* The chest slot. This slot is used to hold items such as
|
|
@@ -1855,10 +1783,6 @@ export enum GameRule {
|
|
|
1855
1783
|
*
|
|
1856
1784
|
*/
|
|
1857
1785
|
KeepInventory = 'keepInventory',
|
|
1858
|
-
/**
|
|
1859
|
-
* @beta
|
|
1860
|
-
*/
|
|
1861
|
-
LocatorBar = 'locatorBar',
|
|
1862
1786
|
/**
|
|
1863
1787
|
* @remarks
|
|
1864
1788
|
* The maximum number of chained commands that can execute per
|
|
@@ -2330,34 +2254,6 @@ export enum LiquidType {
|
|
|
2330
2254
|
Water = 'Water',
|
|
2331
2255
|
}
|
|
2332
2256
|
|
|
2333
|
-
/**
|
|
2334
|
-
* @beta
|
|
2335
|
-
* Enum representing the different reasons why a locator bar
|
|
2336
|
-
* operation may fail.
|
|
2337
|
-
*/
|
|
2338
|
-
export enum LocatorBarErrorReason {
|
|
2339
|
-
/**
|
|
2340
|
-
* @remarks
|
|
2341
|
-
* The waypoint already exists in the locator bar and cannot be
|
|
2342
|
-
* added again.
|
|
2343
|
-
*
|
|
2344
|
-
*/
|
|
2345
|
-
WaypointAlreadyExists = 'WaypointAlreadyExists',
|
|
2346
|
-
/**
|
|
2347
|
-
* @remarks
|
|
2348
|
-
* The maximum number of waypoints has been reached and no more
|
|
2349
|
-
* can be added.
|
|
2350
|
-
*
|
|
2351
|
-
*/
|
|
2352
|
-
WaypointLimitExceeded = 'WaypointLimitExceeded',
|
|
2353
|
-
/**
|
|
2354
|
-
* @remarks
|
|
2355
|
-
* The specified waypoint does not exist in the locator bar.
|
|
2356
|
-
*
|
|
2357
|
-
*/
|
|
2358
|
-
WaypointNotFound = 'WaypointNotFound',
|
|
2359
|
-
}
|
|
2360
|
-
|
|
2361
2257
|
/**
|
|
2362
2258
|
* Describes the memory of a device.
|
|
2363
2259
|
*/
|
|
@@ -3003,61 +2899,6 @@ export enum TintMethod {
|
|
|
3003
2899
|
Water = 'Water',
|
|
3004
2900
|
}
|
|
3005
2901
|
|
|
3006
|
-
/**
|
|
3007
|
-
* @beta
|
|
3008
|
-
* An enumeration with the reason that a watchdog is deciding
|
|
3009
|
-
* to terminate execution of a behavior packs' script.
|
|
3010
|
-
*/
|
|
3011
|
-
export enum WatchdogTerminateReason {
|
|
3012
|
-
/**
|
|
3013
|
-
* @remarks
|
|
3014
|
-
* Script runtime for a behavior pack is terminated due to
|
|
3015
|
-
* non-responsiveness from script (a hang or infinite loop).
|
|
3016
|
-
*
|
|
3017
|
-
*/
|
|
3018
|
-
Hang = 'Hang',
|
|
3019
|
-
/**
|
|
3020
|
-
* @remarks
|
|
3021
|
-
* Script runtime for a behavior pack is terminated due to a
|
|
3022
|
-
* stack overflow (a long, and potentially infinite) chain of
|
|
3023
|
-
* function calls.
|
|
3024
|
-
*
|
|
3025
|
-
*/
|
|
3026
|
-
StackOverflow = 'StackOverflow',
|
|
3027
|
-
}
|
|
3028
|
-
|
|
3029
|
-
/**
|
|
3030
|
-
* @beta
|
|
3031
|
-
* Enum representing different texture icons that can be
|
|
3032
|
-
* displayed for waypoints on the locator bar.
|
|
3033
|
-
*/
|
|
3034
|
-
export enum WaypointTexture {
|
|
3035
|
-
/**
|
|
3036
|
-
* @remarks
|
|
3037
|
-
* Circle waypoint icon texture.
|
|
3038
|
-
*
|
|
3039
|
-
*/
|
|
3040
|
-
Circle = 'minecraft:circle',
|
|
3041
|
-
/**
|
|
3042
|
-
* @remarks
|
|
3043
|
-
* Small square waypoint icon texture.
|
|
3044
|
-
*
|
|
3045
|
-
*/
|
|
3046
|
-
SmallSquare = 'minecraft:small_square',
|
|
3047
|
-
/**
|
|
3048
|
-
* @remarks
|
|
3049
|
-
* Small star waypoint icon texture.
|
|
3050
|
-
*
|
|
3051
|
-
*/
|
|
3052
|
-
SmallStar = 'minecraft:small_star',
|
|
3053
|
-
/**
|
|
3054
|
-
* @remarks
|
|
3055
|
-
* Square waypoint icon texture.
|
|
3056
|
-
*
|
|
3057
|
-
*/
|
|
3058
|
-
Square = 'minecraft:square',
|
|
3059
|
-
}
|
|
3060
|
-
|
|
3061
2902
|
/**
|
|
3062
2903
|
* Used to specify the type of weather condition within the
|
|
3063
2904
|
* world.
|
|
@@ -3209,7 +3050,6 @@ export type EntityComponentTypeMap = {
|
|
|
3209
3050
|
'minecraft:navigation.generic': EntityNavigationGenericComponent;
|
|
3210
3051
|
'minecraft:navigation.hover': EntityNavigationHoverComponent;
|
|
3211
3052
|
'minecraft:navigation.walk': EntityNavigationWalkComponent;
|
|
3212
|
-
'minecraft:npc': EntityNpcComponent;
|
|
3213
3053
|
'minecraft:onfire': EntityOnFireComponent;
|
|
3214
3054
|
'minecraft:player.exhaustion': EntityExhaustionComponent;
|
|
3215
3055
|
'minecraft:player.hunger': EntityHungerComponent;
|
|
@@ -3243,7 +3083,6 @@ export type EntityComponentTypeMap = {
|
|
|
3243
3083
|
'navigation.generic': EntityNavigationGenericComponent;
|
|
3244
3084
|
'navigation.hover': EntityNavigationHoverComponent;
|
|
3245
3085
|
'navigation.walk': EntityNavigationWalkComponent;
|
|
3246
|
-
npc: EntityNpcComponent;
|
|
3247
3086
|
onfire: EntityOnFireComponent;
|
|
3248
3087
|
'player.exhaustion': EntityExhaustionComponent;
|
|
3249
3088
|
'player.hunger': EntityHungerComponent;
|
|
@@ -3263,15 +3102,6 @@ export type EntityComponentTypeMap = {
|
|
|
3263
3102
|
wants_jockey: EntityWantsJockeyComponent;
|
|
3264
3103
|
};
|
|
3265
3104
|
|
|
3266
|
-
/**
|
|
3267
|
-
* @beta
|
|
3268
|
-
*/
|
|
3269
|
-
export type EntityIdentifierType<T> = [T] extends [never]
|
|
3270
|
-
? VanillaEntityIdentifier
|
|
3271
|
-
: T extends string
|
|
3272
|
-
? VanillaEntityIdentifier | T
|
|
3273
|
-
: never;
|
|
3274
|
-
|
|
3275
3105
|
export type ItemComponentReturnType<T extends string> = T extends keyof ItemComponentTypeMap
|
|
3276
3106
|
? ItemComponentTypeMap[T]
|
|
3277
3107
|
: ItemCustomComponentInstance;
|
|
@@ -3298,16 +3128,7 @@ export type ItemComponentTypeMap = {
|
|
|
3298
3128
|
};
|
|
3299
3129
|
|
|
3300
3130
|
/**
|
|
3301
|
-
* @
|
|
3302
|
-
*/
|
|
3303
|
-
export type VanillaEntityIdentifier =
|
|
3304
|
-
| EntityType
|
|
3305
|
-
| minecraftvanilladata.MinecraftEntityTypes
|
|
3306
|
-
| `${minecraftvanilladata.MinecraftEntityTypes}`
|
|
3307
|
-
| `${minecraftvanilladata.MinecraftEntityTypes}<${string}>`;
|
|
3308
|
-
|
|
3309
|
-
/**
|
|
3310
|
-
* @beta
|
|
3131
|
+
* @rc
|
|
3311
3132
|
* Handle to an aim-assist category that exists in the
|
|
3312
3133
|
* world.aimAssist registry.
|
|
3313
3134
|
*/
|
|
@@ -3382,7 +3203,7 @@ export class AimAssistCategory {
|
|
|
3382
3203
|
}
|
|
3383
3204
|
|
|
3384
3205
|
/**
|
|
3385
|
-
* @
|
|
3206
|
+
* @rc
|
|
3386
3207
|
* Settings used with AimAssistRegistry.addCategory for
|
|
3387
3208
|
* creation of the AimAssistCategory.
|
|
3388
3209
|
*/
|
|
@@ -3465,9 +3286,7 @@ export class AimAssistCategorySettings {
|
|
|
3465
3286
|
* A record mapping block Ids to their priority settings.
|
|
3466
3287
|
* Larger numbers have greater priority.
|
|
3467
3288
|
*/
|
|
3468
|
-
setBlockPriorities(
|
|
3469
|
-
blockPriorities: Record<keyof typeof minecraftvanilladata.MinecraftBlockTypes | string, number>,
|
|
3470
|
-
): void;
|
|
3289
|
+
setBlockPriorities(blockPriorities: Record<string, number>): void;
|
|
3471
3290
|
/**
|
|
3472
3291
|
* @remarks
|
|
3473
3292
|
* Sets the priority settings used for block targeting.
|
|
@@ -3486,9 +3305,7 @@ export class AimAssistCategorySettings {
|
|
|
3486
3305
|
* A record mapping entity Ids to their priority settings.
|
|
3487
3306
|
* Larger numbers have greater priority.
|
|
3488
3307
|
*/
|
|
3489
|
-
setEntityPriorities(
|
|
3490
|
-
entityPriorities: Record<keyof typeof minecraftvanilladata.MinecraftEntityTypes | string, number>,
|
|
3491
|
-
): void;
|
|
3308
|
+
setEntityPriorities(entityPriorities: Record<string, number>): void;
|
|
3492
3309
|
/**
|
|
3493
3310
|
* @remarks
|
|
3494
3311
|
* Sets the priority settings used for entity targeting.
|
|
@@ -3500,7 +3317,7 @@ export class AimAssistCategorySettings {
|
|
|
3500
3317
|
}
|
|
3501
3318
|
|
|
3502
3319
|
/**
|
|
3503
|
-
* @
|
|
3320
|
+
* @rc
|
|
3504
3321
|
* Handle to an aim-assist preset that exists in the
|
|
3505
3322
|
* world.aimAssist registry.
|
|
3506
3323
|
*/
|
|
@@ -3593,7 +3410,7 @@ export class AimAssistPreset {
|
|
|
3593
3410
|
}
|
|
3594
3411
|
|
|
3595
3412
|
/**
|
|
3596
|
-
* @
|
|
3413
|
+
* @rc
|
|
3597
3414
|
* Settings used with AimAssistRegistry.addPreset for creation
|
|
3598
3415
|
* of the AimAssistPreset.
|
|
3599
3416
|
*/
|
|
@@ -3689,10 +3506,8 @@ export class AimAssistPresetSettings {
|
|
|
3689
3506
|
*
|
|
3690
3507
|
* This function can't be called in restricted-execution mode.
|
|
3691
3508
|
*
|
|
3692
|
-
* @param targets
|
|
3693
|
-
* An array of block tags.
|
|
3694
3509
|
*/
|
|
3695
|
-
setExcludedBlockTagTargets(
|
|
3510
|
+
setExcludedBlockTagTargets(blockTagTargets?: string[]): void;
|
|
3696
3511
|
/**
|
|
3697
3512
|
* @remarks
|
|
3698
3513
|
* Sets the list of block Ids to exclude from aim assist
|
|
@@ -3700,10 +3515,8 @@ export class AimAssistPresetSettings {
|
|
|
3700
3515
|
*
|
|
3701
3516
|
* This function can't be called in restricted-execution mode.
|
|
3702
3517
|
*
|
|
3703
|
-
* @param targets
|
|
3704
|
-
* An array of block Ids.
|
|
3705
3518
|
*/
|
|
3706
|
-
setExcludedBlockTargets(
|
|
3519
|
+
setExcludedBlockTargets(blockTargets?: string[]): void;
|
|
3707
3520
|
/**
|
|
3708
3521
|
* @remarks
|
|
3709
3522
|
* Sets the list of entity Ids to exclude from aim assist
|
|
@@ -3711,10 +3524,8 @@ export class AimAssistPresetSettings {
|
|
|
3711
3524
|
*
|
|
3712
3525
|
* This function can't be called in restricted-execution mode.
|
|
3713
3526
|
*
|
|
3714
|
-
* @param targets
|
|
3715
|
-
* An array of entity Ids.
|
|
3716
3527
|
*/
|
|
3717
|
-
setExcludedEntityTargets(
|
|
3528
|
+
setExcludedEntityTargets(entityTargets?: string[]): void;
|
|
3718
3529
|
/**
|
|
3719
3530
|
* @remarks
|
|
3720
3531
|
* Sets the list of entity type families to exclude from aim
|
|
@@ -3722,10 +3533,8 @@ export class AimAssistPresetSettings {
|
|
|
3722
3533
|
*
|
|
3723
3534
|
* This function can't be called in restricted-execution mode.
|
|
3724
3535
|
*
|
|
3725
|
-
* @param targets
|
|
3726
|
-
* An array of entity type families.
|
|
3727
3536
|
*/
|
|
3728
|
-
setExcludedEntityTypeFamilyTargets(
|
|
3537
|
+
setExcludedEntityTypeFamilyTargets(entityTypeFamilyTargets?: string[]): void;
|
|
3729
3538
|
/**
|
|
3730
3539
|
* @remarks
|
|
3731
3540
|
* Sets the per-item aim-assist category Ids.
|
|
@@ -3736,7 +3545,7 @@ export class AimAssistPresetSettings {
|
|
|
3736
3545
|
* A record mapping item Ids to aim-assist category Ids.
|
|
3737
3546
|
* Category Ids must have a namespace.
|
|
3738
3547
|
*/
|
|
3739
|
-
setItemSettings(itemSettings: Record<
|
|
3548
|
+
setItemSettings(itemSettings: Record<string, string>): void;
|
|
3740
3549
|
/**
|
|
3741
3550
|
* @remarks
|
|
3742
3551
|
* Sets the list of item Ids that will target liquid blocks
|
|
@@ -3747,11 +3556,11 @@ export class AimAssistPresetSettings {
|
|
|
3747
3556
|
* @param items
|
|
3748
3557
|
* An array of item Ids.
|
|
3749
3558
|
*/
|
|
3750
|
-
setLiquidTargetingItems(items?:
|
|
3559
|
+
setLiquidTargetingItems(items?: string[]): void;
|
|
3751
3560
|
}
|
|
3752
3561
|
|
|
3753
3562
|
/**
|
|
3754
|
-
* @
|
|
3563
|
+
* @rc
|
|
3755
3564
|
* A container for APIs related to the world's aim-assist
|
|
3756
3565
|
* settings.
|
|
3757
3566
|
*/
|
|
@@ -3854,28 +3663,6 @@ export class AimAssistRegistry {
|
|
|
3854
3663
|
getPresets(): AimAssistPreset[];
|
|
3855
3664
|
}
|
|
3856
3665
|
|
|
3857
|
-
/**
|
|
3858
|
-
* @beta
|
|
3859
|
-
* Describes a single banner pattern, which includes a colour
|
|
3860
|
-
* and a pattern type.
|
|
3861
|
-
*/
|
|
3862
|
-
export class BannerPattern {
|
|
3863
|
-
private constructor();
|
|
3864
|
-
/**
|
|
3865
|
-
* @remarks
|
|
3866
|
-
* The color to apply to this banner pattern.
|
|
3867
|
-
*
|
|
3868
|
-
*/
|
|
3869
|
-
readonly color: string;
|
|
3870
|
-
/**
|
|
3871
|
-
* @remarks
|
|
3872
|
-
* The pattern type (e.g. gradient, chevron, cross, etc.) to
|
|
3873
|
-
* apply to the banner.
|
|
3874
|
-
*
|
|
3875
|
-
*/
|
|
3876
|
-
readonly pattern: string;
|
|
3877
|
-
}
|
|
3878
|
-
|
|
3879
3666
|
/**
|
|
3880
3667
|
* Describes a type of biome.
|
|
3881
3668
|
*/
|
|
@@ -3887,49 +3674,6 @@ export class BiomeType {
|
|
|
3887
3674
|
*
|
|
3888
3675
|
*/
|
|
3889
3676
|
readonly id: string;
|
|
3890
|
-
/**
|
|
3891
|
-
* @beta
|
|
3892
|
-
* @remarks
|
|
3893
|
-
* Returns a list of the biome's tags.
|
|
3894
|
-
*
|
|
3895
|
-
*/
|
|
3896
|
-
getTags(): string[];
|
|
3897
|
-
/**
|
|
3898
|
-
* @beta
|
|
3899
|
-
* @remarks
|
|
3900
|
-
* Checks if the biome has all of the provided tags.
|
|
3901
|
-
*
|
|
3902
|
-
* @param tags
|
|
3903
|
-
* The list of tags to check against the biome.
|
|
3904
|
-
*/
|
|
3905
|
-
hasTags(tags: string[]): boolean;
|
|
3906
|
-
}
|
|
3907
|
-
|
|
3908
|
-
/**
|
|
3909
|
-
* @beta
|
|
3910
|
-
* Supports a catalog of available biome types registered
|
|
3911
|
-
* within Minecraft.
|
|
3912
|
-
*/
|
|
3913
|
-
export class BiomeTypes {
|
|
3914
|
-
private constructor();
|
|
3915
|
-
/**
|
|
3916
|
-
* @remarks
|
|
3917
|
-
* Returns a specific biome type.
|
|
3918
|
-
*
|
|
3919
|
-
* @param typeName
|
|
3920
|
-
* Identifier of the biome. Generally, namespaced identifiers
|
|
3921
|
-
* (e.g., minecraft:frozen_peaks) should be used.
|
|
3922
|
-
* @returns
|
|
3923
|
-
* If the biome exists, a BiomeType object is returned. If not,
|
|
3924
|
-
* undefined is returned.
|
|
3925
|
-
*/
|
|
3926
|
-
static get(typeName: string): BiomeType | undefined;
|
|
3927
|
-
/**
|
|
3928
|
-
* @remarks
|
|
3929
|
-
* Returns all registered biome types within Minecraft
|
|
3930
|
-
*
|
|
3931
|
-
*/
|
|
3932
|
-
static getAll(): BiomeType[];
|
|
3933
3677
|
}
|
|
3934
3678
|
|
|
3935
3679
|
/**
|
|
@@ -3972,20 +3716,6 @@ export class Block {
|
|
|
3972
3716
|
* {@link LocationOutOfWorldBoundariesError}
|
|
3973
3717
|
*/
|
|
3974
3718
|
readonly isLiquid: boolean;
|
|
3975
|
-
/**
|
|
3976
|
-
* @beta
|
|
3977
|
-
* @remarks
|
|
3978
|
-
* Returns true if this block is solid and impassible - (e.g.,
|
|
3979
|
-
* a cobblestone block and a diamond block are solid, while a
|
|
3980
|
-
* ladder block and a fence block are not).
|
|
3981
|
-
*
|
|
3982
|
-
* @throws This property can throw when used.
|
|
3983
|
-
*
|
|
3984
|
-
* {@link LocationInUnloadedChunkError}
|
|
3985
|
-
*
|
|
3986
|
-
* {@link LocationOutOfWorldBoundariesError}
|
|
3987
|
-
*/
|
|
3988
|
-
readonly isSolid: boolean;
|
|
3989
3719
|
/**
|
|
3990
3720
|
* @remarks
|
|
3991
3721
|
* Returns true if this reference to a block is still valid
|
|
@@ -4151,30 +3881,6 @@ export class Block {
|
|
|
4151
3881
|
* {@link LocationOutOfWorldBoundariesError}
|
|
4152
3882
|
*/
|
|
4153
3883
|
canContainLiquid(liquidType: LiquidType): boolean;
|
|
4154
|
-
/**
|
|
4155
|
-
* @beta
|
|
4156
|
-
* @remarks
|
|
4157
|
-
* Checks to see whether it is valid to place the specified
|
|
4158
|
-
* block type or block permutation, on a specified face on this
|
|
4159
|
-
* block.
|
|
4160
|
-
*
|
|
4161
|
-
* @param blockToPlace
|
|
4162
|
-
* Block type or block permutation to check placement for.
|
|
4163
|
-
* @param faceToPlaceOn
|
|
4164
|
-
* Optional specific face of this block to check placement
|
|
4165
|
-
* against.
|
|
4166
|
-
* @returns
|
|
4167
|
-
* Returns `true` if the block type or permutation can be
|
|
4168
|
-
* placed on this block, else `false`.
|
|
4169
|
-
* @throws This function can throw errors.
|
|
4170
|
-
*
|
|
4171
|
-
* {@link Error}
|
|
4172
|
-
*
|
|
4173
|
-
* {@link LocationInUnloadedChunkError}
|
|
4174
|
-
*
|
|
4175
|
-
* {@link LocationOutOfWorldBoundariesError}
|
|
4176
|
-
*/
|
|
4177
|
-
canPlace(blockToPlace: BlockPermutation | BlockType | string, faceToPlaceOn?: Direction): boolean;
|
|
4178
3884
|
/**
|
|
4179
3885
|
* @remarks
|
|
4180
3886
|
* Returns the {@link Vector3} of the center of this block on
|
|
@@ -4272,29 +3978,6 @@ export class Block {
|
|
|
4272
3978
|
* {@link LocationInUnloadedChunkError}
|
|
4273
3979
|
*/
|
|
4274
3980
|
getLightLevel(): number;
|
|
4275
|
-
/**
|
|
4276
|
-
* @beta
|
|
4277
|
-
* @throws This function can throw errors.
|
|
4278
|
-
*
|
|
4279
|
-
* {@link LocationInUnloadedChunkError}
|
|
4280
|
-
*
|
|
4281
|
-
* {@link LocationOutOfWorldBoundariesError}
|
|
4282
|
-
*/
|
|
4283
|
-
getMapColor(): RGBA;
|
|
4284
|
-
/**
|
|
4285
|
-
* @beta
|
|
4286
|
-
* @remarks
|
|
4287
|
-
* Returns array of all loaded block parts if this block has
|
|
4288
|
-
* the 'minecraft:multi_block' trait. If it does not have the
|
|
4289
|
-
* trait returns undefined
|
|
4290
|
-
*
|
|
4291
|
-
* @throws This function can throw errors.
|
|
4292
|
-
*
|
|
4293
|
-
* {@link LocationInUnloadedChunkError}
|
|
4294
|
-
*
|
|
4295
|
-
* {@link LocationOutOfWorldBoundariesError}
|
|
4296
|
-
*/
|
|
4297
|
-
getParts(): Block[] | undefined;
|
|
4298
3981
|
/**
|
|
4299
3982
|
* @remarks
|
|
4300
3983
|
* Returns the net redstone power of this block.
|
|
@@ -4563,27 +4246,6 @@ export class Block {
|
|
|
4563
4246
|
* {@link LocationOutOfWorldBoundariesError}
|
|
4564
4247
|
*/
|
|
4565
4248
|
south(steps?: number): Block | undefined;
|
|
4566
|
-
/**
|
|
4567
|
-
* @beta
|
|
4568
|
-
* @remarks
|
|
4569
|
-
* Tries to set the block in the dimension to the state of the
|
|
4570
|
-
* permutation by first checking if the placement is valid.
|
|
4571
|
-
*
|
|
4572
|
-
* This function can't be called in restricted-execution mode.
|
|
4573
|
-
*
|
|
4574
|
-
* @param permutation
|
|
4575
|
-
* Permutation that contains a set of property states for the
|
|
4576
|
-
* Block.
|
|
4577
|
-
* @returns
|
|
4578
|
-
* Returns `true` if the block permutation data was
|
|
4579
|
-
* successfully set, else `false`.
|
|
4580
|
-
* @throws This function can throw errors.
|
|
4581
|
-
*
|
|
4582
|
-
* {@link LocationInUnloadedChunkError}
|
|
4583
|
-
*
|
|
4584
|
-
* {@link LocationOutOfWorldBoundariesError}
|
|
4585
|
-
*/
|
|
4586
|
-
trySetPermutation(permutation: BlockPermutation): boolean;
|
|
4587
4249
|
/**
|
|
4588
4250
|
* @remarks
|
|
4589
4251
|
* Returns the {@link Block} to the west of this block
|
|
@@ -4602,214 +4264,83 @@ export class Block {
|
|
|
4602
4264
|
}
|
|
4603
4265
|
|
|
4604
4266
|
/**
|
|
4605
|
-
*
|
|
4606
|
-
* Bounding Box Utils is a utility class that provides a number
|
|
4607
|
-
* of useful functions for the creation and utility of {@link
|
|
4608
|
-
* BlockBoundingBox} objects
|
|
4267
|
+
* Base type for components associated with blocks.
|
|
4609
4268
|
*/
|
|
4610
|
-
|
|
4269
|
+
// @ts-ignore Class inheritance allowed for native defined classes
|
|
4270
|
+
export class BlockComponent extends Component {
|
|
4611
4271
|
private constructor();
|
|
4612
4272
|
/**
|
|
4613
4273
|
* @remarks
|
|
4614
|
-
*
|
|
4615
|
-
* where the min and max components are guaranteed to be (min
|
|
4616
|
-
* <= max)
|
|
4617
|
-
*
|
|
4618
|
-
* This function can't be called in restricted-execution mode.
|
|
4274
|
+
* Block instance that this component pertains to.
|
|
4619
4275
|
*
|
|
4620
|
-
* @param min
|
|
4621
|
-
* A corner world location
|
|
4622
|
-
* @param max
|
|
4623
|
-
* A corner world location diametrically opposite
|
|
4624
4276
|
*/
|
|
4625
|
-
|
|
4277
|
+
readonly block: Block;
|
|
4278
|
+
}
|
|
4279
|
+
|
|
4280
|
+
/**
|
|
4281
|
+
* Contains information regarding a specific block being
|
|
4282
|
+
* broken.
|
|
4283
|
+
*/
|
|
4284
|
+
// @ts-ignore Class inheritance allowed for native defined classes
|
|
4285
|
+
export class BlockComponentBlockBreakEvent extends BlockEvent {
|
|
4286
|
+
private constructor();
|
|
4626
4287
|
/**
|
|
4627
4288
|
* @remarks
|
|
4628
|
-
*
|
|
4629
|
-
* each axis.
|
|
4630
|
-
* Sizes can be negative to perform contraction.
|
|
4631
|
-
* Note: corners can be inverted if the contraction size is
|
|
4632
|
-
* greater than the span, but the min/max relationship will
|
|
4633
|
-
* remain correct
|
|
4634
|
-
*
|
|
4635
|
-
* This function can't be called in restricted-execution mode.
|
|
4289
|
+
* The block that caused destruction.
|
|
4636
4290
|
*
|
|
4637
|
-
* @returns
|
|
4638
|
-
* Return a new {@link BlockBoundingBox} object representing
|
|
4639
|
-
* the changes
|
|
4640
4291
|
*/
|
|
4641
|
-
|
|
4292
|
+
readonly blockDestructionSource?: Block;
|
|
4642
4293
|
/**
|
|
4643
4294
|
* @remarks
|
|
4644
|
-
*
|
|
4645
|
-
*
|
|
4646
|
-
* This function can't be called in restricted-execution mode.
|
|
4295
|
+
* Returns permutation information about this block before it
|
|
4296
|
+
* was broken.
|
|
4647
4297
|
*
|
|
4648
4298
|
*/
|
|
4649
|
-
|
|
4299
|
+
readonly brokenBlockPermutation: BlockPermutation;
|
|
4650
4300
|
/**
|
|
4651
4301
|
* @remarks
|
|
4652
|
-
*
|
|
4653
|
-
* argument. The resultant {@link BlockBoundingBox} object
|
|
4654
|
-
* will be a BlockBoundingBox which exactly encompasses the two
|
|
4655
|
-
* boxes.
|
|
4656
|
-
*
|
|
4657
|
-
* This function can't be called in restricted-execution mode.
|
|
4302
|
+
* The Actor that caused destruction.
|
|
4658
4303
|
*
|
|
4659
|
-
* @returns
|
|
4660
|
-
* A new {@link BlockBoundingBox} instance representing the
|
|
4661
|
-
* smallest possible bounding box which can encompass both
|
|
4662
4304
|
*/
|
|
4663
|
-
|
|
4305
|
+
readonly entitySource?: Entity;
|
|
4306
|
+
}
|
|
4307
|
+
|
|
4308
|
+
/**
|
|
4309
|
+
* @rc
|
|
4310
|
+
* Contains information regarding an event sent by an entity to
|
|
4311
|
+
* this block in the world.
|
|
4312
|
+
*/
|
|
4313
|
+
// @ts-ignore Class inheritance allowed for native defined classes
|
|
4314
|
+
export class BlockComponentEntityEvent extends BlockEvent {
|
|
4315
|
+
private constructor();
|
|
4664
4316
|
/**
|
|
4665
4317
|
* @remarks
|
|
4666
|
-
*
|
|
4667
|
-
*
|
|
4668
|
-
*
|
|
4669
|
-
* This function can't be called in restricted-execution mode.
|
|
4318
|
+
* Returns permutation information about the block receiving
|
|
4319
|
+
* the event.
|
|
4670
4320
|
*
|
|
4671
|
-
* @returns
|
|
4672
|
-
* Note that {@link BlockBoundingBox} objects represent whole
|
|
4673
|
-
* blocks, so the center of boxes which have odd numbered
|
|
4674
|
-
* bounds are not mathematically centered...
|
|
4675
|
-
* i.e. a BlockBoundingBox( 0,0,0 -> 3,3,3 ) would have a
|
|
4676
|
-
* center of (1,1,1) (not (1.5, 1.5, 1.5) as expected)
|
|
4677
4321
|
*/
|
|
4678
|
-
|
|
4322
|
+
readonly blockPermutation: BlockPermutation;
|
|
4679
4323
|
/**
|
|
4680
4324
|
* @remarks
|
|
4681
|
-
*
|
|
4682
|
-
* area of two intersecting BlockBoundingBoxes
|
|
4683
|
-
*
|
|
4684
|
-
* This function can't be called in restricted-execution mode.
|
|
4325
|
+
* The entity that sent the event.
|
|
4685
4326
|
*
|
|
4686
4327
|
*/
|
|
4687
|
-
|
|
4328
|
+
readonly entitySource: Entity;
|
|
4688
4329
|
/**
|
|
4689
4330
|
* @remarks
|
|
4690
|
-
*
|
|
4691
|
-
*
|
|
4692
|
-
* This function can't be called in restricted-execution mode.
|
|
4331
|
+
* Name of the event fired by the entity.
|
|
4693
4332
|
*
|
|
4694
4333
|
*/
|
|
4695
|
-
|
|
4696
|
-
|
|
4697
|
-
|
|
4698
|
-
|
|
4699
|
-
|
|
4700
|
-
|
|
4701
|
-
|
|
4702
|
-
|
|
4703
|
-
|
|
4704
|
-
|
|
4705
|
-
* @remarks
|
|
4706
|
-
* Check to see if a given coordinate is inside a
|
|
4707
|
-
* BlockBoundingBox
|
|
4708
|
-
*
|
|
4709
|
-
* This function can't be called in restricted-execution mode.
|
|
4710
|
-
*
|
|
4711
|
-
*/
|
|
4712
|
-
static isInside(box: BlockBoundingBox, pos: Vector3): boolean;
|
|
4713
|
-
/**
|
|
4714
|
-
* @remarks
|
|
4715
|
-
* Check to see if a BlockBoundingBox is valid (i.e. (min <=
|
|
4716
|
-
* max))
|
|
4717
|
-
*
|
|
4718
|
-
* This function can't be called in restricted-execution mode.
|
|
4719
|
-
*
|
|
4720
|
-
*/
|
|
4721
|
-
static isValid(box: BlockBoundingBox): boolean;
|
|
4722
|
-
/**
|
|
4723
|
-
* @remarks
|
|
4724
|
-
* Move a BlockBoundingBox by a given amount
|
|
4725
|
-
*
|
|
4726
|
-
* This function can't be called in restricted-execution mode.
|
|
4727
|
-
*
|
|
4728
|
-
* @returns
|
|
4729
|
-
* Return a new BlockBoundingBox object which represents the
|
|
4730
|
-
* change
|
|
4731
|
-
*/
|
|
4732
|
-
static translate(box: BlockBoundingBox, delta: Vector3): BlockBoundingBox;
|
|
4733
|
-
}
|
|
4734
|
-
|
|
4735
|
-
/**
|
|
4736
|
-
* Base type for components associated with blocks.
|
|
4737
|
-
*/
|
|
4738
|
-
// @ts-ignore Class inheritance allowed for native defined classes
|
|
4739
|
-
export class BlockComponent extends Component {
|
|
4740
|
-
private constructor();
|
|
4741
|
-
/**
|
|
4742
|
-
* @remarks
|
|
4743
|
-
* Block instance that this component pertains to.
|
|
4744
|
-
*
|
|
4745
|
-
*/
|
|
4746
|
-
readonly block: Block;
|
|
4747
|
-
}
|
|
4748
|
-
|
|
4749
|
-
/**
|
|
4750
|
-
* Contains information regarding a specific block being
|
|
4751
|
-
* broken.
|
|
4752
|
-
*/
|
|
4753
|
-
// @ts-ignore Class inheritance allowed for native defined classes
|
|
4754
|
-
export class BlockComponentBlockBreakEvent extends BlockEvent {
|
|
4755
|
-
private constructor();
|
|
4756
|
-
/**
|
|
4757
|
-
* @remarks
|
|
4758
|
-
* The block that caused destruction.
|
|
4759
|
-
*
|
|
4760
|
-
*/
|
|
4761
|
-
readonly blockDestructionSource?: Block;
|
|
4762
|
-
/**
|
|
4763
|
-
* @remarks
|
|
4764
|
-
* Returns permutation information about this block before it
|
|
4765
|
-
* was broken.
|
|
4766
|
-
*
|
|
4767
|
-
*/
|
|
4768
|
-
readonly brokenBlockPermutation: BlockPermutation;
|
|
4769
|
-
/**
|
|
4770
|
-
* @remarks
|
|
4771
|
-
* The Actor that caused destruction.
|
|
4772
|
-
*
|
|
4773
|
-
*/
|
|
4774
|
-
readonly entitySource?: Entity;
|
|
4775
|
-
}
|
|
4776
|
-
|
|
4777
|
-
/**
|
|
4778
|
-
* @rc
|
|
4779
|
-
* Contains information regarding an event sent by an entity to
|
|
4780
|
-
* this block in the world.
|
|
4781
|
-
*/
|
|
4782
|
-
// @ts-ignore Class inheritance allowed for native defined classes
|
|
4783
|
-
export class BlockComponentEntityEvent extends BlockEvent {
|
|
4784
|
-
private constructor();
|
|
4785
|
-
/**
|
|
4786
|
-
* @remarks
|
|
4787
|
-
* Returns permutation information about the block receiving
|
|
4788
|
-
* the event.
|
|
4789
|
-
*
|
|
4790
|
-
*/
|
|
4791
|
-
readonly blockPermutation: BlockPermutation;
|
|
4792
|
-
/**
|
|
4793
|
-
* @remarks
|
|
4794
|
-
* The entity that sent the event.
|
|
4795
|
-
*
|
|
4796
|
-
*/
|
|
4797
|
-
readonly entitySource: Entity;
|
|
4798
|
-
/**
|
|
4799
|
-
* @remarks
|
|
4800
|
-
* Name of the event fired by the entity.
|
|
4801
|
-
*
|
|
4802
|
-
*/
|
|
4803
|
-
readonly name: string;
|
|
4804
|
-
}
|
|
4805
|
-
|
|
4806
|
-
/**
|
|
4807
|
-
* Contains information regarding an entity falling onto a
|
|
4808
|
-
* specific block.
|
|
4809
|
-
*/
|
|
4810
|
-
// @ts-ignore Class inheritance allowed for native defined classes
|
|
4811
|
-
export class BlockComponentEntityFallOnEvent extends BlockEvent {
|
|
4812
|
-
private constructor();
|
|
4334
|
+
readonly name: string;
|
|
4335
|
+
}
|
|
4336
|
+
|
|
4337
|
+
/**
|
|
4338
|
+
* Contains information regarding an entity falling onto a
|
|
4339
|
+
* specific block.
|
|
4340
|
+
*/
|
|
4341
|
+
// @ts-ignore Class inheritance allowed for native defined classes
|
|
4342
|
+
export class BlockComponentEntityFallOnEvent extends BlockEvent {
|
|
4343
|
+
private constructor();
|
|
4813
4344
|
/**
|
|
4814
4345
|
* @remarks
|
|
4815
4346
|
* The entity that fell onto the block.
|
|
@@ -5241,18 +4772,6 @@ export class BlockLocationIterator implements Iterable<Vector3> {
|
|
|
5241
4772
|
*
|
|
5242
4773
|
*/
|
|
5243
4774
|
[Symbol.iterator](): Iterator<Vector3>;
|
|
5244
|
-
/**
|
|
5245
|
-
* @beta
|
|
5246
|
-
* @remarks
|
|
5247
|
-
* Checks if the underlining block volume has been invalidated.
|
|
5248
|
-
* Will return false if the block volume was modified between
|
|
5249
|
-
* creating the iterator and iterating it, and true otherwise.
|
|
5250
|
-
*
|
|
5251
|
-
* @throws This function can throw errors.
|
|
5252
|
-
*
|
|
5253
|
-
* {@link minecraftcommon.EngineError}
|
|
5254
|
-
*/
|
|
5255
|
-
isValid(): boolean;
|
|
5256
4775
|
/**
|
|
5257
4776
|
* @remarks
|
|
5258
4777
|
* This function can't be called in restricted-execution mode.
|
|
@@ -6150,15 +5669,6 @@ export class BlockVolumeBase {
|
|
|
6150
5669
|
*
|
|
6151
5670
|
*/
|
|
6152
5671
|
getBlockLocationIterator(): BlockLocationIterator;
|
|
6153
|
-
/**
|
|
6154
|
-
* @beta
|
|
6155
|
-
* @remarks
|
|
6156
|
-
* Return a {@link BlockBoundingBox} object which represents
|
|
6157
|
-
* the validated min and max coordinates of the volume
|
|
6158
|
-
*
|
|
6159
|
-
* @throws This function can throw errors.
|
|
6160
|
-
*/
|
|
6161
|
-
getBoundingBox(): BlockBoundingBox;
|
|
6162
5672
|
/**
|
|
6163
5673
|
* @remarks
|
|
6164
5674
|
* Return the capacity (volume) of the BlockVolume (W*D*H)
|
|
@@ -6391,23 +5901,6 @@ export class Camera {
|
|
|
6391
5901
|
| CameraSetRotOptions
|
|
6392
5902
|
| CameraTargetOptions,
|
|
6393
5903
|
): void;
|
|
6394
|
-
/**
|
|
6395
|
-
* @beta
|
|
6396
|
-
* @remarks
|
|
6397
|
-
* Sets the current active camera with easing.
|
|
6398
|
-
*
|
|
6399
|
-
* This function can't be called in restricted-execution mode.
|
|
6400
|
-
*
|
|
6401
|
-
* @param cameraPreset
|
|
6402
|
-
* Identifier of a camera preset file defined within JSON.
|
|
6403
|
-
* @param easeOptions
|
|
6404
|
-
* Options to ease the camera from the previous camera to the
|
|
6405
|
-
* current one.
|
|
6406
|
-
* @throws
|
|
6407
|
-
* Throws when easing to minecraft:first_person presets
|
|
6408
|
-
* currently without the experimental cameras toggle enabled.
|
|
6409
|
-
*/
|
|
6410
|
-
setCameraWithEase(cameraPreset: string, easeOptions: EaseOptions): void;
|
|
6411
5904
|
/**
|
|
6412
5905
|
* @remarks
|
|
6413
5906
|
* Sets the current active camera for the specified player and
|
|
@@ -6448,164 +5941,6 @@ export class CatmullRomSpline {
|
|
|
6448
5941
|
controlPoints: Vector3[];
|
|
6449
5942
|
}
|
|
6450
5943
|
|
|
6451
|
-
/**
|
|
6452
|
-
* @beta
|
|
6453
|
-
* An event that fires as players enter chat messages.
|
|
6454
|
-
*/
|
|
6455
|
-
export class ChatSendAfterEvent {
|
|
6456
|
-
private constructor();
|
|
6457
|
-
/**
|
|
6458
|
-
* @remarks
|
|
6459
|
-
* Message that is being broadcast.
|
|
6460
|
-
*
|
|
6461
|
-
*/
|
|
6462
|
-
readonly message: string;
|
|
6463
|
-
/**
|
|
6464
|
-
* @remarks
|
|
6465
|
-
* Player that sent the chat message.
|
|
6466
|
-
*
|
|
6467
|
-
*/
|
|
6468
|
-
readonly sender: Player;
|
|
6469
|
-
/**
|
|
6470
|
-
* @remarks
|
|
6471
|
-
* Optional list of players that will receive this message. If
|
|
6472
|
-
* defined, this message is directly targeted to one or more
|
|
6473
|
-
* players (i.e., is not broadcast.)
|
|
6474
|
-
*
|
|
6475
|
-
*/
|
|
6476
|
-
readonly targets?: Player[];
|
|
6477
|
-
}
|
|
6478
|
-
|
|
6479
|
-
/**
|
|
6480
|
-
* @beta
|
|
6481
|
-
* Manages callbacks that are connected to chat messages being
|
|
6482
|
-
* sent.
|
|
6483
|
-
*/
|
|
6484
|
-
export class ChatSendAfterEventSignal {
|
|
6485
|
-
private constructor();
|
|
6486
|
-
/**
|
|
6487
|
-
* @remarks
|
|
6488
|
-
* Adds a callback that will be called when new chat messages
|
|
6489
|
-
* are sent.
|
|
6490
|
-
*
|
|
6491
|
-
* This function can't be called in restricted-execution mode.
|
|
6492
|
-
*
|
|
6493
|
-
* This function can be called in early-execution mode.
|
|
6494
|
-
*
|
|
6495
|
-
*/
|
|
6496
|
-
subscribe(callback: (arg0: ChatSendAfterEvent) => void): (arg0: ChatSendAfterEvent) => void;
|
|
6497
|
-
/**
|
|
6498
|
-
* @remarks
|
|
6499
|
-
* Removes a callback from being called when new chat messages
|
|
6500
|
-
* are sent.
|
|
6501
|
-
*
|
|
6502
|
-
* This function can't be called in restricted-execution mode.
|
|
6503
|
-
*
|
|
6504
|
-
* This function can be called in early-execution mode.
|
|
6505
|
-
*
|
|
6506
|
-
*/
|
|
6507
|
-
unsubscribe(callback: (arg0: ChatSendAfterEvent) => void): void;
|
|
6508
|
-
}
|
|
6509
|
-
|
|
6510
|
-
/**
|
|
6511
|
-
* @beta
|
|
6512
|
-
* An event that fires as players enter chat messages.
|
|
6513
|
-
*/
|
|
6514
|
-
export class ChatSendBeforeEvent {
|
|
6515
|
-
private constructor();
|
|
6516
|
-
/**
|
|
6517
|
-
* @remarks
|
|
6518
|
-
* If set to true in a beforeChat event handler, this message
|
|
6519
|
-
* is not broadcast out.
|
|
6520
|
-
*
|
|
6521
|
-
*/
|
|
6522
|
-
cancel: boolean;
|
|
6523
|
-
/**
|
|
6524
|
-
* @remarks
|
|
6525
|
-
* Message that is being broadcast.
|
|
6526
|
-
*
|
|
6527
|
-
*/
|
|
6528
|
-
readonly message: string;
|
|
6529
|
-
/**
|
|
6530
|
-
* @remarks
|
|
6531
|
-
* Player that sent the chat message.
|
|
6532
|
-
*
|
|
6533
|
-
*/
|
|
6534
|
-
readonly sender: Player;
|
|
6535
|
-
/**
|
|
6536
|
-
* @remarks
|
|
6537
|
-
* Optional list of players that will receive this message. If
|
|
6538
|
-
* defined, this message is directly targeted to one or more
|
|
6539
|
-
* players (i.e., is not broadcast.)
|
|
6540
|
-
*
|
|
6541
|
-
*/
|
|
6542
|
-
readonly targets?: Player[];
|
|
6543
|
-
}
|
|
6544
|
-
|
|
6545
|
-
/**
|
|
6546
|
-
* @beta
|
|
6547
|
-
* Manages callbacks that are connected to an event that fires
|
|
6548
|
-
* before chat messages are sent.
|
|
6549
|
-
* @example customCommand.ts
|
|
6550
|
-
* ```typescript
|
|
6551
|
-
* import { world, DimensionLocation } from "@minecraft/server";
|
|
6552
|
-
*
|
|
6553
|
-
* function customCommand(targetLocation: DimensionLocation) {
|
|
6554
|
-
* const chatCallback = world.beforeEvents.chatSend.subscribe((eventData) => {
|
|
6555
|
-
* if (eventData.message.includes("cancel")) {
|
|
6556
|
-
* // Cancel event if the message contains "cancel"
|
|
6557
|
-
* eventData.cancel = true;
|
|
6558
|
-
* } else {
|
|
6559
|
-
* const args = eventData.message.split(" ");
|
|
6560
|
-
*
|
|
6561
|
-
* if (args.length > 0) {
|
|
6562
|
-
* switch (args[0].toLowerCase()) {
|
|
6563
|
-
* case "echo":
|
|
6564
|
-
* // Send a modified version of chat message
|
|
6565
|
-
* world.sendMessage(`Echo '${eventData.message.substring(4).trim()}'`);
|
|
6566
|
-
* break;
|
|
6567
|
-
* case "help":
|
|
6568
|
-
* world.sendMessage(`Available commands: echo <message>`);
|
|
6569
|
-
* break;
|
|
6570
|
-
* }
|
|
6571
|
-
* }
|
|
6572
|
-
* }
|
|
6573
|
-
* });
|
|
6574
|
-
* }
|
|
6575
|
-
* ```
|
|
6576
|
-
*/
|
|
6577
|
-
export class ChatSendBeforeEventSignal {
|
|
6578
|
-
private constructor();
|
|
6579
|
-
/**
|
|
6580
|
-
* @remarks
|
|
6581
|
-
* Adds a callback that will be called before new chat messages
|
|
6582
|
-
* are sent.
|
|
6583
|
-
*
|
|
6584
|
-
* This function can't be called in restricted-execution mode.
|
|
6585
|
-
*
|
|
6586
|
-
* This function can be called in early-execution mode.
|
|
6587
|
-
*
|
|
6588
|
-
* @param callback
|
|
6589
|
-
* This closure is called with restricted-execution privilege.
|
|
6590
|
-
* @returns
|
|
6591
|
-
* Closure that is called with restricted-execution privilege.
|
|
6592
|
-
*/
|
|
6593
|
-
subscribe(callback: (arg0: ChatSendBeforeEvent) => void): (arg0: ChatSendBeforeEvent) => void;
|
|
6594
|
-
/**
|
|
6595
|
-
* @remarks
|
|
6596
|
-
* Removes a callback from being called before new chat
|
|
6597
|
-
* messages are sent.
|
|
6598
|
-
*
|
|
6599
|
-
* This function can't be called in restricted-execution mode.
|
|
6600
|
-
*
|
|
6601
|
-
* This function can be called in early-execution mode.
|
|
6602
|
-
*
|
|
6603
|
-
* @param callback
|
|
6604
|
-
* This closure is called with restricted-execution privilege.
|
|
6605
|
-
*/
|
|
6606
|
-
unsubscribe(callback: (arg0: ChatSendBeforeEvent) => void): void;
|
|
6607
|
-
}
|
|
6608
|
-
|
|
6609
5944
|
/**
|
|
6610
5945
|
* Contains the device information for a client instance.
|
|
6611
5946
|
*/
|
|
@@ -6663,258 +5998,6 @@ export class Component {
|
|
|
6663
5998
|
readonly typeId: string;
|
|
6664
5999
|
}
|
|
6665
6000
|
|
|
6666
|
-
/**
|
|
6667
|
-
* @beta
|
|
6668
|
-
* The Compound Block Volume is a collection of individual
|
|
6669
|
-
* block volume definitions which, as a collection, define a
|
|
6670
|
-
* larger volume of (sometimes non-contiguous) irregular
|
|
6671
|
-
* shapes.
|
|
6672
|
-
* This class is loosely based on the concept of CSG
|
|
6673
|
-
* (Computational Solid Geometry) and allows a user to create
|
|
6674
|
-
* complex volumes by building a stack of volumes and voids to
|
|
6675
|
-
* make a larger single volume.
|
|
6676
|
-
* For example - normally a creator would create a hollow cube
|
|
6677
|
-
* by creating 6 "wall" surfaces for each face.
|
|
6678
|
-
* With a Compound Block Volume, a creator can define a hollow
|
|
6679
|
-
* cube by creating a single outer solid cube, and then
|
|
6680
|
-
* defining a further single 'void' cube inside the larger one.
|
|
6681
|
-
* Similarly, the Compound Block Volume can represent irregular
|
|
6682
|
-
* shaped volumes (e.g. a tree consists of a trunk and lots of
|
|
6683
|
-
* leaf cubes which are not necessarily contiguously placed).
|
|
6684
|
-
* Each of the volumes added to the CompoundBlockVolume are (by
|
|
6685
|
-
* default) relative to the origin set (either at construction
|
|
6686
|
-
* or via one of the set functions).
|
|
6687
|
-
* However, it is also possible to push volumes to the compound
|
|
6688
|
-
* collection which are absolute in nature and are not affected
|
|
6689
|
-
* by origin changes.
|
|
6690
|
-
*/
|
|
6691
|
-
export class CompoundBlockVolume {
|
|
6692
|
-
/**
|
|
6693
|
-
* @remarks
|
|
6694
|
-
* Return the 'capacity' of the bounding rectangle which
|
|
6695
|
-
* represents the collection of volumes in the stack
|
|
6696
|
-
*
|
|
6697
|
-
*/
|
|
6698
|
-
readonly capacity: number;
|
|
6699
|
-
readonly items: CompoundBlockVolumeItem[];
|
|
6700
|
-
readonly itemsAbsolute: CompoundBlockVolumeItem[];
|
|
6701
|
-
/**
|
|
6702
|
-
* @remarks
|
|
6703
|
-
* Return the number of volumes (positive and negative) in the
|
|
6704
|
-
* volume stack
|
|
6705
|
-
*
|
|
6706
|
-
*/
|
|
6707
|
-
readonly volumeCount: number;
|
|
6708
|
-
/**
|
|
6709
|
-
* @remarks
|
|
6710
|
-
* Create a CompoundBlockVolume object
|
|
6711
|
-
*
|
|
6712
|
-
* @param origin
|
|
6713
|
-
* An optional world space origin on which to center the
|
|
6714
|
-
* compound volume.
|
|
6715
|
-
* If not specified, the origin is set to (0,0,0)
|
|
6716
|
-
*/
|
|
6717
|
-
constructor(origin?: Vector3);
|
|
6718
|
-
/**
|
|
6719
|
-
* @remarks
|
|
6720
|
-
* Clear the contents of the volume stack
|
|
6721
|
-
*
|
|
6722
|
-
* This function can't be called in restricted-execution mode.
|
|
6723
|
-
*
|
|
6724
|
-
*/
|
|
6725
|
-
clear(): void;
|
|
6726
|
-
/**
|
|
6727
|
-
* @remarks
|
|
6728
|
-
* Fetch a Block Location Iterator for the Compound Block
|
|
6729
|
-
* Volume. This iterator will allow a creator to iterate
|
|
6730
|
-
* across all of the selected volumes within the larger
|
|
6731
|
-
* bounding area.
|
|
6732
|
-
* Areas of a volume which have been overridden by a
|
|
6733
|
-
* subtractive volume will not be included in the iterator
|
|
6734
|
-
* step.
|
|
6735
|
-
* (i.e. if you push a cube to the stack, and then push a
|
|
6736
|
-
* subtractive volume to the same location, then the iterator
|
|
6737
|
-
* will step over the initial volume because it is considered
|
|
6738
|
-
* negative space)
|
|
6739
|
-
* Note that the Block Locations returned by this iterator are
|
|
6740
|
-
* in absolute world space (irrespective of whether the
|
|
6741
|
-
* compound volume items pushed are absolute or relative)
|
|
6742
|
-
*
|
|
6743
|
-
* This function can't be called in restricted-execution mode.
|
|
6744
|
-
*
|
|
6745
|
-
*/
|
|
6746
|
-
getBlockLocationIterator(): BlockLocationIterator;
|
|
6747
|
-
/**
|
|
6748
|
-
* @remarks
|
|
6749
|
-
* Get the largest bounding box that represents a container for
|
|
6750
|
-
* all of the volumes on the stack
|
|
6751
|
-
* Note that the bounding box returned is represented in
|
|
6752
|
-
* absolute world space (irrespective of whether the compound
|
|
6753
|
-
* volume items pushed are absolute or relative)
|
|
6754
|
-
*
|
|
6755
|
-
* This function can't be called in restricted-execution mode.
|
|
6756
|
-
*
|
|
6757
|
-
*/
|
|
6758
|
-
getBoundingBox(): BlockBoundingBox;
|
|
6759
|
-
/**
|
|
6760
|
-
* @remarks
|
|
6761
|
-
* Get the max block location of the outermost bounding
|
|
6762
|
-
* rectangle which represents the volumes on the stack.
|
|
6763
|
-
* Note that the max location returned is in absolute world
|
|
6764
|
-
* space (irrespective of whether the compound volume items
|
|
6765
|
-
* pushed are absolute or relative)
|
|
6766
|
-
*
|
|
6767
|
-
* This function can't be called in restricted-execution mode.
|
|
6768
|
-
*
|
|
6769
|
-
*/
|
|
6770
|
-
getMax(): Vector3;
|
|
6771
|
-
/**
|
|
6772
|
-
* @remarks
|
|
6773
|
-
* Get the min block location of the outermost bounding
|
|
6774
|
-
* rectangle which represents the volumes on the stack.
|
|
6775
|
-
* Note that the min location returned is in absolute world
|
|
6776
|
-
* space (irrespective of whether the compound volume items
|
|
6777
|
-
* pushed are absolute or relative)
|
|
6778
|
-
*
|
|
6779
|
-
* This function can't be called in restricted-execution mode.
|
|
6780
|
-
*
|
|
6781
|
-
*/
|
|
6782
|
-
getMin(): Vector3;
|
|
6783
|
-
/**
|
|
6784
|
-
* @remarks
|
|
6785
|
-
* Fetch the origin in world space of the compound volume
|
|
6786
|
-
*
|
|
6787
|
-
* This function can't be called in restricted-execution mode.
|
|
6788
|
-
*
|
|
6789
|
-
*/
|
|
6790
|
-
getOrigin(): Vector3;
|
|
6791
|
-
/**
|
|
6792
|
-
* @remarks
|
|
6793
|
-
* Return a boolean which signals if there are any volume items
|
|
6794
|
-
* pushed to the volume
|
|
6795
|
-
*
|
|
6796
|
-
* This function can't be called in restricted-execution mode.
|
|
6797
|
-
*
|
|
6798
|
-
*/
|
|
6799
|
-
isEmpty(): boolean;
|
|
6800
|
-
/**
|
|
6801
|
-
* @remarks
|
|
6802
|
-
* Return a boolean representing whether or not a given
|
|
6803
|
-
* absolute world space block location is inside a positive
|
|
6804
|
-
* block volume.
|
|
6805
|
-
* E.g. if the stack contains a large cube followed by a
|
|
6806
|
-
* slightly smaller negative cube, and the test location is
|
|
6807
|
-
* within the negative cube - the function will return false
|
|
6808
|
-
* because it's not 'inside' a volume (it IS inside the
|
|
6809
|
-
* bounding rectangle, but it is not inside a positively
|
|
6810
|
-
* defined location)
|
|
6811
|
-
*
|
|
6812
|
-
* This function can't be called in restricted-execution mode.
|
|
6813
|
-
*
|
|
6814
|
-
*/
|
|
6815
|
-
isInside(worldLocation: Vector3): boolean;
|
|
6816
|
-
/**
|
|
6817
|
-
* @remarks
|
|
6818
|
-
* Inspect the last entry pushed to the volume stack without
|
|
6819
|
-
* affecting the stack contents.
|
|
6820
|
-
*
|
|
6821
|
-
* This function can't be called in restricted-execution mode.
|
|
6822
|
-
*
|
|
6823
|
-
* @param forceRelativity
|
|
6824
|
-
* Determine whether the function returns a
|
|
6825
|
-
* CompoundBlockVolumeItem which is forced into either relative
|
|
6826
|
-
* or absolute coordinate system.
|
|
6827
|
-
* `true` = force returned item to be relative to volume origin
|
|
6828
|
-
* `false` = force returned item to be absolute world space
|
|
6829
|
-
* location
|
|
6830
|
-
*
|
|
6831
|
-
* If no flag is specified, the item returned retains whatever
|
|
6832
|
-
* relativity it had when it was pushed
|
|
6833
|
-
* @returns
|
|
6834
|
-
* Returns undefined if the stack is empty
|
|
6835
|
-
*/
|
|
6836
|
-
peekLastVolume(forceRelativity?: CompoundBlockVolumePositionRelativity): CompoundBlockVolumeItem | undefined;
|
|
6837
|
-
/**
|
|
6838
|
-
* @remarks
|
|
6839
|
-
* Remove the last entry from the volume stack. This will
|
|
6840
|
-
* reduce the stack size by one
|
|
6841
|
-
*
|
|
6842
|
-
* This function can't be called in restricted-execution mode.
|
|
6843
|
-
*
|
|
6844
|
-
*/
|
|
6845
|
-
popVolume(): boolean;
|
|
6846
|
-
/**
|
|
6847
|
-
* @remarks
|
|
6848
|
-
* Push a volume item to the stack. The volume item contains
|
|
6849
|
-
* an 'action' parameter which determines whether this volume
|
|
6850
|
-
* is a positive or negative space.
|
|
6851
|
-
* The item also contains a `locationRelativity` which
|
|
6852
|
-
* determines whether it is relative or absolute to the
|
|
6853
|
-
* compound volume origin
|
|
6854
|
-
*
|
|
6855
|
-
* This function can't be called in restricted-execution mode.
|
|
6856
|
-
*
|
|
6857
|
-
* @param item
|
|
6858
|
-
* Item to push to the end of the stack
|
|
6859
|
-
*/
|
|
6860
|
-
pushVolume(item: CompoundBlockVolumeItem): void;
|
|
6861
|
-
/**
|
|
6862
|
-
* @remarks
|
|
6863
|
-
* If the volume stack is empty, this function will push the
|
|
6864
|
-
* specified item to the stack.
|
|
6865
|
-
* If the volume stack is NOT empty, this function will replace
|
|
6866
|
-
* the last item on the stack with the new item.
|
|
6867
|
-
*
|
|
6868
|
-
* This function can't be called in restricted-execution mode.
|
|
6869
|
-
*
|
|
6870
|
-
* @param item
|
|
6871
|
-
* Item to add or replace
|
|
6872
|
-
*/
|
|
6873
|
-
replaceOrAddLastVolume(item: CompoundBlockVolumeItem): boolean;
|
|
6874
|
-
/**
|
|
6875
|
-
* @remarks
|
|
6876
|
-
* Set the origin of the compound volume to an absolute world
|
|
6877
|
-
* space location
|
|
6878
|
-
*
|
|
6879
|
-
* This function can't be called in restricted-execution mode.
|
|
6880
|
-
*
|
|
6881
|
-
* @param preserveExistingVolumes
|
|
6882
|
-
* This optional boolean flag determines whether the relative
|
|
6883
|
-
* `CompoundBlockVolumeItem`'s are frozen in place, or are
|
|
6884
|
-
* affected by the new origin.
|
|
6885
|
-
* Imagine a scenario where you have a series of relative
|
|
6886
|
-
* locations around an origin which make up a sphere; all of
|
|
6887
|
-
* these locations are in the range of -2 to 2.
|
|
6888
|
-
* Push each of these locations to the compound volume as
|
|
6889
|
-
* relative items.
|
|
6890
|
-
* Now, move the origin and all of the locations representing
|
|
6891
|
-
* the sphere move accordingly.
|
|
6892
|
-
* However, let's say you want to add a 2nd sphere next to the
|
|
6893
|
-
* 1st.
|
|
6894
|
-
* In this case, set the new origin a few locations over, but
|
|
6895
|
-
* 'preserveExistingVolumes' = true.
|
|
6896
|
-
* This will set a new origin, but the existing sphere
|
|
6897
|
-
* locations will remain relative to the original origin.
|
|
6898
|
-
* Now, you can push the relative sphere locations again (this
|
|
6899
|
-
* time they will be relative to the new origin) - resulting in
|
|
6900
|
-
* 2 spheres next to each other.
|
|
6901
|
-
*/
|
|
6902
|
-
setOrigin(position: Vector3, preserveExistingVolumes?: boolean): void;
|
|
6903
|
-
/**
|
|
6904
|
-
* @remarks
|
|
6905
|
-
* Similar to {@link CompoundBlockVolume.setOrigin} - this
|
|
6906
|
-
* function will translate the origin by a given delta to a new
|
|
6907
|
-
* position
|
|
6908
|
-
*
|
|
6909
|
-
* This function can't be called in restricted-execution mode.
|
|
6910
|
-
*
|
|
6911
|
-
* @param preserveExistingVolumes
|
|
6912
|
-
* See the description for the arguments to {@link
|
|
6913
|
-
* CompoundBlockVolume.setOrigin}
|
|
6914
|
-
*/
|
|
6915
|
-
translateOrigin(delta: Vector3, preserveExistingVolumes?: boolean): void;
|
|
6916
|
-
}
|
|
6917
|
-
|
|
6918
6001
|
/**
|
|
6919
6002
|
* Represents a container that can hold sets of items. Used
|
|
6920
6003
|
* with entities such as Players, Chest Minecarts, Llamas, and
|
|
@@ -7052,9 +6135,7 @@ export class Container {
|
|
|
7052
6135
|
*
|
|
7053
6136
|
* @param itemStack
|
|
7054
6137
|
* The stack of items to add.
|
|
7055
|
-
* @throws
|
|
7056
|
-
* Won't throw {@link ContainerRules} error for over weight
|
|
7057
|
-
* limit but will instead add items up to the weight limit.
|
|
6138
|
+
* @throws This function can throw errors.
|
|
7058
6139
|
*
|
|
7059
6140
|
* {@link ContainerRulesError}
|
|
7060
6141
|
*
|
|
@@ -7294,8 +6375,6 @@ export class Container {
|
|
|
7294
6375
|
* @throws
|
|
7295
6376
|
* Throws if either this container or `toContainer` are invalid
|
|
7296
6377
|
* or if the `fromSlot` or `toSlot` indices out of bounds.
|
|
7297
|
-
* Won't throw {@link ContainerRules} error for over weight
|
|
7298
|
-
* limit but will instead add items up to the weight limit.
|
|
7299
6378
|
*
|
|
7300
6379
|
* {@link ContainerRulesError}
|
|
7301
6380
|
*
|
|
@@ -8084,30 +7163,6 @@ export class Dimension {
|
|
|
8084
7163
|
block: BlockPermutation | BlockType | string,
|
|
8085
7164
|
options?: BlockFillOptions,
|
|
8086
7165
|
): ListBlockVolume;
|
|
8087
|
-
/**
|
|
8088
|
-
* @beta
|
|
8089
|
-
* @remarks
|
|
8090
|
-
* Finds the location of the closest biome of a particular
|
|
8091
|
-
* type. Note that the findClosestBiome operation can take some
|
|
8092
|
-
* time to complete, so avoid using many of these calls within
|
|
8093
|
-
* a particular tick.
|
|
8094
|
-
*
|
|
8095
|
-
* @param pos
|
|
8096
|
-
* Starting location to look for a biome to find.
|
|
8097
|
-
* @param biomeToFind
|
|
8098
|
-
* Identifier of the biome to look for.
|
|
8099
|
-
* @param options
|
|
8100
|
-
* Additional selection criteria for a biome search.
|
|
8101
|
-
* @returns
|
|
8102
|
-
* Returns a location of the biome, or undefined if a biome
|
|
8103
|
-
* could not be found.
|
|
8104
|
-
* @throws This function can throw errors.
|
|
8105
|
-
*
|
|
8106
|
-
* {@link minecraftcommon.EngineError}
|
|
8107
|
-
*
|
|
8108
|
-
* {@link Error}
|
|
8109
|
-
*/
|
|
8110
|
-
findClosestBiome(pos: Vector3, biomeToFind: BiomeType | string, options?: BiomeSearchOptions): Vector3 | undefined;
|
|
8111
7166
|
/**
|
|
8112
7167
|
* @remarks
|
|
8113
7168
|
* Returns the biome type at the specified location.
|
|
@@ -8327,26 +7382,6 @@ export class Dimension {
|
|
|
8327
7382
|
* {@link minecraftcommon.UnsupportedFunctionalityError}
|
|
8328
7383
|
*/
|
|
8329
7384
|
getEntitiesFromRay(location: Vector3, direction: Vector3, options?: EntityRaycastOptions): EntityRaycastHit[];
|
|
8330
|
-
/**
|
|
8331
|
-
* @beta
|
|
8332
|
-
* @remarks
|
|
8333
|
-
* Returns a vector of generated structures that contain the
|
|
8334
|
-
* specified location (ex: Pillager Outpost, Mineshaft, etc.).
|
|
8335
|
-
* The vector will be empty if no structures are found.
|
|
8336
|
-
*
|
|
8337
|
-
* @param location
|
|
8338
|
-
* Location at which to check for structures.
|
|
8339
|
-
* @throws
|
|
8340
|
-
* An error will be thrown if the location is out of world
|
|
8341
|
-
* bounds.
|
|
8342
|
-
* An error will be thrown if the location is in an unloaded
|
|
8343
|
-
* chunk.
|
|
8344
|
-
*
|
|
8345
|
-
* {@link LocationInUnloadedChunkError}
|
|
8346
|
-
*
|
|
8347
|
-
* {@link LocationOutOfWorldBoundariesError}
|
|
8348
|
-
*/
|
|
8349
|
-
getGeneratedStructures(location: Vector3): (minecraftvanilladata.MinecraftFeatureTypes | string)[];
|
|
8350
7385
|
/**
|
|
8351
7386
|
* @remarks
|
|
8352
7387
|
* Returns the total brightness level of light shining on a
|
|
@@ -8408,16 +7443,6 @@ export class Dimension {
|
|
|
8408
7443
|
* @throws This function can throw errors.
|
|
8409
7444
|
*/
|
|
8410
7445
|
getTopmostBlock(locationXZ: VectorXZ, minHeight?: number): Block | undefined;
|
|
8411
|
-
/**
|
|
8412
|
-
* @beta
|
|
8413
|
-
* @remarks
|
|
8414
|
-
* Returns the current weather.
|
|
8415
|
-
*
|
|
8416
|
-
* @returns
|
|
8417
|
-
* Returns a WeatherType that explains the broad category of
|
|
8418
|
-
* weather that is currently going on.
|
|
8419
|
-
*/
|
|
8420
|
-
getWeather(): WeatherType;
|
|
8421
7446
|
/**
|
|
8422
7447
|
* @remarks
|
|
8423
7448
|
* Returns true if the chunk at the given location is loaded
|
|
@@ -8661,11 +7686,7 @@ export class Dimension {
|
|
|
8661
7686
|
* }
|
|
8662
7687
|
* ```
|
|
8663
7688
|
*/
|
|
8664
|
-
spawnEntity
|
|
8665
|
-
identifier: EntityIdentifierType<NoInfer<T>>,
|
|
8666
|
-
location: Vector3,
|
|
8667
|
-
options?: SpawnEntityOptions,
|
|
8668
|
-
): Entity;
|
|
7689
|
+
spawnEntity(identifier: EntityType | string, location: Vector3, options?: SpawnEntityOptions): Entity;
|
|
8669
7690
|
/**
|
|
8670
7691
|
* @remarks
|
|
8671
7692
|
* Creates a new item stack as an entity at the specified
|
|
@@ -8760,26 +7781,6 @@ export class Dimension {
|
|
|
8760
7781
|
* ```
|
|
8761
7782
|
*/
|
|
8762
7783
|
spawnParticle(effectName: string, location: Vector3, molangVariables?: MolangVariableMap): void;
|
|
8763
|
-
/**
|
|
8764
|
-
* @beta
|
|
8765
|
-
* @remarks
|
|
8766
|
-
* Stops all sounds from playing for all players.
|
|
8767
|
-
*
|
|
8768
|
-
* This function can't be called in restricted-execution mode.
|
|
8769
|
-
*
|
|
8770
|
-
*/
|
|
8771
|
-
stopAllSounds(): void;
|
|
8772
|
-
/**
|
|
8773
|
-
* @beta
|
|
8774
|
-
* @remarks
|
|
8775
|
-
* Stops a sound from playing for all players.
|
|
8776
|
-
*
|
|
8777
|
-
* This function can't be called in restricted-execution mode.
|
|
8778
|
-
*
|
|
8779
|
-
* @param soundId
|
|
8780
|
-
* Identifier of the sound.
|
|
8781
|
-
*/
|
|
8782
|
-
stopSound(soundId: string): void;
|
|
8783
7784
|
}
|
|
8784
7785
|
|
|
8785
7786
|
/**
|
|
@@ -9304,18 +8305,6 @@ export class Entity {
|
|
|
9304
8305
|
*
|
|
9305
8306
|
*/
|
|
9306
8307
|
readonly scoreboardIdentity?: ScoreboardIdentity;
|
|
9307
|
-
/**
|
|
9308
|
-
* @beta
|
|
9309
|
-
* @remarks
|
|
9310
|
-
* Retrieves or sets an entity that is used as the target of
|
|
9311
|
-
* AI-related behaviors, like attacking. If the entity
|
|
9312
|
-
* currently has no target returns undefined.
|
|
9313
|
-
*
|
|
9314
|
-
* @throws This property can throw when used.
|
|
9315
|
-
*
|
|
9316
|
-
* {@link InvalidEntityError}
|
|
9317
|
-
*/
|
|
9318
|
-
readonly target?: Entity;
|
|
9319
8308
|
/**
|
|
9320
8309
|
* @remarks
|
|
9321
8310
|
* Identifier of the type of the entity - for example,
|
|
@@ -9395,30 +8384,9 @@ export class Entity {
|
|
|
9395
8384
|
* wolf.isSneaking = true;
|
|
9396
8385
|
* log("Created a sneaking wolf.", 1);
|
|
9397
8386
|
* }
|
|
9398
|
-
* ```
|
|
9399
|
-
*/
|
|
9400
|
-
addEffect(effectType: EffectType | string, duration: number, options?: EntityEffectOptions): Effect | undefined;
|
|
9401
|
-
/**
|
|
9402
|
-
* @beta
|
|
9403
|
-
* @remarks
|
|
9404
|
-
* Adds an item to the entity's inventory.
|
|
9405
|
-
*
|
|
9406
|
-
* This function can't be called in restricted-execution mode.
|
|
9407
|
-
*
|
|
9408
|
-
* @returns
|
|
9409
|
-
* Returns undefined if the item was fully added or returns an
|
|
9410
|
-
* ItemStack with the remaining count.
|
|
9411
|
-
* @throws This function can throw errors.
|
|
9412
|
-
*
|
|
9413
|
-
* {@link ContainerRulesError}
|
|
9414
|
-
*
|
|
9415
|
-
* {@link Error}
|
|
9416
|
-
*
|
|
9417
|
-
* {@link InvalidEntityComponentError}
|
|
9418
|
-
*
|
|
9419
|
-
* {@link InvalidEntityError}
|
|
8387
|
+
* ```
|
|
9420
8388
|
*/
|
|
9421
|
-
|
|
8389
|
+
addEffect(effectType: EffectType | string, duration: number, options?: EntityEffectOptions): Effect | undefined;
|
|
9422
8390
|
/**
|
|
9423
8391
|
* @remarks
|
|
9424
8392
|
* Adds a specified tag to an entity.
|
|
@@ -10565,18 +9533,6 @@ export class EntityBaseMovementComponent extends EntityComponent {
|
|
|
10565
9533
|
// @ts-ignore Class inheritance allowed for native defined classes
|
|
10566
9534
|
export class EntityBreathableComponent extends EntityComponent {
|
|
10567
9535
|
private constructor();
|
|
10568
|
-
/**
|
|
10569
|
-
* @beta
|
|
10570
|
-
* @remarks
|
|
10571
|
-
* The current air supply of the entity.
|
|
10572
|
-
*
|
|
10573
|
-
* This property can't be edited in restricted-execution mode.
|
|
10574
|
-
*
|
|
10575
|
-
* @throws
|
|
10576
|
-
* Will throw an error if the air supply is out of bounds
|
|
10577
|
-
* [suffocationTime, maxAirSupply].
|
|
10578
|
-
*/
|
|
10579
|
-
airSupply: number;
|
|
10580
9536
|
/**
|
|
10581
9537
|
* @remarks
|
|
10582
9538
|
* If true, this entity can breathe in air.
|
|
@@ -10605,14 +9561,6 @@ export class EntityBreathableComponent extends EntityComponent {
|
|
|
10605
9561
|
* @throws This property can throw when used.
|
|
10606
9562
|
*/
|
|
10607
9563
|
readonly breathesWater: boolean;
|
|
10608
|
-
/**
|
|
10609
|
-
* @beta
|
|
10610
|
-
* @remarks
|
|
10611
|
-
* If true, the entity is able to breathe.
|
|
10612
|
-
*
|
|
10613
|
-
* @throws This property can throw when used.
|
|
10614
|
-
*/
|
|
10615
|
-
readonly canBreathe: boolean;
|
|
10616
9564
|
/**
|
|
10617
9565
|
* @remarks
|
|
10618
9566
|
* If true, this entity will have visible bubbles while in
|
|
@@ -12463,42 +11411,6 @@ export class EntityNavigationWalkComponent extends EntityNavigationComponent {
|
|
|
12463
11411
|
static readonly componentId = 'minecraft:navigation.walk';
|
|
12464
11412
|
}
|
|
12465
11413
|
|
|
12466
|
-
/**
|
|
12467
|
-
* @beta
|
|
12468
|
-
* Adds NPC capabilities to an entity such as custom skin,
|
|
12469
|
-
* name, and dialogue interactions.
|
|
12470
|
-
*/
|
|
12471
|
-
// @ts-ignore Class inheritance allowed for native defined classes
|
|
12472
|
-
export class EntityNpcComponent extends EntityComponent {
|
|
12473
|
-
private constructor();
|
|
12474
|
-
/**
|
|
12475
|
-
* @remarks
|
|
12476
|
-
* The DialogueScene that is opened when players first interact
|
|
12477
|
-
* with the NPC.
|
|
12478
|
-
*
|
|
12479
|
-
* This property can't be edited in restricted-execution mode.
|
|
12480
|
-
*
|
|
12481
|
-
*/
|
|
12482
|
-
defaultScene: string;
|
|
12483
|
-
/**
|
|
12484
|
-
* @remarks
|
|
12485
|
-
* The name of the NPC as it is displayed to players.
|
|
12486
|
-
*
|
|
12487
|
-
* This property can't be edited in restricted-execution mode.
|
|
12488
|
-
*
|
|
12489
|
-
*/
|
|
12490
|
-
name: string;
|
|
12491
|
-
/**
|
|
12492
|
-
* @remarks
|
|
12493
|
-
* The index of the skin the NPC will use.
|
|
12494
|
-
*
|
|
12495
|
-
* This property can't be edited in restricted-execution mode.
|
|
12496
|
-
*
|
|
12497
|
-
*/
|
|
12498
|
-
skinIndex: number;
|
|
12499
|
-
static readonly componentId = 'minecraft:npc';
|
|
12500
|
-
}
|
|
12501
|
-
|
|
12502
11414
|
/**
|
|
12503
11415
|
* When present on an entity, this entity is on fire.
|
|
12504
11416
|
* @example setOnFire.ts
|
|
@@ -13377,7 +12289,7 @@ export class EntityTypes {
|
|
|
13377
12289
|
* Retrieves an entity type using a string-based identifier.
|
|
13378
12290
|
*
|
|
13379
12291
|
*/
|
|
13380
|
-
static get
|
|
12292
|
+
static get(identifier: string): EntityType | undefined;
|
|
13381
12293
|
/**
|
|
13382
12294
|
* @remarks
|
|
13383
12295
|
* Retrieves a set of all entity types within this world.
|
|
@@ -13424,51 +12336,6 @@ export class EntityWantsJockeyComponent extends EntityComponent {
|
|
|
13424
12336
|
static readonly componentId = 'minecraft:wants_jockey';
|
|
13425
12337
|
}
|
|
13426
12338
|
|
|
13427
|
-
/**
|
|
13428
|
-
* @beta
|
|
13429
|
-
* Waypoint that tracks an entity's position. The waypoint
|
|
13430
|
-
* automatically updates as the entity moves and becomes
|
|
13431
|
-
* invalid when the entity is removed.
|
|
13432
|
-
*/
|
|
13433
|
-
// @ts-ignore Class inheritance allowed for native defined classes
|
|
13434
|
-
export class EntityWaypoint extends Waypoint {
|
|
13435
|
-
/**
|
|
13436
|
-
* @remarks
|
|
13437
|
-
* The entity being tracked by this waypoint.
|
|
13438
|
-
*
|
|
13439
|
-
* @throws This property can throw when used.
|
|
13440
|
-
*
|
|
13441
|
-
* {@link InvalidWaypointError}
|
|
13442
|
-
*
|
|
13443
|
-
* {@link InvalidWaypointTextureSelectorError}
|
|
13444
|
-
*/
|
|
13445
|
-
readonly entity: Entity;
|
|
13446
|
-
/**
|
|
13447
|
-
* @remarks
|
|
13448
|
-
* The visibility rules that control when the waypoint is shown
|
|
13449
|
-
* based on the entity's state (e.g., sneaking, invisible,
|
|
13450
|
-
* dead).
|
|
13451
|
-
*
|
|
13452
|
-
* @throws This property can throw when used.
|
|
13453
|
-
*
|
|
13454
|
-
* {@link InvalidWaypointError}
|
|
13455
|
-
*
|
|
13456
|
-
* {@link InvalidWaypointTextureSelectorError}
|
|
13457
|
-
*/
|
|
13458
|
-
readonly entityRules: EntityVisibilityRules;
|
|
13459
|
-
/**
|
|
13460
|
-
* @throws This function can throw errors.
|
|
13461
|
-
*
|
|
13462
|
-
* {@link InvalidWaypointTextureSelectorError}
|
|
13463
|
-
*/
|
|
13464
|
-
constructor(
|
|
13465
|
-
entity: Entity,
|
|
13466
|
-
textureSelector: WaypointTextureSelector,
|
|
13467
|
-
entityRules: EntityVisibilityRules,
|
|
13468
|
-
color?: RGB,
|
|
13469
|
-
);
|
|
13470
|
-
}
|
|
13471
|
-
|
|
13472
12339
|
/**
|
|
13473
12340
|
* Loot item function that modifies a dropped treasure map to
|
|
13474
12341
|
* mark a location.
|
|
@@ -13889,13 +12756,6 @@ export class GameRules {
|
|
|
13889
12756
|
*
|
|
13890
12757
|
*/
|
|
13891
12758
|
keepInventory: boolean;
|
|
13892
|
-
/**
|
|
13893
|
-
* @beta
|
|
13894
|
-
* @remarks
|
|
13895
|
-
* This property can't be edited in restricted-execution mode.
|
|
13896
|
-
*
|
|
13897
|
-
*/
|
|
13898
|
-
locatorBar: boolean;
|
|
13899
12759
|
/**
|
|
13900
12760
|
* @remarks
|
|
13901
12761
|
* This property can't be edited in restricted-execution mode.
|
|
@@ -16220,175 +15080,6 @@ export class ListBlockVolume extends BlockVolumeBase {
|
|
|
16220
15080
|
remove(locations: Vector3[]): void;
|
|
16221
15081
|
}
|
|
16222
15082
|
|
|
16223
|
-
/**
|
|
16224
|
-
* @beta
|
|
16225
|
-
* Waypoint that points to a fixed location in the world.
|
|
16226
|
-
* Unlike entity waypoints, location waypoints always remain
|
|
16227
|
-
* valid and their position can be updated.
|
|
16228
|
-
*/
|
|
16229
|
-
// @ts-ignore Class inheritance allowed for native defined classes
|
|
16230
|
-
export class LocationWaypoint extends Waypoint {
|
|
16231
|
-
/**
|
|
16232
|
-
* @throws This function can throw errors.
|
|
16233
|
-
*
|
|
16234
|
-
* {@link InvalidWaypointTextureSelectorError}
|
|
16235
|
-
*/
|
|
16236
|
-
constructor(dimensionLocation: DimensionLocation, textureSelector: WaypointTextureSelector, color?: RGB);
|
|
16237
|
-
/**
|
|
16238
|
-
* @remarks
|
|
16239
|
-
* Updates the dimension and location that this waypoint points
|
|
16240
|
-
* to.
|
|
16241
|
-
*
|
|
16242
|
-
* This function can't be called in restricted-execution mode.
|
|
16243
|
-
*
|
|
16244
|
-
* @param dimensionLocation
|
|
16245
|
-
* The new {@link DimensionLocation} (dimension and
|
|
16246
|
-
* coordinates) for the waypoint.
|
|
16247
|
-
*/
|
|
16248
|
-
setDimensionLocation(dimensionLocation: DimensionLocation): void;
|
|
16249
|
-
}
|
|
16250
|
-
|
|
16251
|
-
/**
|
|
16252
|
-
* @beta
|
|
16253
|
-
* Manages the collection of waypoints displayed on a player's
|
|
16254
|
-
* locator bar. Allows adding, removing, and querying waypoints
|
|
16255
|
-
* with a maximum capacity limit.
|
|
16256
|
-
*
|
|
16257
|
-
* Invalid waypoints in the locator bar will be automatically
|
|
16258
|
-
* removed in the next tick. This includes waypoints tied to
|
|
16259
|
-
* entities that have been removed from the world.
|
|
16260
|
-
*
|
|
16261
|
-
* Note: You can control whether vanilla player waypoints are
|
|
16262
|
-
* automatically added to the locator bar using the
|
|
16263
|
-
* `locatorbar` {@link GameRule}. This game rule is currently
|
|
16264
|
-
* named `locatorbar` but will likely be renamed in a future
|
|
16265
|
-
* update to be more descriptive.
|
|
16266
|
-
*
|
|
16267
|
-
* Note: You can only modify, remove, or query waypoints that
|
|
16268
|
-
* were added by this pack.
|
|
16269
|
-
* @example sharedWaypoint.ts
|
|
16270
|
-
* ```typescript
|
|
16271
|
-
* /\*
|
|
16272
|
-
* import { world, LocationWaypoint, WaypointTextureSelector, WaypointTexture } from "@minecraft/server"
|
|
16273
|
-
*
|
|
16274
|
-
* function sharedWaypoint() {
|
|
16275
|
-
* const players = world.getAllPlayers();
|
|
16276
|
-
*
|
|
16277
|
-
* if (players.length < 2) {
|
|
16278
|
-
* console.warn("Need at least 2 players for this example.");
|
|
16279
|
-
* return;
|
|
16280
|
-
* }
|
|
16281
|
-
*
|
|
16282
|
-
* const playerA = players[0];
|
|
16283
|
-
* const playerB = players[1];
|
|
16284
|
-
*
|
|
16285
|
-
* // Create a single waypoint at a specific location
|
|
16286
|
-
* const textureSelector: WaypointTextureSelector = {
|
|
16287
|
-
* textureBoundsList: [
|
|
16288
|
-
* { lowerBound: 0, texture: WaypointTexture.Circle }
|
|
16289
|
-
* ]
|
|
16290
|
-
* };
|
|
16291
|
-
*
|
|
16292
|
-
* const waypoint = new LocationWaypoint(
|
|
16293
|
-
* { dimension: playerA.dimension, x: 100, y: 64, z: 100 },
|
|
16294
|
-
* textureSelector,
|
|
16295
|
-
* { red: 1, green: 0, blue: 0 } // Initially red
|
|
16296
|
-
* );
|
|
16297
|
-
*
|
|
16298
|
-
* // Add the same waypoint to both players' locator bars
|
|
16299
|
-
* playerA.locatorBar.addWaypoint(waypoint);
|
|
16300
|
-
* playerB.locatorBar.addWaypoint(waypoint);
|
|
16301
|
-
*
|
|
16302
|
-
* // Change the color - this affects both players
|
|
16303
|
-
* waypoint.color = { red: 0, green: 1, blue: 0 }; // Now green for both players
|
|
16304
|
-
* }
|
|
16305
|
-
* *\/
|
|
16306
|
-
* ```
|
|
16307
|
-
*/
|
|
16308
|
-
export class LocatorBar {
|
|
16309
|
-
private constructor();
|
|
16310
|
-
/**
|
|
16311
|
-
* @remarks
|
|
16312
|
-
* The current number of waypoints in the locator bar.
|
|
16313
|
-
*
|
|
16314
|
-
*/
|
|
16315
|
-
readonly count: number;
|
|
16316
|
-
/**
|
|
16317
|
-
* @remarks
|
|
16318
|
-
* The maximum number of waypoints that can be added to the
|
|
16319
|
-
* locator bar.
|
|
16320
|
-
*
|
|
16321
|
-
*/
|
|
16322
|
-
readonly maxCount: number;
|
|
16323
|
-
/**
|
|
16324
|
-
* @remarks
|
|
16325
|
-
* Adds a waypoint to the locator bar. Throws an error if the
|
|
16326
|
-
* waypoint already exists, the maximum waypoint limit has been
|
|
16327
|
-
* reached, or the waypoint is invalid.
|
|
16328
|
-
*
|
|
16329
|
-
* This function can't be called in restricted-execution mode.
|
|
16330
|
-
*
|
|
16331
|
-
* @param waypoint
|
|
16332
|
-
* The {@link Waypoint} to add to the locator bar.
|
|
16333
|
-
* @throws This function can throw errors.
|
|
16334
|
-
*
|
|
16335
|
-
* {@link minecraftcommon.EngineError}
|
|
16336
|
-
*
|
|
16337
|
-
* {@link InvalidWaypointError}
|
|
16338
|
-
*
|
|
16339
|
-
* {@link LocatorBarError}
|
|
16340
|
-
*/
|
|
16341
|
-
addWaypoint(waypoint: Waypoint): void;
|
|
16342
|
-
/**
|
|
16343
|
-
* @remarks
|
|
16344
|
-
* Returns an array of all waypoints currently in the locator
|
|
16345
|
-
* bar.
|
|
16346
|
-
*
|
|
16347
|
-
* This function can't be called in restricted-execution mode.
|
|
16348
|
-
*
|
|
16349
|
-
*/
|
|
16350
|
-
getAllWaypoints(): Waypoint[];
|
|
16351
|
-
/**
|
|
16352
|
-
* @remarks
|
|
16353
|
-
* Checks whether the specified waypoint exists in the locator
|
|
16354
|
-
* bar.
|
|
16355
|
-
*
|
|
16356
|
-
* This function can't be called in restricted-execution mode.
|
|
16357
|
-
*
|
|
16358
|
-
* @param waypoint
|
|
16359
|
-
* The {@link Waypoint} to check for.
|
|
16360
|
-
*/
|
|
16361
|
-
hasWaypoint(waypoint: Waypoint): boolean;
|
|
16362
|
-
/**
|
|
16363
|
-
* @remarks
|
|
16364
|
-
* Removes all waypoints from the locator bar, clearing it
|
|
16365
|
-
* completely.
|
|
16366
|
-
*
|
|
16367
|
-
* This function can't be called in restricted-execution mode.
|
|
16368
|
-
*
|
|
16369
|
-
* @throws This function can throw errors.
|
|
16370
|
-
*
|
|
16371
|
-
* {@link minecraftcommon.EngineError}
|
|
16372
|
-
*/
|
|
16373
|
-
removeAllWaypoints(): void;
|
|
16374
|
-
/**
|
|
16375
|
-
* @remarks
|
|
16376
|
-
* Removes a specific waypoint from the locator bar. Returns an
|
|
16377
|
-
* error if the waypoint does not exist in the locator bar.
|
|
16378
|
-
*
|
|
16379
|
-
* This function can't be called in restricted-execution mode.
|
|
16380
|
-
*
|
|
16381
|
-
* @param waypoint
|
|
16382
|
-
* The {@link Waypoint} to remove from the locator bar.
|
|
16383
|
-
* @throws This function can throw errors.
|
|
16384
|
-
*
|
|
16385
|
-
* {@link minecraftcommon.EngineError}
|
|
16386
|
-
*
|
|
16387
|
-
* {@link LocatorBarError}
|
|
16388
|
-
*/
|
|
16389
|
-
removeWaypoint(waypoint: Waypoint): void;
|
|
16390
|
-
}
|
|
16391
|
-
|
|
16392
15083
|
/**
|
|
16393
15084
|
* Loot item function that drops extra items if the provided
|
|
16394
15085
|
* tool has the looting enchant.
|
|
@@ -16767,33 +15458,6 @@ export class MatchToolCondition extends LootItemCondition {
|
|
|
16767
15458
|
readonly itemTagsNone: string[];
|
|
16768
15459
|
}
|
|
16769
15460
|
|
|
16770
|
-
/**
|
|
16771
|
-
* @beta
|
|
16772
|
-
* A specific currently-internal event used for passing
|
|
16773
|
-
* messages from client to server.
|
|
16774
|
-
*/
|
|
16775
|
-
export class MessageReceiveAfterEvent {
|
|
16776
|
-
private constructor();
|
|
16777
|
-
/**
|
|
16778
|
-
* @remarks
|
|
16779
|
-
* The message identifier.
|
|
16780
|
-
*
|
|
16781
|
-
*/
|
|
16782
|
-
readonly id: string;
|
|
16783
|
-
/**
|
|
16784
|
-
* @remarks
|
|
16785
|
-
* The message.
|
|
16786
|
-
*
|
|
16787
|
-
*/
|
|
16788
|
-
readonly message: string;
|
|
16789
|
-
/**
|
|
16790
|
-
* @remarks
|
|
16791
|
-
* The player who sent the message.
|
|
16792
|
-
*
|
|
16793
|
-
*/
|
|
16794
|
-
readonly player: Player;
|
|
16795
|
-
}
|
|
16796
|
-
|
|
16797
15461
|
/**
|
|
16798
15462
|
* Contains a set of additional variable values for further
|
|
16799
15463
|
* defining how rendering and animations function.
|
|
@@ -16862,49 +15526,6 @@ export class MolangVariableMap {
|
|
|
16862
15526
|
setVector3(variableName: string, vector: Vector3): void;
|
|
16863
15527
|
}
|
|
16864
15528
|
|
|
16865
|
-
/**
|
|
16866
|
-
* @beta
|
|
16867
|
-
* Pack setting name and value that changed.
|
|
16868
|
-
*/
|
|
16869
|
-
export class PackSettingChangeAfterEvent {
|
|
16870
|
-
private constructor();
|
|
16871
|
-
/**
|
|
16872
|
-
* @remarks
|
|
16873
|
-
* The name of the setting.
|
|
16874
|
-
*
|
|
16875
|
-
*/
|
|
16876
|
-
readonly settingName: string;
|
|
16877
|
-
/**
|
|
16878
|
-
* @remarks
|
|
16879
|
-
* The value of the setting.
|
|
16880
|
-
*
|
|
16881
|
-
*/
|
|
16882
|
-
readonly settingValue: boolean | number | string;
|
|
16883
|
-
}
|
|
16884
|
-
|
|
16885
|
-
/**
|
|
16886
|
-
* @beta
|
|
16887
|
-
*/
|
|
16888
|
-
export class PackSettingChangeAfterEventSignal {
|
|
16889
|
-
private constructor();
|
|
16890
|
-
/**
|
|
16891
|
-
* @remarks
|
|
16892
|
-
* This function can't be called in restricted-execution mode.
|
|
16893
|
-
*
|
|
16894
|
-
* This function can be called in early-execution mode.
|
|
16895
|
-
*
|
|
16896
|
-
*/
|
|
16897
|
-
subscribe(callback: (arg0: PackSettingChangeAfterEvent) => void): (arg0: PackSettingChangeAfterEvent) => void;
|
|
16898
|
-
/**
|
|
16899
|
-
* @remarks
|
|
16900
|
-
* This function can't be called in restricted-execution mode.
|
|
16901
|
-
*
|
|
16902
|
-
* This function can be called in early-execution mode.
|
|
16903
|
-
*
|
|
16904
|
-
*/
|
|
16905
|
-
unsubscribe(callback: (arg0: PackSettingChangeAfterEvent) => void): void;
|
|
16906
|
-
}
|
|
16907
|
-
|
|
16908
15529
|
/**
|
|
16909
15530
|
* Loot item condition that checks whether the looting entity
|
|
16910
15531
|
* is currently a passenger of a specific type of entity.
|
|
@@ -17132,14 +15753,6 @@ export class Player extends Entity {
|
|
|
17132
15753
|
* @throws This property can throw when used.
|
|
17133
15754
|
*/
|
|
17134
15755
|
readonly level: number;
|
|
17135
|
-
/**
|
|
17136
|
-
* @beta
|
|
17137
|
-
* @remarks
|
|
17138
|
-
* The player's Locator Bar. This property is used for managing
|
|
17139
|
-
* waypoints displayed on the HUD.
|
|
17140
|
-
*
|
|
17141
|
-
*/
|
|
17142
|
-
readonly locatorBar: LocatorBar;
|
|
17143
15756
|
/**
|
|
17144
15757
|
* @remarks
|
|
17145
15758
|
* Name of the player.
|
|
@@ -17155,13 +15768,6 @@ export class Player extends Entity {
|
|
|
17155
15768
|
* @throws This property can throw when used.
|
|
17156
15769
|
*/
|
|
17157
15770
|
readonly onScreenDisplay: ScreenDisplay;
|
|
17158
|
-
/**
|
|
17159
|
-
* @beta
|
|
17160
|
-
* @throws This property can throw when used.
|
|
17161
|
-
*
|
|
17162
|
-
* {@link InvalidEntityError}
|
|
17163
|
-
*/
|
|
17164
|
-
readonly partyId?: string;
|
|
17165
15771
|
/**
|
|
17166
15772
|
* @throws This property can throw when used.
|
|
17167
15773
|
*
|
|
@@ -17236,21 +15842,7 @@ export class Player extends Entity {
|
|
|
17236
15842
|
*/
|
|
17237
15843
|
clearPropertyOverridesForEntity(targetEntity: Entity | string): void;
|
|
17238
15844
|
/**
|
|
17239
|
-
* @
|
|
17240
|
-
* @remarks
|
|
17241
|
-
* Eats an item, providing the item's hunger and saturation
|
|
17242
|
-
* effects to the player. Can only be used on food items.
|
|
17243
|
-
*
|
|
17244
|
-
* This function can't be called in restricted-execution mode.
|
|
17245
|
-
*
|
|
17246
|
-
* @param itemStack
|
|
17247
|
-
* The item to eat.
|
|
17248
|
-
* @throws
|
|
17249
|
-
* Throws if the item is not a food item.
|
|
17250
|
-
*/
|
|
17251
|
-
eatItem(itemStack: ItemStack): void;
|
|
17252
|
-
/**
|
|
17253
|
-
* @beta
|
|
15845
|
+
* @rc
|
|
17254
15846
|
* @remarks
|
|
17255
15847
|
* The player's aim-assist settings.
|
|
17256
15848
|
*
|
|
@@ -17350,17 +15942,6 @@ export class Player extends Entity {
|
|
|
17350
15942
|
* ```
|
|
17351
15943
|
*/
|
|
17352
15944
|
playSound(soundId: string, soundOptions?: PlayerSoundOptions): void;
|
|
17353
|
-
/**
|
|
17354
|
-
* @beta
|
|
17355
|
-
* @remarks
|
|
17356
|
-
* This is an internal-facing method for posting a system
|
|
17357
|
-
* message to downstream clients.
|
|
17358
|
-
*
|
|
17359
|
-
* This function can't be called in restricted-execution mode.
|
|
17360
|
-
*
|
|
17361
|
-
* @throws This function can throw errors.
|
|
17362
|
-
*/
|
|
17363
|
-
postClientMessage(id: string, value: string): void;
|
|
17364
15945
|
/**
|
|
17365
15946
|
* @remarks
|
|
17366
15947
|
* Queues an additional music track that only this particular
|
|
@@ -17638,18 +16219,6 @@ export class Player extends Entity {
|
|
|
17638
16219
|
* @throws This function can throw errors.
|
|
17639
16220
|
*/
|
|
17640
16221
|
startItemCooldown(cooldownCategory: string, tickDuration: number): void;
|
|
17641
|
-
/**
|
|
17642
|
-
* @beta
|
|
17643
|
-
* @remarks
|
|
17644
|
-
* Stops all sounds from playing for this particular player.
|
|
17645
|
-
*
|
|
17646
|
-
* This function can't be called in restricted-execution mode.
|
|
17647
|
-
*
|
|
17648
|
-
* @throws This function can throw errors.
|
|
17649
|
-
*
|
|
17650
|
-
* {@link InvalidEntityError}
|
|
17651
|
-
*/
|
|
17652
|
-
stopAllSounds(): void;
|
|
17653
16222
|
/**
|
|
17654
16223
|
* @remarks
|
|
17655
16224
|
* Stops any music tracks from playing for this particular
|
|
@@ -17660,24 +16229,10 @@ export class Player extends Entity {
|
|
|
17660
16229
|
* @throws This function can throw errors.
|
|
17661
16230
|
*/
|
|
17662
16231
|
stopMusic(): void;
|
|
17663
|
-
/**
|
|
17664
|
-
* @beta
|
|
17665
|
-
* @remarks
|
|
17666
|
-
* Stops a sound from playing for this particular player.
|
|
17667
|
-
*
|
|
17668
|
-
* This function can't be called in restricted-execution mode.
|
|
17669
|
-
*
|
|
17670
|
-
* @param soundId
|
|
17671
|
-
* Identifier of the sound.
|
|
17672
|
-
* @throws This function can throw errors.
|
|
17673
|
-
*
|
|
17674
|
-
* {@link InvalidEntityError}
|
|
17675
|
-
*/
|
|
17676
|
-
stopSound(soundId: string): void;
|
|
17677
16232
|
}
|
|
17678
16233
|
|
|
17679
16234
|
/**
|
|
17680
|
-
* @
|
|
16235
|
+
* @rc
|
|
17681
16236
|
* A container for APIs related to player aim-assist.
|
|
17682
16237
|
*/
|
|
17683
16238
|
export class PlayerAimAssist {
|
|
@@ -18959,88 +17514,6 @@ export class PlayerPlaceBlockAfterEventSignal {
|
|
|
18959
17514
|
unsubscribe(callback: (arg0: PlayerPlaceBlockAfterEvent) => void): void;
|
|
18960
17515
|
}
|
|
18961
17516
|
|
|
18962
|
-
/**
|
|
18963
|
-
* @beta
|
|
18964
|
-
* Contains information regarding an event before a player
|
|
18965
|
-
* places a block.
|
|
18966
|
-
*/
|
|
18967
|
-
// @ts-ignore Class inheritance allowed for native defined classes
|
|
18968
|
-
export class PlayerPlaceBlockBeforeEvent extends BlockEvent {
|
|
18969
|
-
private constructor();
|
|
18970
|
-
/**
|
|
18971
|
-
* @remarks
|
|
18972
|
-
* If set to true, cancels the block place event.
|
|
18973
|
-
*
|
|
18974
|
-
*/
|
|
18975
|
-
cancel: boolean;
|
|
18976
|
-
/**
|
|
18977
|
-
* @remarks
|
|
18978
|
-
* The face of the block that the new block is being placed on.
|
|
18979
|
-
*
|
|
18980
|
-
*/
|
|
18981
|
-
readonly face: Direction;
|
|
18982
|
-
/**
|
|
18983
|
-
* @remarks
|
|
18984
|
-
* Location relative to the bottom north-west corner of the
|
|
18985
|
-
* block where the new block is being placed onto.
|
|
18986
|
-
*
|
|
18987
|
-
*/
|
|
18988
|
-
readonly faceLocation: Vector3;
|
|
18989
|
-
/**
|
|
18990
|
-
* @remarks
|
|
18991
|
-
* The block permutation that will be placed if the event is
|
|
18992
|
-
* not cancelled.
|
|
18993
|
-
*
|
|
18994
|
-
*/
|
|
18995
|
-
readonly permutationToPlace: BlockPermutation;
|
|
18996
|
-
/**
|
|
18997
|
-
* @remarks
|
|
18998
|
-
* Player that is placing the block for this event.
|
|
18999
|
-
*
|
|
19000
|
-
*/
|
|
19001
|
-
readonly player: Player;
|
|
19002
|
-
}
|
|
19003
|
-
|
|
19004
|
-
/**
|
|
19005
|
-
* @beta
|
|
19006
|
-
* Manages callbacks that are connected to before a block is
|
|
19007
|
-
* placed by a player.
|
|
19008
|
-
*/
|
|
19009
|
-
export class PlayerPlaceBlockBeforeEventSignal {
|
|
19010
|
-
private constructor();
|
|
19011
|
-
/**
|
|
19012
|
-
* @remarks
|
|
19013
|
-
* Adds a callback that will be called before a block is placed
|
|
19014
|
-
* by a player.
|
|
19015
|
-
*
|
|
19016
|
-
* This function can't be called in restricted-execution mode.
|
|
19017
|
-
*
|
|
19018
|
-
* This function can be called in early-execution mode.
|
|
19019
|
-
*
|
|
19020
|
-
* @param callback
|
|
19021
|
-
* This closure is called with restricted-execution privilege.
|
|
19022
|
-
* @returns
|
|
19023
|
-
* Closure that is called with restricted-execution privilege.
|
|
19024
|
-
*/
|
|
19025
|
-
subscribe(
|
|
19026
|
-
callback: (arg0: PlayerPlaceBlockBeforeEvent) => void,
|
|
19027
|
-
options?: BlockEventOptions,
|
|
19028
|
-
): (arg0: PlayerPlaceBlockBeforeEvent) => void;
|
|
19029
|
-
/**
|
|
19030
|
-
* @remarks
|
|
19031
|
-
* Removes a callback from being called before an block is
|
|
19032
|
-
* placed by a player.
|
|
19033
|
-
*
|
|
19034
|
-
* This function can't be called in restricted-execution mode.
|
|
19035
|
-
*
|
|
19036
|
-
* This function can be called in early-execution mode.
|
|
19037
|
-
*
|
|
19038
|
-
* @param callback
|
|
19039
|
-
* This closure is called with restricted-execution privilege.
|
|
19040
|
-
*/
|
|
19041
|
-
unsubscribe(callback: (arg0: PlayerPlaceBlockBeforeEvent) => void): void;
|
|
19042
|
-
}
|
|
19043
|
-
|
|
19044
17517
|
/**
|
|
19045
17518
|
* An event that contains more information about a player
|
|
19046
17519
|
* spawning.
|
|
@@ -19159,114 +17632,6 @@ export class PlayerSwingStartAfterEventSignal {
|
|
|
19159
17632
|
unsubscribe(callback: (arg0: PlayerSwingStartAfterEvent) => void): void;
|
|
19160
17633
|
}
|
|
19161
17634
|
|
|
19162
|
-
/**
|
|
19163
|
-
* @beta
|
|
19164
|
-
* Contains information related to when a player successfully
|
|
19165
|
-
* names an Entity with a named Name Tag item.
|
|
19166
|
-
*/
|
|
19167
|
-
export class PlayerUseNameTagAfterEvent {
|
|
19168
|
-
private constructor();
|
|
19169
|
-
/**
|
|
19170
|
-
* @remarks
|
|
19171
|
-
* The entity that was named by the player.
|
|
19172
|
-
*
|
|
19173
|
-
* This property can't be edited in restricted-execution mode.
|
|
19174
|
-
*
|
|
19175
|
-
*/
|
|
19176
|
-
entityNamed: Entity;
|
|
19177
|
-
/**
|
|
19178
|
-
* @remarks
|
|
19179
|
-
* The new name that the player has given to the entity.
|
|
19180
|
-
*
|
|
19181
|
-
* This property can't be edited in restricted-execution mode.
|
|
19182
|
-
*
|
|
19183
|
-
*/
|
|
19184
|
-
newName: string;
|
|
19185
|
-
/**
|
|
19186
|
-
* @remarks
|
|
19187
|
-
* Handle to the player that used the name tag.
|
|
19188
|
-
*
|
|
19189
|
-
* This property can't be edited in restricted-execution mode.
|
|
19190
|
-
*
|
|
19191
|
-
*/
|
|
19192
|
-
player: Player;
|
|
19193
|
-
/**
|
|
19194
|
-
* @remarks
|
|
19195
|
-
* The previous name of the entity before the player used the
|
|
19196
|
-
* name tag. This will be undefined if the entity was not
|
|
19197
|
-
* previously named.
|
|
19198
|
-
*
|
|
19199
|
-
* This property can't be edited in restricted-execution mode.
|
|
19200
|
-
*
|
|
19201
|
-
*/
|
|
19202
|
-
previousName?: string;
|
|
19203
|
-
}
|
|
19204
|
-
|
|
19205
|
-
/**
|
|
19206
|
-
* @beta
|
|
19207
|
-
* Manages callbacks that are connected to when a player
|
|
19208
|
-
* successfully names an Entity with a named Name Tag item.
|
|
19209
|
-
*/
|
|
19210
|
-
export class PlayerUseNameTagAfterEventSignal {
|
|
19211
|
-
private constructor();
|
|
19212
|
-
/**
|
|
19213
|
-
* @remarks
|
|
19214
|
-
* Subscribes the specified callback to a player use name tag
|
|
19215
|
-
* after event.
|
|
19216
|
-
*
|
|
19217
|
-
* This function can't be called in restricted-execution mode.
|
|
19218
|
-
*
|
|
19219
|
-
* This function can be called in early-execution mode.
|
|
19220
|
-
*
|
|
19221
|
-
*/
|
|
19222
|
-
subscribe(callback: (arg0: PlayerUseNameTagAfterEvent) => void): (arg0: PlayerUseNameTagAfterEvent) => void;
|
|
19223
|
-
/**
|
|
19224
|
-
* @remarks
|
|
19225
|
-
* Removes the specified callback from a player use name tag
|
|
19226
|
-
* after event.
|
|
19227
|
-
*
|
|
19228
|
-
* This function can't be called in restricted-execution mode.
|
|
19229
|
-
*
|
|
19230
|
-
* This function can be called in early-execution mode.
|
|
19231
|
-
*
|
|
19232
|
-
*/
|
|
19233
|
-
unsubscribe(callback: (arg0: PlayerUseNameTagAfterEvent) => void): void;
|
|
19234
|
-
}
|
|
19235
|
-
|
|
19236
|
-
/**
|
|
19237
|
-
* @beta
|
|
19238
|
-
* Waypoint that tracks a player's position. Extends {@link
|
|
19239
|
-
* EntityWaypoint} with additional player-specific visibility
|
|
19240
|
-
* rules such as hidden state and spectator mode.
|
|
19241
|
-
*/
|
|
19242
|
-
// @ts-ignore Class inheritance allowed for native defined classes
|
|
19243
|
-
export class PlayerWaypoint extends EntityWaypoint {
|
|
19244
|
-
/**
|
|
19245
|
-
* @remarks
|
|
19246
|
-
* The {@link PlayerVisibilityRules} that control when the
|
|
19247
|
-
* waypoint is shown based on the player's state (e.g., hidden,
|
|
19248
|
-
* spectator mode, spectator viewing another spectator).
|
|
19249
|
-
*
|
|
19250
|
-
* @throws This property can throw when used.
|
|
19251
|
-
*
|
|
19252
|
-
* {@link InvalidWaypointError}
|
|
19253
|
-
*
|
|
19254
|
-
* {@link InvalidWaypointTextureSelectorError}
|
|
19255
|
-
*/
|
|
19256
|
-
readonly playerRules: PlayerVisibilityRules;
|
|
19257
|
-
/**
|
|
19258
|
-
* @throws This function can throw errors.
|
|
19259
|
-
*
|
|
19260
|
-
* {@link InvalidWaypointTextureSelectorError}
|
|
19261
|
-
*/
|
|
19262
|
-
constructor(
|
|
19263
|
-
player: Player,
|
|
19264
|
-
textureSelector: WaypointTextureSelector,
|
|
19265
|
-
playerRules: PlayerVisibilityRules,
|
|
19266
|
-
color?: RGB,
|
|
19267
|
-
);
|
|
19268
|
-
}
|
|
19269
|
-
|
|
19270
17635
|
/**
|
|
19271
17636
|
* Represents how the potion effect is delivered.
|
|
19272
17637
|
*/
|
|
@@ -19349,10 +17714,10 @@ export class Potions {
|
|
|
19349
17714
|
*
|
|
19350
17715
|
* {@link InvalidPotionEffectTypeError}
|
|
19351
17716
|
*/
|
|
19352
|
-
static resolve
|
|
19353
|
-
|
|
19354
|
-
|
|
19355
|
-
|
|
17717
|
+
static resolve(
|
|
17718
|
+
potionEffectType: PotionEffectType | string,
|
|
17719
|
+
potionDeliveryType: PotionDeliveryType | string,
|
|
17720
|
+
): ItemStack;
|
|
19356
17721
|
}
|
|
19357
17722
|
|
|
19358
17723
|
/**
|
|
@@ -20420,38 +18785,6 @@ export class Seat {
|
|
|
20420
18785
|
readonly seatRotation: number;
|
|
20421
18786
|
}
|
|
20422
18787
|
|
|
20423
|
-
/**
|
|
20424
|
-
* @beta
|
|
20425
|
-
* Manages callbacks that are message passing to a server. This
|
|
20426
|
-
* event is not currently fully implemented, and should not be
|
|
20427
|
-
* used.
|
|
20428
|
-
*/
|
|
20429
|
-
export class ServerMessageAfterEventSignal {
|
|
20430
|
-
private constructor();
|
|
20431
|
-
/**
|
|
20432
|
-
* @remarks
|
|
20433
|
-
* Adds a callback that will be called when an internal message
|
|
20434
|
-
* is passed.
|
|
20435
|
-
*
|
|
20436
|
-
* This function can't be called in restricted-execution mode.
|
|
20437
|
-
*
|
|
20438
|
-
* This function can be called in early-execution mode.
|
|
20439
|
-
*
|
|
20440
|
-
*/
|
|
20441
|
-
subscribe(callback: (arg0: MessageReceiveAfterEvent) => void): (arg0: MessageReceiveAfterEvent) => void;
|
|
20442
|
-
/**
|
|
20443
|
-
* @remarks
|
|
20444
|
-
* Removes a callback from being called when an internal
|
|
20445
|
-
* message is passed.
|
|
20446
|
-
*
|
|
20447
|
-
* This function can't be called in restricted-execution mode.
|
|
20448
|
-
*
|
|
20449
|
-
* This function can be called in early-execution mode.
|
|
20450
|
-
*
|
|
20451
|
-
*/
|
|
20452
|
-
unsubscribe(callback: (arg0: MessageReceiveAfterEvent) => void): void;
|
|
20453
|
-
}
|
|
20454
|
-
|
|
20455
18788
|
/**
|
|
20456
18789
|
* Loot item function that modifies the trim on a dropped armor
|
|
20457
18790
|
* item.
|
|
@@ -20480,21 +18813,6 @@ export class SetArmorTrimFunction extends LootItemFunction {
|
|
|
20480
18813
|
// @ts-ignore Class inheritance allowed for native defined classes
|
|
20481
18814
|
export class SetBannerDetailsFunction extends LootItemFunction {
|
|
20482
18815
|
private constructor();
|
|
20483
|
-
/**
|
|
20484
|
-
* @beta
|
|
20485
|
-
* @remarks
|
|
20486
|
-
* The base color for the dropped banner.
|
|
20487
|
-
*
|
|
20488
|
-
*/
|
|
20489
|
-
readonly baseColor: string;
|
|
20490
|
-
/**
|
|
20491
|
-
* @beta
|
|
20492
|
-
* @remarks
|
|
20493
|
-
* An array of {@link BannerPattern} objects used to decorate
|
|
20494
|
-
* the banner, including color and pattern type.
|
|
20495
|
-
*
|
|
20496
|
-
*/
|
|
20497
|
-
readonly patterns: BannerPattern[];
|
|
20498
18816
|
/**
|
|
20499
18817
|
* @remarks
|
|
20500
18818
|
* The type of banner to drop.
|
|
@@ -21039,8 +19357,14 @@ export class StructureManager {
|
|
|
21039
19357
|
get(identifier: string): Structure | undefined;
|
|
21040
19358
|
/**
|
|
21041
19359
|
* @remarks
|
|
19360
|
+
* Returns a list of all structures saved to the world and to
|
|
19361
|
+
* memory. Does not include structures contained in behavior
|
|
19362
|
+
* packs.
|
|
19363
|
+
*
|
|
21042
19364
|
* This function can't be called in restricted-execution mode.
|
|
21043
19365
|
*
|
|
19366
|
+
* @returns
|
|
19367
|
+
* The list of structure identifiers.
|
|
21044
19368
|
*/
|
|
21045
19369
|
getWorldStructureIds(): string[];
|
|
21046
19370
|
/**
|
|
@@ -21427,19 +19751,6 @@ export class SystemBeforeEvents {
|
|
|
21427
19751
|
*
|
|
21428
19752
|
*/
|
|
21429
19753
|
readonly startup: StartupBeforeEventSignal;
|
|
21430
|
-
/**
|
|
21431
|
-
* @beta
|
|
21432
|
-
* @remarks
|
|
21433
|
-
* Fires when the scripting watchdog shuts down the server. The
|
|
21434
|
-
* can be due to using too much memory, or by causing
|
|
21435
|
-
* significant slowdown or hang.
|
|
21436
|
-
* To prevent shutdown, set the event's cancel property to
|
|
21437
|
-
* true.
|
|
21438
|
-
*
|
|
21439
|
-
* This property can be read in early-execution mode.
|
|
21440
|
-
*
|
|
21441
|
-
*/
|
|
21442
|
-
readonly watchdogTerminate: WatchdogTerminateBeforeEventSignal;
|
|
21443
19754
|
}
|
|
21444
19755
|
|
|
21445
19756
|
/**
|
|
@@ -21717,192 +20028,47 @@ export class TripWireTripAfterEvent extends BlockEvent {
|
|
|
21717
20028
|
* return -1;
|
|
21718
20029
|
* }
|
|
21719
20030
|
*
|
|
21720
|
-
* redstone.setPermutation(BlockPermutation.resolve(MinecraftBlockTypes.RedstoneBlock));
|
|
21721
|
-
* tripwire.setPermutation(BlockPermutation.resolve(MinecraftBlockTypes.TripWire));
|
|
21722
|
-
*
|
|
21723
|
-
* world.afterEvents.tripWireTrip.subscribe((tripWireTripEvent: TripWireTripAfterEvent) => {
|
|
21724
|
-
* const eventLoc = tripWireTripEvent.block.location;
|
|
21725
|
-
*
|
|
21726
|
-
* if (eventLoc.x === targetLocation.x && eventLoc.y === targetLocation.y && eventLoc.z === targetLocation.z) {
|
|
21727
|
-
* log(
|
|
21728
|
-
* "Tripwire trip event at tick " +
|
|
21729
|
-
* system.currentTick +
|
|
21730
|
-
* (tripWireTripEvent.sources.length > 0 ? " by entity " + tripWireTripEvent.sources[0].id : "")
|
|
21731
|
-
* );
|
|
21732
|
-
* }
|
|
21733
|
-
* });
|
|
21734
|
-
* }
|
|
21735
|
-
* ```
|
|
21736
|
-
*/
|
|
21737
|
-
export class TripWireTripAfterEventSignal {
|
|
21738
|
-
private constructor();
|
|
21739
|
-
/**
|
|
21740
|
-
* @remarks
|
|
21741
|
-
* Adds a callback that will be called when a trip wire is
|
|
21742
|
-
* tripped.
|
|
21743
|
-
*
|
|
21744
|
-
* This function can't be called in restricted-execution mode.
|
|
21745
|
-
*
|
|
21746
|
-
* This function can be called in early-execution mode.
|
|
21747
|
-
*
|
|
21748
|
-
*/
|
|
21749
|
-
subscribe(callback: (arg0: TripWireTripAfterEvent) => void): (arg0: TripWireTripAfterEvent) => void;
|
|
21750
|
-
/**
|
|
21751
|
-
* @remarks
|
|
21752
|
-
* Removes a callback from being called when a trip wire is
|
|
21753
|
-
* tripped.
|
|
21754
|
-
*
|
|
21755
|
-
* This function can't be called in restricted-execution mode.
|
|
21756
|
-
*
|
|
21757
|
-
* This function can be called in early-execution mode.
|
|
21758
|
-
*
|
|
21759
|
-
*/
|
|
21760
|
-
unsubscribe(callback: (arg0: TripWireTripAfterEvent) => void): void;
|
|
21761
|
-
}
|
|
21762
|
-
|
|
21763
|
-
/**
|
|
21764
|
-
* @beta
|
|
21765
|
-
* Contains information related to a script watchdog
|
|
21766
|
-
* termination.
|
|
21767
|
-
*/
|
|
21768
|
-
export class WatchdogTerminateBeforeEvent {
|
|
21769
|
-
private constructor();
|
|
21770
|
-
/**
|
|
21771
|
-
* @remarks
|
|
21772
|
-
* If set to true, cancels the termination of the script
|
|
21773
|
-
* runtime. Note that depending on server configuration
|
|
21774
|
-
* settings, cancellation of the termination may not be
|
|
21775
|
-
* allowed.
|
|
21776
|
-
*
|
|
21777
|
-
*/
|
|
21778
|
-
cancel: boolean;
|
|
21779
|
-
/**
|
|
21780
|
-
* @remarks
|
|
21781
|
-
* Contains the reason why a script runtime is to be
|
|
21782
|
-
* terminated.
|
|
21783
|
-
*
|
|
21784
|
-
*/
|
|
21785
|
-
readonly terminateReason: WatchdogTerminateReason;
|
|
21786
|
-
}
|
|
21787
|
-
|
|
21788
|
-
/**
|
|
21789
|
-
* @beta
|
|
21790
|
-
* Manages callbacks that are connected to a callback that will
|
|
21791
|
-
* be called when a script runtime is being terminated due to a
|
|
21792
|
-
* violation of the performance watchdog system.
|
|
21793
|
-
*/
|
|
21794
|
-
export class WatchdogTerminateBeforeEventSignal {
|
|
21795
|
-
private constructor();
|
|
21796
|
-
/**
|
|
21797
|
-
* @remarks
|
|
21798
|
-
* Adds a callback that will be called when a script runtime is
|
|
21799
|
-
* being terminated due to a violation of the performance
|
|
21800
|
-
* watchdog system.
|
|
21801
|
-
*
|
|
21802
|
-
* This function can't be called in restricted-execution mode.
|
|
21803
|
-
*
|
|
21804
|
-
* This function can be called in early-execution mode.
|
|
21805
|
-
*
|
|
21806
|
-
* @param callback
|
|
21807
|
-
* This closure is called with restricted-execution privilege.
|
|
21808
|
-
* @returns
|
|
21809
|
-
* Closure that is called with restricted-execution privilege.
|
|
21810
|
-
*/
|
|
21811
|
-
subscribe(callback: (arg0: WatchdogTerminateBeforeEvent) => void): (arg0: WatchdogTerminateBeforeEvent) => void;
|
|
21812
|
-
/**
|
|
21813
|
-
* @remarks
|
|
21814
|
-
* Removes a callback from being called when a script runtime
|
|
21815
|
-
* is being terminated due to a violation of the performance
|
|
21816
|
-
* watchdog system.
|
|
21817
|
-
*
|
|
21818
|
-
* This function can't be called in restricted-execution mode.
|
|
21819
|
-
*
|
|
21820
|
-
* This function can be called in early-execution mode.
|
|
21821
|
-
*
|
|
21822
|
-
* @param callback
|
|
21823
|
-
* This closure is called with restricted-execution privilege.
|
|
21824
|
-
*/
|
|
21825
|
-
unsubscribe(callback: (arg0: WatchdogTerminateBeforeEvent) => void): void;
|
|
21826
|
-
}
|
|
21827
|
-
|
|
21828
|
-
/**
|
|
21829
|
-
* @beta
|
|
21830
|
-
* Base class for waypoints displayed on the player's locator
|
|
21831
|
-
* bar. Waypoints can track locations or entities and are
|
|
21832
|
-
* rendered with customizable textures and colors.
|
|
20031
|
+
* redstone.setPermutation(BlockPermutation.resolve(MinecraftBlockTypes.RedstoneBlock));
|
|
20032
|
+
* tripwire.setPermutation(BlockPermutation.resolve(MinecraftBlockTypes.TripWire));
|
|
20033
|
+
*
|
|
20034
|
+
* world.afterEvents.tripWireTrip.subscribe((tripWireTripEvent: TripWireTripAfterEvent) => {
|
|
20035
|
+
* const eventLoc = tripWireTripEvent.block.location;
|
|
21833
20036
|
*
|
|
21834
|
-
*
|
|
21835
|
-
*
|
|
21836
|
-
*
|
|
21837
|
-
*
|
|
21838
|
-
*
|
|
21839
|
-
*
|
|
21840
|
-
*
|
|
20037
|
+
* if (eventLoc.x === targetLocation.x && eventLoc.y === targetLocation.y && eventLoc.z === targetLocation.z) {
|
|
20038
|
+
* log(
|
|
20039
|
+
* "Tripwire trip event at tick " +
|
|
20040
|
+
* system.currentTick +
|
|
20041
|
+
* (tripWireTripEvent.sources.length > 0 ? " by entity " + tripWireTripEvent.sources[0].id : "")
|
|
20042
|
+
* );
|
|
20043
|
+
* }
|
|
20044
|
+
* });
|
|
20045
|
+
* }
|
|
20046
|
+
* ```
|
|
21841
20047
|
*/
|
|
21842
|
-
export class
|
|
20048
|
+
export class TripWireTripAfterEventSignal {
|
|
21843
20049
|
private constructor();
|
|
21844
20050
|
/**
|
|
21845
20051
|
* @remarks
|
|
21846
|
-
*
|
|
21847
|
-
*
|
|
21848
|
-
*
|
|
21849
|
-
* This property can't be edited in restricted-execution mode.
|
|
21850
|
-
*
|
|
21851
|
-
*/
|
|
21852
|
-
color?: RGB;
|
|
21853
|
-
/**
|
|
21854
|
-
* @remarks
|
|
21855
|
-
* Controls whether the waypoint is currently displayed on the
|
|
21856
|
-
* player's screen. When disabled, the waypoint is hidden but
|
|
21857
|
-
* remains valid.
|
|
21858
|
-
*
|
|
21859
|
-
* This property can't be edited in restricted-execution mode.
|
|
21860
|
-
*
|
|
21861
|
-
*/
|
|
21862
|
-
isEnabled: boolean;
|
|
21863
|
-
/**
|
|
21864
|
-
* @remarks
|
|
21865
|
-
* Returns whether the waypoint is currently valid. A waypoint
|
|
21866
|
-
* becomes invalid when its tracked entity is no longer valid.
|
|
21867
|
-
*
|
|
21868
|
-
*/
|
|
21869
|
-
readonly isValid: boolean;
|
|
21870
|
-
/**
|
|
21871
|
-
* @remarks
|
|
21872
|
-
* The {@link WaypointTextureSelector} that determines which
|
|
21873
|
-
* icon texture is displayed for the waypoint based on distance
|
|
21874
|
-
* or other criteria.
|
|
21875
|
-
*
|
|
21876
|
-
* This property can't be edited in restricted-execution mode.
|
|
21877
|
-
*
|
|
21878
|
-
*/
|
|
21879
|
-
textureSelector: WaypointTextureSelector;
|
|
21880
|
-
/**
|
|
21881
|
-
* @remarks
|
|
21882
|
-
* Gets the current {@link DimensionLocation} of the waypoint.
|
|
21883
|
-
* For entity waypoints, this returns the entity's current
|
|
21884
|
-
* position. For location waypoints, this returns the stored
|
|
21885
|
-
* location.
|
|
20052
|
+
* Adds a callback that will be called when a trip wire is
|
|
20053
|
+
* tripped.
|
|
21886
20054
|
*
|
|
21887
20055
|
* This function can't be called in restricted-execution mode.
|
|
21888
20056
|
*
|
|
21889
|
-
*
|
|
21890
|
-
*
|
|
21891
|
-
* {@link InvalidWaypointError}
|
|
20057
|
+
* This function can be called in early-execution mode.
|
|
21892
20058
|
*
|
|
21893
|
-
* {@link InvalidWaypointTextureSelectorError}
|
|
21894
20059
|
*/
|
|
21895
|
-
|
|
20060
|
+
subscribe(callback: (arg0: TripWireTripAfterEvent) => void): (arg0: TripWireTripAfterEvent) => void;
|
|
21896
20061
|
/**
|
|
21897
20062
|
* @remarks
|
|
21898
|
-
* Removes
|
|
21899
|
-
*
|
|
21900
|
-
* locator bar.
|
|
20063
|
+
* Removes a callback from being called when a trip wire is
|
|
20064
|
+
* tripped.
|
|
21901
20065
|
*
|
|
21902
20066
|
* This function can't be called in restricted-execution mode.
|
|
21903
20067
|
*
|
|
20068
|
+
* This function can be called in early-execution mode.
|
|
20069
|
+
*
|
|
21904
20070
|
*/
|
|
21905
|
-
|
|
20071
|
+
unsubscribe(callback: (arg0: TripWireTripAfterEvent) => void): void;
|
|
21906
20072
|
}
|
|
21907
20073
|
|
|
21908
20074
|
/**
|
|
@@ -22113,20 +20279,6 @@ export class World {
|
|
|
22113
20279
|
*
|
|
22114
20280
|
*/
|
|
22115
20281
|
readonly tickingAreaManager: TickingAreaManager;
|
|
22116
|
-
/**
|
|
22117
|
-
* @beta
|
|
22118
|
-
* @remarks
|
|
22119
|
-
* A method that is internal-only, used for broadcasting
|
|
22120
|
-
* specific messages between client and server.
|
|
22121
|
-
*
|
|
22122
|
-
* This function can't be called in restricted-execution mode.
|
|
22123
|
-
*
|
|
22124
|
-
* @param id
|
|
22125
|
-
* The message identifier.
|
|
22126
|
-
* @param value
|
|
22127
|
-
* The message.
|
|
22128
|
-
*/
|
|
22129
|
-
broadcastClientMessage(id: string, value: string): void;
|
|
22130
20282
|
/**
|
|
22131
20283
|
* @remarks
|
|
22132
20284
|
* Clears the set of dynamic properties declared for this
|
|
@@ -22141,7 +20293,7 @@ export class World {
|
|
|
22141
20293
|
*/
|
|
22142
20294
|
getAbsoluteTime(): number;
|
|
22143
20295
|
/**
|
|
22144
|
-
* @
|
|
20296
|
+
* @rc
|
|
22145
20297
|
* @remarks
|
|
22146
20298
|
* The aim-assist presets and categories that can be used in
|
|
22147
20299
|
* the world.
|
|
@@ -22324,15 +20476,6 @@ export class World {
|
|
|
22324
20476
|
*
|
|
22325
20477
|
*/
|
|
22326
20478
|
getMoonPhase(): MoonPhase;
|
|
22327
|
-
/**
|
|
22328
|
-
* @beta
|
|
22329
|
-
* @remarks
|
|
22330
|
-
* Returns a map of pack setting name and value pairs.
|
|
22331
|
-
*
|
|
22332
|
-
* This function can be called in early-execution mode.
|
|
22333
|
-
*
|
|
22334
|
-
*/
|
|
22335
|
-
getPackSettings(): Record<string, boolean | number | string>;
|
|
22336
20479
|
/**
|
|
22337
20480
|
* @remarks
|
|
22338
20481
|
* Returns a set of players based on a set of conditions
|
|
@@ -22608,16 +20751,6 @@ export class WorldAfterEvents {
|
|
|
22608
20751
|
*
|
|
22609
20752
|
*/
|
|
22610
20753
|
readonly buttonPush: ButtonPushAfterEventSignal;
|
|
22611
|
-
/**
|
|
22612
|
-
* @beta
|
|
22613
|
-
* @remarks
|
|
22614
|
-
* This event is triggered after a chat message has been
|
|
22615
|
-
* broadcast or sent to players.
|
|
22616
|
-
*
|
|
22617
|
-
* This property can be read in early-execution mode.
|
|
22618
|
-
*
|
|
22619
|
-
*/
|
|
22620
|
-
readonly chatSend: ChatSendAfterEventSignal;
|
|
22621
20754
|
/**
|
|
22622
20755
|
* @remarks
|
|
22623
20756
|
* This event is fired when an entity event has been triggered
|
|
@@ -22819,25 +20952,6 @@ export class WorldAfterEvents {
|
|
|
22819
20952
|
*
|
|
22820
20953
|
*/
|
|
22821
20954
|
readonly leverAction: LeverActionAfterEventSignal;
|
|
22822
|
-
/**
|
|
22823
|
-
* @beta
|
|
22824
|
-
* @remarks
|
|
22825
|
-
* This event is an internal implementation detail, and is
|
|
22826
|
-
* otherwise not currently functional.
|
|
22827
|
-
*
|
|
22828
|
-
* This property can be read in early-execution mode.
|
|
22829
|
-
*
|
|
22830
|
-
*/
|
|
22831
|
-
readonly messageReceive: ServerMessageAfterEventSignal;
|
|
22832
|
-
/**
|
|
22833
|
-
* @beta
|
|
22834
|
-
* @remarks
|
|
22835
|
-
* This event is triggered when a pack setting is changed.
|
|
22836
|
-
*
|
|
22837
|
-
* This property can be read in early-execution mode.
|
|
22838
|
-
*
|
|
22839
|
-
*/
|
|
22840
|
-
readonly packSettingChange: PackSettingChangeAfterEventSignal;
|
|
22841
20955
|
/**
|
|
22842
20956
|
* @remarks
|
|
22843
20957
|
* This event fires when a piston expands or retracts.
|
|
@@ -22974,16 +21088,6 @@ export class WorldAfterEvents {
|
|
|
22974
21088
|
*
|
|
22975
21089
|
*/
|
|
22976
21090
|
readonly playerSwingStart: PlayerSwingStartAfterEventSignal;
|
|
22977
|
-
/**
|
|
22978
|
-
* @beta
|
|
22979
|
-
* @remarks
|
|
22980
|
-
* An event for when a player uses a named name tag on an
|
|
22981
|
-
* entity.
|
|
22982
|
-
*
|
|
22983
|
-
* This property can be read in early-execution mode.
|
|
22984
|
-
*
|
|
22985
|
-
*/
|
|
22986
|
-
readonly playerUseNameTag: PlayerUseNameTagAfterEventSignal;
|
|
22987
21091
|
/**
|
|
22988
21092
|
* @remarks
|
|
22989
21093
|
* A pressure plate has popped back up (i.e., there are no
|
|
@@ -23060,43 +21164,6 @@ export class WorldAfterEvents {
|
|
|
23060
21164
|
*/
|
|
23061
21165
|
export class WorldBeforeEvents {
|
|
23062
21166
|
private constructor();
|
|
23063
|
-
/**
|
|
23064
|
-
* @beta
|
|
23065
|
-
* @remarks
|
|
23066
|
-
* This event is triggered after a chat message has been
|
|
23067
|
-
* broadcast or sent to players.
|
|
23068
|
-
*
|
|
23069
|
-
* This property can be read in early-execution mode.
|
|
23070
|
-
*
|
|
23071
|
-
* @example customCommand.ts
|
|
23072
|
-
* ```typescript
|
|
23073
|
-
* import { world, DimensionLocation } from "@minecraft/server";
|
|
23074
|
-
*
|
|
23075
|
-
* function customCommand(targetLocation: DimensionLocation) {
|
|
23076
|
-
* const chatCallback = world.beforeEvents.chatSend.subscribe((eventData) => {
|
|
23077
|
-
* if (eventData.message.includes("cancel")) {
|
|
23078
|
-
* // Cancel event if the message contains "cancel"
|
|
23079
|
-
* eventData.cancel = true;
|
|
23080
|
-
* } else {
|
|
23081
|
-
* const args = eventData.message.split(" ");
|
|
23082
|
-
*
|
|
23083
|
-
* if (args.length > 0) {
|
|
23084
|
-
* switch (args[0].toLowerCase()) {
|
|
23085
|
-
* case "echo":
|
|
23086
|
-
* // Send a modified version of chat message
|
|
23087
|
-
* world.sendMessage(`Echo '${eventData.message.substring(4).trim()}'`);
|
|
23088
|
-
* break;
|
|
23089
|
-
* case "help":
|
|
23090
|
-
* world.sendMessage(`Available commands: echo <message>`);
|
|
23091
|
-
* break;
|
|
23092
|
-
* }
|
|
23093
|
-
* }
|
|
23094
|
-
* }
|
|
23095
|
-
* });
|
|
23096
|
-
* }
|
|
23097
|
-
* ```
|
|
23098
|
-
*/
|
|
23099
|
-
readonly chatSend: ChatSendBeforeEventSignal;
|
|
23100
21167
|
/**
|
|
23101
21168
|
* @remarks
|
|
23102
21169
|
* This event is triggered after an event has been added to an
|
|
@@ -23193,15 +21260,6 @@ export class WorldBeforeEvents {
|
|
|
23193
21260
|
*
|
|
23194
21261
|
*/
|
|
23195
21262
|
readonly playerLeave: PlayerLeaveBeforeEventSignal;
|
|
23196
|
-
/**
|
|
23197
|
-
* @beta
|
|
23198
|
-
* @remarks
|
|
23199
|
-
* This event fires before a block is placed by a player.
|
|
23200
|
-
*
|
|
23201
|
-
* This property can be read in early-execution mode.
|
|
23202
|
-
*
|
|
23203
|
-
*/
|
|
23204
|
-
readonly playerPlaceBlock: PlayerPlaceBlockBeforeEventSignal;
|
|
23205
21263
|
/**
|
|
23206
21264
|
* @remarks
|
|
23207
21265
|
* This property can be read in early-execution mode.
|
|
@@ -23283,27 +21341,13 @@ export interface BiomeFilter {
|
|
|
23283
21341
|
includeTags?: string[];
|
|
23284
21342
|
}
|
|
23285
21343
|
|
|
23286
|
-
/**
|
|
23287
|
-
* @beta
|
|
23288
|
-
* Contains additional options for searches for the
|
|
23289
|
-
* dimension.findNearestBiome API.
|
|
23290
|
-
*/
|
|
23291
|
-
export interface BiomeSearchOptions {
|
|
23292
|
-
/**
|
|
23293
|
-
* @remarks
|
|
23294
|
-
* Bounding volume size to look within.
|
|
23295
|
-
*
|
|
23296
|
-
*/
|
|
23297
|
-
boundingSize?: Vector3;
|
|
23298
|
-
}
|
|
23299
|
-
|
|
23300
21344
|
/**
|
|
23301
21345
|
* A BlockBoundingBox is an interface to an object which
|
|
23302
21346
|
* represents an AABB aligned rectangle.
|
|
23303
21347
|
* The BlockBoundingBox assumes that it was created in a valid
|
|
23304
21348
|
* state (min <= max) but cannot guarantee it (unless it was
|
|
23305
|
-
* created using the associated {@link
|
|
23306
|
-
* utility functions.
|
|
21349
|
+
* created using the associated {@link
|
|
21350
|
+
* @minecraft/server.BlockBoundingBoxUtils} utility functions.
|
|
23307
21351
|
* The min/max coordinates represent the diametrically opposite
|
|
23308
21352
|
* corners of the rectangle.
|
|
23309
21353
|
* The BlockBoundingBox is not a representation of blocks - it
|
|
@@ -23731,40 +21775,6 @@ export interface CameraTargetOptions {
|
|
|
23731
21775
|
targetEntity: Entity;
|
|
23732
21776
|
}
|
|
23733
21777
|
|
|
23734
|
-
/**
|
|
23735
|
-
* @beta
|
|
23736
|
-
* This interface defines an entry into the {@link
|
|
23737
|
-
* CompoundBlockVolume} which represents a volume of positive
|
|
23738
|
-
* or negative space.
|
|
23739
|
-
*
|
|
23740
|
-
*/
|
|
23741
|
-
export interface CompoundBlockVolumeItem {
|
|
23742
|
-
/**
|
|
23743
|
-
* @remarks
|
|
23744
|
-
* The 'action' defines how the block volume is represented in
|
|
23745
|
-
* the compound block volume stack.
|
|
23746
|
-
* 'Add' creates a block volume which is positively selected
|
|
23747
|
-
* 'Subtract' creates a block volume which represents a hole or
|
|
23748
|
-
* negative space in the overall compound block volume.
|
|
23749
|
-
*
|
|
23750
|
-
*/
|
|
23751
|
-
action?: CompoundBlockVolumeAction;
|
|
23752
|
-
/**
|
|
23753
|
-
* @remarks
|
|
23754
|
-
* The relativity enumeration determines whether the
|
|
23755
|
-
* BlockVolume specified is positioned relative to the parent
|
|
23756
|
-
* compound block volume origin, or in absolute world space.
|
|
23757
|
-
*
|
|
23758
|
-
*/
|
|
23759
|
-
locationRelativity?: CompoundBlockVolumePositionRelativity;
|
|
23760
|
-
/**
|
|
23761
|
-
* @remarks
|
|
23762
|
-
* The volume of space
|
|
23763
|
-
*
|
|
23764
|
-
*/
|
|
23765
|
-
volume: BlockVolume;
|
|
23766
|
-
}
|
|
23767
|
-
|
|
23768
21778
|
/**
|
|
23769
21779
|
* Rules that if broken on container operations will throw an
|
|
23770
21780
|
* error.
|
|
@@ -23849,15 +21859,6 @@ export interface CustomCommand {
|
|
|
23849
21859
|
* command.
|
|
23850
21860
|
*/
|
|
23851
21861
|
export interface CustomCommandParameter {
|
|
23852
|
-
/**
|
|
23853
|
-
* @beta
|
|
23854
|
-
* @remarks
|
|
23855
|
-
* Can be used to reference the enum name when {@link
|
|
23856
|
-
* CustomCommandParamType} is 'Enum'. Allows the parameter name
|
|
23857
|
-
* to be different from the enum name.
|
|
23858
|
-
*
|
|
23859
|
-
*/
|
|
23860
|
-
enumName?: string;
|
|
23861
21862
|
/**
|
|
23862
21863
|
* @remarks
|
|
23863
21864
|
* The name of parameter as it appears on the command line.
|
|
@@ -23910,14 +21911,6 @@ export interface DefinitionModifier {
|
|
|
23910
21911
|
*
|
|
23911
21912
|
*/
|
|
23912
21913
|
removedComponentGroups: string[];
|
|
23913
|
-
/**
|
|
23914
|
-
* @beta
|
|
23915
|
-
* @remarks
|
|
23916
|
-
* The list of entity definition events that will be fired via
|
|
23917
|
-
* this update.
|
|
23918
|
-
*
|
|
23919
|
-
*/
|
|
23920
|
-
triggers: Trigger[];
|
|
23921
21914
|
}
|
|
23922
21915
|
|
|
23923
21916
|
/**
|
|
@@ -24710,37 +22703,6 @@ export interface EntityRaycastOptions extends EntityFilter {
|
|
|
24710
22703
|
maxDistance?: number;
|
|
24711
22704
|
}
|
|
24712
22705
|
|
|
24713
|
-
/**
|
|
24714
|
-
* @beta
|
|
24715
|
-
* Controls when a waypoint is visible based on the state of
|
|
24716
|
-
* the entity it tracks. These rules allow filtering waypoint
|
|
24717
|
-
* visibility by entity conditions like sneaking, invisibility,
|
|
24718
|
-
* and death state.
|
|
24719
|
-
*/
|
|
24720
|
-
export interface EntityVisibilityRules {
|
|
24721
|
-
/**
|
|
24722
|
-
* @remarks
|
|
24723
|
-
* Controls whether the waypoint is shown when the tracked
|
|
24724
|
-
* entity is dead. If undefined, defaults to true.
|
|
24725
|
-
*
|
|
24726
|
-
*/
|
|
24727
|
-
showDead?: boolean;
|
|
24728
|
-
/**
|
|
24729
|
-
* @remarks
|
|
24730
|
-
* Controls whether the waypoint is shown when the tracked
|
|
24731
|
-
* entity is invisible. If undefined, defaults to true.
|
|
24732
|
-
*
|
|
24733
|
-
*/
|
|
24734
|
-
showInvisible?: boolean;
|
|
24735
|
-
/**
|
|
24736
|
-
* @remarks
|
|
24737
|
-
* Controls whether the waypoint is shown when the tracked
|
|
24738
|
-
* entity is sneaking. If undefined, defaults to true.
|
|
24739
|
-
*
|
|
24740
|
-
*/
|
|
24741
|
-
showSneaking?: boolean;
|
|
24742
|
-
}
|
|
24743
|
-
|
|
24744
22706
|
/**
|
|
24745
22707
|
* Equal to operator.
|
|
24746
22708
|
*/
|
|
@@ -25191,7 +23153,7 @@ export interface PlayAnimationOptions {
|
|
|
25191
23153
|
}
|
|
25192
23154
|
|
|
25193
23155
|
/**
|
|
25194
|
-
* @
|
|
23156
|
+
* @rc
|
|
25195
23157
|
* Settings relating to a player's aim-assist targeting.
|
|
25196
23158
|
*/
|
|
25197
23159
|
export interface PlayerAimAssistSettings {
|
|
@@ -25272,39 +23234,6 @@ export interface PlayerSwingEventOptions {
|
|
|
25272
23234
|
swingSource?: EntitySwingSource;
|
|
25273
23235
|
}
|
|
25274
23236
|
|
|
25275
|
-
/**
|
|
25276
|
-
* @beta
|
|
25277
|
-
* Controls when a waypoint is visible based on player-specific
|
|
25278
|
-
* states. Extends {@link EntityVisibilityRules} with
|
|
25279
|
-
* additional rules for player-only states like hidden mode and
|
|
25280
|
-
* spectator mode.
|
|
25281
|
-
*/
|
|
25282
|
-
// @ts-ignore Class inheritance allowed for native defined classes
|
|
25283
|
-
export interface PlayerVisibilityRules extends EntityVisibilityRules {
|
|
25284
|
-
/**
|
|
25285
|
-
* @remarks
|
|
25286
|
-
* Controls whether the waypoint is shown when the tracked
|
|
25287
|
-
* player is hidden. If undefined, defaults to true.
|
|
25288
|
-
*
|
|
25289
|
-
*/
|
|
25290
|
-
showHidden?: boolean;
|
|
25291
|
-
/**
|
|
25292
|
-
* @remarks
|
|
25293
|
-
* Controls whether the waypoint is shown when the tracked
|
|
25294
|
-
* player is in spectator mode. If undefined, defaults to true.
|
|
25295
|
-
*
|
|
25296
|
-
*/
|
|
25297
|
-
showSpectator?: boolean;
|
|
25298
|
-
/**
|
|
25299
|
-
* @remarks
|
|
25300
|
-
* Controls whether the waypoint is shown when a spectator is
|
|
25301
|
-
* viewing another spectator player. If undefined, defaults to
|
|
25302
|
-
* true.
|
|
25303
|
-
*
|
|
25304
|
-
*/
|
|
25305
|
-
showSpectatorToSpectator?: boolean;
|
|
25306
|
-
}
|
|
25307
|
-
|
|
25308
23237
|
/**
|
|
25309
23238
|
* @rc
|
|
25310
23239
|
* Key frame that holds the progress of the camera animation.
|
|
@@ -26009,60 +23938,6 @@ export interface VectorXZ {
|
|
|
26009
23938
|
z: number;
|
|
26010
23939
|
}
|
|
26011
23940
|
|
|
26012
|
-
/**
|
|
26013
|
-
* @beta
|
|
26014
|
-
* Defines a texture and the distance range in which it should
|
|
26015
|
-
* be displayed. Used within a {@link WaypointTextureSelector}
|
|
26016
|
-
* to create distance-based texture switching.
|
|
26017
|
-
*/
|
|
26018
|
-
export interface WaypointTextureBounds {
|
|
26019
|
-
/**
|
|
26020
|
-
* @remarks
|
|
26021
|
-
* The lower distance bound for this texture. The texture is
|
|
26022
|
-
* displayed when the distance to the waypoint is greater than
|
|
26023
|
-
* this value. Value must be greater than or equal to 0.
|
|
26024
|
-
*
|
|
26025
|
-
* Minimum Value: 0
|
|
26026
|
-
*/
|
|
26027
|
-
lowerBound: number;
|
|
26028
|
-
/**
|
|
26029
|
-
* @remarks
|
|
26030
|
-
* The {@link WaypointTexture} to display within this distance
|
|
26031
|
-
* range.
|
|
26032
|
-
*
|
|
26033
|
-
*/
|
|
26034
|
-
texture: WaypointTexture;
|
|
26035
|
-
/**
|
|
26036
|
-
* @remarks
|
|
26037
|
-
* The upper distance bound for this texture. The texture is
|
|
26038
|
-
* displayed when the distance to the waypoint is less than or
|
|
26039
|
-
* equal to this value. If undefined, there is no upper limit.
|
|
26040
|
-
* Value must be greater than or equal to 0.
|
|
26041
|
-
*
|
|
26042
|
-
* Minimum Value: 0
|
|
26043
|
-
*/
|
|
26044
|
-
upperBound?: number;
|
|
26045
|
-
}
|
|
26046
|
-
|
|
26047
|
-
/**
|
|
26048
|
-
* @beta
|
|
26049
|
-
* Defines how waypoint textures change based on distance.
|
|
26050
|
-
* Contains a list of texture bounds that determine which
|
|
26051
|
-
* texture is displayed at different distance ranges.
|
|
26052
|
-
*/
|
|
26053
|
-
export interface WaypointTextureSelector {
|
|
26054
|
-
/**
|
|
26055
|
-
* @remarks
|
|
26056
|
-
* An array of {@link WaypointTextureBounds} that define which
|
|
26057
|
-
* textures are displayed at different distance ranges. The
|
|
26058
|
-
* system evaluates these bounds to determine the appropriate
|
|
26059
|
-
* texture based on the current distance to the waypoint. The
|
|
26060
|
-
* list has a maximum size limit of 16.
|
|
26061
|
-
*
|
|
26062
|
-
*/
|
|
26063
|
-
textureBoundsList: WaypointTextureBounds[];
|
|
26064
|
-
}
|
|
26065
|
-
|
|
26066
23941
|
/**
|
|
26067
23942
|
* Contains additional options for a playSound occurrence.
|
|
26068
23943
|
*/
|
|
@@ -26246,16 +24121,6 @@ export class InvalidContainerSlotError extends Error {
|
|
|
26246
24121
|
private constructor();
|
|
26247
24122
|
}
|
|
26248
24123
|
|
|
26249
|
-
/**
|
|
26250
|
-
* @beta
|
|
26251
|
-
* This error can occur when accessing components on an entity
|
|
26252
|
-
* that doesn't have them.
|
|
26253
|
-
*/
|
|
26254
|
-
// @ts-ignore Class inheritance allowed for native defined classes
|
|
26255
|
-
export class InvalidEntityComponentError extends Error {
|
|
26256
|
-
private constructor();
|
|
26257
|
-
}
|
|
26258
|
-
|
|
26259
24124
|
/**
|
|
26260
24125
|
* The error called when an entity is invalid. This can occur
|
|
26261
24126
|
* when accessing components on a removed entity.
|
|
@@ -26322,25 +24187,6 @@ export class InvalidStructureError extends Error {
|
|
|
26322
24187
|
private constructor();
|
|
26323
24188
|
}
|
|
26324
24189
|
|
|
26325
|
-
/**
|
|
26326
|
-
* @beta
|
|
26327
|
-
* Error thrown when attempting to perform operations on an
|
|
26328
|
-
* invalid waypoint. A waypoint becomes invalid when it is
|
|
26329
|
-
* removed or when the entity it tracks is no longer valid.
|
|
26330
|
-
*/
|
|
26331
|
-
// @ts-ignore Class inheritance allowed for native defined classes
|
|
26332
|
-
export class InvalidWaypointError extends Error {
|
|
26333
|
-
private constructor();
|
|
26334
|
-
}
|
|
26335
|
-
|
|
26336
|
-
/**
|
|
26337
|
-
* @beta
|
|
26338
|
-
*/
|
|
26339
|
-
// @ts-ignore Class inheritance allowed for native defined classes
|
|
26340
|
-
export class InvalidWaypointTextureSelectorError extends Error {
|
|
26341
|
-
private constructor();
|
|
26342
|
-
}
|
|
26343
|
-
|
|
26344
24190
|
/**
|
|
26345
24191
|
* Thrown when trying to register an item custom component with
|
|
26346
24192
|
* a name that has already been registered.
|
|
@@ -26397,25 +24243,6 @@ export class LocationOutOfWorldBoundariesError extends Error {
|
|
|
26397
24243
|
private constructor();
|
|
26398
24244
|
}
|
|
26399
24245
|
|
|
26400
|
-
/**
|
|
26401
|
-
* @beta
|
|
26402
|
-
* Error thrown when a locator bar operation fails. Contains a
|
|
26403
|
-
* reason code indicating the specific cause of the error.
|
|
26404
|
-
*/
|
|
26405
|
-
// @ts-ignore Class inheritance allowed for native defined classes
|
|
26406
|
-
export class LocatorBarError extends Error {
|
|
26407
|
-
private constructor();
|
|
26408
|
-
/**
|
|
26409
|
-
* @remarks
|
|
26410
|
-
* The {@link LocatorBarErrorReason} code that indicates why
|
|
26411
|
-
* the locator bar operation failed.
|
|
26412
|
-
*
|
|
26413
|
-
* This property can be read in early-execution mode.
|
|
26414
|
-
*
|
|
26415
|
-
*/
|
|
26416
|
-
readonly reason: LocatorBarErrorReason;
|
|
26417
|
-
}
|
|
26418
|
-
|
|
26419
24246
|
/**
|
|
26420
24247
|
* Thrown when a name requires a namespace and an error occurs
|
|
26421
24248
|
* when validating that namespace
|