@minecraft/server 2.0.0-beta.1.21.70-preview.23 → 2.0.0-beta.1.21.70-preview.25
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 +356 -173
- package/package.json +1 -1
package/index.d.ts
CHANGED
|
@@ -1856,7 +1856,7 @@ export enum ItemLockMode {
|
|
|
1856
1856
|
}
|
|
1857
1857
|
|
|
1858
1858
|
/**
|
|
1859
|
-
* @
|
|
1859
|
+
* @rc
|
|
1860
1860
|
* Represents the type of liquid that can be placed on a block
|
|
1861
1861
|
* or flow dynamically in the world.
|
|
1862
1862
|
*/
|
|
@@ -2379,6 +2379,7 @@ export enum TimeOfDay {
|
|
|
2379
2379
|
export enum TintMethod {
|
|
2380
2380
|
BirchFoliage = 'BirchFoliage',
|
|
2381
2381
|
DefaultFoliage = 'DefaultFoliage',
|
|
2382
|
+
DryFoliage = 'DryFoliage',
|
|
2382
2383
|
EvergreenFoliage = 'EvergreenFoliage',
|
|
2383
2384
|
Grass = 'Grass',
|
|
2384
2385
|
None = 'None',
|
|
@@ -2434,12 +2435,21 @@ export enum WeatherType {
|
|
|
2434
2435
|
}
|
|
2435
2436
|
|
|
2436
2437
|
/**
|
|
2437
|
-
* @
|
|
2438
|
+
* @rc
|
|
2439
|
+
*/
|
|
2440
|
+
export type BlockComponentReturnType<T extends string> = T extends keyof BlockComponentTypeMap
|
|
2441
|
+
? BlockComponentTypeMap[T]
|
|
2442
|
+
: BlockComponent;
|
|
2443
|
+
|
|
2444
|
+
/**
|
|
2445
|
+
* @rc
|
|
2438
2446
|
*/
|
|
2439
2447
|
export type BlockComponentTypeMap = {
|
|
2448
|
+
destruction_particles: BlockDestructionParticlesComponent;
|
|
2440
2449
|
fluid_container: BlockFluidContainerComponent;
|
|
2441
2450
|
inventory: BlockInventoryComponent;
|
|
2442
2451
|
map_color: BlockMapColorComponent;
|
|
2452
|
+
'minecraft:destruction_particles': BlockDestructionParticlesComponent;
|
|
2443
2453
|
'minecraft:fluid_container': BlockFluidContainerComponent;
|
|
2444
2454
|
'minecraft:inventory': BlockInventoryComponent;
|
|
2445
2455
|
'minecraft:map_color': BlockMapColorComponent;
|
|
@@ -2452,7 +2462,7 @@ export type BlockComponentTypeMap = {
|
|
|
2452
2462
|
};
|
|
2453
2463
|
|
|
2454
2464
|
/**
|
|
2455
|
-
* @
|
|
2465
|
+
* @rc
|
|
2456
2466
|
* Type alias used by the {@link BlockPermutation} matches and
|
|
2457
2467
|
* resolve functions to narrow block state argument types to
|
|
2458
2468
|
* those mapped by {@link
|
|
@@ -2465,7 +2475,14 @@ export type BlockStateArg<T> = T extends `${minecraftvanilladata.MinecraftBlockT
|
|
|
2465
2475
|
: Record<string, boolean | number | string>;
|
|
2466
2476
|
|
|
2467
2477
|
/**
|
|
2468
|
-
* @
|
|
2478
|
+
* @rc
|
|
2479
|
+
*/
|
|
2480
|
+
export type EntityComponentReturnType<T extends string> = T extends keyof EntityComponentTypeMap
|
|
2481
|
+
? EntityComponentTypeMap[T]
|
|
2482
|
+
: EntityComponent;
|
|
2483
|
+
|
|
2484
|
+
/**
|
|
2485
|
+
* @rc
|
|
2469
2486
|
*/
|
|
2470
2487
|
export type EntityComponentTypeMap = {
|
|
2471
2488
|
addrider: EntityAddRiderComponent;
|
|
@@ -2603,7 +2620,14 @@ export type EntityComponentTypeMap = {
|
|
|
2603
2620
|
};
|
|
2604
2621
|
|
|
2605
2622
|
/**
|
|
2606
|
-
* @
|
|
2623
|
+
* @rc
|
|
2624
|
+
*/
|
|
2625
|
+
export type ItemComponentReturnType<T extends string> = T extends keyof ItemComponentTypeMap
|
|
2626
|
+
? ItemComponentTypeMap[T]
|
|
2627
|
+
: ItemComponent;
|
|
2628
|
+
|
|
2629
|
+
/**
|
|
2630
|
+
* @rc
|
|
2607
2631
|
*/
|
|
2608
2632
|
export type ItemComponentTypeMap = {
|
|
2609
2633
|
compostable: ItemCompostableComponent;
|
|
@@ -2741,6 +2765,8 @@ export class AimAssistCategorySettings {
|
|
|
2741
2765
|
* @remarks
|
|
2742
2766
|
* Sets the priority settings used for block targeting.
|
|
2743
2767
|
*
|
|
2768
|
+
* This function can't be called in read-only mode.
|
|
2769
|
+
*
|
|
2744
2770
|
* @param blockPriorities
|
|
2745
2771
|
* A record mapping block Ids to their priority settings.
|
|
2746
2772
|
* Larger numbers have greater priority.
|
|
@@ -2752,6 +2778,8 @@ export class AimAssistCategorySettings {
|
|
|
2752
2778
|
* @remarks
|
|
2753
2779
|
* Sets the priority settings used for entity targeting.
|
|
2754
2780
|
*
|
|
2781
|
+
* This function can't be called in read-only mode.
|
|
2782
|
+
*
|
|
2755
2783
|
* @param entityPriorities
|
|
2756
2784
|
* A record mapping entity Ids to their priority settings.
|
|
2757
2785
|
* Larger numbers have greater priority.
|
|
@@ -2898,6 +2926,8 @@ export class AimAssistPresetSettings {
|
|
|
2898
2926
|
* Sets the list of block/entity Ids to exclude from aim assist
|
|
2899
2927
|
* targeting.
|
|
2900
2928
|
*
|
|
2929
|
+
* This function can't be called in read-only mode.
|
|
2930
|
+
*
|
|
2901
2931
|
* @param targets
|
|
2902
2932
|
* An array of block/entity Ids.
|
|
2903
2933
|
*/
|
|
@@ -2912,6 +2942,8 @@ export class AimAssistPresetSettings {
|
|
|
2912
2942
|
* @remarks
|
|
2913
2943
|
* Sets the per-item aim-assist category Ids.
|
|
2914
2944
|
*
|
|
2945
|
+
* This function can't be called in read-only mode.
|
|
2946
|
+
*
|
|
2915
2947
|
* @param itemSettings
|
|
2916
2948
|
* A record mapping item Ids to aim-assist category Ids.
|
|
2917
2949
|
* Category Ids must have a namespace.
|
|
@@ -2922,6 +2954,8 @@ export class AimAssistPresetSettings {
|
|
|
2922
2954
|
* Sets the list of item Ids that will target liquid blocks
|
|
2923
2955
|
* with aim-assist when being held.
|
|
2924
2956
|
*
|
|
2957
|
+
* This function can't be called in read-only mode.
|
|
2958
|
+
*
|
|
2925
2959
|
* @param items
|
|
2926
2960
|
* An array of item Ids.
|
|
2927
2961
|
*/
|
|
@@ -3237,7 +3271,7 @@ export class Block {
|
|
|
3237
3271
|
*/
|
|
3238
3272
|
bottomCenter(): Vector3;
|
|
3239
3273
|
/**
|
|
3240
|
-
* @
|
|
3274
|
+
* @rc
|
|
3241
3275
|
* @remarks
|
|
3242
3276
|
* Returns whether this block is removed when touched by
|
|
3243
3277
|
* liquid.
|
|
@@ -3256,7 +3290,7 @@ export class Block {
|
|
|
3256
3290
|
*/
|
|
3257
3291
|
canBeDestroyedByLiquidSpread(liquidType: LiquidType): boolean;
|
|
3258
3292
|
/**
|
|
3259
|
-
* @
|
|
3293
|
+
* @rc
|
|
3260
3294
|
* @remarks
|
|
3261
3295
|
* Returns whether this block can have a liquid placed over it,
|
|
3262
3296
|
* i.e. be waterlogged.
|
|
@@ -3339,7 +3373,7 @@ export class Block {
|
|
|
3339
3373
|
*
|
|
3340
3374
|
* {@link LocationOutOfWorldBoundariesError}
|
|
3341
3375
|
*/
|
|
3342
|
-
getComponent<T extends
|
|
3376
|
+
getComponent<T extends string>(componentId: T): BlockComponentReturnType<T> | undefined;
|
|
3343
3377
|
/**
|
|
3344
3378
|
* @remarks
|
|
3345
3379
|
* Creates a prototype item stack based on this block that can
|
|
@@ -3431,7 +3465,7 @@ export class Block {
|
|
|
3431
3465
|
*/
|
|
3432
3466
|
hasTag(tag: string): boolean;
|
|
3433
3467
|
/**
|
|
3434
|
-
* @
|
|
3468
|
+
* @rc
|
|
3435
3469
|
* @remarks
|
|
3436
3470
|
* Returns whether this block stops liquid from flowing.
|
|
3437
3471
|
*
|
|
@@ -3449,7 +3483,18 @@ export class Block {
|
|
|
3449
3483
|
*/
|
|
3450
3484
|
isLiquidBlocking(liquidType: LiquidType): boolean;
|
|
3451
3485
|
/**
|
|
3452
|
-
* @
|
|
3486
|
+
* @rc
|
|
3487
|
+
* @remarks
|
|
3488
|
+
* Returns whether liquid can flow into the block from the
|
|
3489
|
+
* provided direction, or flow out from the provided direction
|
|
3490
|
+
* when liquid is placed into it with a bucket.
|
|
3491
|
+
*
|
|
3492
|
+
* @param liquidType
|
|
3493
|
+
* The type of liquid this function should be called for.
|
|
3494
|
+
* @returns
|
|
3495
|
+
* Whether liquid can flow into the block from the provided
|
|
3496
|
+
* direction, or flow out from the provided direction when
|
|
3497
|
+
* liquid is placed into it with a bucket
|
|
3453
3498
|
* @throws This function can throw errors.
|
|
3454
3499
|
*
|
|
3455
3500
|
* {@link Error}
|
|
@@ -3460,7 +3505,7 @@ export class Block {
|
|
|
3460
3505
|
*/
|
|
3461
3506
|
liquidCanFlowFromDirection(liquidType: LiquidType, flowDirection: Direction): boolean;
|
|
3462
3507
|
/**
|
|
3463
|
-
* @
|
|
3508
|
+
* @rc
|
|
3464
3509
|
* @remarks
|
|
3465
3510
|
* Returns whether this block is removed and spawns its item
|
|
3466
3511
|
* when touched by liquid.
|
|
@@ -3839,6 +3884,35 @@ export class BlockComponentTickEvent extends BlockEvent {
|
|
|
3839
3884
|
private constructor();
|
|
3840
3885
|
}
|
|
3841
3886
|
|
|
3887
|
+
/**
|
|
3888
|
+
* @beta
|
|
3889
|
+
* Represents the particles that appear when the block is
|
|
3890
|
+
* destroyed.
|
|
3891
|
+
*/
|
|
3892
|
+
// @ts-ignore Class inheritance allowed for native defined classes
|
|
3893
|
+
export class BlockDestructionParticlesComponent extends BlockComponent {
|
|
3894
|
+
private constructor();
|
|
3895
|
+
/**
|
|
3896
|
+
* @remarks
|
|
3897
|
+
* Name of the texture used for the particles.
|
|
3898
|
+
*
|
|
3899
|
+
* @throws This property can throw when used.
|
|
3900
|
+
*
|
|
3901
|
+
* {@link Error}
|
|
3902
|
+
*/
|
|
3903
|
+
readonly texture: string;
|
|
3904
|
+
/**
|
|
3905
|
+
* @remarks
|
|
3906
|
+
* Type of tint applied to the particles.
|
|
3907
|
+
*
|
|
3908
|
+
* @throws This property can throw when used.
|
|
3909
|
+
*
|
|
3910
|
+
* {@link Error}
|
|
3911
|
+
*/
|
|
3912
|
+
readonly tintMethod: TintMethod;
|
|
3913
|
+
static readonly componentId = 'minecraft:destruction_particles';
|
|
3914
|
+
}
|
|
3915
|
+
|
|
3842
3916
|
/**
|
|
3843
3917
|
* Contains information regarding an event that impacts a
|
|
3844
3918
|
* specific block.
|
|
@@ -4083,38 +4157,32 @@ export class BlockLocationIterator implements Iterable<Vector3> {
|
|
|
4083
4157
|
// @ts-ignore Class inheritance allowed for native defined classes
|
|
4084
4158
|
export class BlockMapColorComponent extends BlockComponent {
|
|
4085
4159
|
private constructor();
|
|
4086
|
-
static readonly componentId = 'minecraft:map_color';
|
|
4087
4160
|
/**
|
|
4088
4161
|
* @remarks
|
|
4089
4162
|
* Base map color defined for that block.
|
|
4090
4163
|
*
|
|
4091
|
-
* This
|
|
4092
|
-
*
|
|
4093
|
-
* @throws This function can throw errors.
|
|
4164
|
+
* @throws This property can throw when used.
|
|
4094
4165
|
*
|
|
4095
4166
|
* {@link Error}
|
|
4096
4167
|
*/
|
|
4097
|
-
color
|
|
4168
|
+
readonly color: RGBA;
|
|
4098
4169
|
/**
|
|
4099
4170
|
* @remarks
|
|
4100
4171
|
* Returns the base color multiplied to the evaluated tint at
|
|
4101
4172
|
* the given position.
|
|
4102
4173
|
*
|
|
4103
|
-
* This function can't be called in read-only mode.
|
|
4104
|
-
*
|
|
4105
4174
|
*/
|
|
4106
|
-
tintedColor
|
|
4175
|
+
readonly tintedColor: RGBA;
|
|
4107
4176
|
/**
|
|
4108
4177
|
* @remarks
|
|
4109
4178
|
* Type of tint applied to the color.
|
|
4110
4179
|
*
|
|
4111
|
-
* This
|
|
4112
|
-
*
|
|
4113
|
-
* @throws This function can throw errors.
|
|
4180
|
+
* @throws This property can throw when used.
|
|
4114
4181
|
*
|
|
4115
4182
|
* {@link Error}
|
|
4116
4183
|
*/
|
|
4117
|
-
tintMethod
|
|
4184
|
+
readonly tintMethod: TintMethod;
|
|
4185
|
+
static readonly componentId = 'minecraft:map_color';
|
|
4118
4186
|
}
|
|
4119
4187
|
|
|
4120
4188
|
/**
|
|
@@ -4157,7 +4225,7 @@ export class BlockPermutation {
|
|
|
4157
4225
|
*/
|
|
4158
4226
|
readonly 'type': BlockType;
|
|
4159
4227
|
/**
|
|
4160
|
-
* @
|
|
4228
|
+
* @rc
|
|
4161
4229
|
* @remarks
|
|
4162
4230
|
* Returns whether this block is removed when touched by
|
|
4163
4231
|
* liquid.
|
|
@@ -4172,7 +4240,7 @@ export class BlockPermutation {
|
|
|
4172
4240
|
*/
|
|
4173
4241
|
canBeDestroyedByLiquidSpread(liquidType: LiquidType): boolean;
|
|
4174
4242
|
/**
|
|
4175
|
-
* @
|
|
4243
|
+
* @rc
|
|
4176
4244
|
* @remarks
|
|
4177
4245
|
* Returns whether this block can have a liquid placed over it,
|
|
4178
4246
|
* i.e. be waterlogged.
|
|
@@ -4251,7 +4319,7 @@ export class BlockPermutation {
|
|
|
4251
4319
|
*/
|
|
4252
4320
|
hasTag(tag: string): boolean;
|
|
4253
4321
|
/**
|
|
4254
|
-
* @
|
|
4322
|
+
* @rc
|
|
4255
4323
|
* @remarks
|
|
4256
4324
|
* Returns whether this block stops liquid from flowing.
|
|
4257
4325
|
*
|
|
@@ -4265,7 +4333,7 @@ export class BlockPermutation {
|
|
|
4265
4333
|
*/
|
|
4266
4334
|
isLiquidBlocking(liquidType: LiquidType): boolean;
|
|
4267
4335
|
/**
|
|
4268
|
-
* @
|
|
4336
|
+
* @rc
|
|
4269
4337
|
* @remarks
|
|
4270
4338
|
* Returns whether this block is removed and spawns its item
|
|
4271
4339
|
* when touched by liquid.
|
|
@@ -7858,7 +7926,7 @@ export class Entity {
|
|
|
7858
7926
|
*
|
|
7859
7927
|
* {@link InvalidEntityError}
|
|
7860
7928
|
*/
|
|
7861
|
-
getComponent<T extends
|
|
7929
|
+
getComponent<T extends string>(componentId: T): EntityComponentReturnType<T> | undefined;
|
|
7862
7930
|
/**
|
|
7863
7931
|
* @remarks
|
|
7864
7932
|
* Returns all components that are both present on this entity
|
|
@@ -10636,10 +10704,9 @@ export class EntityScaleComponent extends EntityComponent {
|
|
|
10636
10704
|
* @remarks
|
|
10637
10705
|
* Current value for the scale property set on entities.
|
|
10638
10706
|
*
|
|
10639
|
-
* This property can
|
|
10640
|
-
*
|
|
10707
|
+
* @throws This property can throw when used.
|
|
10641
10708
|
*/
|
|
10642
|
-
value: number;
|
|
10709
|
+
readonly value: number;
|
|
10643
10710
|
static readonly componentId = 'minecraft:scale';
|
|
10644
10711
|
}
|
|
10645
10712
|
|
|
@@ -12571,7 +12638,7 @@ export class ItemStack {
|
|
|
12571
12638
|
* }
|
|
12572
12639
|
* ```
|
|
12573
12640
|
*/
|
|
12574
|
-
getComponent<T extends
|
|
12641
|
+
getComponent<T extends string>(componentId: T): ItemComponentReturnType<T> | undefined;
|
|
12575
12642
|
/**
|
|
12576
12643
|
* @remarks
|
|
12577
12644
|
* Returns all components that are both present on this item
|
|
@@ -13192,129 +13259,6 @@ export class ItemUseBeforeEventSignal {
|
|
|
13192
13259
|
unsubscribe(callback: (arg0: ItemUseBeforeEvent) => void): void;
|
|
13193
13260
|
}
|
|
13194
13261
|
|
|
13195
|
-
/**
|
|
13196
|
-
* Contains information related to an item being used on a
|
|
13197
|
-
* block. This event fires when an item used by a player
|
|
13198
|
-
* successfully triggers a block interaction.
|
|
13199
|
-
*/
|
|
13200
|
-
export class ItemUseOnAfterEvent {
|
|
13201
|
-
private constructor();
|
|
13202
|
-
/**
|
|
13203
|
-
* @remarks
|
|
13204
|
-
* The block that the item is used on.
|
|
13205
|
-
*
|
|
13206
|
-
*/
|
|
13207
|
-
readonly block: Block;
|
|
13208
|
-
/**
|
|
13209
|
-
* @remarks
|
|
13210
|
-
* The face of the block that an item is being used on.
|
|
13211
|
-
*
|
|
13212
|
-
*/
|
|
13213
|
-
readonly blockFace: Direction;
|
|
13214
|
-
/**
|
|
13215
|
-
* @remarks
|
|
13216
|
-
* Location relative to the bottom north-west corner of the
|
|
13217
|
-
* block where the item is placed.
|
|
13218
|
-
*
|
|
13219
|
-
*/
|
|
13220
|
-
readonly faceLocation: Vector3;
|
|
13221
|
-
/**
|
|
13222
|
-
* @remarks
|
|
13223
|
-
* This value will be true if the event was triggered on
|
|
13224
|
-
* players initial interaction button press and false on events
|
|
13225
|
-
* triggered from holding the interaction button.
|
|
13226
|
-
*
|
|
13227
|
-
*/
|
|
13228
|
-
readonly isFirstEvent: boolean;
|
|
13229
|
-
/**
|
|
13230
|
-
* @remarks
|
|
13231
|
-
* The impacted item stack that is being used on a block.
|
|
13232
|
-
*
|
|
13233
|
-
*/
|
|
13234
|
-
readonly itemStack: ItemStack;
|
|
13235
|
-
/**
|
|
13236
|
-
* @remarks
|
|
13237
|
-
* Returns the source entity that triggered this item event.
|
|
13238
|
-
*
|
|
13239
|
-
*/
|
|
13240
|
-
readonly source: Player;
|
|
13241
|
-
}
|
|
13242
|
-
|
|
13243
|
-
/**
|
|
13244
|
-
* Manages callbacks that are connected to an item being used
|
|
13245
|
-
* on a block event.
|
|
13246
|
-
*/
|
|
13247
|
-
export class ItemUseOnAfterEventSignal {
|
|
13248
|
-
private constructor();
|
|
13249
|
-
/**
|
|
13250
|
-
* @remarks
|
|
13251
|
-
* Adds a callback that will be called when an item is used on
|
|
13252
|
-
* a block.
|
|
13253
|
-
*
|
|
13254
|
-
* This function can't be called in read-only mode.
|
|
13255
|
-
*
|
|
13256
|
-
* This function can be called in early-execution mode.
|
|
13257
|
-
*
|
|
13258
|
-
*/
|
|
13259
|
-
subscribe(callback: (arg0: ItemUseOnAfterEvent) => void): (arg0: ItemUseOnAfterEvent) => void;
|
|
13260
|
-
/**
|
|
13261
|
-
* @remarks
|
|
13262
|
-
* Removes a callback from being called when an item is used on
|
|
13263
|
-
* a block.
|
|
13264
|
-
*
|
|
13265
|
-
* This function can't be called in read-only mode.
|
|
13266
|
-
*
|
|
13267
|
-
* This function can be called in early-execution mode.
|
|
13268
|
-
*
|
|
13269
|
-
*/
|
|
13270
|
-
unsubscribe(callback: (arg0: ItemUseOnAfterEvent) => void): void;
|
|
13271
|
-
}
|
|
13272
|
-
|
|
13273
|
-
/**
|
|
13274
|
-
* Contains information related to an item being used on a
|
|
13275
|
-
* block.
|
|
13276
|
-
*/
|
|
13277
|
-
// @ts-ignore Class inheritance allowed for native defined classes
|
|
13278
|
-
export class ItemUseOnBeforeEvent extends ItemUseOnAfterEvent {
|
|
13279
|
-
private constructor();
|
|
13280
|
-
/**
|
|
13281
|
-
* @remarks
|
|
13282
|
-
* If set to true, this will cancel the item use behavior.
|
|
13283
|
-
*
|
|
13284
|
-
*/
|
|
13285
|
-
cancel: boolean;
|
|
13286
|
-
}
|
|
13287
|
-
|
|
13288
|
-
/**
|
|
13289
|
-
* Manages callbacks that fire before an item being used on a
|
|
13290
|
-
* block event.
|
|
13291
|
-
*/
|
|
13292
|
-
export class ItemUseOnBeforeEventSignal {
|
|
13293
|
-
private constructor();
|
|
13294
|
-
/**
|
|
13295
|
-
* @remarks
|
|
13296
|
-
* Adds a callback that will be called before an item is used
|
|
13297
|
-
* on a block.
|
|
13298
|
-
*
|
|
13299
|
-
* This function can't be called in read-only mode.
|
|
13300
|
-
*
|
|
13301
|
-
* This function can be called in early-execution mode.
|
|
13302
|
-
*
|
|
13303
|
-
*/
|
|
13304
|
-
subscribe(callback: (arg0: ItemUseOnBeforeEvent) => void): (arg0: ItemUseOnBeforeEvent) => void;
|
|
13305
|
-
/**
|
|
13306
|
-
* @remarks
|
|
13307
|
-
* Removes a callback from being called before an item is used
|
|
13308
|
-
* on a block.
|
|
13309
|
-
*
|
|
13310
|
-
* This function can't be called in read-only mode.
|
|
13311
|
-
*
|
|
13312
|
-
* This function can be called in early-execution mode.
|
|
13313
|
-
*
|
|
13314
|
-
*/
|
|
13315
|
-
unsubscribe(callback: (arg0: ItemUseOnBeforeEvent) => void): void;
|
|
13316
|
-
}
|
|
13317
|
-
|
|
13318
13262
|
/**
|
|
13319
13263
|
* Contains information regarding the use of an item on a
|
|
13320
13264
|
* block.
|
|
@@ -13870,6 +13814,22 @@ export class Player extends Entity {
|
|
|
13870
13814
|
* @throws This function can throw errors.
|
|
13871
13815
|
*/
|
|
13872
13816
|
addLevels(amount: number): number;
|
|
13817
|
+
/**
|
|
13818
|
+
* @beta
|
|
13819
|
+
* @remarks
|
|
13820
|
+
* For this player, removes all overrides of any Entity
|
|
13821
|
+
* Properties on the target Entity. This change is not applied
|
|
13822
|
+
* until the next tick and will not apply to other players.
|
|
13823
|
+
*
|
|
13824
|
+
* This function can't be called in read-only mode.
|
|
13825
|
+
*
|
|
13826
|
+
* @param targetEntity
|
|
13827
|
+
* The Entity whose Entity Property overrides are being
|
|
13828
|
+
* cleared.
|
|
13829
|
+
* @throws
|
|
13830
|
+
* Throws if the entity is invalid.
|
|
13831
|
+
*/
|
|
13832
|
+
clearPropertyOverridesForEntity(targetEntity: Entity): void;
|
|
13873
13833
|
/**
|
|
13874
13834
|
* @beta
|
|
13875
13835
|
* @remarks
|
|
@@ -14013,6 +13973,26 @@ export class Player extends Entity {
|
|
|
14013
13973
|
*
|
|
14014
13974
|
*/
|
|
14015
13975
|
queueMusic(trackId: string, musicOptions?: MusicOptions): void;
|
|
13976
|
+
/**
|
|
13977
|
+
* @beta
|
|
13978
|
+
* @remarks
|
|
13979
|
+
* For this player, removes the override on an Entity Property.
|
|
13980
|
+
* This change is not applied until the next tick and will not
|
|
13981
|
+
* apply to other players.
|
|
13982
|
+
*
|
|
13983
|
+
* This function can't be called in read-only mode.
|
|
13984
|
+
*
|
|
13985
|
+
* @param targetEntity
|
|
13986
|
+
* The Entity whose Entity Property override is being removed.
|
|
13987
|
+
* @param identifier
|
|
13988
|
+
* The Entity Property identifier.
|
|
13989
|
+
* @throws
|
|
13990
|
+
* Throws if the entity is invalid.
|
|
13991
|
+
* Throws if an invalid identifier is provided.
|
|
13992
|
+
* Throws if the provided value type does not match the
|
|
13993
|
+
* property type.
|
|
13994
|
+
*/
|
|
13995
|
+
removePropertyOverrideForEntity(targetEntity: Entity, identifier: string): void;
|
|
14016
13996
|
/**
|
|
14017
13997
|
* @remarks
|
|
14018
13998
|
* Resets the level of the player.
|
|
@@ -14130,6 +14110,34 @@ export class Player extends Entity {
|
|
|
14130
14110
|
* @throws This function can throw errors.
|
|
14131
14111
|
*/
|
|
14132
14112
|
setOp(isOp: boolean): void;
|
|
14113
|
+
/**
|
|
14114
|
+
* @beta
|
|
14115
|
+
* @remarks
|
|
14116
|
+
* For this player, overrides an Entity Property on the target
|
|
14117
|
+
* Entity to the provided value. This property must be client
|
|
14118
|
+
* synced. This change is not applied until the next tick and
|
|
14119
|
+
* will not apply to other players.
|
|
14120
|
+
*
|
|
14121
|
+
* This function can't be called in read-only mode.
|
|
14122
|
+
*
|
|
14123
|
+
* @param targetEntity
|
|
14124
|
+
* The Entity whose Entity Property is being overriden.
|
|
14125
|
+
* @param identifier
|
|
14126
|
+
* The Entity Property identifier.
|
|
14127
|
+
* @param value
|
|
14128
|
+
* The override value. The provided type must be compatible
|
|
14129
|
+
* with the type specified in the entity's definition.
|
|
14130
|
+
* @throws
|
|
14131
|
+
* Throws if the entity is invalid.
|
|
14132
|
+
* Throws if an invalid identifier is provided.
|
|
14133
|
+
* Throws if the provided value type does not match the
|
|
14134
|
+
* property type.
|
|
14135
|
+
* Throws if the provided value is outside the expected range
|
|
14136
|
+
* (int, float properties).
|
|
14137
|
+
* Throws if the provided string value does not match the set
|
|
14138
|
+
* of accepted enum values (enum properties)
|
|
14139
|
+
*/
|
|
14140
|
+
setPropertyOverrideForEntity(targetEntity: Entity, identifier: string, value: boolean | number | string): void;
|
|
14133
14141
|
/**
|
|
14134
14142
|
* @remarks
|
|
14135
14143
|
* Sets the current starting spawn point for this particular
|
|
@@ -14145,7 +14153,7 @@ export class Player extends Entity {
|
|
|
14145
14153
|
*/
|
|
14146
14154
|
setSpawnPoint(spawnPoint?: DimensionLocation): void;
|
|
14147
14155
|
/**
|
|
14148
|
-
* @
|
|
14156
|
+
* @rc
|
|
14149
14157
|
* @remarks
|
|
14150
14158
|
* Creates a new particle emitter at a specified location in
|
|
14151
14159
|
* the world. Only visible to the target player.
|
|
@@ -16581,7 +16589,17 @@ export class StartupBeforeEventSignal {
|
|
|
16581
16589
|
*/
|
|
16582
16590
|
export class StartupEvent {
|
|
16583
16591
|
private constructor();
|
|
16592
|
+
/**
|
|
16593
|
+
* @remarks
|
|
16594
|
+
* This property can be read in early-execution mode.
|
|
16595
|
+
*
|
|
16596
|
+
*/
|
|
16584
16597
|
readonly blockComponentRegistry: BlockComponentRegistry;
|
|
16598
|
+
/**
|
|
16599
|
+
* @remarks
|
|
16600
|
+
* This property can be read in early-execution mode.
|
|
16601
|
+
*
|
|
16602
|
+
*/
|
|
16585
16603
|
readonly itemComponentRegistry: ItemComponentRegistry;
|
|
16586
16604
|
}
|
|
16587
16605
|
|
|
@@ -16955,6 +16973,8 @@ export class System {
|
|
|
16955
16973
|
* Returns a collection of after-events for system-level
|
|
16956
16974
|
* operations.
|
|
16957
16975
|
*
|
|
16976
|
+
* This property can be read in early-execution mode.
|
|
16977
|
+
*
|
|
16958
16978
|
*/
|
|
16959
16979
|
readonly afterEvents: SystemAfterEvents;
|
|
16960
16980
|
/**
|
|
@@ -16963,12 +16983,16 @@ export class System {
|
|
|
16963
16983
|
* Returns a collection of before-events for system-level
|
|
16964
16984
|
* operations.
|
|
16965
16985
|
*
|
|
16986
|
+
* This property can be read in early-execution mode.
|
|
16987
|
+
*
|
|
16966
16988
|
*/
|
|
16967
16989
|
readonly beforeEvents: SystemBeforeEvents;
|
|
16968
16990
|
/**
|
|
16969
16991
|
* @remarks
|
|
16970
16992
|
* Represents the current world tick of the server.
|
|
16971
16993
|
*
|
|
16994
|
+
* This property can be read in early-execution mode.
|
|
16995
|
+
*
|
|
16972
16996
|
*/
|
|
16973
16997
|
readonly currentTick: number;
|
|
16974
16998
|
/**
|
|
@@ -16977,12 +17001,16 @@ export class System {
|
|
|
16977
17001
|
* Returns true if this is a world where the editor is
|
|
16978
17002
|
* currently loaded, returns false otherwise.
|
|
16979
17003
|
*
|
|
17004
|
+
* This property can be read in early-execution mode.
|
|
17005
|
+
*
|
|
16980
17006
|
*/
|
|
16981
17007
|
readonly isEditorWorld: boolean;
|
|
16982
17008
|
/**
|
|
16983
17009
|
* @remarks
|
|
16984
17010
|
* Contains the device information for the server.
|
|
16985
17011
|
*
|
|
17012
|
+
* This property can be read in early-execution mode.
|
|
17013
|
+
*
|
|
16986
17014
|
*/
|
|
16987
17015
|
readonly serverSystemInfo: SystemInfo;
|
|
16988
17016
|
/**
|
|
@@ -17182,6 +17210,8 @@ export class SystemAfterEvents {
|
|
|
17182
17210
|
* provides a way for commands and other systems to trigger
|
|
17183
17211
|
* behavior within script.
|
|
17184
17212
|
*
|
|
17213
|
+
* This property can be read in early-execution mode.
|
|
17214
|
+
*
|
|
17185
17215
|
*/
|
|
17186
17216
|
readonly scriptEventReceive: ScriptEventCommandMessageAfterEventSignal;
|
|
17187
17217
|
}
|
|
@@ -17196,7 +17226,17 @@ export class SystemAfterEvents {
|
|
|
17196
17226
|
*/
|
|
17197
17227
|
export class SystemBeforeEvents {
|
|
17198
17228
|
private constructor();
|
|
17229
|
+
/**
|
|
17230
|
+
* @remarks
|
|
17231
|
+
* This property can be read in early-execution mode.
|
|
17232
|
+
*
|
|
17233
|
+
*/
|
|
17199
17234
|
readonly shutdown: ShutdownBeforeEventSignal;
|
|
17235
|
+
/**
|
|
17236
|
+
* @remarks
|
|
17237
|
+
* This property can be read in early-execution mode.
|
|
17238
|
+
*
|
|
17239
|
+
*/
|
|
17200
17240
|
readonly startup: StartupBeforeEventSignal;
|
|
17201
17241
|
/**
|
|
17202
17242
|
* @remarks
|
|
@@ -17206,6 +17246,8 @@ export class SystemBeforeEvents {
|
|
|
17206
17246
|
* To prevent shutdown, set the event's cancel property to
|
|
17207
17247
|
* true.
|
|
17208
17248
|
*
|
|
17249
|
+
* This property can be read in early-execution mode.
|
|
17250
|
+
*
|
|
17209
17251
|
*/
|
|
17210
17252
|
readonly watchdogTerminate: WatchdogTerminateBeforeEventSignal;
|
|
17211
17253
|
}
|
|
@@ -17609,6 +17651,8 @@ export class World {
|
|
|
17609
17651
|
* of the world. Event callbacks are called in a deferred
|
|
17610
17652
|
* manner. Event callbacks are executed in read-write mode.
|
|
17611
17653
|
*
|
|
17654
|
+
* This property can be read in early-execution mode.
|
|
17655
|
+
*
|
|
17612
17656
|
*/
|
|
17613
17657
|
readonly afterEvents: WorldAfterEvents;
|
|
17614
17658
|
/**
|
|
@@ -17617,6 +17661,8 @@ export class World {
|
|
|
17617
17661
|
* of the world. Event callbacks are called immediately. Event
|
|
17618
17662
|
* callbacks are executed in read-only mode.
|
|
17619
17663
|
*
|
|
17664
|
+
* This property can be read in early-execution mode.
|
|
17665
|
+
*
|
|
17620
17666
|
* @example customCommand.ts
|
|
17621
17667
|
* ```typescript
|
|
17622
17668
|
* import { world, DimensionLocation } from "@minecraft/server";
|
|
@@ -18115,12 +18161,16 @@ export class WorldAfterEvents {
|
|
|
18115
18161
|
* explosion. It is fired after the blocks have already been
|
|
18116
18162
|
* destroyed.
|
|
18117
18163
|
*
|
|
18164
|
+
* This property can be read in early-execution mode.
|
|
18165
|
+
*
|
|
18118
18166
|
*/
|
|
18119
18167
|
readonly blockExplode: BlockExplodeAfterEventSignal;
|
|
18120
18168
|
/**
|
|
18121
18169
|
* @remarks
|
|
18122
18170
|
* This event fires when a button is pushed.
|
|
18123
18171
|
*
|
|
18172
|
+
* This property can be read in early-execution mode.
|
|
18173
|
+
*
|
|
18124
18174
|
*/
|
|
18125
18175
|
readonly buttonPush: ButtonPushAfterEventSignal;
|
|
18126
18176
|
/**
|
|
@@ -18129,6 +18179,8 @@ export class WorldAfterEvents {
|
|
|
18129
18179
|
* This event is triggered after a chat message has been
|
|
18130
18180
|
* broadcast or sent to players.
|
|
18131
18181
|
*
|
|
18182
|
+
* This property can be read in early-execution mode.
|
|
18183
|
+
*
|
|
18132
18184
|
*/
|
|
18133
18185
|
readonly chatSend: ChatSendAfterEventSignal;
|
|
18134
18186
|
/**
|
|
@@ -18137,6 +18189,8 @@ export class WorldAfterEvents {
|
|
|
18137
18189
|
* that will update the component definition state of an
|
|
18138
18190
|
* entity.
|
|
18139
18191
|
*
|
|
18192
|
+
* This property can be read in early-execution mode.
|
|
18193
|
+
*
|
|
18140
18194
|
*/
|
|
18141
18195
|
readonly dataDrivenEntityTrigger: DataDrivenEntityTriggerAfterEventSignal;
|
|
18142
18196
|
/**
|
|
@@ -18144,18 +18198,24 @@ export class WorldAfterEvents {
|
|
|
18144
18198
|
* This event fires when an effect, like poisoning, is added to
|
|
18145
18199
|
* an entity.
|
|
18146
18200
|
*
|
|
18201
|
+
* This property can be read in early-execution mode.
|
|
18202
|
+
*
|
|
18147
18203
|
*/
|
|
18148
18204
|
readonly effectAdd: EffectAddAfterEventSignal;
|
|
18149
18205
|
/**
|
|
18150
18206
|
* @remarks
|
|
18151
18207
|
* This event fires when an entity dies.
|
|
18152
18208
|
*
|
|
18209
|
+
* This property can be read in early-execution mode.
|
|
18210
|
+
*
|
|
18153
18211
|
*/
|
|
18154
18212
|
readonly entityDie: EntityDieAfterEventSignal;
|
|
18155
18213
|
/**
|
|
18156
18214
|
* @remarks
|
|
18157
18215
|
* This event fires when entity health changes in any degree.
|
|
18158
18216
|
*
|
|
18217
|
+
* This property can be read in early-execution mode.
|
|
18218
|
+
*
|
|
18159
18219
|
*/
|
|
18160
18220
|
readonly entityHealthChanged: EntityHealthChangedAfterEventSignal;
|
|
18161
18221
|
/**
|
|
@@ -18163,6 +18223,8 @@ export class WorldAfterEvents {
|
|
|
18163
18223
|
* This event fires when an entity hits (that is, melee
|
|
18164
18224
|
* attacks) a block.
|
|
18165
18225
|
*
|
|
18226
|
+
* This property can be read in early-execution mode.
|
|
18227
|
+
*
|
|
18166
18228
|
*/
|
|
18167
18229
|
readonly entityHitBlock: EntityHitBlockAfterEventSignal;
|
|
18168
18230
|
/**
|
|
@@ -18170,18 +18232,24 @@ export class WorldAfterEvents {
|
|
|
18170
18232
|
* This event fires when an entity hits (that is, melee
|
|
18171
18233
|
* attacks) another entity.
|
|
18172
18234
|
*
|
|
18235
|
+
* This property can be read in early-execution mode.
|
|
18236
|
+
*
|
|
18173
18237
|
*/
|
|
18174
18238
|
readonly entityHitEntity: EntityHitEntityAfterEventSignal;
|
|
18175
18239
|
/**
|
|
18176
18240
|
* @remarks
|
|
18177
18241
|
* This event fires when an entity is hurt (takes damage).
|
|
18178
18242
|
*
|
|
18243
|
+
* This property can be read in early-execution mode.
|
|
18244
|
+
*
|
|
18179
18245
|
*/
|
|
18180
18246
|
readonly entityHurt: EntityHurtAfterEventSignal;
|
|
18181
18247
|
/**
|
|
18182
18248
|
* @remarks
|
|
18183
18249
|
* Fires when an entity is loaded.
|
|
18184
18250
|
*
|
|
18251
|
+
* This property can be read in early-execution mode.
|
|
18252
|
+
*
|
|
18185
18253
|
*/
|
|
18186
18254
|
readonly entityLoad: EntityLoadAfterEventSignal;
|
|
18187
18255
|
/**
|
|
@@ -18189,18 +18257,24 @@ export class WorldAfterEvents {
|
|
|
18189
18257
|
* Fires when an entity is removed (for example, potentially
|
|
18190
18258
|
* unloaded, or removed after being killed).
|
|
18191
18259
|
*
|
|
18260
|
+
* This property can be read in early-execution mode.
|
|
18261
|
+
*
|
|
18192
18262
|
*/
|
|
18193
18263
|
readonly entityRemove: EntityRemoveAfterEventSignal;
|
|
18194
18264
|
/**
|
|
18195
18265
|
* @remarks
|
|
18196
18266
|
* This event fires when an entity is spawned.
|
|
18197
18267
|
*
|
|
18268
|
+
* This property can be read in early-execution mode.
|
|
18269
|
+
*
|
|
18198
18270
|
*/
|
|
18199
18271
|
readonly entitySpawn: EntitySpawnAfterEventSignal;
|
|
18200
18272
|
/**
|
|
18201
18273
|
* @remarks
|
|
18202
18274
|
* This event is fired after an explosion occurs.
|
|
18203
18275
|
*
|
|
18276
|
+
* This property can be read in early-execution mode.
|
|
18277
|
+
*
|
|
18204
18278
|
*/
|
|
18205
18279
|
readonly explosion: ExplosionAfterEventSignal;
|
|
18206
18280
|
/**
|
|
@@ -18208,12 +18282,16 @@ export class WorldAfterEvents {
|
|
|
18208
18282
|
* This event fires when a world.gameRules property has
|
|
18209
18283
|
* changed.
|
|
18210
18284
|
*
|
|
18285
|
+
* This property can be read in early-execution mode.
|
|
18286
|
+
*
|
|
18211
18287
|
*/
|
|
18212
18288
|
readonly gameRuleChange: GameRuleChangeAfterEventSignal;
|
|
18213
18289
|
/**
|
|
18214
18290
|
* @remarks
|
|
18215
18291
|
* This event fires when a chargeable item completes charging.
|
|
18216
18292
|
*
|
|
18293
|
+
* This property can be read in early-execution mode.
|
|
18294
|
+
*
|
|
18217
18295
|
*/
|
|
18218
18296
|
readonly itemCompleteUse: ItemCompleteUseAfterEventSignal;
|
|
18219
18297
|
/**
|
|
@@ -18221,12 +18299,16 @@ export class WorldAfterEvents {
|
|
|
18221
18299
|
* This event fires when a chargeable item is released from
|
|
18222
18300
|
* charging.
|
|
18223
18301
|
*
|
|
18302
|
+
* This property can be read in early-execution mode.
|
|
18303
|
+
*
|
|
18224
18304
|
*/
|
|
18225
18305
|
readonly itemReleaseUse: ItemReleaseUseAfterEventSignal;
|
|
18226
18306
|
/**
|
|
18227
18307
|
* @remarks
|
|
18228
18308
|
* This event fires when a chargeable item starts charging.
|
|
18229
18309
|
*
|
|
18310
|
+
* This property can be read in early-execution mode.
|
|
18311
|
+
*
|
|
18230
18312
|
*/
|
|
18231
18313
|
readonly itemStartUse: ItemStartUseAfterEventSignal;
|
|
18232
18314
|
/**
|
|
@@ -18237,12 +18319,16 @@ export class WorldAfterEvents {
|
|
|
18237
18319
|
* occur once at the beginning of the block placement. Note:
|
|
18238
18320
|
* This event cannot be used with Hoe or Axe items.
|
|
18239
18321
|
*
|
|
18322
|
+
* This property can be read in early-execution mode.
|
|
18323
|
+
*
|
|
18240
18324
|
*/
|
|
18241
18325
|
readonly itemStartUseOn: ItemStartUseOnAfterEventSignal;
|
|
18242
18326
|
/**
|
|
18243
18327
|
* @remarks
|
|
18244
18328
|
* This event fires when a chargeable item stops charging.
|
|
18245
18329
|
*
|
|
18330
|
+
* This property can be read in early-execution mode.
|
|
18331
|
+
*
|
|
18246
18332
|
*/
|
|
18247
18333
|
readonly itemStopUse: ItemStopUseAfterEventSignal;
|
|
18248
18334
|
/**
|
|
@@ -18251,6 +18337,8 @@ export class WorldAfterEvents {
|
|
|
18251
18337
|
* Block button after successfully using an item. Note: This
|
|
18252
18338
|
* event cannot be used with Hoe or Axe items.
|
|
18253
18339
|
*
|
|
18340
|
+
* This property can be read in early-execution mode.
|
|
18341
|
+
*
|
|
18254
18342
|
*/
|
|
18255
18343
|
readonly itemStopUseOn: ItemStopUseOnAfterEventSignal;
|
|
18256
18344
|
/**
|
|
@@ -18258,19 +18346,16 @@ export class WorldAfterEvents {
|
|
|
18258
18346
|
* This event fires when an item is successfully used by a
|
|
18259
18347
|
* player.
|
|
18260
18348
|
*
|
|
18261
|
-
|
|
18262
|
-
readonly itemUse: ItemUseAfterEventSignal;
|
|
18263
|
-
/**
|
|
18264
|
-
* @remarks
|
|
18265
|
-
* This event fires when an item is used on a block by a
|
|
18266
|
-
* player.
|
|
18349
|
+
* This property can be read in early-execution mode.
|
|
18267
18350
|
*
|
|
18268
18351
|
*/
|
|
18269
|
-
readonly
|
|
18352
|
+
readonly itemUse: ItemUseAfterEventSignal;
|
|
18270
18353
|
/**
|
|
18271
18354
|
* @remarks
|
|
18272
18355
|
* A lever has been pulled.
|
|
18273
18356
|
*
|
|
18357
|
+
* This property can be read in early-execution mode.
|
|
18358
|
+
*
|
|
18274
18359
|
*/
|
|
18275
18360
|
readonly leverAction: LeverActionAfterEventSignal;
|
|
18276
18361
|
/**
|
|
@@ -18279,18 +18364,24 @@ export class WorldAfterEvents {
|
|
|
18279
18364
|
* This event is an internal implementation detail, and is
|
|
18280
18365
|
* otherwise not currently functional.
|
|
18281
18366
|
*
|
|
18367
|
+
* This property can be read in early-execution mode.
|
|
18368
|
+
*
|
|
18282
18369
|
*/
|
|
18283
18370
|
readonly messageReceive: ServerMessageAfterEventSignal;
|
|
18284
18371
|
/**
|
|
18285
18372
|
* @remarks
|
|
18286
18373
|
* This event fires when a piston expands or retracts.
|
|
18287
18374
|
*
|
|
18375
|
+
* This property can be read in early-execution mode.
|
|
18376
|
+
*
|
|
18288
18377
|
*/
|
|
18289
18378
|
readonly pistonActivate: PistonActivateAfterEventSignal;
|
|
18290
18379
|
/**
|
|
18291
18380
|
* @remarks
|
|
18292
18381
|
* This event fires for a block that is broken by a player.
|
|
18293
18382
|
*
|
|
18383
|
+
* This property can be read in early-execution mode.
|
|
18384
|
+
*
|
|
18294
18385
|
*/
|
|
18295
18386
|
readonly playerBreakBlock: PlayerBreakBlockAfterEventSignal;
|
|
18296
18387
|
/**
|
|
@@ -18299,38 +18390,60 @@ export class WorldAfterEvents {
|
|
|
18299
18390
|
* This event fires when an {@link InputButton} state is
|
|
18300
18391
|
* changed.
|
|
18301
18392
|
*
|
|
18393
|
+
* This property can be read in early-execution mode.
|
|
18394
|
+
*
|
|
18302
18395
|
*/
|
|
18303
18396
|
readonly playerButtonInput: PlayerButtonInputAfterEventSignal;
|
|
18304
18397
|
/**
|
|
18305
18398
|
* @remarks
|
|
18306
18399
|
* Fires when a player moved to a different dimension.
|
|
18307
18400
|
*
|
|
18401
|
+
* This property can be read in early-execution mode.
|
|
18402
|
+
*
|
|
18308
18403
|
*/
|
|
18309
18404
|
readonly playerDimensionChange: PlayerDimensionChangeAfterEventSignal;
|
|
18405
|
+
/**
|
|
18406
|
+
* @remarks
|
|
18407
|
+
* This property can be read in early-execution mode.
|
|
18408
|
+
*
|
|
18409
|
+
*/
|
|
18310
18410
|
readonly playerEmote: PlayerEmoteAfterEventSignal;
|
|
18411
|
+
/**
|
|
18412
|
+
* @remarks
|
|
18413
|
+
* This property can be read in early-execution mode.
|
|
18414
|
+
*
|
|
18415
|
+
*/
|
|
18311
18416
|
readonly playerGameModeChange: PlayerGameModeChangeAfterEventSignal;
|
|
18312
18417
|
/**
|
|
18313
18418
|
* @remarks
|
|
18314
18419
|
* This event fires when a player's {@link InputMode} changes.
|
|
18315
18420
|
*
|
|
18421
|
+
* This property can be read in early-execution mode.
|
|
18422
|
+
*
|
|
18316
18423
|
*/
|
|
18317
18424
|
readonly playerInputModeChange: PlayerInputModeChangeAfterEventSignal;
|
|
18318
18425
|
/**
|
|
18319
18426
|
* @remarks
|
|
18320
18427
|
* This event fires when a players input permissions change.
|
|
18321
18428
|
*
|
|
18429
|
+
* This property can be read in early-execution mode.
|
|
18430
|
+
*
|
|
18322
18431
|
*/
|
|
18323
18432
|
readonly playerInputPermissionCategoryChange: PlayerInputPermissionCategoryChangeAfterEventSignal;
|
|
18324
18433
|
/**
|
|
18325
18434
|
* @remarks
|
|
18326
18435
|
* An event for when a player interacts with a block.
|
|
18327
18436
|
*
|
|
18437
|
+
* This property can be read in early-execution mode.
|
|
18438
|
+
*
|
|
18328
18439
|
*/
|
|
18329
18440
|
readonly playerInteractWithBlock: PlayerInteractWithBlockAfterEventSignal;
|
|
18330
18441
|
/**
|
|
18331
18442
|
* @remarks
|
|
18332
18443
|
* This event fires when a player interacts with an entity.
|
|
18333
18444
|
*
|
|
18445
|
+
* This property can be read in early-execution mode.
|
|
18446
|
+
*
|
|
18334
18447
|
*/
|
|
18335
18448
|
readonly playerInteractWithEntity: PlayerInteractWithEntityAfterEventSignal;
|
|
18336
18449
|
/**
|
|
@@ -18339,18 +18452,24 @@ export class WorldAfterEvents {
|
|
|
18339
18452
|
* playerSpawn for another related event you can trap for when
|
|
18340
18453
|
* a player is spawned the first time within a world.
|
|
18341
18454
|
*
|
|
18455
|
+
* This property can be read in early-execution mode.
|
|
18456
|
+
*
|
|
18342
18457
|
*/
|
|
18343
18458
|
readonly playerJoin: PlayerJoinAfterEventSignal;
|
|
18344
18459
|
/**
|
|
18345
18460
|
* @remarks
|
|
18346
18461
|
* This event fires when a player leaves a world.
|
|
18347
18462
|
*
|
|
18463
|
+
* This property can be read in early-execution mode.
|
|
18464
|
+
*
|
|
18348
18465
|
*/
|
|
18349
18466
|
readonly playerLeave: PlayerLeaveAfterEventSignal;
|
|
18350
18467
|
/**
|
|
18351
18468
|
* @remarks
|
|
18352
18469
|
* This event fires for a block that is placed by a player.
|
|
18353
18470
|
*
|
|
18471
|
+
* This property can be read in early-execution mode.
|
|
18472
|
+
*
|
|
18354
18473
|
*/
|
|
18355
18474
|
readonly playerPlaceBlock: PlayerPlaceBlockAfterEventSignal;
|
|
18356
18475
|
/**
|
|
@@ -18359,6 +18478,8 @@ export class WorldAfterEvents {
|
|
|
18359
18478
|
* an additional flag within this event will tell you whether
|
|
18360
18479
|
* the player is spawning right after join vs. a respawn.
|
|
18361
18480
|
*
|
|
18481
|
+
* This property can be read in early-execution mode.
|
|
18482
|
+
*
|
|
18362
18483
|
*/
|
|
18363
18484
|
readonly playerSpawn: PlayerSpawnAfterEventSignal;
|
|
18364
18485
|
/**
|
|
@@ -18366,6 +18487,8 @@ export class WorldAfterEvents {
|
|
|
18366
18487
|
* A pressure plate has popped back up (i.e., there are no
|
|
18367
18488
|
* entities on the pressure plate.)
|
|
18368
18489
|
*
|
|
18490
|
+
* This property can be read in early-execution mode.
|
|
18491
|
+
*
|
|
18369
18492
|
*/
|
|
18370
18493
|
readonly pressurePlatePop: PressurePlatePopAfterEventSignal;
|
|
18371
18494
|
/**
|
|
@@ -18373,30 +18496,40 @@ export class WorldAfterEvents {
|
|
|
18373
18496
|
* A pressure plate has pushed (at least one entity has moved
|
|
18374
18497
|
* onto a pressure plate.)
|
|
18375
18498
|
*
|
|
18499
|
+
* This property can be read in early-execution mode.
|
|
18500
|
+
*
|
|
18376
18501
|
*/
|
|
18377
18502
|
readonly pressurePlatePush: PressurePlatePushAfterEventSignal;
|
|
18378
18503
|
/**
|
|
18379
18504
|
* @remarks
|
|
18380
18505
|
* This event fires when a projectile hits a block.
|
|
18381
18506
|
*
|
|
18507
|
+
* This property can be read in early-execution mode.
|
|
18508
|
+
*
|
|
18382
18509
|
*/
|
|
18383
18510
|
readonly projectileHitBlock: ProjectileHitBlockAfterEventSignal;
|
|
18384
18511
|
/**
|
|
18385
18512
|
* @remarks
|
|
18386
18513
|
* This event fires when a projectile hits an entity.
|
|
18387
18514
|
*
|
|
18515
|
+
* This property can be read in early-execution mode.
|
|
18516
|
+
*
|
|
18388
18517
|
*/
|
|
18389
18518
|
readonly projectileHitEntity: ProjectileHitEntityAfterEventSignal;
|
|
18390
18519
|
/**
|
|
18391
18520
|
* @remarks
|
|
18392
18521
|
* A target block was hit.
|
|
18393
18522
|
*
|
|
18523
|
+
* This property can be read in early-execution mode.
|
|
18524
|
+
*
|
|
18394
18525
|
*/
|
|
18395
18526
|
readonly targetBlockHit: TargetBlockHitAfterEventSignal;
|
|
18396
18527
|
/**
|
|
18397
18528
|
* @remarks
|
|
18398
18529
|
* A trip wire was tripped.
|
|
18399
18530
|
*
|
|
18531
|
+
* This property can be read in early-execution mode.
|
|
18532
|
+
*
|
|
18400
18533
|
*/
|
|
18401
18534
|
readonly tripWireTrip: TripWireTripAfterEventSignal;
|
|
18402
18535
|
/**
|
|
@@ -18404,10 +18537,15 @@ export class WorldAfterEvents {
|
|
|
18404
18537
|
* This event will be triggered when the weather changes within
|
|
18405
18538
|
* Minecraft.
|
|
18406
18539
|
*
|
|
18540
|
+
* This property can be read in early-execution mode.
|
|
18541
|
+
*
|
|
18407
18542
|
*/
|
|
18408
18543
|
readonly weatherChange: WeatherChangeAfterEventSignal;
|
|
18409
18544
|
/**
|
|
18410
18545
|
* @beta
|
|
18546
|
+
* @remarks
|
|
18547
|
+
* This property can be read in early-execution mode.
|
|
18548
|
+
*
|
|
18411
18549
|
*/
|
|
18412
18550
|
readonly worldLoad: WorldLoadAfterEventSignal;
|
|
18413
18551
|
}
|
|
@@ -18427,6 +18565,8 @@ export class WorldBeforeEvents {
|
|
|
18427
18565
|
* This event is triggered after a chat message has been
|
|
18428
18566
|
* broadcast or sent to players.
|
|
18429
18567
|
*
|
|
18568
|
+
* This property can be read in early-execution mode.
|
|
18569
|
+
*
|
|
18430
18570
|
* @example customCommand.ts
|
|
18431
18571
|
* ```typescript
|
|
18432
18572
|
* import { world, DimensionLocation } from "@minecraft/server";
|
|
@@ -18461,6 +18601,8 @@ export class WorldBeforeEvents {
|
|
|
18461
18601
|
* This event is triggered after an event has been added to an
|
|
18462
18602
|
* entity.
|
|
18463
18603
|
*
|
|
18604
|
+
* This property can be read in early-execution mode.
|
|
18605
|
+
*
|
|
18464
18606
|
*/
|
|
18465
18607
|
readonly effectAdd: EffectAddBeforeEventSignal;
|
|
18466
18608
|
/**
|
|
@@ -18468,12 +18610,16 @@ export class WorldBeforeEvents {
|
|
|
18468
18610
|
* Fires before an entity is removed from the world (for
|
|
18469
18611
|
* example, unloaded or removed after being killed.)
|
|
18470
18612
|
*
|
|
18613
|
+
* This property can be read in early-execution mode.
|
|
18614
|
+
*
|
|
18471
18615
|
*/
|
|
18472
18616
|
readonly entityRemove: EntityRemoveBeforeEventSignal;
|
|
18473
18617
|
/**
|
|
18474
18618
|
* @remarks
|
|
18475
18619
|
* This event is fired after an explosion occurs.
|
|
18476
18620
|
*
|
|
18621
|
+
* This property can be read in early-execution mode.
|
|
18622
|
+
*
|
|
18477
18623
|
*/
|
|
18478
18624
|
readonly explosion: ExplosionBeforeEventSignal;
|
|
18479
18625
|
/**
|
|
@@ -18481,38 +18627,46 @@ export class WorldBeforeEvents {
|
|
|
18481
18627
|
* This event fires when an item is successfully used by a
|
|
18482
18628
|
* player.
|
|
18483
18629
|
*
|
|
18630
|
+
* This property can be read in early-execution mode.
|
|
18631
|
+
*
|
|
18484
18632
|
*/
|
|
18485
18633
|
readonly itemUse: ItemUseBeforeEventSignal;
|
|
18486
18634
|
/**
|
|
18487
18635
|
* @remarks
|
|
18488
|
-
* This event fires
|
|
18489
|
-
*
|
|
18636
|
+
* This event fires before a block is broken by a player.
|
|
18637
|
+
*
|
|
18638
|
+
* This property can be read in early-execution mode.
|
|
18490
18639
|
*
|
|
18491
18640
|
*/
|
|
18492
|
-
readonly
|
|
18641
|
+
readonly playerBreakBlock: PlayerBreakBlockBeforeEventSignal;
|
|
18493
18642
|
/**
|
|
18494
18643
|
* @remarks
|
|
18495
|
-
* This
|
|
18644
|
+
* This property can be read in early-execution mode.
|
|
18496
18645
|
*
|
|
18497
18646
|
*/
|
|
18498
|
-
readonly playerBreakBlock: PlayerBreakBlockBeforeEventSignal;
|
|
18499
18647
|
readonly playerGameModeChange: PlayerGameModeChangeBeforeEventSignal;
|
|
18500
18648
|
/**
|
|
18501
18649
|
* @remarks
|
|
18502
18650
|
* Fires before a player interacts with a block.
|
|
18503
18651
|
*
|
|
18652
|
+
* This property can be read in early-execution mode.
|
|
18653
|
+
*
|
|
18504
18654
|
*/
|
|
18505
18655
|
readonly playerInteractWithBlock: PlayerInteractWithBlockBeforeEventSignal;
|
|
18506
18656
|
/**
|
|
18507
18657
|
* @remarks
|
|
18508
18658
|
* Fires before a player interacts with an entity.
|
|
18509
18659
|
*
|
|
18660
|
+
* This property can be read in early-execution mode.
|
|
18661
|
+
*
|
|
18510
18662
|
*/
|
|
18511
18663
|
readonly playerInteractWithEntity: PlayerInteractWithEntityBeforeEventSignal;
|
|
18512
18664
|
/**
|
|
18513
18665
|
* @remarks
|
|
18514
18666
|
* Fires when a player leaves the game.
|
|
18515
18667
|
*
|
|
18668
|
+
* This property can be read in early-execution mode.
|
|
18669
|
+
*
|
|
18516
18670
|
*/
|
|
18517
18671
|
readonly playerLeave: PlayerLeaveBeforeEventSignal;
|
|
18518
18672
|
/**
|
|
@@ -18520,8 +18674,15 @@ export class WorldBeforeEvents {
|
|
|
18520
18674
|
* @remarks
|
|
18521
18675
|
* This event fires before a block is placed by a player.
|
|
18522
18676
|
*
|
|
18677
|
+
* This property can be read in early-execution mode.
|
|
18678
|
+
*
|
|
18523
18679
|
*/
|
|
18524
18680
|
readonly playerPlaceBlock: PlayerPlaceBlockBeforeEventSignal;
|
|
18681
|
+
/**
|
|
18682
|
+
* @remarks
|
|
18683
|
+
* This property can be read in early-execution mode.
|
|
18684
|
+
*
|
|
18685
|
+
*/
|
|
18525
18686
|
readonly weatherChange: WeatherChangeBeforeEventSignal;
|
|
18526
18687
|
}
|
|
18527
18688
|
|
|
@@ -18914,14 +19075,22 @@ export interface CameraFadeTimeOptions {
|
|
|
18914
19075
|
}
|
|
18915
19076
|
|
|
18916
19077
|
/**
|
|
18917
|
-
*
|
|
18918
|
-
*
|
|
18919
|
-
* Required Experiments:
|
|
18920
|
-
* - Third Person Cameras
|
|
18921
|
-
*
|
|
19078
|
+
* Options to control pivot points and offsets of the third
|
|
19079
|
+
* person boom preset.
|
|
18922
19080
|
*/
|
|
18923
19081
|
export interface CameraFixedBoomOptions {
|
|
19082
|
+
/**
|
|
19083
|
+
* @remarks
|
|
19084
|
+
* Changes the pivot point to be <x, y, z> away from the
|
|
19085
|
+
* player.
|
|
19086
|
+
*
|
|
19087
|
+
*/
|
|
18924
19088
|
entityOffset?: Vector3;
|
|
19089
|
+
/**
|
|
19090
|
+
* @remarks
|
|
19091
|
+
* Offsets the camera from center by <x, y>.
|
|
19092
|
+
*
|
|
19093
|
+
*/
|
|
18925
19094
|
viewOffset?: Vector2;
|
|
18926
19095
|
}
|
|
18927
19096
|
|
|
@@ -20686,6 +20855,11 @@ export class CustomComponentInvalidRegistryError extends Error {
|
|
|
20686
20855
|
// @ts-ignore Class inheritance allowed for native defined classes
|
|
20687
20856
|
export class CustomComponentNameError extends Error {
|
|
20688
20857
|
private constructor();
|
|
20858
|
+
/**
|
|
20859
|
+
* @remarks
|
|
20860
|
+
* This property can be read in early-execution mode.
|
|
20861
|
+
*
|
|
20862
|
+
*/
|
|
20689
20863
|
reason: CustomComponentNameErrorReason;
|
|
20690
20864
|
}
|
|
20691
20865
|
|
|
@@ -20724,12 +20898,16 @@ export class InvalidEntityError extends Error {
|
|
|
20724
20898
|
* @remarks
|
|
20725
20899
|
* The id of the entity that is now invalid.
|
|
20726
20900
|
*
|
|
20901
|
+
* This property can be read in early-execution mode.
|
|
20902
|
+
*
|
|
20727
20903
|
*/
|
|
20728
20904
|
id: string;
|
|
20729
20905
|
/**
|
|
20730
20906
|
* @remarks
|
|
20731
20907
|
* The type of the entity that is now invalid.
|
|
20732
20908
|
*
|
|
20909
|
+
* This property can be read in early-execution mode.
|
|
20910
|
+
*
|
|
20733
20911
|
*/
|
|
20734
20912
|
type: string;
|
|
20735
20913
|
}
|
|
@@ -20812,6 +20990,11 @@ export class LocationOutOfWorldBoundariesError extends Error {
|
|
|
20812
20990
|
// @ts-ignore Class inheritance allowed for native defined classes
|
|
20813
20991
|
export class NamespaceNameError extends Error {
|
|
20814
20992
|
private constructor();
|
|
20993
|
+
/**
|
|
20994
|
+
* @remarks
|
|
20995
|
+
* This property can be read in early-execution mode.
|
|
20996
|
+
*
|
|
20997
|
+
*/
|
|
20815
20998
|
reason: NamespaceNameErrorReason;
|
|
20816
20999
|
}
|
|
20817
21000
|
|