@minecraft/server 2.11.0-beta.1.26.50-preview.26 → 2.11.0-rc.1.26.60-preview.21
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 +114 -2673
- 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.11.0
|
|
19
|
+
* "version": "2.11.0"
|
|
20
20
|
* }
|
|
21
21
|
* ```
|
|
22
22
|
*
|
|
@@ -385,13 +385,6 @@ export enum CustomCommandErrorReason {
|
|
|
385
385
|
*
|
|
386
386
|
*/
|
|
387
387
|
RegistryReadOnly = 'RegistryReadOnly',
|
|
388
|
-
/**
|
|
389
|
-
* @beta
|
|
390
|
-
* @remarks
|
|
391
|
-
* Non enum type command parameters cannot use enumName.
|
|
392
|
-
*
|
|
393
|
-
*/
|
|
394
|
-
UnexpectedEnumName = 'UnexpectedEnumName',
|
|
395
388
|
}
|
|
396
389
|
|
|
397
390
|
/**
|
|
@@ -1127,14 +1120,6 @@ export enum EntityComponentTypes {
|
|
|
1127
1120
|
*
|
|
1128
1121
|
*/
|
|
1129
1122
|
NavigationWalk = 'minecraft:navigation.walk',
|
|
1130
|
-
/**
|
|
1131
|
-
* @beta
|
|
1132
|
-
* @remarks
|
|
1133
|
-
* Adds NPC capabilities to an entity such as custom skin,
|
|
1134
|
-
* name, and dialogue interactions.
|
|
1135
|
-
*
|
|
1136
|
-
*/
|
|
1137
|
-
Npc = 'minecraft:npc',
|
|
1138
1123
|
/**
|
|
1139
1124
|
* @remarks
|
|
1140
1125
|
* When present on an entity, this entity is on fire.
|
|
@@ -1618,14 +1603,6 @@ export enum EntitySwingSource {
|
|
|
1618
1603
|
* and mainhand slots.
|
|
1619
1604
|
*/
|
|
1620
1605
|
export enum EquipmentSlot {
|
|
1621
|
-
/**
|
|
1622
|
-
* @beta
|
|
1623
|
-
* @remarks
|
|
1624
|
-
* The body slot. This slot is used to hold armor for
|
|
1625
|
-
* non-humanoid mobs.
|
|
1626
|
-
*
|
|
1627
|
-
*/
|
|
1628
|
-
Body = 'Body',
|
|
1629
1606
|
/**
|
|
1630
1607
|
* @remarks
|
|
1631
1608
|
* The chest slot. This slot is used to hold items such as
|
|
@@ -1895,14 +1872,6 @@ export enum GameRule {
|
|
|
1895
1872
|
*
|
|
1896
1873
|
*/
|
|
1897
1874
|
PlayersSleepingPercentage = 'playersSleepingPercentage',
|
|
1898
|
-
/**
|
|
1899
|
-
* @beta
|
|
1900
|
-
* @remarks
|
|
1901
|
-
* Controls which player waypoints are automatically added to
|
|
1902
|
-
* the players locator bar.
|
|
1903
|
-
*
|
|
1904
|
-
*/
|
|
1905
|
-
PlayerWaypoints = 'playerWaypoints',
|
|
1906
1875
|
/**
|
|
1907
1876
|
* @remarks
|
|
1908
1877
|
* Controls whether projectiles (entities with a projectile
|
|
@@ -2728,42 +2697,6 @@ export enum PlayerSplitScreenSlot {
|
|
|
2728
2697
|
Third = 'Third',
|
|
2729
2698
|
}
|
|
2730
2699
|
|
|
2731
|
-
/**
|
|
2732
|
-
* @beta
|
|
2733
|
-
*/
|
|
2734
|
-
export enum PlayerWaypointsMode {
|
|
2735
|
-
Everyone = 'Everyone',
|
|
2736
|
-
Off = 'Off',
|
|
2737
|
-
}
|
|
2738
|
-
|
|
2739
|
-
/**
|
|
2740
|
-
* @beta
|
|
2741
|
-
* Specifies how a block point-of-interest query filters
|
|
2742
|
-
* instances by ticket occupancy.
|
|
2743
|
-
*/
|
|
2744
|
-
export enum PoiBlockOccupancyFilter {
|
|
2745
|
-
/**
|
|
2746
|
-
* @remarks
|
|
2747
|
-
* Includes POI instances regardless of their occupancy or
|
|
2748
|
-
* available ticket count.
|
|
2749
|
-
*
|
|
2750
|
-
*/
|
|
2751
|
-
Any = 'Any',
|
|
2752
|
-
/**
|
|
2753
|
-
* @remarks
|
|
2754
|
-
* Includes POI instances with no available tickets.
|
|
2755
|
-
*
|
|
2756
|
-
*/
|
|
2757
|
-
Full = 'Full',
|
|
2758
|
-
/**
|
|
2759
|
-
* @remarks
|
|
2760
|
-
* Includes POI instances with at least one ticket available to
|
|
2761
|
-
* be claimed.
|
|
2762
|
-
*
|
|
2763
|
-
*/
|
|
2764
|
-
HasVacancy = 'HasVacancy',
|
|
2765
|
-
}
|
|
2766
|
-
|
|
2767
2700
|
/**
|
|
2768
2701
|
* Contains objectives and participants for the scoreboard.
|
|
2769
2702
|
*/
|
|
@@ -3089,29 +3022,6 @@ export enum TintMethod {
|
|
|
3089
3022
|
Water = 'Water',
|
|
3090
3023
|
}
|
|
3091
3024
|
|
|
3092
|
-
/**
|
|
3093
|
-
* @beta
|
|
3094
|
-
* An enumeration with the reason that a watchdog is deciding
|
|
3095
|
-
* to terminate execution of a behavior packs' script.
|
|
3096
|
-
*/
|
|
3097
|
-
export enum WatchdogTerminateReason {
|
|
3098
|
-
/**
|
|
3099
|
-
* @remarks
|
|
3100
|
-
* Script runtime for a behavior pack is terminated due to
|
|
3101
|
-
* non-responsiveness from script (a hang or infinite loop).
|
|
3102
|
-
*
|
|
3103
|
-
*/
|
|
3104
|
-
Hang = 'Hang',
|
|
3105
|
-
/**
|
|
3106
|
-
* @remarks
|
|
3107
|
-
* Script runtime for a behavior pack is terminated due to a
|
|
3108
|
-
* stack overflow (a long, and potentially infinite) chain of
|
|
3109
|
-
* function calls.
|
|
3110
|
-
*
|
|
3111
|
-
*/
|
|
3112
|
-
StackOverflow = 'StackOverflow',
|
|
3113
|
-
}
|
|
3114
|
-
|
|
3115
3025
|
/**
|
|
3116
3026
|
* Enum representing different texture icons that can be
|
|
3117
3027
|
* displayed for waypoints on the locator bar.
|
|
@@ -3298,7 +3208,6 @@ export type EntityComponentTypeMap = {
|
|
|
3298
3208
|
'minecraft:navigation.generic': EntityNavigationGenericComponent;
|
|
3299
3209
|
'minecraft:navigation.hover': EntityNavigationHoverComponent;
|
|
3300
3210
|
'minecraft:navigation.walk': EntityNavigationWalkComponent;
|
|
3301
|
-
'minecraft:npc': EntityNpcComponent;
|
|
3302
3211
|
'minecraft:onfire': EntityOnFireComponent;
|
|
3303
3212
|
'minecraft:player.exhaustion': EntityExhaustionComponent;
|
|
3304
3213
|
'minecraft:player.hunger': EntityHungerComponent;
|
|
@@ -3332,7 +3241,6 @@ export type EntityComponentTypeMap = {
|
|
|
3332
3241
|
'navigation.generic': EntityNavigationGenericComponent;
|
|
3333
3242
|
'navigation.hover': EntityNavigationHoverComponent;
|
|
3334
3243
|
'navigation.walk': EntityNavigationWalkComponent;
|
|
3335
|
-
npc: EntityNpcComponent;
|
|
3336
3244
|
onfire: EntityOnFireComponent;
|
|
3337
3245
|
'player.exhaustion': EntityExhaustionComponent;
|
|
3338
3246
|
'player.hunger': EntityHungerComponent;
|
|
@@ -3352,15 +3260,6 @@ export type EntityComponentTypeMap = {
|
|
|
3352
3260
|
wants_jockey: EntityWantsJockeyComponent;
|
|
3353
3261
|
};
|
|
3354
3262
|
|
|
3355
|
-
/**
|
|
3356
|
-
* @beta
|
|
3357
|
-
*/
|
|
3358
|
-
export type EntityIdentifierType<T> = [T] extends [never]
|
|
3359
|
-
? VanillaEntityIdentifier
|
|
3360
|
-
: T extends string
|
|
3361
|
-
? VanillaEntityIdentifier | T
|
|
3362
|
-
: never;
|
|
3363
|
-
|
|
3364
3263
|
export type ItemComponentReturnType<T extends string> = T extends keyof ItemComponentTypeMap
|
|
3365
3264
|
? ItemComponentTypeMap[T]
|
|
3366
3265
|
: ItemCustomComponentInstance;
|
|
@@ -3388,15 +3287,6 @@ export type ItemComponentTypeMap = {
|
|
|
3388
3287
|
potion: ItemPotionComponent;
|
|
3389
3288
|
};
|
|
3390
3289
|
|
|
3391
|
-
/**
|
|
3392
|
-
* @beta
|
|
3393
|
-
*/
|
|
3394
|
-
export type VanillaEntityIdentifier =
|
|
3395
|
-
| EntityType
|
|
3396
|
-
| minecraftvanilladata.MinecraftEntityTypes
|
|
3397
|
-
| `${minecraftvanilladata.MinecraftEntityTypes}`
|
|
3398
|
-
| `${minecraftvanilladata.MinecraftEntityTypes}<${string}>`;
|
|
3399
|
-
|
|
3400
3290
|
/**
|
|
3401
3291
|
* Handle to an aim-assist category that exists in the
|
|
3402
3292
|
* world.aimAssist registry.
|
|
@@ -3554,9 +3444,7 @@ export class AimAssistCategorySettings {
|
|
|
3554
3444
|
* A record mapping block Ids to their priority settings.
|
|
3555
3445
|
* Larger numbers have greater priority.
|
|
3556
3446
|
*/
|
|
3557
|
-
setBlockPriorities(
|
|
3558
|
-
blockPriorities: Record<keyof typeof minecraftvanilladata.MinecraftBlockTypes | string, number>,
|
|
3559
|
-
): void;
|
|
3447
|
+
setBlockPriorities(blockPriorities: Record<string, number>): void;
|
|
3560
3448
|
/**
|
|
3561
3449
|
* @remarks
|
|
3562
3450
|
* Sets the priority settings used for block targeting.
|
|
@@ -3575,9 +3463,7 @@ export class AimAssistCategorySettings {
|
|
|
3575
3463
|
* A record mapping entity Ids to their priority settings.
|
|
3576
3464
|
* Larger numbers have greater priority.
|
|
3577
3465
|
*/
|
|
3578
|
-
setEntityPriorities(
|
|
3579
|
-
entityPriorities: Record<keyof typeof minecraftvanilladata.MinecraftEntityTypes | string, number>,
|
|
3580
|
-
): void;
|
|
3466
|
+
setEntityPriorities(entityPriorities: Record<string, number>): void;
|
|
3581
3467
|
/**
|
|
3582
3468
|
* @remarks
|
|
3583
3469
|
* Sets the priority settings used for entity targeting.
|
|
@@ -3776,10 +3662,8 @@ export class AimAssistPresetSettings {
|
|
|
3776
3662
|
*
|
|
3777
3663
|
* @privilege no-restricted-execution - This function can't be called in restricted-execution mode.
|
|
3778
3664
|
*
|
|
3779
|
-
* @param targets
|
|
3780
|
-
* An array of block tags.
|
|
3781
3665
|
*/
|
|
3782
|
-
setExcludedBlockTagTargets(
|
|
3666
|
+
setExcludedBlockTagTargets(blockTagTargets?: string[]): void;
|
|
3783
3667
|
/**
|
|
3784
3668
|
* @remarks
|
|
3785
3669
|
* Sets the list of block Ids to exclude from aim assist
|
|
@@ -3787,10 +3671,8 @@ export class AimAssistPresetSettings {
|
|
|
3787
3671
|
*
|
|
3788
3672
|
* @privilege no-restricted-execution - This function can't be called in restricted-execution mode.
|
|
3789
3673
|
*
|
|
3790
|
-
* @param targets
|
|
3791
|
-
* An array of block Ids.
|
|
3792
3674
|
*/
|
|
3793
|
-
setExcludedBlockTargets(
|
|
3675
|
+
setExcludedBlockTargets(blockTargets?: string[]): void;
|
|
3794
3676
|
/**
|
|
3795
3677
|
* @remarks
|
|
3796
3678
|
* Sets the list of entity Ids to exclude from aim assist
|
|
@@ -3798,10 +3680,8 @@ export class AimAssistPresetSettings {
|
|
|
3798
3680
|
*
|
|
3799
3681
|
* @privilege no-restricted-execution - This function can't be called in restricted-execution mode.
|
|
3800
3682
|
*
|
|
3801
|
-
* @param targets
|
|
3802
|
-
* An array of entity Ids.
|
|
3803
3683
|
*/
|
|
3804
|
-
setExcludedEntityTargets(
|
|
3684
|
+
setExcludedEntityTargets(entityTargets?: string[]): void;
|
|
3805
3685
|
/**
|
|
3806
3686
|
* @remarks
|
|
3807
3687
|
* Sets the list of entity type families to exclude from aim
|
|
@@ -3809,10 +3689,8 @@ export class AimAssistPresetSettings {
|
|
|
3809
3689
|
*
|
|
3810
3690
|
* @privilege no-restricted-execution - This function can't be called in restricted-execution mode.
|
|
3811
3691
|
*
|
|
3812
|
-
* @param targets
|
|
3813
|
-
* An array of entity type families.
|
|
3814
3692
|
*/
|
|
3815
|
-
setExcludedEntityTypeFamilyTargets(
|
|
3693
|
+
setExcludedEntityTypeFamilyTargets(entityTypeFamilyTargets?: string[]): void;
|
|
3816
3694
|
/**
|
|
3817
3695
|
* @remarks
|
|
3818
3696
|
* Sets the per-item aim-assist category Ids.
|
|
@@ -3823,7 +3701,7 @@ export class AimAssistPresetSettings {
|
|
|
3823
3701
|
* A record mapping item Ids to aim-assist category Ids.
|
|
3824
3702
|
* Category Ids must have a namespace.
|
|
3825
3703
|
*/
|
|
3826
|
-
setItemSettings(itemSettings: Record<
|
|
3704
|
+
setItemSettings(itemSettings: Record<string, string>): void;
|
|
3827
3705
|
/**
|
|
3828
3706
|
* @remarks
|
|
3829
3707
|
* Sets the list of item Ids that will target liquid blocks
|
|
@@ -3834,7 +3712,7 @@ export class AimAssistPresetSettings {
|
|
|
3834
3712
|
* @param items
|
|
3835
3713
|
* An array of item Ids.
|
|
3836
3714
|
*/
|
|
3837
|
-
setLiquidTargetingItems(items?:
|
|
3715
|
+
setLiquidTargetingItems(items?: string[]): void;
|
|
3838
3716
|
}
|
|
3839
3717
|
|
|
3840
3718
|
/**
|
|
@@ -3940,28 +3818,6 @@ export class AimAssistRegistry {
|
|
|
3940
3818
|
getPresets(): AimAssistPreset[];
|
|
3941
3819
|
}
|
|
3942
3820
|
|
|
3943
|
-
/**
|
|
3944
|
-
* @beta
|
|
3945
|
-
* Describes a single banner pattern, which includes a colour
|
|
3946
|
-
* and a pattern type.
|
|
3947
|
-
*/
|
|
3948
|
-
export class BannerPattern {
|
|
3949
|
-
private constructor();
|
|
3950
|
-
/**
|
|
3951
|
-
* @remarks
|
|
3952
|
-
* The color to apply to this banner pattern.
|
|
3953
|
-
*
|
|
3954
|
-
*/
|
|
3955
|
-
readonly color: string;
|
|
3956
|
-
/**
|
|
3957
|
-
* @remarks
|
|
3958
|
-
* The pattern type (e.g. gradient, chevron, cross, etc.) to
|
|
3959
|
-
* apply to the banner.
|
|
3960
|
-
*
|
|
3961
|
-
*/
|
|
3962
|
-
readonly pattern: string;
|
|
3963
|
-
}
|
|
3964
|
-
|
|
3965
3821
|
/**
|
|
3966
3822
|
* Describes a type of biome.
|
|
3967
3823
|
*/
|
|
@@ -4055,20 +3911,6 @@ export class Block {
|
|
|
4055
3911
|
* {@link LocationOutOfWorldBoundariesError}
|
|
4056
3912
|
*/
|
|
4057
3913
|
readonly isLiquid: boolean;
|
|
4058
|
-
/**
|
|
4059
|
-
* @beta
|
|
4060
|
-
* @remarks
|
|
4061
|
-
* Returns true if this block is solid and impassible - (e.g.,
|
|
4062
|
-
* a cobblestone block and a diamond block are solid, while a
|
|
4063
|
-
* ladder block and a fence block are not).
|
|
4064
|
-
*
|
|
4065
|
-
* @throws This property can throw when used.
|
|
4066
|
-
*
|
|
4067
|
-
* {@link LocationInUnloadedChunkError}
|
|
4068
|
-
*
|
|
4069
|
-
* {@link LocationOutOfWorldBoundariesError}
|
|
4070
|
-
*/
|
|
4071
|
-
readonly isSolid: boolean;
|
|
4072
3914
|
/**
|
|
4073
3915
|
* @remarks
|
|
4074
3916
|
* Returns true if this reference to a block is still valid
|
|
@@ -4234,30 +4076,6 @@ export class Block {
|
|
|
4234
4076
|
* {@link LocationOutOfWorldBoundariesError}
|
|
4235
4077
|
*/
|
|
4236
4078
|
canContainLiquid(liquidType: LiquidType): boolean;
|
|
4237
|
-
/**
|
|
4238
|
-
* @beta
|
|
4239
|
-
* @remarks
|
|
4240
|
-
* Checks to see whether it is valid to place the specified
|
|
4241
|
-
* block type or block permutation, on a specified face on this
|
|
4242
|
-
* block.
|
|
4243
|
-
*
|
|
4244
|
-
* @param blockToPlace
|
|
4245
|
-
* Block type or block permutation to check placement for.
|
|
4246
|
-
* @param faceToPlaceOn
|
|
4247
|
-
* Optional specific face of this block to check placement
|
|
4248
|
-
* against.
|
|
4249
|
-
* @returns
|
|
4250
|
-
* Returns `true` if the block type or permutation can be
|
|
4251
|
-
* placed on this block, else `false`.
|
|
4252
|
-
* @throws This function can throw errors.
|
|
4253
|
-
*
|
|
4254
|
-
* {@link Error}
|
|
4255
|
-
*
|
|
4256
|
-
* {@link LocationInUnloadedChunkError}
|
|
4257
|
-
*
|
|
4258
|
-
* {@link LocationOutOfWorldBoundariesError}
|
|
4259
|
-
*/
|
|
4260
|
-
canPlace(blockToPlace: BlockPermutation | BlockType | string, faceToPlaceOn?: Direction): boolean;
|
|
4261
4079
|
/**
|
|
4262
4080
|
* @remarks
|
|
4263
4081
|
* Returns the {@link Vector3} of the center of this block on
|
|
@@ -4354,15 +4172,6 @@ export class Block {
|
|
|
4354
4172
|
* {@link LocationInUnloadedChunkError}
|
|
4355
4173
|
*/
|
|
4356
4174
|
getLightLevel(): number;
|
|
4357
|
-
/**
|
|
4358
|
-
* @beta
|
|
4359
|
-
* @throws This function can throw errors.
|
|
4360
|
-
*
|
|
4361
|
-
* {@link LocationInUnloadedChunkError}
|
|
4362
|
-
*
|
|
4363
|
-
* {@link LocationOutOfWorldBoundariesError}
|
|
4364
|
-
*/
|
|
4365
|
-
getMapColor(): RGBA;
|
|
4366
4175
|
/**
|
|
4367
4176
|
* @remarks
|
|
4368
4177
|
* Returns array of all loaded block parts if this block has
|
|
@@ -4643,27 +4452,6 @@ export class Block {
|
|
|
4643
4452
|
* {@link LocationOutOfWorldBoundariesError}
|
|
4644
4453
|
*/
|
|
4645
4454
|
south(steps?: number): Block | undefined;
|
|
4646
|
-
/**
|
|
4647
|
-
* @beta
|
|
4648
|
-
* @remarks
|
|
4649
|
-
* Tries to set the block in the dimension to the state of the
|
|
4650
|
-
* permutation by first checking if the placement is valid.
|
|
4651
|
-
*
|
|
4652
|
-
* @privilege no-restricted-execution - This function can't be called in restricted-execution mode.
|
|
4653
|
-
*
|
|
4654
|
-
* @param permutation
|
|
4655
|
-
* Permutation that contains a set of property states for the
|
|
4656
|
-
* Block.
|
|
4657
|
-
* @returns
|
|
4658
|
-
* Returns `true` if the block permutation data was
|
|
4659
|
-
* successfully set, else `false`.
|
|
4660
|
-
* @throws This function can throw errors.
|
|
4661
|
-
*
|
|
4662
|
-
* {@link LocationInUnloadedChunkError}
|
|
4663
|
-
*
|
|
4664
|
-
* {@link LocationOutOfWorldBoundariesError}
|
|
4665
|
-
*/
|
|
4666
|
-
trySetPermutation(permutation: BlockPermutation): boolean;
|
|
4667
4455
|
/**
|
|
4668
4456
|
* @remarks
|
|
4669
4457
|
* Returns the {@link Block} to the west of this block
|
|
@@ -4681,137 +4469,6 @@ export class Block {
|
|
|
4681
4469
|
west(steps?: number): Block | undefined;
|
|
4682
4470
|
}
|
|
4683
4471
|
|
|
4684
|
-
/**
|
|
4685
|
-
* @beta
|
|
4686
|
-
* Bounding Box Utils is a utility class that provides a number
|
|
4687
|
-
* of useful functions for the creation and utility of
|
|
4688
|
-
* {@link BlockBoundingBox} objects
|
|
4689
|
-
*/
|
|
4690
|
-
export class BlockBoundingBoxUtils {
|
|
4691
|
-
private constructor();
|
|
4692
|
-
/**
|
|
4693
|
-
* @remarks
|
|
4694
|
-
* Create a validated instance of a {@link BlockBoundingBox}
|
|
4695
|
-
* where the min and max components are guaranteed to be (min
|
|
4696
|
-
* <= max)
|
|
4697
|
-
*
|
|
4698
|
-
* @privilege no-restricted-execution - This function can't be called in restricted-execution mode.
|
|
4699
|
-
*
|
|
4700
|
-
* @param min
|
|
4701
|
-
* A corner world location
|
|
4702
|
-
* @param max
|
|
4703
|
-
* A corner world location diametrically opposite
|
|
4704
|
-
*/
|
|
4705
|
-
static createValid(min: Vector3, max: Vector3): BlockBoundingBox;
|
|
4706
|
-
/**
|
|
4707
|
-
* @remarks
|
|
4708
|
-
* Expand a {@link BlockBoundingBox} by a given amount along
|
|
4709
|
-
* each axis.
|
|
4710
|
-
* Sizes can be negative to perform contraction.
|
|
4711
|
-
* Note: corners can be inverted if the contraction size is
|
|
4712
|
-
* greater than the span, but the min/max relationship will
|
|
4713
|
-
* remain correct
|
|
4714
|
-
*
|
|
4715
|
-
* @privilege no-restricted-execution - This function can't be called in restricted-execution mode.
|
|
4716
|
-
*
|
|
4717
|
-
* @returns
|
|
4718
|
-
* Return a new {@link BlockBoundingBox} object representing
|
|
4719
|
-
* the changes
|
|
4720
|
-
*/
|
|
4721
|
-
static dilate(box: BlockBoundingBox, size: Vector3): BlockBoundingBox;
|
|
4722
|
-
/**
|
|
4723
|
-
* @remarks
|
|
4724
|
-
* Check if two {@link BlockBoundingBox} objects are identical
|
|
4725
|
-
*
|
|
4726
|
-
* @privilege no-restricted-execution - This function can't be called in restricted-execution mode.
|
|
4727
|
-
*
|
|
4728
|
-
*/
|
|
4729
|
-
static equals(box: BlockBoundingBox, other: BlockBoundingBox): boolean;
|
|
4730
|
-
/**
|
|
4731
|
-
* @remarks
|
|
4732
|
-
* Expand the initial box object bounds to include the 2nd box
|
|
4733
|
-
* argument. The resultant {@link BlockBoundingBox} object
|
|
4734
|
-
* will be a BlockBoundingBox which exactly encompasses the two
|
|
4735
|
-
* boxes.
|
|
4736
|
-
*
|
|
4737
|
-
* @privilege no-restricted-execution - This function can't be called in restricted-execution mode.
|
|
4738
|
-
*
|
|
4739
|
-
* @returns
|
|
4740
|
-
* A new {@link BlockBoundingBox} instance representing the
|
|
4741
|
-
* smallest possible bounding box which can encompass both
|
|
4742
|
-
*/
|
|
4743
|
-
static expand(box: BlockBoundingBox, other: BlockBoundingBox): BlockBoundingBox;
|
|
4744
|
-
/**
|
|
4745
|
-
* @remarks
|
|
4746
|
-
* Calculate the center block of a given
|
|
4747
|
-
* {@link BlockBoundingBox} object.
|
|
4748
|
-
*
|
|
4749
|
-
* @privilege no-restricted-execution - This function can't be called in restricted-execution mode.
|
|
4750
|
-
*
|
|
4751
|
-
* @returns
|
|
4752
|
-
* Note that {@link BlockBoundingBox} objects represent whole
|
|
4753
|
-
* blocks, so the center of boxes which have odd numbered
|
|
4754
|
-
* bounds are not mathematically centered...
|
|
4755
|
-
* i.e. a BlockBoundingBox( 0,0,0 -> 3,3,3 ) would have a
|
|
4756
|
-
* center of (1,1,1) (not (1.5, 1.5, 1.5) as expected)
|
|
4757
|
-
*/
|
|
4758
|
-
static getCenter(box: BlockBoundingBox): Vector3;
|
|
4759
|
-
/**
|
|
4760
|
-
* @remarks
|
|
4761
|
-
* Calculate the BlockBoundingBox which represents the union
|
|
4762
|
-
* area of two intersecting BlockBoundingBoxes
|
|
4763
|
-
*
|
|
4764
|
-
* @privilege no-restricted-execution - This function can't be called in restricted-execution mode.
|
|
4765
|
-
*
|
|
4766
|
-
*/
|
|
4767
|
-
static getIntersection(box: BlockBoundingBox, other: BlockBoundingBox): BlockBoundingBox | undefined;
|
|
4768
|
-
/**
|
|
4769
|
-
* @remarks
|
|
4770
|
-
* Get the Span of each of the BlockBoundingBox Axis components
|
|
4771
|
-
*
|
|
4772
|
-
* @privilege no-restricted-execution - This function can't be called in restricted-execution mode.
|
|
4773
|
-
*
|
|
4774
|
-
*/
|
|
4775
|
-
static getSpan(box: BlockBoundingBox): Vector3;
|
|
4776
|
-
/**
|
|
4777
|
-
* @remarks
|
|
4778
|
-
* Check to see if two BlockBoundingBox objects intersect
|
|
4779
|
-
*
|
|
4780
|
-
* @privilege no-restricted-execution - This function can't be called in restricted-execution mode.
|
|
4781
|
-
*
|
|
4782
|
-
*/
|
|
4783
|
-
static intersects(box: BlockBoundingBox, other: BlockBoundingBox): boolean;
|
|
4784
|
-
/**
|
|
4785
|
-
* @remarks
|
|
4786
|
-
* Check to see if a given coordinate is inside a
|
|
4787
|
-
* BlockBoundingBox
|
|
4788
|
-
*
|
|
4789
|
-
* @privilege no-restricted-execution - This function can't be called in restricted-execution mode.
|
|
4790
|
-
*
|
|
4791
|
-
*/
|
|
4792
|
-
static isInside(box: BlockBoundingBox, pos: Vector3): boolean;
|
|
4793
|
-
/**
|
|
4794
|
-
* @remarks
|
|
4795
|
-
* Check to see if a BlockBoundingBox is valid (i.e. (min <=
|
|
4796
|
-
* max))
|
|
4797
|
-
*
|
|
4798
|
-
* @privilege no-restricted-execution - This function can't be called in restricted-execution mode.
|
|
4799
|
-
*
|
|
4800
|
-
*/
|
|
4801
|
-
static isValid(box: BlockBoundingBox): boolean;
|
|
4802
|
-
/**
|
|
4803
|
-
* @remarks
|
|
4804
|
-
* Move a BlockBoundingBox by a given amount
|
|
4805
|
-
*
|
|
4806
|
-
* @privilege no-restricted-execution - This function can't be called in restricted-execution mode.
|
|
4807
|
-
*
|
|
4808
|
-
* @returns
|
|
4809
|
-
* Return a new BlockBoundingBox object which represents the
|
|
4810
|
-
* change
|
|
4811
|
-
*/
|
|
4812
|
-
static translate(box: BlockBoundingBox, delta: Vector3): BlockBoundingBox;
|
|
4813
|
-
}
|
|
4814
|
-
|
|
4815
4472
|
/**
|
|
4816
4473
|
* Base type for components associated with blocks.
|
|
4817
4474
|
*/
|
|
@@ -5034,13 +4691,6 @@ export class BlockComponentRandomTickEvent extends BlockEvent {
|
|
|
5034
4691
|
// @ts-ignore Class inheritance allowed for native defined classes
|
|
5035
4692
|
export class BlockComponentRedstoneUpdateEvent extends BlockEvent {
|
|
5036
4693
|
private constructor();
|
|
5037
|
-
/**
|
|
5038
|
-
* @beta
|
|
5039
|
-
* @remarks
|
|
5040
|
-
* The first update event for the redstone component.
|
|
5041
|
-
*
|
|
5042
|
-
*/
|
|
5043
|
-
readonly firstUpdate: boolean;
|
|
5044
4694
|
/**
|
|
5045
4695
|
* @remarks
|
|
5046
4696
|
* The redstone signal strength passing through this block. It
|
|
@@ -5597,18 +5247,6 @@ export class BlockLocationIterator implements Iterable<Vector3> {
|
|
|
5597
5247
|
*
|
|
5598
5248
|
*/
|
|
5599
5249
|
[Symbol.iterator](): Iterator<Vector3>;
|
|
5600
|
-
/**
|
|
5601
|
-
* @beta
|
|
5602
|
-
* @remarks
|
|
5603
|
-
* Checks if the underlining block volume has been invalidated.
|
|
5604
|
-
* Will return false if the block volume was modified between
|
|
5605
|
-
* creating the iterator and iterating it, and true otherwise.
|
|
5606
|
-
*
|
|
5607
|
-
* @throws This function can throw errors.
|
|
5608
|
-
*
|
|
5609
|
-
* {@link minecraftcommon.EngineError}
|
|
5610
|
-
*/
|
|
5611
|
-
isValid(): boolean;
|
|
5612
5250
|
/**
|
|
5613
5251
|
* @remarks
|
|
5614
5252
|
* @privilege no-restricted-execution - This function can't be called in restricted-execution mode.
|
|
@@ -6524,15 +6162,6 @@ export class BlockVolumeBase {
|
|
|
6524
6162
|
*
|
|
6525
6163
|
*/
|
|
6526
6164
|
getBlockLocationIterator(): BlockLocationIterator;
|
|
6527
|
-
/**
|
|
6528
|
-
* @beta
|
|
6529
|
-
* @remarks
|
|
6530
|
-
* Return a {@link BlockBoundingBox} object which represents
|
|
6531
|
-
* the validated min and max coordinates of the volume
|
|
6532
|
-
*
|
|
6533
|
-
* @throws This function can throw errors.
|
|
6534
|
-
*/
|
|
6535
|
-
getBoundingBox(): BlockBoundingBox;
|
|
6536
6165
|
/**
|
|
6537
6166
|
* @remarks
|
|
6538
6167
|
* Return the capacity (volume) of the BlockVolume (W*D*H)
|
|
@@ -6807,23 +6436,6 @@ export class Camera {
|
|
|
6807
6436
|
| CameraSetRotOptions
|
|
6808
6437
|
| CameraTargetOptions,
|
|
6809
6438
|
): void;
|
|
6810
|
-
/**
|
|
6811
|
-
* @beta
|
|
6812
|
-
* @remarks
|
|
6813
|
-
* Sets the current active camera with easing.
|
|
6814
|
-
*
|
|
6815
|
-
* @privilege no-restricted-execution - This function can't be called in restricted-execution mode.
|
|
6816
|
-
*
|
|
6817
|
-
* @param cameraPreset
|
|
6818
|
-
* Identifier of a camera preset file defined within JSON.
|
|
6819
|
-
* @param easeOptions
|
|
6820
|
-
* Options to ease the camera from the previous camera to the
|
|
6821
|
-
* current one.
|
|
6822
|
-
* @throws
|
|
6823
|
-
* Throws when easing to minecraft:first_person presets
|
|
6824
|
-
* currently without the experimental cameras toggle enabled.
|
|
6825
|
-
*/
|
|
6826
|
-
setCameraWithEase(cameraPreset: string, easeOptions: EaseOptions): void;
|
|
6827
6439
|
/**
|
|
6828
6440
|
* @remarks
|
|
6829
6441
|
* Sets the current active camera for the specified player and
|
|
@@ -6859,24 +6471,6 @@ export class Camera {
|
|
|
6859
6471
|
stopShaking(): void;
|
|
6860
6472
|
}
|
|
6861
6473
|
|
|
6862
|
-
/**
|
|
6863
|
-
* @beta
|
|
6864
|
-
* Loot item function that will try to copy the block entity
|
|
6865
|
-
* data from the destroyed block to the dropped item.
|
|
6866
|
-
*/
|
|
6867
|
-
// @ts-ignore Class inheritance allowed for native defined classes
|
|
6868
|
-
export class CarryOverBlockEntityDataFunction extends LootItemFunction {
|
|
6869
|
-
private constructor();
|
|
6870
|
-
/**
|
|
6871
|
-
* @remarks
|
|
6872
|
-
* If true, and if the block entity had dynamic_properties, the
|
|
6873
|
-
* function will copy the dynamic properties from the block
|
|
6874
|
-
* entity to the dropped item.
|
|
6875
|
-
*
|
|
6876
|
-
*/
|
|
6877
|
-
readonly dynamicProperties: boolean;
|
|
6878
|
-
}
|
|
6879
|
-
|
|
6880
6474
|
/**
|
|
6881
6475
|
* CatmullRom spline creation.
|
|
6882
6476
|
*/
|
|
@@ -6892,208 +6486,49 @@ export class CatmullRomSpline {
|
|
|
6892
6486
|
}
|
|
6893
6487
|
|
|
6894
6488
|
/**
|
|
6895
|
-
*
|
|
6896
|
-
* An event that fires as players enter chat messages.
|
|
6489
|
+
* Contains the device information for a client instance.
|
|
6897
6490
|
*/
|
|
6898
|
-
|
|
6491
|
+
// @ts-ignore Class inheritance allowed for native defined classes
|
|
6492
|
+
export class ClientSystemInfo extends SystemInfo {
|
|
6899
6493
|
private constructor();
|
|
6900
6494
|
/**
|
|
6901
6495
|
* @remarks
|
|
6902
|
-
*
|
|
6496
|
+
* The locale selected by the client (e.g., en_US, fr_FR,
|
|
6497
|
+
* ja_JP). Note that in most cases, server scripts should not
|
|
6498
|
+
* use this property to manually localize text. Instead, use
|
|
6499
|
+
* {@link RawMessage} with a translate field to send
|
|
6500
|
+
* localization keys, allowing each client to resolve them in
|
|
6501
|
+
* their own language automatically. Direct use of locale for
|
|
6502
|
+
* localization is fragile and may produce unexpected results
|
|
6503
|
+
* when players with different languages are on the same
|
|
6504
|
+
* server.
|
|
6903
6505
|
*
|
|
6904
6506
|
*/
|
|
6905
|
-
readonly
|
|
6507
|
+
readonly locale: string;
|
|
6906
6508
|
/**
|
|
6907
6509
|
* @remarks
|
|
6908
|
-
*
|
|
6510
|
+
* The max render distance for the device in chunks.
|
|
6909
6511
|
*
|
|
6910
6512
|
*/
|
|
6911
|
-
readonly
|
|
6513
|
+
readonly maxRenderDistance: number;
|
|
6912
6514
|
/**
|
|
6913
6515
|
* @remarks
|
|
6914
|
-
*
|
|
6915
|
-
* defined, this message is directly targeted to one or more
|
|
6916
|
-
* players (i.e., is not broadcast.)
|
|
6516
|
+
* The platform type of the device.
|
|
6917
6517
|
*
|
|
6918
6518
|
*/
|
|
6919
|
-
readonly
|
|
6519
|
+
readonly platformType: PlatformType;
|
|
6920
6520
|
}
|
|
6921
6521
|
|
|
6922
6522
|
/**
|
|
6923
|
-
*
|
|
6924
|
-
* Manages callbacks that are connected to chat messages being
|
|
6925
|
-
* sent.
|
|
6523
|
+
* Contains return data on the result of a command execution.
|
|
6926
6524
|
*/
|
|
6927
|
-
export class
|
|
6525
|
+
export class CommandResult {
|
|
6928
6526
|
private constructor();
|
|
6929
6527
|
/**
|
|
6930
6528
|
* @remarks
|
|
6931
|
-
*
|
|
6932
|
-
*
|
|
6933
|
-
*
|
|
6934
|
-
* @privilege no-restricted-execution - This function can't be called in restricted-execution mode.
|
|
6935
|
-
*
|
|
6936
|
-
* @privilege early-execution-allowed - This function can be called in early-execution mode.
|
|
6937
|
-
*
|
|
6938
|
-
*/
|
|
6939
|
-
subscribe(callback: (arg0: ChatSendAfterEvent) => void): (arg0: ChatSendAfterEvent) => void;
|
|
6940
|
-
/**
|
|
6941
|
-
* @remarks
|
|
6942
|
-
* Removes a callback from being called when new chat messages
|
|
6943
|
-
* are sent.
|
|
6944
|
-
*
|
|
6945
|
-
* @privilege no-restricted-execution - This function can't be called in restricted-execution mode.
|
|
6946
|
-
*
|
|
6947
|
-
* @privilege early-execution-allowed - This function can be called in early-execution mode.
|
|
6948
|
-
*
|
|
6949
|
-
*/
|
|
6950
|
-
unsubscribe(callback: (arg0: ChatSendAfterEvent) => void): void;
|
|
6951
|
-
}
|
|
6952
|
-
|
|
6953
|
-
/**
|
|
6954
|
-
* @beta
|
|
6955
|
-
* An event that fires as players enter chat messages.
|
|
6956
|
-
*/
|
|
6957
|
-
export class ChatSendBeforeEvent {
|
|
6958
|
-
private constructor();
|
|
6959
|
-
/**
|
|
6960
|
-
* @remarks
|
|
6961
|
-
* If set to true in a beforeChat event handler, this message
|
|
6962
|
-
* is not broadcast out.
|
|
6963
|
-
*
|
|
6964
|
-
*/
|
|
6965
|
-
cancel: boolean;
|
|
6966
|
-
/**
|
|
6967
|
-
* @remarks
|
|
6968
|
-
* Message that is being broadcast.
|
|
6969
|
-
*
|
|
6970
|
-
*/
|
|
6971
|
-
readonly message: string;
|
|
6972
|
-
/**
|
|
6973
|
-
* @remarks
|
|
6974
|
-
* Player that sent the chat message.
|
|
6975
|
-
*
|
|
6976
|
-
*/
|
|
6977
|
-
readonly sender: Player;
|
|
6978
|
-
/**
|
|
6979
|
-
* @remarks
|
|
6980
|
-
* Optional list of players that will receive this message. If
|
|
6981
|
-
* defined, this message is directly targeted to one or more
|
|
6982
|
-
* players (i.e., is not broadcast). This list can be modified
|
|
6983
|
-
* to change the message recipients.
|
|
6984
|
-
*
|
|
6985
|
-
*/
|
|
6986
|
-
targets?: Player[];
|
|
6987
|
-
}
|
|
6988
|
-
|
|
6989
|
-
/**
|
|
6990
|
-
* @beta
|
|
6991
|
-
* Manages callbacks that are connected to an event that fires
|
|
6992
|
-
* before chat messages are sent.
|
|
6993
|
-
* @example customCommand.ts
|
|
6994
|
-
* ```typescript
|
|
6995
|
-
* import { world, DimensionLocation } from '@minecraft/server';
|
|
6996
|
-
*
|
|
6997
|
-
* function customCommand(targetLocation: DimensionLocation) {
|
|
6998
|
-
* const chatCallback = world.beforeEvents.chatSend.subscribe(eventData => {
|
|
6999
|
-
* if (eventData.message.includes('cancel')) {
|
|
7000
|
-
* // Cancel event if the message contains "cancel"
|
|
7001
|
-
* eventData.cancel = true;
|
|
7002
|
-
* } else {
|
|
7003
|
-
* const args = eventData.message.split(' ');
|
|
7004
|
-
*
|
|
7005
|
-
* if (args.length > 0) {
|
|
7006
|
-
* switch (args[0].toLowerCase()) {
|
|
7007
|
-
* case 'echo':
|
|
7008
|
-
* // Send a modified version of chat message
|
|
7009
|
-
* world.sendMessage(`Echo '${eventData.message.substring(4).trim()}'`);
|
|
7010
|
-
* break;
|
|
7011
|
-
* case 'help':
|
|
7012
|
-
* world.sendMessage(`Available commands: echo <message>`);
|
|
7013
|
-
* break;
|
|
7014
|
-
* }
|
|
7015
|
-
* }
|
|
7016
|
-
* }
|
|
7017
|
-
* });
|
|
7018
|
-
* }
|
|
7019
|
-
* ```
|
|
7020
|
-
*/
|
|
7021
|
-
export class ChatSendBeforeEventSignal {
|
|
7022
|
-
private constructor();
|
|
7023
|
-
/**
|
|
7024
|
-
* @remarks
|
|
7025
|
-
* Adds a callback that will be called before new chat messages
|
|
7026
|
-
* are sent.
|
|
7027
|
-
*
|
|
7028
|
-
* @privilege no-restricted-execution - This function can't be called in restricted-execution mode.
|
|
7029
|
-
*
|
|
7030
|
-
* @privilege early-execution-allowed - This function can be called in early-execution mode.
|
|
7031
|
-
*
|
|
7032
|
-
* @param callback
|
|
7033
|
-
* This closure is called with restricted-execution privilege.
|
|
7034
|
-
* @returns
|
|
7035
|
-
* Closure that is called with restricted-execution privilege.
|
|
7036
|
-
*/
|
|
7037
|
-
subscribe(callback: (arg0: ChatSendBeforeEvent) => void): (arg0: ChatSendBeforeEvent) => void;
|
|
7038
|
-
/**
|
|
7039
|
-
* @remarks
|
|
7040
|
-
* Removes a callback from being called before new chat
|
|
7041
|
-
* messages are sent.
|
|
7042
|
-
*
|
|
7043
|
-
* @privilege no-restricted-execution - This function can't be called in restricted-execution mode.
|
|
7044
|
-
*
|
|
7045
|
-
* @privilege early-execution-allowed - This function can be called in early-execution mode.
|
|
7046
|
-
*
|
|
7047
|
-
* @param callback
|
|
7048
|
-
* This closure is called with restricted-execution privilege.
|
|
7049
|
-
*/
|
|
7050
|
-
unsubscribe(callback: (arg0: ChatSendBeforeEvent) => void): void;
|
|
7051
|
-
}
|
|
7052
|
-
|
|
7053
|
-
/**
|
|
7054
|
-
* Contains the device information for a client instance.
|
|
7055
|
-
*/
|
|
7056
|
-
// @ts-ignore Class inheritance allowed for native defined classes
|
|
7057
|
-
export class ClientSystemInfo extends SystemInfo {
|
|
7058
|
-
private constructor();
|
|
7059
|
-
/**
|
|
7060
|
-
* @remarks
|
|
7061
|
-
* The locale selected by the client (e.g., en_US, fr_FR,
|
|
7062
|
-
* ja_JP). Note that in most cases, server scripts should not
|
|
7063
|
-
* use this property to manually localize text. Instead, use
|
|
7064
|
-
* {@link RawMessage} with a translate field to send
|
|
7065
|
-
* localization keys, allowing each client to resolve them in
|
|
7066
|
-
* their own language automatically. Direct use of locale for
|
|
7067
|
-
* localization is fragile and may produce unexpected results
|
|
7068
|
-
* when players with different languages are on the same
|
|
7069
|
-
* server.
|
|
7070
|
-
*
|
|
7071
|
-
*/
|
|
7072
|
-
readonly locale: string;
|
|
7073
|
-
/**
|
|
7074
|
-
* @remarks
|
|
7075
|
-
* The max render distance for the device in chunks.
|
|
7076
|
-
*
|
|
7077
|
-
*/
|
|
7078
|
-
readonly maxRenderDistance: number;
|
|
7079
|
-
/**
|
|
7080
|
-
* @remarks
|
|
7081
|
-
* The platform type of the device.
|
|
7082
|
-
*
|
|
7083
|
-
*/
|
|
7084
|
-
readonly platformType: PlatformType;
|
|
7085
|
-
}
|
|
7086
|
-
|
|
7087
|
-
/**
|
|
7088
|
-
* Contains return data on the result of a command execution.
|
|
7089
|
-
*/
|
|
7090
|
-
export class CommandResult {
|
|
7091
|
-
private constructor();
|
|
7092
|
-
/**
|
|
7093
|
-
* @remarks
|
|
7094
|
-
* If the command operates against a number of entities,
|
|
7095
|
-
* blocks, or items, this returns the number of successful
|
|
7096
|
-
* applications of this command.
|
|
6529
|
+
* If the command operates against a number of entities,
|
|
6530
|
+
* blocks, or items, this returns the number of successful
|
|
6531
|
+
* applications of this command.
|
|
7097
6532
|
*
|
|
7098
6533
|
*/
|
|
7099
6534
|
readonly successCount: number;
|
|
@@ -7258,9 +6693,7 @@ export class Container {
|
|
|
7258
6693
|
*
|
|
7259
6694
|
* @param itemStack
|
|
7260
6695
|
* The stack of items to add.
|
|
7261
|
-
* @throws
|
|
7262
|
-
* Won't throw {@link ContainerRules} error for over weight
|
|
7263
|
-
* limit but will instead add items up to the weight limit.
|
|
6696
|
+
* @throws This function can throw errors.
|
|
7264
6697
|
*
|
|
7265
6698
|
* {@link ContainerRulesError}
|
|
7266
6699
|
*
|
|
@@ -7498,8 +6931,6 @@ export class Container {
|
|
|
7498
6931
|
* @throws
|
|
7499
6932
|
* Throws if either this container or `toContainer` are invalid
|
|
7500
6933
|
* or if the `fromSlot` or `toSlot` indices out of bounds.
|
|
7501
|
-
* Won't throw {@link ContainerRules} error for over weight
|
|
7502
|
-
* limit but will instead add items up to the weight limit.
|
|
7503
6934
|
*
|
|
7504
6935
|
* {@link ContainerRulesError}
|
|
7505
6936
|
*
|
|
@@ -8126,15 +7557,6 @@ export class Dimension {
|
|
|
8126
7557
|
*
|
|
8127
7558
|
*/
|
|
8128
7559
|
readonly localizationKey: string;
|
|
8129
|
-
/**
|
|
8130
|
-
* @beta
|
|
8131
|
-
* @remarks
|
|
8132
|
-
* Provides access to point-of-interest (POI) managers for this
|
|
8133
|
-
* dimension. This property is available only when the POI
|
|
8134
|
-
* experiment is enabled.
|
|
8135
|
-
*
|
|
8136
|
-
*/
|
|
8137
|
-
readonly poiManager: PoiManager;
|
|
8138
7560
|
/**
|
|
8139
7561
|
* @remarks
|
|
8140
7562
|
* Calculates the location of the closest biome of a particular
|
|
@@ -8440,14 +7862,10 @@ export class Dimension {
|
|
|
8440
7862
|
/**
|
|
8441
7863
|
* @rc
|
|
8442
7864
|
* @remarks
|
|
8443
|
-
* Gets all the blocks in a volume that satisfy the
|
|
8444
|
-
* options.
|
|
7865
|
+
* Gets all the blocks in a volume that satisfy the filter.
|
|
8445
7866
|
*
|
|
8446
7867
|
* @param volume
|
|
8447
7868
|
* Volume of blocks that will be checked.
|
|
8448
|
-
* @param options
|
|
8449
|
-
* Block query options including filter criteria and optional
|
|
8450
|
-
* closest/farthest distance sorting from a location.
|
|
8451
7869
|
* @param allowUnloadedChunks
|
|
8452
7870
|
* If set to true will suppress the UnloadedChunksError if some
|
|
8453
7871
|
* or all of the block volume is outside of the loaded chunks.
|
|
@@ -8456,7 +7874,7 @@ export class Dimension {
|
|
|
8456
7874
|
* Defaults to: false
|
|
8457
7875
|
* @returns
|
|
8458
7876
|
* Returns the ListBlockVolume that contains all the block
|
|
8459
|
-
* locations that satisfied the block
|
|
7877
|
+
* locations that satisfied the block filter.
|
|
8460
7878
|
* @throws This function can throw errors.
|
|
8461
7879
|
*
|
|
8462
7880
|
* {@link minecraftcommon.ArgumentOutOfBoundsError}
|
|
@@ -8581,26 +7999,6 @@ export class Dimension {
|
|
|
8581
7999
|
* {@link minecraftcommon.UnsupportedFunctionalityError}
|
|
8582
8000
|
*/
|
|
8583
8001
|
getEntitiesFromRay(location: Vector3, direction: Vector3, options?: EntityRaycastOptions): EntityRaycastHit[];
|
|
8584
|
-
/**
|
|
8585
|
-
* @beta
|
|
8586
|
-
* @remarks
|
|
8587
|
-
* Returns a vector of generated structures that contain the
|
|
8588
|
-
* specified location (ex: Pillager Outpost, Mineshaft, etc.).
|
|
8589
|
-
* The vector will be empty if no structures are found.
|
|
8590
|
-
*
|
|
8591
|
-
* @param location
|
|
8592
|
-
* Location at which to check for structures.
|
|
8593
|
-
* @throws
|
|
8594
|
-
* An error will be thrown if the location is out of world
|
|
8595
|
-
* bounds.
|
|
8596
|
-
* An error will be thrown if the location is in an unloaded
|
|
8597
|
-
* chunk.
|
|
8598
|
-
*
|
|
8599
|
-
* {@link LocationInUnloadedChunkError}
|
|
8600
|
-
*
|
|
8601
|
-
* {@link LocationOutOfWorldBoundariesError}
|
|
8602
|
-
*/
|
|
8603
|
-
getGeneratedStructures(location: Vector3): (minecraftvanilladata.MinecraftFeatureTypes | string)[];
|
|
8604
8002
|
/**
|
|
8605
8003
|
* @remarks
|
|
8606
8004
|
* Returns the total brightness level of light shining on a
|
|
@@ -8662,16 +8060,6 @@ export class Dimension {
|
|
|
8662
8060
|
* @throws This function can throw errors.
|
|
8663
8061
|
*/
|
|
8664
8062
|
getTopmostBlock(locationXZ: VectorXZ, minHeight?: number): Block | undefined;
|
|
8665
|
-
/**
|
|
8666
|
-
* @beta
|
|
8667
|
-
* @remarks
|
|
8668
|
-
* Returns the current weather.
|
|
8669
|
-
*
|
|
8670
|
-
* @returns
|
|
8671
|
-
* Returns a WeatherType that explains the broad category of
|
|
8672
|
-
* weather that is currently going on.
|
|
8673
|
-
*/
|
|
8674
|
-
getWeather(): WeatherType;
|
|
8675
8063
|
/**
|
|
8676
8064
|
* @remarks
|
|
8677
8065
|
* Returns true if the chunk at the given location is loaded
|
|
@@ -8917,11 +8305,7 @@ export class Dimension {
|
|
|
8917
8305
|
* }
|
|
8918
8306
|
* ```
|
|
8919
8307
|
*/
|
|
8920
|
-
spawnEntity
|
|
8921
|
-
identifier: EntityIdentifierType<NoInfer<T>>,
|
|
8922
|
-
location: Vector3,
|
|
8923
|
-
options?: SpawnEntityOptions,
|
|
8924
|
-
): Entity;
|
|
8308
|
+
spawnEntity(identifier: EntityType | string, location: Vector3, options?: SpawnEntityOptions): Entity;
|
|
8925
8309
|
/**
|
|
8926
8310
|
* @remarks
|
|
8927
8311
|
* Creates a new item stack as an entity at the specified
|
|
@@ -9017,7 +8401,7 @@ export class Dimension {
|
|
|
9017
8401
|
*/
|
|
9018
8402
|
spawnParticle(effectName: string, location: Vector3, molangVariables?: MolangVariableMap): void;
|
|
9019
8403
|
/**
|
|
9020
|
-
* @
|
|
8404
|
+
* @rc
|
|
9021
8405
|
* @remarks
|
|
9022
8406
|
* Spawns an experience orb at a specified location in the
|
|
9023
8407
|
* dimension.
|
|
@@ -9036,26 +8420,6 @@ export class Dimension {
|
|
|
9036
8420
|
* {@link LocationOutOfWorldBoundariesError}
|
|
9037
8421
|
*/
|
|
9038
8422
|
spawnXp(location: Vector3, amount: number): void;
|
|
9039
|
-
/**
|
|
9040
|
-
* @beta
|
|
9041
|
-
* @remarks
|
|
9042
|
-
* Stops all sounds from playing for all players.
|
|
9043
|
-
*
|
|
9044
|
-
* @privilege no-restricted-execution - This function can't be called in restricted-execution mode.
|
|
9045
|
-
*
|
|
9046
|
-
*/
|
|
9047
|
-
stopAllSounds(): void;
|
|
9048
|
-
/**
|
|
9049
|
-
* @beta
|
|
9050
|
-
* @remarks
|
|
9051
|
-
* Stops a sound from playing for all players.
|
|
9052
|
-
*
|
|
9053
|
-
* @privilege no-restricted-execution - This function can't be called in restricted-execution mode.
|
|
9054
|
-
*
|
|
9055
|
-
* @param soundId
|
|
9056
|
-
* Identifier of the sound.
|
|
9057
|
-
*/
|
|
9058
|
-
stopSound(soundId: string): void;
|
|
9059
8423
|
}
|
|
9060
8424
|
|
|
9061
8425
|
/**
|
|
@@ -9639,18 +9003,6 @@ export class Entity {
|
|
|
9639
9003
|
*
|
|
9640
9004
|
*/
|
|
9641
9005
|
readonly scoreboardIdentity?: ScoreboardIdentity;
|
|
9642
|
-
/**
|
|
9643
|
-
* @beta
|
|
9644
|
-
* @remarks
|
|
9645
|
-
* Retrieves or sets an entity that is used as the target of
|
|
9646
|
-
* AI-related behaviors, like attacking. If the entity
|
|
9647
|
-
* currently has no target returns undefined.
|
|
9648
|
-
*
|
|
9649
|
-
* @throws This property can throw when used.
|
|
9650
|
-
*
|
|
9651
|
-
* {@link InvalidEntityError}
|
|
9652
|
-
*/
|
|
9653
|
-
readonly target?: Entity;
|
|
9654
9006
|
/**
|
|
9655
9007
|
* @remarks
|
|
9656
9008
|
* Identifier of the type of the entity - for example,
|
|
@@ -10895,18 +10247,6 @@ export class EntityBaseMovementComponent extends EntityComponent {
|
|
|
10895
10247
|
// @ts-ignore Class inheritance allowed for native defined classes
|
|
10896
10248
|
export class EntityBreathableComponent extends EntityComponent {
|
|
10897
10249
|
private constructor();
|
|
10898
|
-
/**
|
|
10899
|
-
* @beta
|
|
10900
|
-
* @remarks
|
|
10901
|
-
* The current air supply of the entity.
|
|
10902
|
-
*
|
|
10903
|
-
* @privilege restricted-execution-read-only - This property can't be edited in restricted-execution mode.
|
|
10904
|
-
*
|
|
10905
|
-
* @throws
|
|
10906
|
-
* Will throw an error if the air supply is out of bounds
|
|
10907
|
-
* [suffocationTime, maxAirSupply].
|
|
10908
|
-
*/
|
|
10909
|
-
airSupply: number;
|
|
10910
10250
|
/**
|
|
10911
10251
|
* @remarks
|
|
10912
10252
|
* If true, this entity can breathe in air.
|
|
@@ -10935,14 +10275,6 @@ export class EntityBreathableComponent extends EntityComponent {
|
|
|
10935
10275
|
* @throws This property can throw when used.
|
|
10936
10276
|
*/
|
|
10937
10277
|
readonly breathesWater: boolean;
|
|
10938
|
-
/**
|
|
10939
|
-
* @beta
|
|
10940
|
-
* @remarks
|
|
10941
|
-
* If true, the entity is able to breathe.
|
|
10942
|
-
*
|
|
10943
|
-
* @throws This property can throw when used.
|
|
10944
|
-
*/
|
|
10945
|
-
readonly canBreathe: boolean;
|
|
10946
10278
|
/**
|
|
10947
10279
|
* @remarks
|
|
10948
10280
|
* If true, this entity will have visible bubbles while in
|
|
@@ -12155,28 +11487,6 @@ export class EntityIsStunnedComponent extends EntityComponent {
|
|
|
12155
11487
|
// @ts-ignore Class inheritance allowed for native defined classes
|
|
12156
11488
|
export class EntityIsTamedComponent extends EntityComponent {
|
|
12157
11489
|
private constructor();
|
|
12158
|
-
/**
|
|
12159
|
-
* @beta
|
|
12160
|
-
* @remarks
|
|
12161
|
-
* Returns the player that has tamed the entity, or 'undefined'
|
|
12162
|
-
* if the entity has no player owner.
|
|
12163
|
-
*
|
|
12164
|
-
* @throws This property can throw when used.
|
|
12165
|
-
*
|
|
12166
|
-
* {@link InvalidEntityError}
|
|
12167
|
-
*/
|
|
12168
|
-
readonly tamedToPlayer?: Player;
|
|
12169
|
-
/**
|
|
12170
|
-
* @beta
|
|
12171
|
-
* @remarks
|
|
12172
|
-
* Returns the id of the player that has tamed the entity, or
|
|
12173
|
-
* 'undefined' if the entity has no player owner.
|
|
12174
|
-
*
|
|
12175
|
-
* @throws This property can throw when used.
|
|
12176
|
-
*
|
|
12177
|
-
* {@link InvalidEntityError}
|
|
12178
|
-
*/
|
|
12179
|
-
readonly tamedToPlayerId?: string;
|
|
12180
11490
|
static readonly componentId = 'minecraft:is_tamed';
|
|
12181
11491
|
}
|
|
12182
11492
|
|
|
@@ -12915,42 +12225,6 @@ export class EntityNavigationWalkComponent extends EntityNavigationComponent {
|
|
|
12915
12225
|
static readonly componentId = 'minecraft:navigation.walk';
|
|
12916
12226
|
}
|
|
12917
12227
|
|
|
12918
|
-
/**
|
|
12919
|
-
* @beta
|
|
12920
|
-
* Adds NPC capabilities to an entity such as custom skin,
|
|
12921
|
-
* name, and dialogue interactions.
|
|
12922
|
-
*/
|
|
12923
|
-
// @ts-ignore Class inheritance allowed for native defined classes
|
|
12924
|
-
export class EntityNpcComponent extends EntityComponent {
|
|
12925
|
-
private constructor();
|
|
12926
|
-
/**
|
|
12927
|
-
* @remarks
|
|
12928
|
-
* The DialogueScene that is opened when players first interact
|
|
12929
|
-
* with the NPC.
|
|
12930
|
-
*
|
|
12931
|
-
* @privilege restricted-execution-read-only - This property can't be edited in restricted-execution mode.
|
|
12932
|
-
*
|
|
12933
|
-
*/
|
|
12934
|
-
defaultScene: string;
|
|
12935
|
-
/**
|
|
12936
|
-
* @remarks
|
|
12937
|
-
* The name of the NPC as it is displayed to players.
|
|
12938
|
-
*
|
|
12939
|
-
* @privilege restricted-execution-read-only - This property can't be edited in restricted-execution mode.
|
|
12940
|
-
*
|
|
12941
|
-
*/
|
|
12942
|
-
name: string;
|
|
12943
|
-
/**
|
|
12944
|
-
* @remarks
|
|
12945
|
-
* The index of the skin the NPC will use.
|
|
12946
|
-
*
|
|
12947
|
-
* @privilege restricted-execution-read-only - This property can't be edited in restricted-execution mode.
|
|
12948
|
-
*
|
|
12949
|
-
*/
|
|
12950
|
-
skinIndex: number;
|
|
12951
|
-
static readonly componentId = 'minecraft:npc';
|
|
12952
|
-
}
|
|
12953
|
-
|
|
12954
12228
|
/**
|
|
12955
12229
|
* When present on an entity, this entity is on fire.
|
|
12956
12230
|
* @example setOnFire.ts
|
|
@@ -14017,7 +13291,7 @@ export class EntityTypes {
|
|
|
14017
13291
|
* Retrieves an entity type using a string-based identifier.
|
|
14018
13292
|
*
|
|
14019
13293
|
*/
|
|
14020
|
-
static get
|
|
13294
|
+
static get(identifier: string): EntityType | undefined;
|
|
14021
13295
|
/**
|
|
14022
13296
|
* @remarks
|
|
14023
13297
|
* Retrieves a set of all entity types within this world.
|
|
@@ -14743,13 +14017,6 @@ export class GameRules {
|
|
|
14743
14017
|
*
|
|
14744
14018
|
*/
|
|
14745
14019
|
playersSleepingPercentage: number;
|
|
14746
|
-
/**
|
|
14747
|
-
* @beta
|
|
14748
|
-
* @remarks
|
|
14749
|
-
* @privilege restricted-execution-read-only - This property can't be edited in restricted-execution mode.
|
|
14750
|
-
*
|
|
14751
|
-
*/
|
|
14752
|
-
playerWaypoints: PlayerWaypointsMode;
|
|
14753
14020
|
/**
|
|
14754
14021
|
* @remarks
|
|
14755
14022
|
* @privilege restricted-execution-read-only - This property can't be edited in restricted-execution mode.
|
|
@@ -17668,33 +16935,6 @@ export class MatchToolCondition extends LootItemCondition {
|
|
|
17668
16935
|
readonly itemTagsNone: string[];
|
|
17669
16936
|
}
|
|
17670
16937
|
|
|
17671
|
-
/**
|
|
17672
|
-
* @beta
|
|
17673
|
-
* A specific currently-internal event used for passing
|
|
17674
|
-
* messages from client to server.
|
|
17675
|
-
*/
|
|
17676
|
-
export class MessageReceiveAfterEvent {
|
|
17677
|
-
private constructor();
|
|
17678
|
-
/**
|
|
17679
|
-
* @remarks
|
|
17680
|
-
* The message identifier.
|
|
17681
|
-
*
|
|
17682
|
-
*/
|
|
17683
|
-
readonly id: string;
|
|
17684
|
-
/**
|
|
17685
|
-
* @remarks
|
|
17686
|
-
* The message.
|
|
17687
|
-
*
|
|
17688
|
-
*/
|
|
17689
|
-
readonly message: string;
|
|
17690
|
-
/**
|
|
17691
|
-
* @remarks
|
|
17692
|
-
* The player who sent the message.
|
|
17693
|
-
*
|
|
17694
|
-
*/
|
|
17695
|
-
readonly player: Player;
|
|
17696
|
-
}
|
|
17697
|
-
|
|
17698
16938
|
/**
|
|
17699
16939
|
* Contains a set of additional variable values for further
|
|
17700
16940
|
* defining how rendering and animations function.
|
|
@@ -17764,61 +17004,18 @@ export class MolangVariableMap {
|
|
|
17764
17004
|
}
|
|
17765
17005
|
|
|
17766
17006
|
/**
|
|
17767
|
-
*
|
|
17768
|
-
*
|
|
17007
|
+
* Loot item condition that checks whether the looting entity
|
|
17008
|
+
* is currently a passenger of a specific type of entity.
|
|
17769
17009
|
*/
|
|
17770
|
-
|
|
17010
|
+
// @ts-ignore Class inheritance allowed for native defined classes
|
|
17011
|
+
export class PassengerOfEntityCondition extends LootItemCondition {
|
|
17771
17012
|
private constructor();
|
|
17772
17013
|
/**
|
|
17773
17014
|
* @remarks
|
|
17774
|
-
* The
|
|
17775
|
-
*
|
|
17776
|
-
*/
|
|
17777
|
-
readonly settingName: string;
|
|
17778
|
-
/**
|
|
17779
|
-
* @remarks
|
|
17780
|
-
* The value of the setting.
|
|
17015
|
+
* The entity type required for this condition to pass.
|
|
17781
17016
|
*
|
|
17782
17017
|
*/
|
|
17783
|
-
readonly
|
|
17784
|
-
}
|
|
17785
|
-
|
|
17786
|
-
/**
|
|
17787
|
-
* @beta
|
|
17788
|
-
*/
|
|
17789
|
-
export class PackSettingChangeAfterEventSignal {
|
|
17790
|
-
private constructor();
|
|
17791
|
-
/**
|
|
17792
|
-
* @remarks
|
|
17793
|
-
* @privilege no-restricted-execution - This function can't be called in restricted-execution mode.
|
|
17794
|
-
*
|
|
17795
|
-
* @privilege early-execution-allowed - This function can be called in early-execution mode.
|
|
17796
|
-
*
|
|
17797
|
-
*/
|
|
17798
|
-
subscribe(callback: (arg0: PackSettingChangeAfterEvent) => void): (arg0: PackSettingChangeAfterEvent) => void;
|
|
17799
|
-
/**
|
|
17800
|
-
* @remarks
|
|
17801
|
-
* @privilege no-restricted-execution - This function can't be called in restricted-execution mode.
|
|
17802
|
-
*
|
|
17803
|
-
* @privilege early-execution-allowed - This function can be called in early-execution mode.
|
|
17804
|
-
*
|
|
17805
|
-
*/
|
|
17806
|
-
unsubscribe(callback: (arg0: PackSettingChangeAfterEvent) => void): void;
|
|
17807
|
-
}
|
|
17808
|
-
|
|
17809
|
-
/**
|
|
17810
|
-
* Loot item condition that checks whether the looting entity
|
|
17811
|
-
* is currently a passenger of a specific type of entity.
|
|
17812
|
-
*/
|
|
17813
|
-
// @ts-ignore Class inheritance allowed for native defined classes
|
|
17814
|
-
export class PassengerOfEntityCondition extends LootItemCondition {
|
|
17815
|
-
private constructor();
|
|
17816
|
-
/**
|
|
17817
|
-
* @remarks
|
|
17818
|
-
* The entity type required for this condition to pass.
|
|
17819
|
-
*
|
|
17820
|
-
*/
|
|
17821
|
-
readonly entityType: string;
|
|
17018
|
+
readonly entityType: string;
|
|
17822
17019
|
}
|
|
17823
17020
|
|
|
17824
17021
|
/**
|
|
@@ -17973,63 +17170,6 @@ export class Player extends Entity {
|
|
|
17973
17170
|
* @throws This property can throw when used.
|
|
17974
17171
|
*/
|
|
17975
17172
|
readonly camera: Camera;
|
|
17976
|
-
/**
|
|
17977
|
-
* @beta
|
|
17978
|
-
* @remarks
|
|
17979
|
-
* The player's chat display name, composed from
|
|
17980
|
-
* {@link Player.chatNamePrefix} + {@link Player.name} +
|
|
17981
|
-
* {@link Player.chatNameSuffix}. This is the name shown as the
|
|
17982
|
-
* author of chat messages sent by this player. To change the
|
|
17983
|
-
* name shown above the player's head, use
|
|
17984
|
-
* {@link Entity.nameTag}.
|
|
17985
|
-
*
|
|
17986
|
-
* @throws This property can throw when used.
|
|
17987
|
-
*
|
|
17988
|
-
* {@link InvalidEntityError}
|
|
17989
|
-
*/
|
|
17990
|
-
readonly chatDisplayName: string;
|
|
17991
|
-
/**
|
|
17992
|
-
* @beta
|
|
17993
|
-
* @remarks
|
|
17994
|
-
* An optional string that, when set, is prepended to the text
|
|
17995
|
-
* of chat messages sent by this player. Useful for applying
|
|
17996
|
-
* formatting or color codes to a player's messages (e.g., '§a'
|
|
17997
|
-
* to make their messages green). Does not affect the player's
|
|
17998
|
-
* name display - use {@link Player.chatNamePrefix} for the
|
|
17999
|
-
* name shown in chat, or {@link Entity.nameTag} for the name
|
|
18000
|
-
* above the player's head. Set to undefined to clear.
|
|
18001
|
-
*
|
|
18002
|
-
* @privilege restricted-execution-read-only - This property can't be edited in restricted-execution mode.
|
|
18003
|
-
*
|
|
18004
|
-
*/
|
|
18005
|
-
chatMessagePrefix?: string;
|
|
18006
|
-
/**
|
|
18007
|
-
* @beta
|
|
18008
|
-
* @remarks
|
|
18009
|
-
* An optional string that, when set, is prepended to the
|
|
18010
|
-
* player's name in chat messages. Does not affect the name tag
|
|
18011
|
-
* above the player's head or the player list - use
|
|
18012
|
-
* {@link Entity.nameTag} for that. To prefix the message text
|
|
18013
|
-
* itself, use {@link Player.chatMessagePrefix}. Set to
|
|
18014
|
-
* undefined to clear.
|
|
18015
|
-
*
|
|
18016
|
-
* @privilege restricted-execution-read-only - This property can't be edited in restricted-execution mode.
|
|
18017
|
-
*
|
|
18018
|
-
*/
|
|
18019
|
-
chatNamePrefix?: string;
|
|
18020
|
-
/**
|
|
18021
|
-
* @beta
|
|
18022
|
-
* @remarks
|
|
18023
|
-
* An optional string that, when set, is appended to the
|
|
18024
|
-
* player's name in chat messages. Does not affect the name tag
|
|
18025
|
-
* above the player's head or the player list - use
|
|
18026
|
-
* {@link Entity.nameTag} for that. See also
|
|
18027
|
-
* {@link Player.chatNamePrefix}. Set to undefined to clear.
|
|
18028
|
-
*
|
|
18029
|
-
* @privilege restricted-execution-read-only - This property can't be edited in restricted-execution mode.
|
|
18030
|
-
*
|
|
18031
|
-
*/
|
|
18032
|
-
chatNameSuffix?: string;
|
|
18033
17173
|
/**
|
|
18034
17174
|
* @remarks
|
|
18035
17175
|
* Contains the player's device information.
|
|
@@ -18134,19 +17274,6 @@ export class Player extends Entity {
|
|
|
18134
17274
|
* @throws This property can throw when used.
|
|
18135
17275
|
*/
|
|
18136
17276
|
readonly onScreenDisplay: ScreenDisplay;
|
|
18137
|
-
/**
|
|
18138
|
-
* @beta
|
|
18139
|
-
* @remarks
|
|
18140
|
-
* An identifier that can be used to identify a player across
|
|
18141
|
-
* sessions.
|
|
18142
|
-
*
|
|
18143
|
-
* @throws This property can throw when used.
|
|
18144
|
-
*
|
|
18145
|
-
* {@link minecraftcommon.EngineError}
|
|
18146
|
-
*
|
|
18147
|
-
* {@link InvalidEntityError}
|
|
18148
|
-
*/
|
|
18149
|
-
readonly persistentId: string;
|
|
18150
17277
|
/**
|
|
18151
17278
|
* @throws This property can throw when used.
|
|
18152
17279
|
*
|
|
@@ -18220,20 +17347,6 @@ export class Player extends Entity {
|
|
|
18220
17347
|
* Throws if the Entity or Entity ID is invalid.
|
|
18221
17348
|
*/
|
|
18222
17349
|
clearPropertyOverridesForEntity(targetEntity: Entity | string): void;
|
|
18223
|
-
/**
|
|
18224
|
-
* @beta
|
|
18225
|
-
* @remarks
|
|
18226
|
-
* Eats an item, providing the item's hunger and saturation
|
|
18227
|
-
* effects to the player. Can only be used on food items.
|
|
18228
|
-
*
|
|
18229
|
-
* @privilege no-restricted-execution - This function can't be called in restricted-execution mode.
|
|
18230
|
-
*
|
|
18231
|
-
* @param itemStack
|
|
18232
|
-
* The item to eat.
|
|
18233
|
-
* @throws
|
|
18234
|
-
* Throws if the item is not a food item.
|
|
18235
|
-
*/
|
|
18236
|
-
eatItem(itemStack: ItemStack): void;
|
|
18237
17350
|
/**
|
|
18238
17351
|
* @remarks
|
|
18239
17352
|
* The player's aim-assist settings.
|
|
@@ -18267,20 +17380,6 @@ export class Player extends Entity {
|
|
|
18267
17380
|
* @throws This function can throw errors.
|
|
18268
17381
|
*/
|
|
18269
17382
|
getItemCooldown(cooldownCategory: string): number;
|
|
18270
|
-
/**
|
|
18271
|
-
* @beta
|
|
18272
|
-
* @remarks
|
|
18273
|
-
* Gets the player's ping in milliseconds.
|
|
18274
|
-
*
|
|
18275
|
-
* @returns
|
|
18276
|
-
* The player's ping in milliseconds.
|
|
18277
|
-
* @throws This function can throw errors.
|
|
18278
|
-
*
|
|
18279
|
-
* {@link minecraftcommon.EngineError}
|
|
18280
|
-
*
|
|
18281
|
-
* {@link InvalidEntityError}
|
|
18282
|
-
*/
|
|
18283
|
-
getPing(): number;
|
|
18284
17383
|
/**
|
|
18285
17384
|
* @remarks
|
|
18286
17385
|
* Gets the current spawn point of the player.
|
|
@@ -18288,21 +17387,6 @@ export class Player extends Entity {
|
|
|
18288
17387
|
* @throws This function can throw errors.
|
|
18289
17388
|
*/
|
|
18290
17389
|
getSpawnPoint(): DimensionLocation | undefined;
|
|
18291
|
-
/**
|
|
18292
|
-
* @beta
|
|
18293
|
-
* @remarks
|
|
18294
|
-
* Returns the split screen slot of the player.
|
|
18295
|
-
*
|
|
18296
|
-
* @returns
|
|
18297
|
-
* The split screen slot of the player or undefined if the
|
|
18298
|
-
* player is not in a split screen session.
|
|
18299
|
-
* @throws This function can throw errors.
|
|
18300
|
-
*
|
|
18301
|
-
* {@link minecraftcommon.EngineError}
|
|
18302
|
-
*
|
|
18303
|
-
* {@link InvalidEntityError}
|
|
18304
|
-
*/
|
|
18305
|
-
getSplitScreenSlot(): PlayerSplitScreenSlot | undefined;
|
|
18306
17390
|
/**
|
|
18307
17391
|
* @remarks
|
|
18308
17392
|
* Gets the total experience of the Player.
|
|
@@ -18367,17 +17451,6 @@ export class Player extends Entity {
|
|
|
18367
17451
|
* ```
|
|
18368
17452
|
*/
|
|
18369
17453
|
playSound(soundId: SoundDefinition | string, soundOptions?: PlayerSoundOptions): SoundInstance;
|
|
18370
|
-
/**
|
|
18371
|
-
* @beta
|
|
18372
|
-
* @remarks
|
|
18373
|
-
* This is an internal-facing method for posting a system
|
|
18374
|
-
* message to downstream clients.
|
|
18375
|
-
*
|
|
18376
|
-
* @privilege no-restricted-execution - This function can't be called in restricted-execution mode.
|
|
18377
|
-
*
|
|
18378
|
-
* @throws This function can throw errors.
|
|
18379
|
-
*/
|
|
18380
|
-
postClientMessage(id: string, value: string): void;
|
|
18381
17454
|
/**
|
|
18382
17455
|
* @remarks
|
|
18383
17456
|
* Queues an additional music track that only this particular
|
|
@@ -18653,18 +17726,6 @@ export class Player extends Entity {
|
|
|
18653
17726
|
* @throws This function can throw errors.
|
|
18654
17727
|
*/
|
|
18655
17728
|
startItemCooldown(cooldownCategory: string, tickDuration: number): void;
|
|
18656
|
-
/**
|
|
18657
|
-
* @beta
|
|
18658
|
-
* @remarks
|
|
18659
|
-
* Stops all sounds from playing for this particular player.
|
|
18660
|
-
*
|
|
18661
|
-
* @privilege no-restricted-execution - This function can't be called in restricted-execution mode.
|
|
18662
|
-
*
|
|
18663
|
-
* @throws This function can throw errors.
|
|
18664
|
-
*
|
|
18665
|
-
* {@link InvalidEntityError}
|
|
18666
|
-
*/
|
|
18667
|
-
stopAllSounds(): void;
|
|
18668
17729
|
/**
|
|
18669
17730
|
* @remarks
|
|
18670
17731
|
* Stops any music tracks from playing for this particular
|
|
@@ -18675,20 +17736,6 @@ export class Player extends Entity {
|
|
|
18675
17736
|
* @throws This function can throw errors.
|
|
18676
17737
|
*/
|
|
18677
17738
|
stopMusic(): void;
|
|
18678
|
-
/**
|
|
18679
|
-
* @beta
|
|
18680
|
-
* @remarks
|
|
18681
|
-
* Stops a sound from playing for this particular player.
|
|
18682
|
-
*
|
|
18683
|
-
* @privilege no-restricted-execution - This function can't be called in restricted-execution mode.
|
|
18684
|
-
*
|
|
18685
|
-
* @param soundId
|
|
18686
|
-
* Identifier of the sound.
|
|
18687
|
-
* @throws This function can throw errors.
|
|
18688
|
-
*
|
|
18689
|
-
* {@link InvalidEntityError}
|
|
18690
|
-
*/
|
|
18691
|
-
stopSound(soundId: string): void;
|
|
18692
17739
|
}
|
|
18693
17740
|
|
|
18694
17741
|
/**
|
|
@@ -20048,88 +19095,6 @@ export class PlayerPlaceBlockAfterEventSignal {
|
|
|
20048
19095
|
unsubscribe(callback: (arg0: PlayerPlaceBlockAfterEvent) => void): void;
|
|
20049
19096
|
}
|
|
20050
19097
|
|
|
20051
|
-
/**
|
|
20052
|
-
* @beta
|
|
20053
|
-
* Contains information regarding an event before a player
|
|
20054
|
-
* places a block.
|
|
20055
|
-
*/
|
|
20056
|
-
// @ts-ignore Class inheritance allowed for native defined classes
|
|
20057
|
-
export class PlayerPlaceBlockBeforeEvent extends BlockEvent {
|
|
20058
|
-
private constructor();
|
|
20059
|
-
/**
|
|
20060
|
-
* @remarks
|
|
20061
|
-
* If set to true, cancels the block place event.
|
|
20062
|
-
*
|
|
20063
|
-
*/
|
|
20064
|
-
cancel: boolean;
|
|
20065
|
-
/**
|
|
20066
|
-
* @remarks
|
|
20067
|
-
* The face of the block that the new block is being placed on.
|
|
20068
|
-
*
|
|
20069
|
-
*/
|
|
20070
|
-
readonly face: Direction;
|
|
20071
|
-
/**
|
|
20072
|
-
* @remarks
|
|
20073
|
-
* Location relative to the bottom north-west corner of the
|
|
20074
|
-
* block where the new block is being placed onto.
|
|
20075
|
-
*
|
|
20076
|
-
*/
|
|
20077
|
-
readonly faceLocation: Vector3;
|
|
20078
|
-
/**
|
|
20079
|
-
* @remarks
|
|
20080
|
-
* The block permutation that will be placed if the event is
|
|
20081
|
-
* not cancelled.
|
|
20082
|
-
*
|
|
20083
|
-
*/
|
|
20084
|
-
readonly permutationToPlace: BlockPermutation;
|
|
20085
|
-
/**
|
|
20086
|
-
* @remarks
|
|
20087
|
-
* Player that is placing the block for this event.
|
|
20088
|
-
*
|
|
20089
|
-
*/
|
|
20090
|
-
readonly player: Player;
|
|
20091
|
-
}
|
|
20092
|
-
|
|
20093
|
-
/**
|
|
20094
|
-
* @beta
|
|
20095
|
-
* Manages callbacks that are connected to before a block is
|
|
20096
|
-
* placed by a player.
|
|
20097
|
-
*/
|
|
20098
|
-
export class PlayerPlaceBlockBeforeEventSignal {
|
|
20099
|
-
private constructor();
|
|
20100
|
-
/**
|
|
20101
|
-
* @remarks
|
|
20102
|
-
* Adds a callback that will be called before a block is placed
|
|
20103
|
-
* by a player.
|
|
20104
|
-
*
|
|
20105
|
-
* @privilege no-restricted-execution - This function can't be called in restricted-execution mode.
|
|
20106
|
-
*
|
|
20107
|
-
* @privilege early-execution-allowed - This function can be called in early-execution mode.
|
|
20108
|
-
*
|
|
20109
|
-
* @param callback
|
|
20110
|
-
* This closure is called with restricted-execution privilege.
|
|
20111
|
-
* @returns
|
|
20112
|
-
* Closure that is called with restricted-execution privilege.
|
|
20113
|
-
*/
|
|
20114
|
-
subscribe(
|
|
20115
|
-
callback: (arg0: PlayerPlaceBlockBeforeEvent) => void,
|
|
20116
|
-
options?: BlockEventOptions,
|
|
20117
|
-
): (arg0: PlayerPlaceBlockBeforeEvent) => void;
|
|
20118
|
-
/**
|
|
20119
|
-
* @remarks
|
|
20120
|
-
* Removes a callback from being called before an block is
|
|
20121
|
-
* placed by a player.
|
|
20122
|
-
*
|
|
20123
|
-
* @privilege no-restricted-execution - This function can't be called in restricted-execution mode.
|
|
20124
|
-
*
|
|
20125
|
-
* @privilege early-execution-allowed - This function can be called in early-execution mode.
|
|
20126
|
-
*
|
|
20127
|
-
* @param callback
|
|
20128
|
-
* This closure is called with restricted-execution privilege.
|
|
20129
|
-
*/
|
|
20130
|
-
unsubscribe(callback: (arg0: PlayerPlaceBlockBeforeEvent) => void): void;
|
|
20131
|
-
}
|
|
20132
|
-
|
|
20133
19098
|
/**
|
|
20134
19099
|
* An event that contains more information about a player
|
|
20135
19100
|
* spawning.
|
|
@@ -20316,80 +19281,6 @@ export class PlayerSwingStartAfterEventSignal {
|
|
|
20316
19281
|
unsubscribe(callback: (arg0: PlayerSwingStartAfterEvent) => void): void;
|
|
20317
19282
|
}
|
|
20318
19283
|
|
|
20319
|
-
/**
|
|
20320
|
-
* @beta
|
|
20321
|
-
* Contains information related to when a player successfully
|
|
20322
|
-
* names an Entity with a named Name Tag item.
|
|
20323
|
-
*/
|
|
20324
|
-
export class PlayerUseNameTagAfterEvent {
|
|
20325
|
-
private constructor();
|
|
20326
|
-
/**
|
|
20327
|
-
* @remarks
|
|
20328
|
-
* The entity that was named by the player.
|
|
20329
|
-
*
|
|
20330
|
-
* @privilege restricted-execution-read-only - This property can't be edited in restricted-execution mode.
|
|
20331
|
-
*
|
|
20332
|
-
*/
|
|
20333
|
-
entityNamed: Entity;
|
|
20334
|
-
/**
|
|
20335
|
-
* @remarks
|
|
20336
|
-
* The new name that the player has given to the entity.
|
|
20337
|
-
*
|
|
20338
|
-
* @privilege restricted-execution-read-only - This property can't be edited in restricted-execution mode.
|
|
20339
|
-
*
|
|
20340
|
-
*/
|
|
20341
|
-
newName: string;
|
|
20342
|
-
/**
|
|
20343
|
-
* @remarks
|
|
20344
|
-
* Handle to the player that used the name tag.
|
|
20345
|
-
*
|
|
20346
|
-
* @privilege restricted-execution-read-only - This property can't be edited in restricted-execution mode.
|
|
20347
|
-
*
|
|
20348
|
-
*/
|
|
20349
|
-
player: Player;
|
|
20350
|
-
/**
|
|
20351
|
-
* @remarks
|
|
20352
|
-
* The previous name of the entity before the player used the
|
|
20353
|
-
* name tag. This will be undefined if the entity was not
|
|
20354
|
-
* previously named.
|
|
20355
|
-
*
|
|
20356
|
-
* @privilege restricted-execution-read-only - This property can't be edited in restricted-execution mode.
|
|
20357
|
-
*
|
|
20358
|
-
*/
|
|
20359
|
-
previousName?: string;
|
|
20360
|
-
}
|
|
20361
|
-
|
|
20362
|
-
/**
|
|
20363
|
-
* @beta
|
|
20364
|
-
* Manages callbacks that are connected to when a player
|
|
20365
|
-
* successfully names an Entity with a named Name Tag item.
|
|
20366
|
-
*/
|
|
20367
|
-
export class PlayerUseNameTagAfterEventSignal {
|
|
20368
|
-
private constructor();
|
|
20369
|
-
/**
|
|
20370
|
-
* @remarks
|
|
20371
|
-
* Subscribes the specified callback to a player use name tag
|
|
20372
|
-
* after event.
|
|
20373
|
-
*
|
|
20374
|
-
* @privilege no-restricted-execution - This function can't be called in restricted-execution mode.
|
|
20375
|
-
*
|
|
20376
|
-
* @privilege early-execution-allowed - This function can be called in early-execution mode.
|
|
20377
|
-
*
|
|
20378
|
-
*/
|
|
20379
|
-
subscribe(callback: (arg0: PlayerUseNameTagAfterEvent) => void): (arg0: PlayerUseNameTagAfterEvent) => void;
|
|
20380
|
-
/**
|
|
20381
|
-
* @remarks
|
|
20382
|
-
* Removes the specified callback from a player use name tag
|
|
20383
|
-
* after event.
|
|
20384
|
-
*
|
|
20385
|
-
* @privilege no-restricted-execution - This function can't be called in restricted-execution mode.
|
|
20386
|
-
*
|
|
20387
|
-
* @privilege early-execution-allowed - This function can be called in early-execution mode.
|
|
20388
|
-
*
|
|
20389
|
-
*/
|
|
20390
|
-
unsubscribe(callback: (arg0: PlayerUseNameTagAfterEvent) => void): void;
|
|
20391
|
-
}
|
|
20392
|
-
|
|
20393
19284
|
/**
|
|
20394
19285
|
* Waypoint that tracks a player's position. Extends
|
|
20395
19286
|
* {@link EntityWaypoint} with additional player-specific
|
|
@@ -20424,336 +19315,27 @@ export class PlayerWaypoint extends EntityWaypoint {
|
|
|
20424
19315
|
}
|
|
20425
19316
|
|
|
20426
19317
|
/**
|
|
20427
|
-
*
|
|
20428
|
-
* Describes a block point-of-interest instance returned by a
|
|
20429
|
-
* query.
|
|
20430
|
-
*
|
|
20431
|
-
* Required Experiments:
|
|
20432
|
-
* - Poi
|
|
20433
|
-
*
|
|
19318
|
+
* Represents how the potion effect is delivered.
|
|
20434
19319
|
*/
|
|
20435
|
-
export class
|
|
19320
|
+
export class PotionDeliveryType {
|
|
19321
|
+
private constructor();
|
|
19322
|
+
readonly id: string;
|
|
19323
|
+
}
|
|
19324
|
+
|
|
19325
|
+
/**
|
|
19326
|
+
* Represents a type of potion effect - like healing or
|
|
19327
|
+
* leaping.
|
|
19328
|
+
*/
|
|
19329
|
+
export class PotionEffectType {
|
|
20436
19330
|
private constructor();
|
|
20437
19331
|
/**
|
|
20438
19332
|
* @remarks
|
|
20439
|
-
*
|
|
19333
|
+
* Duration of the effect when applied to an entity in ticks.
|
|
19334
|
+
* Undefined means the effect does not expire.
|
|
20440
19335
|
*
|
|
20441
|
-
|
|
20442
|
-
|
|
20443
|
-
|
|
20444
|
-
* @remarks
|
|
20445
|
-
* Number of tickets currently available to be claimed from
|
|
20446
|
-
* this POI instance.
|
|
20447
|
-
*
|
|
20448
|
-
*/
|
|
20449
|
-
readonly tickets: number;
|
|
20450
|
-
/**
|
|
20451
|
-
* @remarks
|
|
20452
|
-
* Type of this POI instance.
|
|
20453
|
-
*
|
|
20454
|
-
*/
|
|
20455
|
-
readonly 'type': PoiBlockType;
|
|
20456
|
-
}
|
|
20457
|
-
|
|
20458
|
-
/**
|
|
20459
|
-
* @beta
|
|
20460
|
-
* Provides methods for querying and managing block-based
|
|
20461
|
-
* points of interest in a dimension.
|
|
20462
|
-
*
|
|
20463
|
-
* Required Experiments:
|
|
20464
|
-
* - Poi
|
|
20465
|
-
*
|
|
20466
|
-
*/
|
|
20467
|
-
export class PoiBlockManager {
|
|
20468
|
-
private constructor();
|
|
20469
|
-
/**
|
|
20470
|
-
* @remarks
|
|
20471
|
-
* Adds a block point of interest at a position. This method is
|
|
20472
|
-
* intended for temporary usage. Will be replaced when chunk is
|
|
20473
|
-
* reloaded
|
|
20474
|
-
*
|
|
20475
|
-
* @privilege no-restricted-execution - This function can't be called in restricted-execution mode.
|
|
20476
|
-
*
|
|
20477
|
-
* @param position
|
|
20478
|
-
* Block position at which to add the POI.
|
|
20479
|
-
* @param poi
|
|
20480
|
-
* POI type to add, specified by numeric type Id, type name, or
|
|
20481
|
-
* POI type object.
|
|
20482
|
-
*/
|
|
20483
|
-
addTemporary(position: Vector3, poi: PoiBlockType | string | number): void;
|
|
20484
|
-
/**
|
|
20485
|
-
* @remarks
|
|
20486
|
-
* Gets the type of the block point of interest at a position.
|
|
20487
|
-
*
|
|
20488
|
-
* @privilege no-restricted-execution - This function can't be called in restricted-execution mode.
|
|
20489
|
-
*
|
|
20490
|
-
* @param position
|
|
20491
|
-
* Block position to inspect.
|
|
20492
|
-
* @returns
|
|
20493
|
-
* The POI type at the position, or undefined if no POI exists
|
|
20494
|
-
* there.
|
|
20495
|
-
*/
|
|
20496
|
-
at(position: Vector3): PoiBlockType | undefined;
|
|
20497
|
-
/**
|
|
20498
|
-
* @remarks
|
|
20499
|
-
* Tests whether a block point of interest at a position
|
|
20500
|
-
* matches a type filter.
|
|
20501
|
-
*
|
|
20502
|
-
* @privilege no-restricted-execution - This function can't be called in restricted-execution mode.
|
|
20503
|
-
*
|
|
20504
|
-
* @param position
|
|
20505
|
-
* Block position to inspect.
|
|
20506
|
-
* @param filter
|
|
20507
|
-
* Filter used to select the POI type. A callback receives the
|
|
20508
|
-
* POI type and returns whether it matches; a name filter
|
|
20509
|
-
* matches a type name; and a tag filter requires all specified
|
|
20510
|
-
* tags.
|
|
20511
|
-
* @returns
|
|
20512
|
-
* True if a POI exists at the position and its type matches
|
|
20513
|
-
* the filter; otherwise false.
|
|
20514
|
-
*/
|
|
20515
|
-
exists(position: Vector3, filter: ((arg0: PoiBlockType) => boolean) | PoiNameFilter | PoiTagFilter): boolean;
|
|
20516
|
-
/**
|
|
20517
|
-
* @remarks
|
|
20518
|
-
* Returns block points of interest that match the supplied
|
|
20519
|
-
* type and occupancy filters within the specified distance of
|
|
20520
|
-
* a location.
|
|
20521
|
-
*
|
|
20522
|
-
* @privilege no-restricted-execution - This function can't be called in restricted-execution mode.
|
|
20523
|
-
*
|
|
20524
|
-
* @param filter
|
|
20525
|
-
* Filter used to select POI types. A callback receives each
|
|
20526
|
-
* POI type and returns whether it should be included; a name
|
|
20527
|
-
* filter matches a type name; and a tag filter requires all
|
|
20528
|
-
* specified tags.
|
|
20529
|
-
* @param center
|
|
20530
|
-
* Center of the search.
|
|
20531
|
-
* @param blockRadius
|
|
20532
|
-
* Maximum three-dimensional distance from the center, in
|
|
20533
|
-
* blocks.
|
|
20534
|
-
* @param occupancyFilter
|
|
20535
|
-
* Optional filter applied to the occupancy state of matching
|
|
20536
|
-
* POIs. If omitted, POIs in any occupancy state are returned.
|
|
20537
|
-
* @returns
|
|
20538
|
-
* The matching POI instances within range. The result order is
|
|
20539
|
-
* not guaranteed.
|
|
20540
|
-
*/
|
|
20541
|
-
getInRange(
|
|
20542
|
-
filter: ((arg0: PoiBlockType) => boolean) | PoiNameFilter | PoiTagFilter,
|
|
20543
|
-
center: Vector3,
|
|
20544
|
-
blockRadius: number,
|
|
20545
|
-
occupancyFilter?: PoiBlockOccupancyFilter,
|
|
20546
|
-
): PoiBlockInstance[];
|
|
20547
|
-
/**
|
|
20548
|
-
* @remarks
|
|
20549
|
-
* Returns block points of interest that match the supplied
|
|
20550
|
-
* type and occupancy filters within an axis-aligned square
|
|
20551
|
-
* centered on the specified location, sorted from nearest to
|
|
20552
|
-
* farthest.
|
|
20553
|
-
*
|
|
20554
|
-
* @privilege no-restricted-execution - This function can't be called in restricted-execution mode.
|
|
20555
|
-
*
|
|
20556
|
-
* @param filter
|
|
20557
|
-
* Filter used to select POI types. A callback receives each
|
|
20558
|
-
* POI type and returns whether it should be included; a name
|
|
20559
|
-
* filter matches a type name; and a tag filter requires all
|
|
20560
|
-
* specified tags.
|
|
20561
|
-
* @param center
|
|
20562
|
-
* Center of the search and the location from which distances
|
|
20563
|
-
* are calculated.
|
|
20564
|
-
* @param blockRadius
|
|
20565
|
-
* Maximum three-dimensional distance from the center, in
|
|
20566
|
-
* blocks.
|
|
20567
|
-
* @param occupancyFilter
|
|
20568
|
-
* Optional filter applied to the occupancy state of matching
|
|
20569
|
-
* POIs. If omitted, POIs in any occupancy state are returned.
|
|
20570
|
-
* @returns
|
|
20571
|
-
* The matching POI instances and their squared distances from
|
|
20572
|
-
* the center, sorted in ascending distance order.
|
|
20573
|
-
*/
|
|
20574
|
-
getInRangeSorted(
|
|
20575
|
-
filter: ((arg0: PoiBlockType) => boolean) | PoiNameFilter | PoiTagFilter,
|
|
20576
|
-
center: Vector3,
|
|
20577
|
-
blockRadius: number,
|
|
20578
|
-
occupancyFilter?: PoiBlockOccupancyFilter,
|
|
20579
|
-
): PoiDistancePair[];
|
|
20580
|
-
/**
|
|
20581
|
-
* @remarks
|
|
20582
|
-
* Returns block points of interest that match the supplied
|
|
20583
|
-
* type and occupancy filters within an axis-aligned square
|
|
20584
|
-
* centered on the specified location.
|
|
20585
|
-
*
|
|
20586
|
-
* @privilege no-restricted-execution - This function can't be called in restricted-execution mode.
|
|
20587
|
-
*
|
|
20588
|
-
* @param filter
|
|
20589
|
-
* Filter used to select POI types. A callback receives each
|
|
20590
|
-
* POI type and returns whether it should be included; a name
|
|
20591
|
-
* filter matches a type name; and a tag filter requires all
|
|
20592
|
-
* specified tags.
|
|
20593
|
-
* @param center
|
|
20594
|
-
* Center of the search volume.
|
|
20595
|
-
* @param blockRadius
|
|
20596
|
-
* Half-size of the search volume, in blocks, along each axis.
|
|
20597
|
-
* @param occupancyFilter
|
|
20598
|
-
* Optional filter applied to the occupancy state of matching
|
|
20599
|
-
* POIs. If omitted, POIs in any occupancy state are returned.
|
|
20600
|
-
* @returns
|
|
20601
|
-
* The matching POI instances in the search volume.
|
|
20602
|
-
*/
|
|
20603
|
-
getInSquare(
|
|
20604
|
-
filter: ((arg0: PoiBlockType) => boolean) | PoiNameFilter | PoiTagFilter,
|
|
20605
|
-
center: Vector3,
|
|
20606
|
-
blockRadius: number,
|
|
20607
|
-
occupancyFilter?: PoiBlockOccupancyFilter,
|
|
20608
|
-
): PoiBlockInstance[];
|
|
20609
|
-
/**
|
|
20610
|
-
* @remarks
|
|
20611
|
-
* Releases one previously claimed ticket at a block point of
|
|
20612
|
-
* interest.
|
|
20613
|
-
*
|
|
20614
|
-
* @privilege no-restricted-execution - This function can't be called in restricted-execution mode.
|
|
20615
|
-
*
|
|
20616
|
-
* @param center
|
|
20617
|
-
* Block position of the POI whose ticket should be released.
|
|
20618
|
-
* @returns
|
|
20619
|
-
* True if a ticket was released; false if no POI exists at the
|
|
20620
|
-
* position or the POI has no claimed tickets.
|
|
20621
|
-
*/
|
|
20622
|
-
release(center: Vector3): boolean;
|
|
20623
|
-
/**
|
|
20624
|
-
* @remarks
|
|
20625
|
-
* Claims one available ticket from a matching block point of
|
|
20626
|
-
* interest within range.
|
|
20627
|
-
*
|
|
20628
|
-
* @privilege no-restricted-execution - This function can't be called in restricted-execution mode.
|
|
20629
|
-
*
|
|
20630
|
-
* @param filter
|
|
20631
|
-
* Filter used to select the POI type to claim. A callback
|
|
20632
|
-
* receives each POI type and returns whether it should be
|
|
20633
|
-
* included; a name filter matches a type name; and a tag
|
|
20634
|
-
* filter requires all specified tags.
|
|
20635
|
-
* @param center
|
|
20636
|
-
* Center of the search.
|
|
20637
|
-
* @param blockRadius
|
|
20638
|
-
* Maximum three-dimensional distance from the center, in
|
|
20639
|
-
* blocks.
|
|
20640
|
-
* @returns
|
|
20641
|
-
* The block position of the claimed POI, or undefined if no
|
|
20642
|
-
* matching POI has an available ticket.
|
|
20643
|
-
*/
|
|
20644
|
-
take(
|
|
20645
|
-
filter: ((arg0: PoiBlockType) => boolean) | PoiNameFilter | PoiTagFilter,
|
|
20646
|
-
center: Vector3,
|
|
20647
|
-
blockRadius: number,
|
|
20648
|
-
): Vector3 | undefined;
|
|
20649
|
-
}
|
|
20650
|
-
|
|
20651
|
-
/**
|
|
20652
|
-
* @beta
|
|
20653
|
-
* Describes a block point-of-interest type.
|
|
20654
|
-
*
|
|
20655
|
-
* Required Experiments:
|
|
20656
|
-
* - Poi
|
|
20657
|
-
*
|
|
20658
|
-
*/
|
|
20659
|
-
export class PoiBlockType {
|
|
20660
|
-
private constructor();
|
|
20661
|
-
/**
|
|
20662
|
-
* @remarks
|
|
20663
|
-
* Numeric identifier of this POI type.
|
|
20664
|
-
*
|
|
20665
|
-
*/
|
|
20666
|
-
readonly id: number;
|
|
20667
|
-
/**
|
|
20668
|
-
* @remarks
|
|
20669
|
-
* Namespaced identifier of this POI type.
|
|
20670
|
-
*
|
|
20671
|
-
*/
|
|
20672
|
-
readonly name: string;
|
|
20673
|
-
/**
|
|
20674
|
-
* @remarks
|
|
20675
|
-
* Maximum number of tickets that can be claimed from each POI
|
|
20676
|
-
* instance of this type.
|
|
20677
|
-
*
|
|
20678
|
-
*/
|
|
20679
|
-
readonly tickets: number;
|
|
20680
|
-
/**
|
|
20681
|
-
* @remarks
|
|
20682
|
-
* Maximum range, in blocks, at which this POI type is
|
|
20683
|
-
* considered usable.
|
|
20684
|
-
*
|
|
20685
|
-
*/
|
|
20686
|
-
readonly usableRange: number;
|
|
20687
|
-
/**
|
|
20688
|
-
* @remarks
|
|
20689
|
-
* Tests whether this object and another object describe the
|
|
20690
|
-
* same POI type.
|
|
20691
|
-
*
|
|
20692
|
-
* @privilege no-restricted-execution - This function can't be called in restricted-execution mode.
|
|
20693
|
-
*
|
|
20694
|
-
* @param other
|
|
20695
|
-
* POI type to compare with this type.
|
|
20696
|
-
* @returns
|
|
20697
|
-
* True if both objects describe the same POI type; otherwise
|
|
20698
|
-
* false.
|
|
20699
|
-
*/
|
|
20700
|
-
equals(other: PoiBlockType): boolean;
|
|
20701
|
-
/**
|
|
20702
|
-
* @remarks
|
|
20703
|
-
* Tests whether the type has the provided tag attribute
|
|
20704
|
-
*
|
|
20705
|
-
* @privilege no-restricted-execution - This function can't be called in restricted-execution mode.
|
|
20706
|
-
*
|
|
20707
|
-
* @param tag
|
|
20708
|
-
* POI tag to check.
|
|
20709
|
-
* @returns
|
|
20710
|
-
* True if the POI conatains the tag; otherwise false.
|
|
20711
|
-
*/
|
|
20712
|
-
has(tag: string): boolean;
|
|
20713
|
-
}
|
|
20714
|
-
|
|
20715
|
-
/**
|
|
20716
|
-
* @beta
|
|
20717
|
-
* Provides access to point-of-interest (POI) data in a
|
|
20718
|
-
* dimension.
|
|
20719
|
-
*
|
|
20720
|
-
* Required Experiments:
|
|
20721
|
-
* - Poi
|
|
20722
|
-
*
|
|
20723
|
-
*/
|
|
20724
|
-
export class PoiManager {
|
|
20725
|
-
private constructor();
|
|
20726
|
-
/**
|
|
20727
|
-
* @remarks
|
|
20728
|
-
* Provides access to block-based points of interest in the
|
|
20729
|
-
* dimension.
|
|
20730
|
-
*
|
|
20731
|
-
*/
|
|
20732
|
-
readonly blocks: PoiBlockManager;
|
|
20733
|
-
}
|
|
20734
|
-
|
|
20735
|
-
/**
|
|
20736
|
-
* Represents how the potion effect is delivered.
|
|
20737
|
-
*/
|
|
20738
|
-
export class PotionDeliveryType {
|
|
20739
|
-
private constructor();
|
|
20740
|
-
readonly id: string;
|
|
20741
|
-
}
|
|
20742
|
-
|
|
20743
|
-
/**
|
|
20744
|
-
* Represents a type of potion effect - like healing or
|
|
20745
|
-
* leaping.
|
|
20746
|
-
*/
|
|
20747
|
-
export class PotionEffectType {
|
|
20748
|
-
private constructor();
|
|
20749
|
-
/**
|
|
20750
|
-
* @remarks
|
|
20751
|
-
* Duration of the effect when applied to an entity in ticks.
|
|
20752
|
-
* Undefined means the effect does not expire.
|
|
20753
|
-
*
|
|
20754
|
-
* @throws This property can throw when used.
|
|
20755
|
-
*
|
|
20756
|
-
* {@link minecraftcommon.EngineError}
|
|
19336
|
+
* @throws This property can throw when used.
|
|
19337
|
+
*
|
|
19338
|
+
* {@link minecraftcommon.EngineError}
|
|
20757
19339
|
*/
|
|
20758
19340
|
readonly durationTicks?: number;
|
|
20759
19341
|
readonly id: string;
|
|
@@ -20814,10 +19396,10 @@ export class Potions {
|
|
|
20814
19396
|
*
|
|
20815
19397
|
* {@link InvalidPotionEffectTypeError}
|
|
20816
19398
|
*/
|
|
20817
|
-
static resolve
|
|
20818
|
-
|
|
20819
|
-
|
|
20820
|
-
|
|
19399
|
+
static resolve(
|
|
19400
|
+
potionEffectType: PotionEffectType | string,
|
|
19401
|
+
potionDeliveryType: PotionDeliveryType | string,
|
|
19402
|
+
): ItemStack;
|
|
20821
19403
|
}
|
|
20822
19404
|
|
|
20823
19405
|
/**
|
|
@@ -22036,38 +20618,6 @@ export class Seat {
|
|
|
22036
20618
|
readonly seatRotation: number;
|
|
22037
20619
|
}
|
|
22038
20620
|
|
|
22039
|
-
/**
|
|
22040
|
-
* @beta
|
|
22041
|
-
* Manages callbacks that are message passing to a server. This
|
|
22042
|
-
* event is not currently fully implemented, and should not be
|
|
22043
|
-
* used.
|
|
22044
|
-
*/
|
|
22045
|
-
export class ServerMessageAfterEventSignal {
|
|
22046
|
-
private constructor();
|
|
22047
|
-
/**
|
|
22048
|
-
* @remarks
|
|
22049
|
-
* Adds a callback that will be called when an internal message
|
|
22050
|
-
* is passed.
|
|
22051
|
-
*
|
|
22052
|
-
* @privilege no-restricted-execution - This function can't be called in restricted-execution mode.
|
|
22053
|
-
*
|
|
22054
|
-
* @privilege early-execution-allowed - This function can be called in early-execution mode.
|
|
22055
|
-
*
|
|
22056
|
-
*/
|
|
22057
|
-
subscribe(callback: (arg0: MessageReceiveAfterEvent) => void): (arg0: MessageReceiveAfterEvent) => void;
|
|
22058
|
-
/**
|
|
22059
|
-
* @remarks
|
|
22060
|
-
* Removes a callback from being called when an internal
|
|
22061
|
-
* message is passed.
|
|
22062
|
-
*
|
|
22063
|
-
* @privilege no-restricted-execution - This function can't be called in restricted-execution mode.
|
|
22064
|
-
*
|
|
22065
|
-
* @privilege early-execution-allowed - This function can be called in early-execution mode.
|
|
22066
|
-
*
|
|
22067
|
-
*/
|
|
22068
|
-
unsubscribe(callback: (arg0: MessageReceiveAfterEvent) => void): void;
|
|
22069
|
-
}
|
|
22070
|
-
|
|
22071
20621
|
/**
|
|
22072
20622
|
* Loot item function that modifies the trim on a dropped armor
|
|
22073
20623
|
* item.
|
|
@@ -22096,21 +20646,6 @@ export class SetArmorTrimFunction extends LootItemFunction {
|
|
|
22096
20646
|
// @ts-ignore Class inheritance allowed for native defined classes
|
|
22097
20647
|
export class SetBannerDetailsFunction extends LootItemFunction {
|
|
22098
20648
|
private constructor();
|
|
22099
|
-
/**
|
|
22100
|
-
* @beta
|
|
22101
|
-
* @remarks
|
|
22102
|
-
* The base color for the dropped banner.
|
|
22103
|
-
*
|
|
22104
|
-
*/
|
|
22105
|
-
readonly baseColor: string;
|
|
22106
|
-
/**
|
|
22107
|
-
* @beta
|
|
22108
|
-
* @remarks
|
|
22109
|
-
* An array of {@link BannerPattern} objects used to decorate
|
|
22110
|
-
* the banner, including color and pattern type.
|
|
22111
|
-
*
|
|
22112
|
-
*/
|
|
22113
|
-
readonly patterns: BannerPattern[];
|
|
22114
20649
|
/**
|
|
22115
20650
|
* @remarks
|
|
22116
20651
|
* The type of banner to drop.
|
|
@@ -22546,84 +21081,6 @@ export class SoundInstance {
|
|
|
22546
21081
|
*
|
|
22547
21082
|
*/
|
|
22548
21083
|
readonly soundEventId: string;
|
|
22549
|
-
/**
|
|
22550
|
-
* @beta
|
|
22551
|
-
* @remarks
|
|
22552
|
-
* Fades this sound instance from its current volume to the
|
|
22553
|
-
* target volume over the specified duration. To fade in from
|
|
22554
|
-
* silence, call `setVolume(0.0)` first; to fade out, pass a
|
|
22555
|
-
* target volume of `0.0`.
|
|
22556
|
-
*
|
|
22557
|
-
* @privilege no-restricted-execution - This function can't be called in restricted-execution mode.
|
|
22558
|
-
*
|
|
22559
|
-
* @param duration
|
|
22560
|
-
* Duration of the fade in seconds. Must be non-negative.
|
|
22561
|
-
* Minimum value: 0
|
|
22562
|
-
* @param targetVolume
|
|
22563
|
-
* Volume to fade to. Must be non-negative.
|
|
22564
|
-
* Minimum value: 0
|
|
22565
|
-
*/
|
|
22566
|
-
fade(duration: number, targetVolume: number): void;
|
|
22567
|
-
/**
|
|
22568
|
-
* @beta
|
|
22569
|
-
* @remarks
|
|
22570
|
-
* Pauses this sound.
|
|
22571
|
-
*
|
|
22572
|
-
* @privilege no-restricted-execution - This function can't be called in restricted-execution mode.
|
|
22573
|
-
*
|
|
22574
|
-
*/
|
|
22575
|
-
pause(): void;
|
|
22576
|
-
/**
|
|
22577
|
-
* @beta
|
|
22578
|
-
* @remarks
|
|
22579
|
-
* Resumes this sound after a pause.
|
|
22580
|
-
*
|
|
22581
|
-
* @privilege no-restricted-execution - This function can't be called in restricted-execution mode.
|
|
22582
|
-
*
|
|
22583
|
-
*/
|
|
22584
|
-
resume(): void;
|
|
22585
|
-
/**
|
|
22586
|
-
* @beta
|
|
22587
|
-
* @remarks
|
|
22588
|
-
* Sets the playback position of this sound instance.
|
|
22589
|
-
*
|
|
22590
|
-
* @privilege no-restricted-execution - This function can't be called in restricted-execution mode.
|
|
22591
|
-
*
|
|
22592
|
-
* @param seconds
|
|
22593
|
-
* Position to seek to in seconds. Must be non-negative.
|
|
22594
|
-
* Bounds: [0, 107374184]
|
|
22595
|
-
* @throws
|
|
22596
|
-
* Throws if `seconds` is negative, or if the sound has a known
|
|
22597
|
-
* duration and `seconds` is greater than that duration.
|
|
22598
|
-
*
|
|
22599
|
-
* {@link minecraftcommon.ArgumentOutOfBoundsError}
|
|
22600
|
-
*/
|
|
22601
|
-
seekTo(seconds: number): void;
|
|
22602
|
-
/**
|
|
22603
|
-
* @beta
|
|
22604
|
-
* @remarks
|
|
22605
|
-
* Sets the pitch of this sound instance.
|
|
22606
|
-
*
|
|
22607
|
-
* @privilege no-restricted-execution - This function can't be called in restricted-execution mode.
|
|
22608
|
-
*
|
|
22609
|
-
* @param pitch
|
|
22610
|
-
* Pitch multiplier between 0.01 and 10.0. A value of 1.0 is
|
|
22611
|
-
* normal pitch.
|
|
22612
|
-
* Bounds: [0.009999999776482582, 10]
|
|
22613
|
-
*/
|
|
22614
|
-
setPitch(pitch: number): void;
|
|
22615
|
-
/**
|
|
22616
|
-
* @beta
|
|
22617
|
-
* @remarks
|
|
22618
|
-
* Sets the volume of this sound instance.
|
|
22619
|
-
*
|
|
22620
|
-
* @privilege no-restricted-execution - This function can't be called in restricted-execution mode.
|
|
22621
|
-
*
|
|
22622
|
-
* @param volume
|
|
22623
|
-
* Volume level between 0.0 and 10.0.
|
|
22624
|
-
* Bounds: [0, 10]
|
|
22625
|
-
*/
|
|
22626
|
-
setVolume(volume: number): void;
|
|
22627
21084
|
/**
|
|
22628
21085
|
* @remarks
|
|
22629
21086
|
* Stops this sound instance from playing.
|
|
@@ -22696,13 +21153,6 @@ export class StartupEvent {
|
|
|
22696
21153
|
*
|
|
22697
21154
|
*/
|
|
22698
21155
|
readonly itemComponentRegistry: ItemComponentRegistry;
|
|
22699
|
-
/**
|
|
22700
|
-
* @beta
|
|
22701
|
-
* @remarks
|
|
22702
|
-
* @privilege early-execution-readable - This property can be read in early-execution mode.
|
|
22703
|
-
*
|
|
22704
|
-
*/
|
|
22705
|
-
readonly worldClockRegistry: WorldClockRegistry;
|
|
22706
21156
|
}
|
|
22707
21157
|
|
|
22708
21158
|
/**
|
|
@@ -23355,19 +21805,6 @@ export class SystemBeforeEvents {
|
|
|
23355
21805
|
*
|
|
23356
21806
|
*/
|
|
23357
21807
|
readonly startup: StartupBeforeEventSignal;
|
|
23358
|
-
/**
|
|
23359
|
-
* @beta
|
|
23360
|
-
* @remarks
|
|
23361
|
-
* Fires when the scripting watchdog shuts down the server. The
|
|
23362
|
-
* can be due to using too much memory, or by causing
|
|
23363
|
-
* significant slowdown or hang.
|
|
23364
|
-
* To prevent shutdown, set the event's cancel property to
|
|
23365
|
-
* true.
|
|
23366
|
-
*
|
|
23367
|
-
* @privilege early-execution-readable - This property can be read in early-execution mode.
|
|
23368
|
-
*
|
|
23369
|
-
*/
|
|
23370
|
-
readonly watchdogTerminate: WatchdogTerminateBeforeEventSignal;
|
|
23371
21808
|
}
|
|
23372
21809
|
|
|
23373
21810
|
/**
|
|
@@ -23476,7 +21913,7 @@ export class TextPrimitive extends PrimitiveShape {
|
|
|
23476
21913
|
*/
|
|
23477
21914
|
depthTest: boolean;
|
|
23478
21915
|
/**
|
|
23479
|
-
* @
|
|
21916
|
+
* @rc
|
|
23480
21917
|
* @remarks
|
|
23481
21918
|
* This value determines the gap between lines for the
|
|
23482
21919
|
* TextPrimitive. By default the line gap height is 0.
|
|
@@ -23624,57 +22061,18 @@ export class TickingAreaManager {
|
|
|
23624
22061
|
}
|
|
23625
22062
|
|
|
23626
22063
|
/**
|
|
23627
|
-
*
|
|
23628
|
-
* A named point in time on a world clock that can occur once
|
|
23629
|
-
* or periodically.
|
|
22064
|
+
* Represents a trigger for firing an event.
|
|
23630
22065
|
*/
|
|
23631
|
-
export class
|
|
23632
|
-
private constructor();
|
|
22066
|
+
export class Trigger {
|
|
23633
22067
|
/**
|
|
23634
22068
|
* @remarks
|
|
23635
|
-
*
|
|
22069
|
+
* Event name of the trigger.
|
|
23636
22070
|
*
|
|
23637
22071
|
*/
|
|
23638
|
-
|
|
22072
|
+
eventName: string;
|
|
23639
22073
|
/**
|
|
23640
22074
|
* @remarks
|
|
23641
|
-
*
|
|
23642
|
-
* not specified, the time marker will only occur once.
|
|
23643
|
-
*
|
|
23644
|
-
* @throws
|
|
23645
|
-
* WorldClockInvalidTimeMarkerError: If the time marker is
|
|
23646
|
-
* invalid.
|
|
23647
|
-
*
|
|
23648
|
-
* {@link WorldClockInvalidTimeMarkerError}
|
|
23649
|
-
*/
|
|
23650
|
-
readonly period?: number;
|
|
23651
|
-
/**
|
|
23652
|
-
* @remarks
|
|
23653
|
-
* The time (in ticks) that the time marker occurs at on a
|
|
23654
|
-
* world clock.
|
|
23655
|
-
*
|
|
23656
|
-
* @throws
|
|
23657
|
-
* WorldClockInvalidTimeMarkerError: If the time marker is
|
|
23658
|
-
* invalid.
|
|
23659
|
-
*
|
|
23660
|
-
* {@link WorldClockInvalidTimeMarkerError}
|
|
23661
|
-
*/
|
|
23662
|
-
readonly time: number;
|
|
23663
|
-
}
|
|
23664
|
-
|
|
23665
|
-
/**
|
|
23666
|
-
* Represents a trigger for firing an event.
|
|
23667
|
-
*/
|
|
23668
|
-
export class Trigger {
|
|
23669
|
-
/**
|
|
23670
|
-
* @remarks
|
|
23671
|
-
* Event name of the trigger.
|
|
23672
|
-
*
|
|
23673
|
-
*/
|
|
23674
|
-
eventName: string;
|
|
23675
|
-
/**
|
|
23676
|
-
* @remarks
|
|
23677
|
-
* Creates a new trigger.
|
|
22075
|
+
* Creates a new trigger.
|
|
23678
22076
|
*
|
|
23679
22077
|
*/
|
|
23680
22078
|
constructor(eventName: string);
|
|
@@ -23800,71 +22198,6 @@ export class TripWireTripAfterEventSignal {
|
|
|
23800
22198
|
unsubscribe(callback: (arg0: TripWireTripAfterEvent) => void): void;
|
|
23801
22199
|
}
|
|
23802
22200
|
|
|
23803
|
-
/**
|
|
23804
|
-
* @beta
|
|
23805
|
-
* Contains information related to a script watchdog
|
|
23806
|
-
* termination.
|
|
23807
|
-
*/
|
|
23808
|
-
export class WatchdogTerminateBeforeEvent {
|
|
23809
|
-
private constructor();
|
|
23810
|
-
/**
|
|
23811
|
-
* @remarks
|
|
23812
|
-
* If set to true, cancels the termination of the script
|
|
23813
|
-
* runtime. Note that depending on server configuration
|
|
23814
|
-
* settings, cancellation of the termination may not be
|
|
23815
|
-
* allowed.
|
|
23816
|
-
*
|
|
23817
|
-
*/
|
|
23818
|
-
cancel: boolean;
|
|
23819
|
-
/**
|
|
23820
|
-
* @remarks
|
|
23821
|
-
* Contains the reason why a script runtime is to be
|
|
23822
|
-
* terminated.
|
|
23823
|
-
*
|
|
23824
|
-
*/
|
|
23825
|
-
readonly terminateReason: WatchdogTerminateReason;
|
|
23826
|
-
}
|
|
23827
|
-
|
|
23828
|
-
/**
|
|
23829
|
-
* @beta
|
|
23830
|
-
* Manages callbacks that are connected to a callback that will
|
|
23831
|
-
* be called when a script runtime is being terminated due to a
|
|
23832
|
-
* violation of the performance watchdog system.
|
|
23833
|
-
*/
|
|
23834
|
-
export class WatchdogTerminateBeforeEventSignal {
|
|
23835
|
-
private constructor();
|
|
23836
|
-
/**
|
|
23837
|
-
* @remarks
|
|
23838
|
-
* Adds a callback that will be called when a script runtime is
|
|
23839
|
-
* being terminated due to a violation of the performance
|
|
23840
|
-
* watchdog system.
|
|
23841
|
-
*
|
|
23842
|
-
* @privilege no-restricted-execution - This function can't be called in restricted-execution mode.
|
|
23843
|
-
*
|
|
23844
|
-
* @privilege early-execution-allowed - This function can be called in early-execution mode.
|
|
23845
|
-
*
|
|
23846
|
-
* @param callback
|
|
23847
|
-
* This closure is called with restricted-execution privilege.
|
|
23848
|
-
* @returns
|
|
23849
|
-
* Closure that is called with restricted-execution privilege.
|
|
23850
|
-
*/
|
|
23851
|
-
subscribe(callback: (arg0: WatchdogTerminateBeforeEvent) => void): (arg0: WatchdogTerminateBeforeEvent) => void;
|
|
23852
|
-
/**
|
|
23853
|
-
* @remarks
|
|
23854
|
-
* Removes a callback from being called when a script runtime
|
|
23855
|
-
* is being terminated due to a violation of the performance
|
|
23856
|
-
* watchdog system.
|
|
23857
|
-
*
|
|
23858
|
-
* @privilege no-restricted-execution - This function can't be called in restricted-execution mode.
|
|
23859
|
-
*
|
|
23860
|
-
* @privilege early-execution-allowed - This function can be called in early-execution mode.
|
|
23861
|
-
*
|
|
23862
|
-
* @param callback
|
|
23863
|
-
* This closure is called with restricted-execution privilege.
|
|
23864
|
-
*/
|
|
23865
|
-
unsubscribe(callback: (arg0: WatchdogTerminateBeforeEvent) => void): void;
|
|
23866
|
-
}
|
|
23867
|
-
|
|
23868
22201
|
/**
|
|
23869
22202
|
* Base class for waypoints displayed on the player's locator
|
|
23870
22203
|
* bar. Waypoints can track locations or entities and are
|
|
@@ -24080,15 +22413,6 @@ export class World {
|
|
|
24080
22413
|
*
|
|
24081
22414
|
*/
|
|
24082
22415
|
readonly afterEvents: WorldAfterEvents;
|
|
24083
|
-
/**
|
|
24084
|
-
* @beta
|
|
24085
|
-
* @remarks
|
|
24086
|
-
* Enables or disables cheats.
|
|
24087
|
-
*
|
|
24088
|
-
* @privilege restricted-execution-read-only - This property can't be edited in restricted-execution mode.
|
|
24089
|
-
*
|
|
24090
|
-
*/
|
|
24091
|
-
allowCheats: boolean;
|
|
24092
22416
|
/**
|
|
24093
22417
|
* @remarks
|
|
24094
22418
|
* Contains a set of events that are applicable to the entirety
|
|
@@ -24174,20 +22498,6 @@ export class World {
|
|
|
24174
22498
|
*
|
|
24175
22499
|
*/
|
|
24176
22500
|
readonly tickingAreaManager: TickingAreaManager;
|
|
24177
|
-
/**
|
|
24178
|
-
* @beta
|
|
24179
|
-
* @remarks
|
|
24180
|
-
* A method that is internal-only, used for broadcasting
|
|
24181
|
-
* specific messages between client and server.
|
|
24182
|
-
*
|
|
24183
|
-
* @privilege no-restricted-execution - This function can't be called in restricted-execution mode.
|
|
24184
|
-
*
|
|
24185
|
-
* @param id
|
|
24186
|
-
* The message identifier.
|
|
24187
|
-
* @param value
|
|
24188
|
-
* The message.
|
|
24189
|
-
*/
|
|
24190
|
-
broadcastClientMessage(id: string, value: string): void;
|
|
24191
22501
|
/**
|
|
24192
22502
|
* @remarks
|
|
24193
22503
|
* Clears the set of dynamic properties declared for this
|
|
@@ -24219,22 +22529,6 @@ export class World {
|
|
|
24219
22529
|
* {@link minecraftcommon.InvalidArgumentError}
|
|
24220
22530
|
*/
|
|
24221
22531
|
getAllPlayers(): Player[];
|
|
24222
|
-
/**
|
|
24223
|
-
* @beta
|
|
24224
|
-
* @remarks
|
|
24225
|
-
* Retrieves a world clock by its name.
|
|
24226
|
-
*
|
|
24227
|
-
* @param name
|
|
24228
|
-
* The name of the world clock to retrieve.
|
|
24229
|
-
* @returns
|
|
24230
|
-
* The {@link WorldClock} with the given name.
|
|
24231
|
-
* @throws
|
|
24232
|
-
* WorldClockNotFoundError: If the world clock with the given
|
|
24233
|
-
* name does not exist.
|
|
24234
|
-
*
|
|
24235
|
-
* {@link WorldClockNotFoundError}
|
|
24236
|
-
*/
|
|
24237
|
-
getClock(name: string): WorldClock;
|
|
24238
22532
|
/**
|
|
24239
22533
|
* @remarks
|
|
24240
22534
|
* Returns the current day.
|
|
@@ -24693,16 +22987,6 @@ export class WorldAfterEvents {
|
|
|
24693
22987
|
*
|
|
24694
22988
|
*/
|
|
24695
22989
|
readonly buttonPush: ButtonPushAfterEventSignal;
|
|
24696
|
-
/**
|
|
24697
|
-
* @beta
|
|
24698
|
-
* @remarks
|
|
24699
|
-
* This event is triggered after a chat message has been
|
|
24700
|
-
* broadcast or sent to players.
|
|
24701
|
-
*
|
|
24702
|
-
* @privilege early-execution-readable - This property can be read in early-execution mode.
|
|
24703
|
-
*
|
|
24704
|
-
*/
|
|
24705
|
-
readonly chatSend: ChatSendAfterEventSignal;
|
|
24706
22990
|
/**
|
|
24707
22991
|
* @remarks
|
|
24708
22992
|
* This event is fired when an entity event has been triggered
|
|
@@ -24949,25 +23233,6 @@ export class WorldAfterEvents {
|
|
|
24949
23233
|
*
|
|
24950
23234
|
*/
|
|
24951
23235
|
readonly leverAction: LeverActionAfterEventSignal;
|
|
24952
|
-
/**
|
|
24953
|
-
* @beta
|
|
24954
|
-
* @remarks
|
|
24955
|
-
* This event is an internal implementation detail, and is
|
|
24956
|
-
* otherwise not currently functional.
|
|
24957
|
-
*
|
|
24958
|
-
* @privilege early-execution-readable - This property can be read in early-execution mode.
|
|
24959
|
-
*
|
|
24960
|
-
*/
|
|
24961
|
-
readonly messageReceive: ServerMessageAfterEventSignal;
|
|
24962
|
-
/**
|
|
24963
|
-
* @beta
|
|
24964
|
-
* @remarks
|
|
24965
|
-
* This event is triggered when a pack setting is changed.
|
|
24966
|
-
*
|
|
24967
|
-
* @privilege early-execution-readable - This property can be read in early-execution mode.
|
|
24968
|
-
*
|
|
24969
|
-
*/
|
|
24970
|
-
readonly packSettingChange: PackSettingChangeAfterEventSignal;
|
|
24971
23236
|
/**
|
|
24972
23237
|
* @remarks
|
|
24973
23238
|
* This event fires when a piston expands or retracts.
|
|
@@ -25120,16 +23385,6 @@ export class WorldAfterEvents {
|
|
|
25120
23385
|
*
|
|
25121
23386
|
*/
|
|
25122
23387
|
readonly playerSwingStart: PlayerSwingStartAfterEventSignal;
|
|
25123
|
-
/**
|
|
25124
|
-
* @beta
|
|
25125
|
-
* @remarks
|
|
25126
|
-
* An event for when a player uses a named name tag on an
|
|
25127
|
-
* entity.
|
|
25128
|
-
*
|
|
25129
|
-
* @privilege early-execution-readable - This property can be read in early-execution mode.
|
|
25130
|
-
*
|
|
25131
|
-
*/
|
|
25132
|
-
readonly playerUseNameTag: PlayerUseNameTagAfterEventSignal;
|
|
25133
23388
|
/**
|
|
25134
23389
|
* @remarks
|
|
25135
23390
|
* A pressure plate has popped back up (i.e., there are no
|
|
@@ -25198,47 +23453,6 @@ export class WorldAfterEvents {
|
|
|
25198
23453
|
*
|
|
25199
23454
|
*/
|
|
25200
23455
|
readonly weatherChange: WeatherChangeAfterEventSignal;
|
|
25201
|
-
/**
|
|
25202
|
-
* @beta
|
|
25203
|
-
* @remarks
|
|
25204
|
-
* This event fires when a {@link WorldClock} is paused.
|
|
25205
|
-
*
|
|
25206
|
-
* @privilege early-execution-readable - This property can be read in early-execution mode.
|
|
25207
|
-
*
|
|
25208
|
-
*/
|
|
25209
|
-
readonly worldClockOnPaused: WorldClockOnPausedAfterEventSignal;
|
|
25210
|
-
/**
|
|
25211
|
-
* @beta
|
|
25212
|
-
* @remarks
|
|
25213
|
-
* This event fires when a {@link WorldClock} is resumed.
|
|
25214
|
-
*
|
|
25215
|
-
* @privilege early-execution-readable - This property can be read in early-execution mode.
|
|
25216
|
-
*
|
|
25217
|
-
*/
|
|
25218
|
-
readonly worldClockOnResumed: WorldClockOnResumedAfterEventSignal;
|
|
25219
|
-
/**
|
|
25220
|
-
* @beta
|
|
25221
|
-
* @remarks
|
|
25222
|
-
* This event fires when the time of a {@link WorldClock} hits
|
|
25223
|
-
* a {@link TimeMarker} on the clock. This can happen during a
|
|
25224
|
-
* regular level tick or when the time is set.
|
|
25225
|
-
*
|
|
25226
|
-
* @privilege early-execution-readable - This property can be read in early-execution mode.
|
|
25227
|
-
*
|
|
25228
|
-
*/
|
|
25229
|
-
readonly worldClockOnTimeMarker: WorldClockOnTimeMarkerAfterEventSignal;
|
|
25230
|
-
/**
|
|
25231
|
-
* @beta
|
|
25232
|
-
* @remarks
|
|
25233
|
-
* This event fires when a {@link WorldClock} time is changed.
|
|
25234
|
-
* This can happen when the time is directly set through
|
|
25235
|
-
* scripts or commands or when the clock reaches the maximum
|
|
25236
|
-
* time and restarts.
|
|
25237
|
-
*
|
|
25238
|
-
* @privilege early-execution-readable - This property can be read in early-execution mode.
|
|
25239
|
-
*
|
|
25240
|
-
*/
|
|
25241
|
-
readonly worldClockOnTimeModified: WorldClockOnTimeModifiedAfterEventSignal;
|
|
25242
23456
|
/**
|
|
25243
23457
|
* @remarks
|
|
25244
23458
|
* @privilege early-execution-readable - This property can be read in early-execution mode.
|
|
@@ -25256,43 +23470,6 @@ export class WorldAfterEvents {
|
|
|
25256
23470
|
*/
|
|
25257
23471
|
export class WorldBeforeEvents {
|
|
25258
23472
|
private constructor();
|
|
25259
|
-
/**
|
|
25260
|
-
* @beta
|
|
25261
|
-
* @remarks
|
|
25262
|
-
* This event is triggered after a chat message has been
|
|
25263
|
-
* broadcast or sent to players.
|
|
25264
|
-
*
|
|
25265
|
-
* @privilege early-execution-readable - This property can be read in early-execution mode.
|
|
25266
|
-
*
|
|
25267
|
-
* @example customCommand.ts
|
|
25268
|
-
* ```typescript
|
|
25269
|
-
* import { world, DimensionLocation } from '@minecraft/server';
|
|
25270
|
-
*
|
|
25271
|
-
* function customCommand(targetLocation: DimensionLocation) {
|
|
25272
|
-
* const chatCallback = world.beforeEvents.chatSend.subscribe(eventData => {
|
|
25273
|
-
* if (eventData.message.includes('cancel')) {
|
|
25274
|
-
* // Cancel event if the message contains "cancel"
|
|
25275
|
-
* eventData.cancel = true;
|
|
25276
|
-
* } else {
|
|
25277
|
-
* const args = eventData.message.split(' ');
|
|
25278
|
-
*
|
|
25279
|
-
* if (args.length > 0) {
|
|
25280
|
-
* switch (args[0].toLowerCase()) {
|
|
25281
|
-
* case 'echo':
|
|
25282
|
-
* // Send a modified version of chat message
|
|
25283
|
-
* world.sendMessage(`Echo '${eventData.message.substring(4).trim()}'`);
|
|
25284
|
-
* break;
|
|
25285
|
-
* case 'help':
|
|
25286
|
-
* world.sendMessage(`Available commands: echo <message>`);
|
|
25287
|
-
* break;
|
|
25288
|
-
* }
|
|
25289
|
-
* }
|
|
25290
|
-
* }
|
|
25291
|
-
* });
|
|
25292
|
-
* }
|
|
25293
|
-
* ```
|
|
25294
|
-
*/
|
|
25295
|
-
readonly chatSend: ChatSendBeforeEventSignal;
|
|
25296
23473
|
/**
|
|
25297
23474
|
* @remarks
|
|
25298
23475
|
* This event is triggered after an event has been added to an
|
|
@@ -25307,554 +23484,100 @@ export class WorldBeforeEvents {
|
|
|
25307
23484
|
* @privilege early-execution-readable - This property can be read in early-execution mode.
|
|
25308
23485
|
*
|
|
25309
23486
|
*/
|
|
25310
|
-
readonly entityHeal: EntityHealBeforeEventSignal;
|
|
25311
|
-
/**
|
|
25312
|
-
* @remarks
|
|
25313
|
-
* @privilege early-execution-readable - This property can be read in early-execution mode.
|
|
25314
|
-
*
|
|
25315
|
-
*/
|
|
25316
|
-
readonly entityHurt: EntityHurtBeforeEventSignal;
|
|
25317
|
-
/**
|
|
25318
|
-
* @remarks
|
|
25319
|
-
* This event fires before an entity picks up an item.
|
|
25320
|
-
*
|
|
25321
|
-
* @privilege early-execution-readable - This property can be read in early-execution mode.
|
|
25322
|
-
*
|
|
25323
|
-
*/
|
|
25324
|
-
readonly entityItemPickup: EntityItemPickupBeforeEventSignal;
|
|
25325
|
-
/**
|
|
25326
|
-
* @remarks
|
|
25327
|
-
* Fires before an entity is removed from the world (for
|
|
25328
|
-
* example, unloaded or removed after being killed.)
|
|
25329
|
-
*
|
|
25330
|
-
* @privilege early-execution-readable - This property can be read in early-execution mode.
|
|
25331
|
-
*
|
|
25332
|
-
*/
|
|
25333
|
-
readonly entityRemove: EntityRemoveBeforeEventSignal;
|
|
25334
|
-
/**
|
|
25335
|
-
* @rc
|
|
25336
|
-
* @remarks
|
|
25337
|
-
* Fires before an entity is tamed.
|
|
25338
|
-
*
|
|
25339
|
-
* @privilege early-execution-readable - This property can be read in early-execution mode.
|
|
25340
|
-
*
|
|
25341
|
-
*/
|
|
25342
|
-
readonly entityTamed: EntityTamedBeforeEventSignal;
|
|
25343
|
-
/**
|
|
25344
|
-
* @remarks
|
|
25345
|
-
* This event is fired after an explosion occurs.
|
|
25346
|
-
*
|
|
25347
|
-
* @privilege early-execution-readable - This property can be read in early-execution mode.
|
|
25348
|
-
*
|
|
25349
|
-
*/
|
|
25350
|
-
readonly explosion: ExplosionBeforeEventSignal;
|
|
25351
|
-
/**
|
|
25352
|
-
* @remarks
|
|
25353
|
-
* This event fires when an item is successfully used by a
|
|
25354
|
-
* player.
|
|
25355
|
-
*
|
|
25356
|
-
* @privilege early-execution-readable - This property can be read in early-execution mode.
|
|
25357
|
-
*
|
|
25358
|
-
*/
|
|
25359
|
-
readonly itemUse: ItemUseBeforeEventSignal;
|
|
25360
|
-
/**
|
|
25361
|
-
* @remarks
|
|
25362
|
-
* This event fires before a block is broken by a player.
|
|
25363
|
-
*
|
|
25364
|
-
* @privilege early-execution-readable - This property can be read in early-execution mode.
|
|
25365
|
-
*
|
|
25366
|
-
*/
|
|
25367
|
-
readonly playerBreakBlock: PlayerBreakBlockBeforeEventSignal;
|
|
25368
|
-
/**
|
|
25369
|
-
* @remarks
|
|
25370
|
-
* @privilege early-execution-readable - This property can be read in early-execution mode.
|
|
25371
|
-
*
|
|
25372
|
-
*/
|
|
25373
|
-
readonly playerGameModeChange: PlayerGameModeChangeBeforeEventSignal;
|
|
25374
|
-
/**
|
|
25375
|
-
* @remarks
|
|
25376
|
-
* Fires before a player interacts with a block.
|
|
25377
|
-
*
|
|
25378
|
-
* @privilege early-execution-readable - This property can be read in early-execution mode.
|
|
25379
|
-
*
|
|
25380
|
-
*/
|
|
25381
|
-
readonly playerInteractWithBlock: PlayerInteractWithBlockBeforeEventSignal;
|
|
25382
|
-
/**
|
|
25383
|
-
* @remarks
|
|
25384
|
-
* Fires before a player interacts with an entity.
|
|
25385
|
-
*
|
|
25386
|
-
* @privilege early-execution-readable - This property can be read in early-execution mode.
|
|
25387
|
-
*
|
|
25388
|
-
*/
|
|
25389
|
-
readonly playerInteractWithEntity: PlayerInteractWithEntityBeforeEventSignal;
|
|
25390
|
-
/**
|
|
25391
|
-
* @remarks
|
|
25392
|
-
* Fires when a player leaves the game.
|
|
25393
|
-
*
|
|
25394
|
-
* @privilege early-execution-readable - This property can be read in early-execution mode.
|
|
25395
|
-
*
|
|
25396
|
-
*/
|
|
25397
|
-
readonly playerLeave: PlayerLeaveBeforeEventSignal;
|
|
25398
|
-
/**
|
|
25399
|
-
* @beta
|
|
25400
|
-
* @remarks
|
|
25401
|
-
* This event fires before a block is placed by a player.
|
|
25402
|
-
*
|
|
25403
|
-
* @privilege early-execution-readable - This property can be read in early-execution mode.
|
|
25404
|
-
*
|
|
25405
|
-
*/
|
|
25406
|
-
readonly playerPlaceBlock: PlayerPlaceBlockBeforeEventSignal;
|
|
25407
|
-
/**
|
|
25408
|
-
* @remarks
|
|
25409
|
-
* @privilege early-execution-readable - This property can be read in early-execution mode.
|
|
25410
|
-
*
|
|
25411
|
-
*/
|
|
25412
|
-
readonly weatherChange: WeatherChangeBeforeEventSignal;
|
|
25413
|
-
/**
|
|
25414
|
-
* @beta
|
|
25415
|
-
* @remarks
|
|
25416
|
-
* This event fires when a {@link WorldClock} reaches its
|
|
25417
|
-
* maximum time and is about to restart.
|
|
25418
|
-
*
|
|
25419
|
-
* @privilege early-execution-readable - This property can be read in early-execution mode.
|
|
25420
|
-
*
|
|
25421
|
-
*/
|
|
25422
|
-
readonly worldClockOnRestart: WorldClockOnRestartBeforeEventSignal;
|
|
25423
|
-
}
|
|
25424
|
-
|
|
25425
|
-
/**
|
|
25426
|
-
* @beta
|
|
25427
|
-
* A class that represents a particular clock within a world.
|
|
25428
|
-
*/
|
|
25429
|
-
export class WorldClock {
|
|
25430
|
-
private constructor();
|
|
25431
|
-
/**
|
|
25432
|
-
* @remarks
|
|
25433
|
-
* Retrieves or sets whether the world clock is currently
|
|
25434
|
-
* paused.
|
|
25435
|
-
*
|
|
25436
|
-
* @privilege restricted-execution-read-only - This property can't be edited in restricted-execution mode.
|
|
25437
|
-
*
|
|
25438
|
-
*/
|
|
25439
|
-
isPaused: boolean;
|
|
25440
|
-
/**
|
|
25441
|
-
* @remarks
|
|
25442
|
-
* The identifier that represents this world clock.
|
|
25443
|
-
*
|
|
25444
|
-
*/
|
|
25445
|
-
readonly name: string;
|
|
25446
|
-
/**
|
|
25447
|
-
* @remarks
|
|
25448
|
-
* Retrieves or sets the current time (in ticks) of the world
|
|
25449
|
-
* clock.
|
|
25450
|
-
*
|
|
25451
|
-
* @privilege restricted-execution-read-only - This property can't be edited in restricted-execution mode.
|
|
25452
|
-
*
|
|
25453
|
-
* Minimum Value: 0
|
|
25454
|
-
*/
|
|
25455
|
-
time: number;
|
|
25456
|
-
/**
|
|
25457
|
-
* @remarks
|
|
25458
|
-
* Retrieves the current time markers of the world clock.
|
|
25459
|
-
*
|
|
25460
|
-
*/
|
|
25461
|
-
readonly timeMarkers: TimeMarker[];
|
|
25462
|
-
/**
|
|
25463
|
-
* @remarks
|
|
25464
|
-
* Adds a new time marker to the world clock.
|
|
25465
|
-
*
|
|
25466
|
-
* @privilege no-restricted-execution - This function can't be called in restricted-execution mode.
|
|
25467
|
-
*
|
|
25468
|
-
* @param timeMarkerOptions
|
|
25469
|
-
* Options for creating a time marker.
|
|
25470
|
-
* @throws This function can throw errors.
|
|
25471
|
-
*
|
|
25472
|
-
* {@link WorldClockAddTimeMarkerError}
|
|
25473
|
-
*/
|
|
25474
|
-
addTimeMarker(timeMarkerOptions: TimeMarkerOptions): void;
|
|
25475
|
-
/**
|
|
25476
|
-
* @remarks
|
|
25477
|
-
* Removes an existing time marker from the world clock.
|
|
25478
|
-
*
|
|
25479
|
-
* @privilege no-restricted-execution - This function can't be called in restricted-execution mode.
|
|
25480
|
-
*
|
|
25481
|
-
* @param timeMarker
|
|
25482
|
-
* The time marker or time marker name to remove.
|
|
25483
|
-
* @throws
|
|
25484
|
-
* WorldClockTimeMarkerNotFoundError: If the time marker does
|
|
25485
|
-
* not exist on the world clock.
|
|
25486
|
-
* WorldClockRemoveMinecraftTimeMarkerError: If the time marker
|
|
25487
|
-
* uses the 'minecraft' namespace.
|
|
25488
|
-
*
|
|
25489
|
-
* {@link WorldClockRemoveMinecraftTimeMarkerError}
|
|
25490
|
-
*
|
|
25491
|
-
* {@link WorldClockTimeMarkerNotFoundError}
|
|
25492
|
-
*/
|
|
25493
|
-
removeTimeMarker(timeMarker: string | TimeMarker): void;
|
|
25494
|
-
/**
|
|
25495
|
-
* @remarks
|
|
25496
|
-
* Rewinds the world clock's time to the previous occurrence of
|
|
25497
|
-
* the specified time marker.
|
|
25498
|
-
*
|
|
25499
|
-
* @privilege no-restricted-execution - This function can't be called in restricted-execution mode.
|
|
25500
|
-
*
|
|
25501
|
-
* @param timeMarker
|
|
25502
|
-
* The time marker or time marker name to rewind the world
|
|
25503
|
-
* clock's time to.
|
|
25504
|
-
* @throws
|
|
25505
|
-
* WorldClockTimeMarkerNotFoundError: If the time marker does
|
|
25506
|
-
* not exist on the world clock.
|
|
25507
|
-
* WorldClockRewindError: If the world clock's current time is
|
|
25508
|
-
* before the time marker's first occurrence.
|
|
25509
|
-
*
|
|
25510
|
-
* {@link WorldClockRewindError}
|
|
25511
|
-
*
|
|
25512
|
-
* {@link WorldClockTimeMarkerNotFoundError}
|
|
25513
|
-
*/
|
|
25514
|
-
rewindTo(timeMarker: string | TimeMarker): void;
|
|
25515
|
-
/**
|
|
25516
|
-
* @remarks
|
|
25517
|
-
* Sets the world clock's time to the specified time marker.
|
|
25518
|
-
*
|
|
25519
|
-
* @privilege no-restricted-execution - This function can't be called in restricted-execution mode.
|
|
25520
|
-
*
|
|
25521
|
-
* @param timeMarker
|
|
25522
|
-
* The time marker or time marker name to set the world clock's
|
|
25523
|
-
* time to.
|
|
25524
|
-
* @throws
|
|
25525
|
-
* WorldClockTimeMarkerNotFoundError: If the time marker does
|
|
25526
|
-
* not exist on the world clock.
|
|
25527
|
-
*
|
|
25528
|
-
* {@link WorldClockTimeMarkerNotFoundError}
|
|
25529
|
-
*/
|
|
25530
|
-
set(timeMarker: string | TimeMarker): void;
|
|
25531
|
-
/**
|
|
25532
|
-
* @remarks
|
|
25533
|
-
* Skips the world clock's time to the next occurrence of the
|
|
25534
|
-
* specified time marker.
|
|
25535
|
-
* If the next occurrence overflows the world clock's time, the
|
|
25536
|
-
* time is reset to the first occurrence.
|
|
25537
|
-
*
|
|
25538
|
-
* @privilege no-restricted-execution - This function can't be called in restricted-execution mode.
|
|
25539
|
-
*
|
|
25540
|
-
* @param timeMarker
|
|
25541
|
-
* The time marker or time marker name to skip the world
|
|
25542
|
-
* clock's time to.
|
|
25543
|
-
* @throws
|
|
25544
|
-
* WorldClockTimeMarkerNotFoundError: If the time marker does
|
|
25545
|
-
* not exist on the world clock.
|
|
25546
|
-
*
|
|
25547
|
-
* {@link WorldClockTimeMarkerNotFoundError}
|
|
25548
|
-
*/
|
|
25549
|
-
skipTo(timeMarker: string | TimeMarker): void;
|
|
25550
|
-
}
|
|
25551
|
-
|
|
25552
|
-
/**
|
|
25553
|
-
* @beta
|
|
25554
|
-
* Contains information related to a {@link WorldClock} being
|
|
25555
|
-
* paused.
|
|
25556
|
-
*/
|
|
25557
|
-
export class WorldClockOnPausedAfterEvent {
|
|
25558
|
-
private constructor();
|
|
25559
|
-
/**
|
|
25560
|
-
* @remarks
|
|
25561
|
-
* The world clock that was paused.
|
|
25562
|
-
*
|
|
25563
|
-
*/
|
|
25564
|
-
readonly clock: WorldClock;
|
|
25565
|
-
}
|
|
25566
|
-
|
|
25567
|
-
/**
|
|
25568
|
-
* @beta
|
|
25569
|
-
* Manages callbacks that are connected to a {@link WorldClock}
|
|
25570
|
-
* being paused.
|
|
25571
|
-
*/
|
|
25572
|
-
export class WorldClockOnPausedAfterEventSignal {
|
|
25573
|
-
private constructor();
|
|
25574
|
-
/**
|
|
25575
|
-
* @remarks
|
|
25576
|
-
* Adds a callback that will be called when a world clock is
|
|
25577
|
-
* paused.
|
|
25578
|
-
*
|
|
25579
|
-
* @privilege no-restricted-execution - This function can't be called in restricted-execution mode.
|
|
25580
|
-
*
|
|
25581
|
-
* @privilege early-execution-allowed - This function can be called in early-execution mode.
|
|
25582
|
-
*
|
|
25583
|
-
*/
|
|
25584
|
-
subscribe(
|
|
25585
|
-
callback: (arg0: WorldClockOnPausedAfterEvent) => void,
|
|
25586
|
-
options?: WorldClockEventOptions,
|
|
25587
|
-
): (arg0: WorldClockOnPausedAfterEvent) => void;
|
|
25588
|
-
/**
|
|
25589
|
-
* @remarks
|
|
25590
|
-
* Removes a callback from being called when a world clock is
|
|
25591
|
-
* paused.
|
|
25592
|
-
*
|
|
25593
|
-
* @privilege no-restricted-execution - This function can't be called in restricted-execution mode.
|
|
25594
|
-
*
|
|
25595
|
-
* @privilege early-execution-allowed - This function can be called in early-execution mode.
|
|
25596
|
-
*
|
|
25597
|
-
*/
|
|
25598
|
-
unsubscribe(callback: (arg0: WorldClockOnPausedAfterEvent) => void): void;
|
|
25599
|
-
}
|
|
25600
|
-
|
|
25601
|
-
/**
|
|
25602
|
-
* @beta
|
|
25603
|
-
* Contains information related to a {@link WorldClock}
|
|
25604
|
-
* restarting.
|
|
25605
|
-
*/
|
|
25606
|
-
export class WorldClockOnRestartBeforeEvent {
|
|
25607
|
-
private constructor();
|
|
25608
|
-
/**
|
|
25609
|
-
* @remarks
|
|
25610
|
-
* If set to true, cancels the world clock restart event. This
|
|
25611
|
-
* will keep the world clock at the maximum time value and
|
|
25612
|
-
* prevent it from ticking forward.
|
|
25613
|
-
*
|
|
25614
|
-
*/
|
|
25615
|
-
cancel: boolean;
|
|
25616
|
-
/**
|
|
25617
|
-
* @remarks
|
|
25618
|
-
* The world clock that is restarting.
|
|
25619
|
-
*
|
|
25620
|
-
*/
|
|
25621
|
-
readonly clock: WorldClock;
|
|
25622
|
-
/**
|
|
25623
|
-
* @remarks
|
|
25624
|
-
* The time that the world clock will be set to after it
|
|
25625
|
-
* restarts. If not set, the world clock will be set to 0.
|
|
25626
|
-
*
|
|
25627
|
-
* Minimum Value: 0
|
|
25628
|
-
*/
|
|
25629
|
-
newTime: number;
|
|
25630
|
-
}
|
|
25631
|
-
|
|
25632
|
-
/**
|
|
25633
|
-
* @beta
|
|
25634
|
-
* Manages callbacks that are connected to a {@link WorldClock}
|
|
25635
|
-
* restarting.
|
|
25636
|
-
*/
|
|
25637
|
-
export class WorldClockOnRestartBeforeEventSignal {
|
|
25638
|
-
private constructor();
|
|
25639
|
-
/**
|
|
25640
|
-
* @remarks
|
|
25641
|
-
* Adds a callback that will be called when a world clock is
|
|
25642
|
-
* restarting.
|
|
25643
|
-
*
|
|
25644
|
-
* @privilege no-restricted-execution - This function can't be called in restricted-execution mode.
|
|
25645
|
-
*
|
|
25646
|
-
* @privilege early-execution-allowed - This function can be called in early-execution mode.
|
|
25647
|
-
*
|
|
25648
|
-
* @param callback
|
|
25649
|
-
* This closure is called with restricted-execution privilege.
|
|
25650
|
-
* @returns
|
|
25651
|
-
* Closure that is called with restricted-execution privilege.
|
|
25652
|
-
*/
|
|
25653
|
-
subscribe(
|
|
25654
|
-
callback: (arg0: WorldClockOnRestartBeforeEvent) => void,
|
|
25655
|
-
options?: WorldClockEventOptions,
|
|
25656
|
-
): (arg0: WorldClockOnRestartBeforeEvent) => void;
|
|
25657
|
-
/**
|
|
25658
|
-
* @remarks
|
|
25659
|
-
* Removes a callback from being called when a world clock is
|
|
25660
|
-
* restarting.
|
|
25661
|
-
*
|
|
25662
|
-
* @privilege no-restricted-execution - This function can't be called in restricted-execution mode.
|
|
25663
|
-
*
|
|
25664
|
-
* @privilege early-execution-allowed - This function can be called in early-execution mode.
|
|
25665
|
-
*
|
|
25666
|
-
* @param callback
|
|
25667
|
-
* This closure is called with restricted-execution privilege.
|
|
25668
|
-
*/
|
|
25669
|
-
unsubscribe(callback: (arg0: WorldClockOnRestartBeforeEvent) => void): void;
|
|
25670
|
-
}
|
|
25671
|
-
|
|
25672
|
-
/**
|
|
25673
|
-
* @beta
|
|
25674
|
-
* Contains information related to a {@link WorldClock} being
|
|
25675
|
-
* resumed.
|
|
25676
|
-
*/
|
|
25677
|
-
export class WorldClockOnResumedAfterEvent {
|
|
25678
|
-
private constructor();
|
|
23487
|
+
readonly entityHeal: EntityHealBeforeEventSignal;
|
|
25679
23488
|
/**
|
|
25680
23489
|
* @remarks
|
|
25681
|
-
*
|
|
23490
|
+
* @privilege early-execution-readable - This property can be read in early-execution mode.
|
|
25682
23491
|
*
|
|
25683
23492
|
*/
|
|
25684
|
-
readonly
|
|
25685
|
-
}
|
|
25686
|
-
|
|
25687
|
-
/**
|
|
25688
|
-
* @beta
|
|
25689
|
-
* Manages callbacks that are connected to a {@link WorldClock}
|
|
25690
|
-
* being resumed.
|
|
25691
|
-
*/
|
|
25692
|
-
export class WorldClockOnResumedAfterEventSignal {
|
|
25693
|
-
private constructor();
|
|
23493
|
+
readonly entityHurt: EntityHurtBeforeEventSignal;
|
|
25694
23494
|
/**
|
|
25695
23495
|
* @remarks
|
|
25696
|
-
*
|
|
25697
|
-
* resumed.
|
|
25698
|
-
*
|
|
25699
|
-
* @privilege no-restricted-execution - This function can't be called in restricted-execution mode.
|
|
23496
|
+
* This event fires before an entity picks up an item.
|
|
25700
23497
|
*
|
|
25701
|
-
* @privilege early-execution-
|
|
23498
|
+
* @privilege early-execution-readable - This property can be read in early-execution mode.
|
|
25702
23499
|
*
|
|
25703
23500
|
*/
|
|
25704
|
-
|
|
25705
|
-
callback: (arg0: WorldClockOnResumedAfterEvent) => void,
|
|
25706
|
-
options?: WorldClockEventOptions,
|
|
25707
|
-
): (arg0: WorldClockOnResumedAfterEvent) => void;
|
|
23501
|
+
readonly entityItemPickup: EntityItemPickupBeforeEventSignal;
|
|
25708
23502
|
/**
|
|
25709
23503
|
* @remarks
|
|
25710
|
-
*
|
|
25711
|
-
*
|
|
25712
|
-
*
|
|
25713
|
-
* @privilege no-restricted-execution - This function can't be called in restricted-execution mode.
|
|
23504
|
+
* Fires before an entity is removed from the world (for
|
|
23505
|
+
* example, unloaded or removed after being killed.)
|
|
25714
23506
|
*
|
|
25715
|
-
* @privilege early-execution-
|
|
23507
|
+
* @privilege early-execution-readable - This property can be read in early-execution mode.
|
|
25716
23508
|
*
|
|
25717
23509
|
*/
|
|
25718
|
-
|
|
25719
|
-
}
|
|
25720
|
-
|
|
25721
|
-
/**
|
|
25722
|
-
* @beta
|
|
25723
|
-
* Contains information related to when the time of a
|
|
25724
|
-
* {@link WorldClock} hits a {@link TimeMarker}.
|
|
25725
|
-
*/
|
|
25726
|
-
export class WorldClockOnTimeMarkerAfterEvent {
|
|
25727
|
-
private constructor();
|
|
23510
|
+
readonly entityRemove: EntityRemoveBeforeEventSignal;
|
|
25728
23511
|
/**
|
|
23512
|
+
* @rc
|
|
25729
23513
|
* @remarks
|
|
25730
|
-
*
|
|
23514
|
+
* Fires before an entity is tamed.
|
|
23515
|
+
*
|
|
23516
|
+
* @privilege early-execution-readable - This property can be read in early-execution mode.
|
|
25731
23517
|
*
|
|
25732
23518
|
*/
|
|
25733
|
-
readonly
|
|
23519
|
+
readonly entityTamed: EntityTamedBeforeEventSignal;
|
|
25734
23520
|
/**
|
|
25735
23521
|
* @remarks
|
|
25736
|
-
*
|
|
23522
|
+
* This event is fired after an explosion occurs.
|
|
23523
|
+
*
|
|
23524
|
+
* @privilege early-execution-readable - This property can be read in early-execution mode.
|
|
25737
23525
|
*
|
|
25738
23526
|
*/
|
|
25739
|
-
readonly
|
|
25740
|
-
}
|
|
25741
|
-
|
|
25742
|
-
/**
|
|
25743
|
-
* @beta
|
|
25744
|
-
* Manages callbacks that are connected to when the time of a
|
|
25745
|
-
* {@link WorldClock} hits a {@link TimeMarker}.
|
|
25746
|
-
*/
|
|
25747
|
-
export class WorldClockOnTimeMarkerAfterEventSignal {
|
|
25748
|
-
private constructor();
|
|
23527
|
+
readonly explosion: ExplosionBeforeEventSignal;
|
|
25749
23528
|
/**
|
|
25750
23529
|
* @remarks
|
|
25751
|
-
*
|
|
25752
|
-
*
|
|
25753
|
-
*
|
|
25754
|
-
* @privilege no-restricted-execution - This function can't be called in restricted-execution mode.
|
|
23530
|
+
* This event fires when an item is successfully used by a
|
|
23531
|
+
* player.
|
|
25755
23532
|
*
|
|
25756
|
-
* @privilege early-execution-
|
|
23533
|
+
* @privilege early-execution-readable - This property can be read in early-execution mode.
|
|
25757
23534
|
*
|
|
25758
23535
|
*/
|
|
25759
|
-
|
|
25760
|
-
callback: (arg0: WorldClockOnTimeMarkerAfterEvent) => void,
|
|
25761
|
-
options?: WorldClockTimeMarkerEventOptions,
|
|
25762
|
-
): (arg0: WorldClockOnTimeMarkerAfterEvent) => void;
|
|
23536
|
+
readonly itemUse: ItemUseBeforeEventSignal;
|
|
25763
23537
|
/**
|
|
25764
23538
|
* @remarks
|
|
25765
|
-
*
|
|
25766
|
-
* time hits a time marker.
|
|
25767
|
-
*
|
|
25768
|
-
* @privilege no-restricted-execution - This function can't be called in restricted-execution mode.
|
|
23539
|
+
* This event fires before a block is broken by a player.
|
|
25769
23540
|
*
|
|
25770
|
-
* @privilege early-execution-
|
|
23541
|
+
* @privilege early-execution-readable - This property can be read in early-execution mode.
|
|
25771
23542
|
*
|
|
25772
23543
|
*/
|
|
25773
|
-
|
|
25774
|
-
}
|
|
25775
|
-
|
|
25776
|
-
/**
|
|
25777
|
-
* @beta
|
|
25778
|
-
* Contains information related to changes to the time of a
|
|
25779
|
-
* {@link WorldClock}.
|
|
25780
|
-
*/
|
|
25781
|
-
export class WorldClockOnTimeModifiedAfterEvent {
|
|
25782
|
-
private constructor();
|
|
23544
|
+
readonly playerBreakBlock: PlayerBreakBlockBeforeEventSignal;
|
|
25783
23545
|
/**
|
|
25784
23546
|
* @remarks
|
|
25785
|
-
*
|
|
23547
|
+
* @privilege early-execution-readable - This property can be read in early-execution mode.
|
|
25786
23548
|
*
|
|
25787
23549
|
*/
|
|
25788
|
-
readonly
|
|
25789
|
-
}
|
|
25790
|
-
|
|
25791
|
-
/**
|
|
25792
|
-
* @beta
|
|
25793
|
-
* Manages callbacks that are connected to changes to the time
|
|
25794
|
-
* of a {@link WorldClock}.
|
|
25795
|
-
*/
|
|
25796
|
-
export class WorldClockOnTimeModifiedAfterEventSignal {
|
|
25797
|
-
private constructor();
|
|
23550
|
+
readonly playerGameModeChange: PlayerGameModeChangeBeforeEventSignal;
|
|
25798
23551
|
/**
|
|
25799
23552
|
* @remarks
|
|
25800
|
-
*
|
|
25801
|
-
* time is modified.
|
|
25802
|
-
*
|
|
25803
|
-
* @privilege no-restricted-execution - This function can't be called in restricted-execution mode.
|
|
23553
|
+
* Fires before a player interacts with a block.
|
|
25804
23554
|
*
|
|
25805
|
-
* @privilege early-execution-
|
|
23555
|
+
* @privilege early-execution-readable - This property can be read in early-execution mode.
|
|
25806
23556
|
*
|
|
25807
23557
|
*/
|
|
25808
|
-
|
|
25809
|
-
callback: (arg0: WorldClockOnTimeModifiedAfterEvent) => void,
|
|
25810
|
-
options?: WorldClockEventOptions,
|
|
25811
|
-
): (arg0: WorldClockOnTimeModifiedAfterEvent) => void;
|
|
23558
|
+
readonly playerInteractWithBlock: PlayerInteractWithBlockBeforeEventSignal;
|
|
25812
23559
|
/**
|
|
25813
23560
|
* @remarks
|
|
25814
|
-
*
|
|
25815
|
-
* time is modified.
|
|
25816
|
-
*
|
|
25817
|
-
* @privilege no-restricted-execution - This function can't be called in restricted-execution mode.
|
|
23561
|
+
* Fires before a player interacts with an entity.
|
|
25818
23562
|
*
|
|
25819
|
-
* @privilege early-execution-
|
|
23563
|
+
* @privilege early-execution-readable - This property can be read in early-execution mode.
|
|
25820
23564
|
*
|
|
25821
23565
|
*/
|
|
25822
|
-
|
|
25823
|
-
}
|
|
25824
|
-
|
|
25825
|
-
/**
|
|
25826
|
-
* @beta
|
|
25827
|
-
* Provides the functionality for registering custom world
|
|
25828
|
-
* clocks. World clocks can only be registered during the
|
|
25829
|
-
* system startup event.
|
|
25830
|
-
*/
|
|
25831
|
-
export class WorldClockRegistry {
|
|
25832
|
-
private constructor();
|
|
23566
|
+
readonly playerInteractWithEntity: PlayerInteractWithEntityBeforeEventSignal;
|
|
25833
23567
|
/**
|
|
25834
23568
|
* @remarks
|
|
25835
|
-
*
|
|
25836
|
-
* the system startup event.
|
|
25837
|
-
*
|
|
25838
|
-
* @privilege early-execution-allowed - This function can be called in early-execution mode.
|
|
25839
|
-
*
|
|
25840
|
-
* @param name
|
|
25841
|
-
* The name that represents this world clock. Must have a
|
|
25842
|
-
* namespace and use only valid identifier characters. (e.g.,
|
|
25843
|
-
* 'mypack:my_clock').
|
|
25844
|
-
* @param registrationOptions
|
|
25845
|
-
* Additional options for registering a world clock, such as
|
|
25846
|
-
* including time markers at registration time.
|
|
25847
|
-
* @throws This function can throw errors.
|
|
25848
|
-
*
|
|
25849
|
-
* {@link WorldClockInvalidRegistryError}
|
|
23569
|
+
* Fires when a player leaves the game.
|
|
25850
23570
|
*
|
|
25851
|
-
*
|
|
23571
|
+
* @privilege early-execution-readable - This property can be read in early-execution mode.
|
|
25852
23572
|
*
|
|
25853
|
-
|
|
23573
|
+
*/
|
|
23574
|
+
readonly playerLeave: PlayerLeaveBeforeEventSignal;
|
|
23575
|
+
/**
|
|
23576
|
+
* @remarks
|
|
23577
|
+
* @privilege early-execution-readable - This property can be read in early-execution mode.
|
|
25854
23578
|
*
|
|
25855
|
-
* {@link WorldClockReloadTimeMarkerError}
|
|
25856
23579
|
*/
|
|
25857
|
-
|
|
23580
|
+
readonly weatherChange: WeatherChangeBeforeEventSignal;
|
|
25858
23581
|
}
|
|
25859
23582
|
|
|
25860
23583
|
export class WorldLoadAfterEvent {
|
|
@@ -25943,9 +23666,7 @@ export interface BiomeSearchOptions {
|
|
|
25943
23666
|
* A BlockBoundingBox is an interface to an object which
|
|
25944
23667
|
* represents an AABB aligned rectangle.
|
|
25945
23668
|
* The BlockBoundingBox assumes that it was created in a valid
|
|
25946
|
-
* state (min <= max) but cannot guarantee it
|
|
25947
|
-
* created using the associated {@link BlockBoundingBoxUtils}
|
|
25948
|
-
* utility functions.
|
|
23669
|
+
* state (min <= max) but cannot guarantee it.
|
|
25949
23670
|
* The min/max coordinates represent the diametrically opposite
|
|
25950
23671
|
* corners of the rectangle.
|
|
25951
23672
|
* The BlockBoundingBox is not a representation of blocks - it
|
|
@@ -26573,15 +24294,6 @@ export interface CustomCommand {
|
|
|
26573
24294
|
* command.
|
|
26574
24295
|
*/
|
|
26575
24296
|
export interface CustomCommandParameter {
|
|
26576
|
-
/**
|
|
26577
|
-
* @beta
|
|
26578
|
-
* @remarks
|
|
26579
|
-
* Can be used to reference the enum name when
|
|
26580
|
-
* {@link CustomCommandParamType} is 'Enum'. Allows the
|
|
26581
|
-
* parameter name to be different from the enum name.
|
|
26582
|
-
*
|
|
26583
|
-
*/
|
|
26584
|
-
enumName?: string;
|
|
26585
24297
|
/**
|
|
26586
24298
|
* @remarks
|
|
26587
24299
|
* The name of parameter as it appears on the command line.
|
|
@@ -26660,14 +24372,6 @@ export interface DefinitionModifier {
|
|
|
26660
24372
|
*
|
|
26661
24373
|
*/
|
|
26662
24374
|
removedComponentGroups: string[];
|
|
26663
|
-
/**
|
|
26664
|
-
* @beta
|
|
26665
|
-
* @remarks
|
|
26666
|
-
* The list of entity definition events that will be fired via
|
|
26667
|
-
* this update.
|
|
26668
|
-
*
|
|
26669
|
-
*/
|
|
26670
|
-
triggers: Trigger[];
|
|
26671
24375
|
}
|
|
26672
24376
|
|
|
26673
24377
|
/**
|
|
@@ -28032,19 +25736,6 @@ export interface PlayerSoundOptions {
|
|
|
28032
25736
|
*
|
|
28033
25737
|
*/
|
|
28034
25738
|
location?: Vector3;
|
|
28035
|
-
/**
|
|
28036
|
-
* @beta
|
|
28037
|
-
* @remarks
|
|
28038
|
-
* Number of additional times to repeat the sound after the
|
|
28039
|
-
* initial play. `0` (the default) plays the sound once, `-1`
|
|
28040
|
-
* loops it forever, and a positive integer `N` plays the sound
|
|
28041
|
-
* `N + 1` times in total. For example, `loopCount: 1` plays
|
|
28042
|
-
* the sound twice. The loop count is fixed when the sound
|
|
28043
|
-
* starts and cannot be changed afterward. When using `-1`, see
|
|
28044
|
-
* `SoundInstance` for handle lifetime requirements.
|
|
28045
|
-
*
|
|
28046
|
-
*/
|
|
28047
|
-
loopCount?: number;
|
|
28048
25739
|
/**
|
|
28049
25740
|
* @remarks
|
|
28050
25741
|
* Optional pitch of the sound.
|
|
@@ -28116,56 +25807,6 @@ export interface PlayerVisibilityRules extends EntityVisibilityRules {
|
|
|
28116
25807
|
showSpectatorToSpectator?: boolean;
|
|
28117
25808
|
}
|
|
28118
25809
|
|
|
28119
|
-
/**
|
|
28120
|
-
* @beta
|
|
28121
|
-
* Associates a block point-of-interest instance with its
|
|
28122
|
-
* squared distance from a query center.
|
|
28123
|
-
*/
|
|
28124
|
-
export interface PoiDistancePair {
|
|
28125
|
-
/**
|
|
28126
|
-
* @remarks
|
|
28127
|
-
* Squared three-dimensional distance, in blocks squared, from
|
|
28128
|
-
* the query center to the POI position.
|
|
28129
|
-
*
|
|
28130
|
-
*/
|
|
28131
|
-
distance: number;
|
|
28132
|
-
/**
|
|
28133
|
-
* @remarks
|
|
28134
|
-
* POI instance at this distance.
|
|
28135
|
-
*
|
|
28136
|
-
*/
|
|
28137
|
-
poi: PoiBlockInstance;
|
|
28138
|
-
}
|
|
28139
|
-
|
|
28140
|
-
/**
|
|
28141
|
-
* @beta
|
|
28142
|
-
* Selects block point-of-interest types by their exact
|
|
28143
|
-
* namespaced identifier.
|
|
28144
|
-
*/
|
|
28145
|
-
export interface PoiNameFilter {
|
|
28146
|
-
/**
|
|
28147
|
-
* @remarks
|
|
28148
|
-
* Exact namespaced POI type identifier to match.
|
|
28149
|
-
*
|
|
28150
|
-
*/
|
|
28151
|
-
name: string;
|
|
28152
|
-
}
|
|
28153
|
-
|
|
28154
|
-
/**
|
|
28155
|
-
* @beta
|
|
28156
|
-
* Selects block point-of-interest types that have all
|
|
28157
|
-
* specified tags.
|
|
28158
|
-
*/
|
|
28159
|
-
export interface PoiTagFilter {
|
|
28160
|
-
/**
|
|
28161
|
-
* @remarks
|
|
28162
|
-
* Namespaced POI tags that a matching type must contain. All
|
|
28163
|
-
* tags in the array are required.
|
|
28164
|
-
*
|
|
28165
|
-
*/
|
|
28166
|
-
tags: string[];
|
|
28167
|
-
}
|
|
28168
|
-
|
|
28169
25810
|
/**
|
|
28170
25811
|
* @rc
|
|
28171
25812
|
* Contains optional filters that control which primitive
|
|
@@ -28945,37 +26586,6 @@ export interface TickingAreaOptions {
|
|
|
28945
26586
|
to: Vector3;
|
|
28946
26587
|
}
|
|
28947
26588
|
|
|
28948
|
-
/**
|
|
28949
|
-
* @beta
|
|
28950
|
-
* Options for creating time markers for world clocks.
|
|
28951
|
-
*/
|
|
28952
|
-
export interface TimeMarkerOptions {
|
|
28953
|
-
/**
|
|
28954
|
-
* @remarks
|
|
28955
|
-
* The name that the time marker will have. Must have a
|
|
28956
|
-
* namespace and use only valid identifier characters. (e.g.,
|
|
28957
|
-
* 'mypack:my_time_marker').
|
|
28958
|
-
*
|
|
28959
|
-
*/
|
|
28960
|
-
name: string;
|
|
28961
|
-
/**
|
|
28962
|
-
* @remarks
|
|
28963
|
-
* The optional repeat period (in ticks) that the time marker
|
|
28964
|
-
* will have. If not specified, the time marker will only occur
|
|
28965
|
-
* once.
|
|
28966
|
-
*
|
|
28967
|
-
* Minimum Value: 0
|
|
28968
|
-
*/
|
|
28969
|
-
period?: number;
|
|
28970
|
-
/**
|
|
28971
|
-
* @remarks
|
|
28972
|
-
* The time (in ticks) that the time marker will occur at.
|
|
28973
|
-
*
|
|
28974
|
-
* Minimum Value: 0
|
|
28975
|
-
*/
|
|
28976
|
-
time: number;
|
|
28977
|
-
}
|
|
28978
|
-
|
|
28979
26589
|
/**
|
|
28980
26590
|
* Contains additional options for displaying a title and
|
|
28981
26591
|
* optional subtitle.
|
|
@@ -29113,78 +26723,14 @@ export interface WaypointTextureSelector {
|
|
|
29113
26723
|
textureBoundsList: WaypointTextureBounds[];
|
|
29114
26724
|
}
|
|
29115
26725
|
|
|
29116
|
-
/**
|
|
29117
|
-
* @beta
|
|
29118
|
-
* Contains parameters for world clock events that filters out
|
|
29119
|
-
* which events are passed to the provided callback.
|
|
29120
|
-
*/
|
|
29121
|
-
export interface WorldClockEventOptions {
|
|
29122
|
-
/**
|
|
29123
|
-
* @remarks
|
|
29124
|
-
* The name of the clock that this event should fire for.
|
|
29125
|
-
*
|
|
29126
|
-
*/
|
|
29127
|
-
clock: string;
|
|
29128
|
-
}
|
|
29129
|
-
|
|
29130
|
-
/**
|
|
29131
|
-
* @beta
|
|
29132
|
-
* Contains additional options for registering world clocks.
|
|
29133
|
-
*/
|
|
29134
|
-
export interface WorldClockRegistrationOptions {
|
|
29135
|
-
/**
|
|
29136
|
-
* @remarks
|
|
29137
|
-
* Set of options to include time markers during world clock
|
|
29138
|
-
* registration.
|
|
29139
|
-
*
|
|
29140
|
-
*/
|
|
29141
|
-
timeMarkers?: TimeMarkerOptions[];
|
|
29142
|
-
}
|
|
29143
|
-
|
|
29144
|
-
/**
|
|
29145
|
-
* @beta
|
|
29146
|
-
* Contains parameters for world clock time marker events that
|
|
29147
|
-
* filters out which events are passed to the provided
|
|
29148
|
-
* callback.
|
|
29149
|
-
*/
|
|
29150
|
-
export interface WorldClockTimeMarkerEventOptions {
|
|
29151
|
-
/**
|
|
29152
|
-
* @remarks
|
|
29153
|
-
* The name of the world clock that this event should fire for.
|
|
29154
|
-
*
|
|
29155
|
-
*/
|
|
29156
|
-
clock: string;
|
|
29157
|
-
/**
|
|
29158
|
-
* @remarks
|
|
29159
|
-
* The name of the time marker that this event should fire for.
|
|
29160
|
-
* If undefined, the event will fire for all time markers on
|
|
29161
|
-
* the world clock.
|
|
29162
|
-
*
|
|
29163
|
-
*/
|
|
29164
|
-
timeMarker?: string;
|
|
29165
|
-
}
|
|
29166
|
-
|
|
29167
26726
|
/**
|
|
29168
26727
|
* Contains additional options for a playSound occurrence.
|
|
29169
26728
|
*/
|
|
29170
26729
|
export interface WorldSoundOptions {
|
|
29171
26730
|
/**
|
|
29172
|
-
* @
|
|
26731
|
+
* @rc
|
|
29173
26732
|
*/
|
|
29174
26733
|
isBroadcast?: boolean;
|
|
29175
|
-
/**
|
|
29176
|
-
* @beta
|
|
29177
|
-
* @remarks
|
|
29178
|
-
* Number of additional times to repeat the sound after the
|
|
29179
|
-
* initial play. `0` (the default) plays the sound once, `-1`
|
|
29180
|
-
* loops it forever, and a positive integer `N` plays the sound
|
|
29181
|
-
* `N + 1` times in total. For example, `loopCount: 1` plays
|
|
29182
|
-
* the sound twice. The loop count is fixed when the sound
|
|
29183
|
-
* starts and cannot be changed afterward. When using `-1`, see
|
|
29184
|
-
* `SoundInstance` for handle lifetime requirements.
|
|
29185
|
-
*
|
|
29186
|
-
*/
|
|
29187
|
-
loopCount?: number;
|
|
29188
26734
|
/**
|
|
29189
26735
|
* @remarks
|
|
29190
26736
|
* Pitch of the sound played.
|
|
@@ -29633,111 +27179,6 @@ export class UnloadedChunksError extends Error {
|
|
|
29633
27179
|
private constructor();
|
|
29634
27180
|
}
|
|
29635
27181
|
|
|
29636
|
-
/**
|
|
29637
|
-
* @beta
|
|
29638
|
-
* Error thrown by {@link WorldClock.addTimeMarker} when
|
|
29639
|
-
* failing to add a time marker to a world clock.
|
|
29640
|
-
*/
|
|
29641
|
-
// @ts-ignore Class inheritance allowed for native defined classes
|
|
29642
|
-
export class WorldClockAddTimeMarkerError extends Error {
|
|
29643
|
-
private constructor();
|
|
29644
|
-
}
|
|
29645
|
-
|
|
29646
|
-
/**
|
|
29647
|
-
* @beta
|
|
29648
|
-
* Thrown when trying to register a world clock outside of the
|
|
29649
|
-
* system startup event.
|
|
29650
|
-
*/
|
|
29651
|
-
// @ts-ignore Class inheritance allowed for native defined classes
|
|
29652
|
-
export class WorldClockInvalidRegistryError extends Error {
|
|
29653
|
-
private constructor();
|
|
29654
|
-
}
|
|
29655
|
-
|
|
29656
|
-
/**
|
|
29657
|
-
* @beta
|
|
29658
|
-
* Error thrown when a time marker is invalid. This can occur
|
|
29659
|
-
* when trying to access data on a time marker that has been
|
|
29660
|
-
* removed.
|
|
29661
|
-
*/
|
|
29662
|
-
// @ts-ignore Class inheritance allowed for native defined classes
|
|
29663
|
-
export class WorldClockInvalidTimeMarkerError extends Error {
|
|
29664
|
-
private constructor();
|
|
29665
|
-
}
|
|
29666
|
-
|
|
29667
|
-
/**
|
|
29668
|
-
* @beta
|
|
29669
|
-
* Error thrown when a world clock is not found in the world
|
|
29670
|
-
* clock registry.
|
|
29671
|
-
*/
|
|
29672
|
-
// @ts-ignore Class inheritance allowed for native defined classes
|
|
29673
|
-
export class WorldClockNotFoundError extends Error {
|
|
29674
|
-
private constructor();
|
|
29675
|
-
}
|
|
29676
|
-
|
|
29677
|
-
/**
|
|
29678
|
-
* @beta
|
|
29679
|
-
* Error thrown by {@link WorldClockRegistry.registerClock}
|
|
29680
|
-
* when failing to register a world clock.
|
|
29681
|
-
*/
|
|
29682
|
-
// @ts-ignore Class inheritance allowed for native defined classes
|
|
29683
|
-
export class WorldClockRegistrationError extends Error {
|
|
29684
|
-
private constructor();
|
|
29685
|
-
}
|
|
29686
|
-
|
|
29687
|
-
/**
|
|
29688
|
-
* @beta
|
|
29689
|
-
* Thrown after using the /reload command when trying to
|
|
29690
|
-
* register a world clock that was not previously registered.
|
|
29691
|
-
* New world clocks cannot be added during a reload.
|
|
29692
|
-
*/
|
|
29693
|
-
// @ts-ignore Class inheritance allowed for native defined classes
|
|
29694
|
-
export class WorldClockReloadNewWorldClockError extends Error {
|
|
29695
|
-
private constructor();
|
|
29696
|
-
}
|
|
29697
|
-
|
|
29698
|
-
/**
|
|
29699
|
-
* @beta
|
|
29700
|
-
* Error thrown after using the /reload command when trying to
|
|
29701
|
-
* re-register an existing world clock with an invalid time
|
|
29702
|
-
* marker.
|
|
29703
|
-
*/
|
|
29704
|
-
// @ts-ignore Class inheritance allowed for native defined classes
|
|
29705
|
-
export class WorldClockReloadTimeMarkerError extends Error {
|
|
29706
|
-
private constructor();
|
|
29707
|
-
}
|
|
29708
|
-
|
|
29709
|
-
/**
|
|
29710
|
-
* @beta
|
|
29711
|
-
* Error thrown by {@link WorldClock.removeTimeMarker} when
|
|
29712
|
-
* trying to remove a time marker with the 'minecraft'
|
|
29713
|
-
* namespace from a world clock.
|
|
29714
|
-
*/
|
|
29715
|
-
// @ts-ignore Class inheritance allowed for native defined classes
|
|
29716
|
-
export class WorldClockRemoveMinecraftTimeMarkerError extends Error {
|
|
29717
|
-
private constructor();
|
|
29718
|
-
}
|
|
29719
|
-
|
|
29720
|
-
/**
|
|
29721
|
-
* @beta
|
|
29722
|
-
* Error thrown by {@link WorldClock.rewindTo} when the world
|
|
29723
|
-
* clock's time is already before the time marker's first
|
|
29724
|
-
* occurrence.
|
|
29725
|
-
*/
|
|
29726
|
-
// @ts-ignore Class inheritance allowed for native defined classes
|
|
29727
|
-
export class WorldClockRewindError extends Error {
|
|
29728
|
-
private constructor();
|
|
29729
|
-
}
|
|
29730
|
-
|
|
29731
|
-
/**
|
|
29732
|
-
* @beta
|
|
29733
|
-
* Error thrown when performing actions on a world clock with a
|
|
29734
|
-
* time marker that does not exist.
|
|
29735
|
-
*/
|
|
29736
|
-
// @ts-ignore Class inheritance allowed for native defined classes
|
|
29737
|
-
export class WorldClockTimeMarkerNotFoundError extends Error {
|
|
29738
|
-
private constructor();
|
|
29739
|
-
}
|
|
29740
|
-
|
|
29741
27182
|
export const HudElementsCount = 13;
|
|
29742
27183
|
export const HudVisibilityCount = 2;
|
|
29743
27184
|
/**
|