@minecraft/server 2.3.0-beta.1.21.110-preview.26 → 2.4.0-beta.1.21.120-preview.20
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/index.d.ts +443 -3
- package/package.json +2 -2
package/index.d.ts
CHANGED
|
@@ -16,7 +16,7 @@
|
|
|
16
16
|
* ```json
|
|
17
17
|
* {
|
|
18
18
|
* "module_name": "@minecraft/server",
|
|
19
|
-
* "version": "2.
|
|
19
|
+
* "version": "2.4.0-beta"
|
|
20
20
|
* }
|
|
21
21
|
* ```
|
|
22
22
|
*
|
|
@@ -300,6 +300,19 @@ export enum ContainerRulesErrorReason {
|
|
|
300
300
|
ZeroWeightItem = 'ZeroWeightItem',
|
|
301
301
|
}
|
|
302
302
|
|
|
303
|
+
/**
|
|
304
|
+
* @beta
|
|
305
|
+
* Control Scheme types which define how the player moves in
|
|
306
|
+
* response to player inputs.
|
|
307
|
+
*/
|
|
308
|
+
export enum ControlScheme {
|
|
309
|
+
CameraRelative = 'CameraRelative',
|
|
310
|
+
CameraRelativeStrafe = 'CameraRelativeStrafe',
|
|
311
|
+
LockedPlayerRelativeStrafe = 'LockedPlayerRelativeStrafe',
|
|
312
|
+
PlayerRelative = 'PlayerRelative',
|
|
313
|
+
PlayerRelativeStrafe = 'PlayerRelativeStrafe',
|
|
314
|
+
}
|
|
315
|
+
|
|
303
316
|
/**
|
|
304
317
|
* Reason why custom command registration failed.
|
|
305
318
|
*/
|
|
@@ -3478,7 +3491,7 @@ export class AimAssistRegistry {
|
|
|
3478
3491
|
}
|
|
3479
3492
|
|
|
3480
3493
|
/**
|
|
3481
|
-
* @
|
|
3494
|
+
* @rc
|
|
3482
3495
|
* Describes a type of biome.
|
|
3483
3496
|
*/
|
|
3484
3497
|
export class BiomeType {
|
|
@@ -7126,6 +7139,22 @@ export class CustomComponentParameters {
|
|
|
7126
7139
|
readonly params: unknown;
|
|
7127
7140
|
}
|
|
7128
7141
|
|
|
7142
|
+
/**
|
|
7143
|
+
* @beta
|
|
7144
|
+
* Loot item condition that checks whether the loot source was
|
|
7145
|
+
* damaged by a specific type of entity.
|
|
7146
|
+
*/
|
|
7147
|
+
// @ts-ignore Class inheritance allowed for native defined classes
|
|
7148
|
+
export class DamagedByEntityCondition extends LootItemCondition {
|
|
7149
|
+
private constructor();
|
|
7150
|
+
/**
|
|
7151
|
+
* @remarks
|
|
7152
|
+
* The entity type required for this condition to pass.
|
|
7153
|
+
*
|
|
7154
|
+
*/
|
|
7155
|
+
readonly entityType: string;
|
|
7156
|
+
}
|
|
7157
|
+
|
|
7129
7158
|
/**
|
|
7130
7159
|
* Contains information related to firing of a data driven
|
|
7131
7160
|
* entity event - for example, the minecraft:ageable_grow_up
|
|
@@ -7355,7 +7384,7 @@ export class Dimension {
|
|
|
7355
7384
|
*/
|
|
7356
7385
|
findClosestBiome(pos: Vector3, biomeToFind: BiomeType | string, options?: BiomeSearchOptions): Vector3 | undefined;
|
|
7357
7386
|
/**
|
|
7358
|
-
* @
|
|
7387
|
+
* @rc
|
|
7359
7388
|
* @remarks
|
|
7360
7389
|
* Returns the biome type at the specified location.
|
|
7361
7390
|
*
|
|
@@ -7574,6 +7603,26 @@ export class Dimension {
|
|
|
7574
7603
|
* {@link minecraftcommon.UnsupportedFunctionalityError}
|
|
7575
7604
|
*/
|
|
7576
7605
|
getEntitiesFromRay(location: Vector3, direction: Vector3, options?: EntityRaycastOptions): EntityRaycastHit[];
|
|
7606
|
+
/**
|
|
7607
|
+
* @beta
|
|
7608
|
+
* @remarks
|
|
7609
|
+
* Returns a vector of generated structures that contain the
|
|
7610
|
+
* specified location (ex: Pillager Outpost, Mineshaft, etc.).
|
|
7611
|
+
* The vector will be empty if no structures are found.
|
|
7612
|
+
*
|
|
7613
|
+
* @param location
|
|
7614
|
+
* Location at which to check for structures.
|
|
7615
|
+
* @throws
|
|
7616
|
+
* An error will be thrown if the location is out of world
|
|
7617
|
+
* bounds.
|
|
7618
|
+
* An error will be thrown if the location is in an unloaded
|
|
7619
|
+
* chunk.
|
|
7620
|
+
*
|
|
7621
|
+
* {@link LocationInUnloadedChunkError}
|
|
7622
|
+
*
|
|
7623
|
+
* {@link LocationOutOfWorldBoundariesError}
|
|
7624
|
+
*/
|
|
7625
|
+
getGeneratedStructures(location: Vector3): (minecraftvanilladata.MinecraftFeatureTypes | string)[];
|
|
7577
7626
|
/**
|
|
7578
7627
|
* @beta
|
|
7579
7628
|
* @remarks
|
|
@@ -8267,6 +8316,15 @@ export class EmptyLootItem extends LootPoolEntry {
|
|
|
8267
8316
|
private constructor();
|
|
8268
8317
|
}
|
|
8269
8318
|
|
|
8319
|
+
/**
|
|
8320
|
+
* @beta
|
|
8321
|
+
*/
|
|
8322
|
+
export class EnchantInfo {
|
|
8323
|
+
private constructor();
|
|
8324
|
+
readonly enchantment: string;
|
|
8325
|
+
readonly range: minecraftcommon.NumberRange;
|
|
8326
|
+
}
|
|
8327
|
+
|
|
8270
8328
|
/**
|
|
8271
8329
|
* Contains information on a type of enchantment.
|
|
8272
8330
|
*/
|
|
@@ -10106,6 +10164,40 @@ export class EntityFrictionModifierComponent extends EntityComponent {
|
|
|
10106
10164
|
static readonly componentId = 'minecraft:friction_modifier';
|
|
10107
10165
|
}
|
|
10108
10166
|
|
|
10167
|
+
/**
|
|
10168
|
+
* @beta
|
|
10169
|
+
* Loot item condition that checks the value of the mark
|
|
10170
|
+
* variant of a mob as it drops its loot.
|
|
10171
|
+
*/
|
|
10172
|
+
// @ts-ignore Class inheritance allowed for native defined classes
|
|
10173
|
+
export class EntityHasMarkVariantCondition extends LootItemCondition {
|
|
10174
|
+
private constructor();
|
|
10175
|
+
/**
|
|
10176
|
+
* @remarks
|
|
10177
|
+
* The mark variant value the mob must have for this condition
|
|
10178
|
+
* to pass.
|
|
10179
|
+
*
|
|
10180
|
+
*/
|
|
10181
|
+
readonly value: number;
|
|
10182
|
+
}
|
|
10183
|
+
|
|
10184
|
+
/**
|
|
10185
|
+
* @beta
|
|
10186
|
+
* Loot item condition that checks the variant value of a mob
|
|
10187
|
+
* as it drops its loot.
|
|
10188
|
+
*/
|
|
10189
|
+
// @ts-ignore Class inheritance allowed for native defined classes
|
|
10190
|
+
export class EntityHasVariantCondition extends LootItemCondition {
|
|
10191
|
+
private constructor();
|
|
10192
|
+
/**
|
|
10193
|
+
* @remarks
|
|
10194
|
+
* The variant value the mob must have for this condition to
|
|
10195
|
+
* pass.
|
|
10196
|
+
*
|
|
10197
|
+
*/
|
|
10198
|
+
readonly value: number;
|
|
10199
|
+
}
|
|
10200
|
+
|
|
10109
10201
|
/**
|
|
10110
10202
|
* Defines the interactions with this entity for healing it.
|
|
10111
10203
|
*/
|
|
@@ -10643,6 +10735,23 @@ export class EntityItemComponent extends EntityComponent {
|
|
|
10643
10735
|
static readonly componentId = 'minecraft:item';
|
|
10644
10736
|
}
|
|
10645
10737
|
|
|
10738
|
+
/**
|
|
10739
|
+
* @beta
|
|
10740
|
+
* Loot item condition that checks the entity type of the
|
|
10741
|
+
* entity dropping its loot.
|
|
10742
|
+
*/
|
|
10743
|
+
// @ts-ignore Class inheritance allowed for native defined classes
|
|
10744
|
+
export class EntityKilledCondition extends LootItemCondition {
|
|
10745
|
+
private constructor();
|
|
10746
|
+
/**
|
|
10747
|
+
* @remarks
|
|
10748
|
+
* The entity type required for this condition to pass.
|
|
10749
|
+
* Example: 'minecraft:skeleton'.
|
|
10750
|
+
*
|
|
10751
|
+
*/
|
|
10752
|
+
readonly entityType: string;
|
|
10753
|
+
}
|
|
10754
|
+
|
|
10646
10755
|
/**
|
|
10647
10756
|
* Defines the base movement speed in lava of this entity.
|
|
10648
10757
|
*/
|
|
@@ -12626,6 +12735,16 @@ export class InputInfo {
|
|
|
12626
12735
|
getMovementVector(): Vector2;
|
|
12627
12736
|
}
|
|
12628
12737
|
|
|
12738
|
+
/**
|
|
12739
|
+
* @beta
|
|
12740
|
+
* Loot item condition that checks whether or not the entity
|
|
12741
|
+
* dropping loot is a baby.
|
|
12742
|
+
*/
|
|
12743
|
+
// @ts-ignore Class inheritance allowed for native defined classes
|
|
12744
|
+
export class IsBabyCondition extends LootItemCondition {
|
|
12745
|
+
private constructor();
|
|
12746
|
+
}
|
|
12747
|
+
|
|
12629
12748
|
/**
|
|
12630
12749
|
* @rc
|
|
12631
12750
|
* When present on an item, this item is a book item. Can
|
|
@@ -14558,6 +14677,44 @@ export class ItemUseOnEvent {
|
|
|
14558
14677
|
readonly itemStack: ItemStack;
|
|
14559
14678
|
}
|
|
14560
14679
|
|
|
14680
|
+
/**
|
|
14681
|
+
* @beta
|
|
14682
|
+
* Loot item condition that checks whether or not the drop
|
|
14683
|
+
* source was killed by a specific type of entity.
|
|
14684
|
+
*/
|
|
14685
|
+
// @ts-ignore Class inheritance allowed for native defined classes
|
|
14686
|
+
export class KilledByEntityCondition extends LootItemCondition {
|
|
14687
|
+
private constructor();
|
|
14688
|
+
/**
|
|
14689
|
+
* @remarks
|
|
14690
|
+
* The entity type required for this condition to pass.
|
|
14691
|
+
* Example: 'minecraft:skeleton'.
|
|
14692
|
+
*
|
|
14693
|
+
*/
|
|
14694
|
+
readonly entityType: string;
|
|
14695
|
+
}
|
|
14696
|
+
|
|
14697
|
+
/**
|
|
14698
|
+
* @beta
|
|
14699
|
+
* Loot item condition that checks whether or not the source of
|
|
14700
|
+
* the loot drop was killed by the player.
|
|
14701
|
+
*/
|
|
14702
|
+
// @ts-ignore Class inheritance allowed for native defined classes
|
|
14703
|
+
export class KilledByPlayerCondition extends LootItemCondition {
|
|
14704
|
+
private constructor();
|
|
14705
|
+
}
|
|
14706
|
+
|
|
14707
|
+
/**
|
|
14708
|
+
* @beta
|
|
14709
|
+
* Loot item condition that checks whether or not the source of
|
|
14710
|
+
* the loot drop was killed by the player or any of the
|
|
14711
|
+
* player's pets.
|
|
14712
|
+
*/
|
|
14713
|
+
// @ts-ignore Class inheritance allowed for native defined classes
|
|
14714
|
+
export class KilledByPlayerOrPetsCondition extends LootItemCondition {
|
|
14715
|
+
private constructor();
|
|
14716
|
+
}
|
|
14717
|
+
|
|
14561
14718
|
/**
|
|
14562
14719
|
* Contains information related to changes to a lever
|
|
14563
14720
|
* activating or deactivating.
|
|
@@ -14724,6 +14881,16 @@ export class LootItem extends LootPoolEntry {
|
|
|
14724
14881
|
readonly name?: ItemType;
|
|
14725
14882
|
}
|
|
14726
14883
|
|
|
14884
|
+
/**
|
|
14885
|
+
* @beta
|
|
14886
|
+
* An abstract base class from which all loot item conditions
|
|
14887
|
+
* are derived. A loot item condition is a set of rules or
|
|
14888
|
+
* requirements which must be met for a loot drop to happen.
|
|
14889
|
+
*/
|
|
14890
|
+
export class LootItemCondition {
|
|
14891
|
+
private constructor();
|
|
14892
|
+
}
|
|
14893
|
+
|
|
14727
14894
|
/**
|
|
14728
14895
|
* @beta
|
|
14729
14896
|
* A collection of entries which individually determine loot
|
|
@@ -14740,6 +14907,7 @@ export class LootPool {
|
|
|
14740
14907
|
*
|
|
14741
14908
|
*/
|
|
14742
14909
|
readonly bonusRolls: minecraftcommon.NumberRange;
|
|
14910
|
+
readonly conditions: LootItemCondition[];
|
|
14743
14911
|
/**
|
|
14744
14912
|
* @remarks
|
|
14745
14913
|
* Gets a complete list of all loot pool entries contained in
|
|
@@ -15000,6 +15168,65 @@ export class LootTableReference extends LootPoolEntry {
|
|
|
15000
15168
|
readonly path: string;
|
|
15001
15169
|
}
|
|
15002
15170
|
|
|
15171
|
+
/**
|
|
15172
|
+
* @beta
|
|
15173
|
+
* Loot item condition that checks whether an appropriate tool
|
|
15174
|
+
* was used to trigger the loot event. Can describe item type,
|
|
15175
|
+
* count, durability, enchantments, or arrays of item tags to
|
|
15176
|
+
* compare against.
|
|
15177
|
+
*/
|
|
15178
|
+
// @ts-ignore Class inheritance allowed for native defined classes
|
|
15179
|
+
export class MatchToolCondition extends LootItemCondition {
|
|
15180
|
+
private constructor();
|
|
15181
|
+
/**
|
|
15182
|
+
* @remarks
|
|
15183
|
+
* The stack size, or count, required for this condition to
|
|
15184
|
+
* pass.
|
|
15185
|
+
*
|
|
15186
|
+
*/
|
|
15187
|
+
readonly count: minecraftcommon.NumberRange;
|
|
15188
|
+
/**
|
|
15189
|
+
* @remarks
|
|
15190
|
+
* The durability value required for this condition to pass.
|
|
15191
|
+
*
|
|
15192
|
+
*/
|
|
15193
|
+
readonly durability: minecraftcommon.NumberRange;
|
|
15194
|
+
/**
|
|
15195
|
+
* @remarks
|
|
15196
|
+
* Array of enchantments required for this condition to pass.
|
|
15197
|
+
*
|
|
15198
|
+
*/
|
|
15199
|
+
readonly enchantments: EnchantInfo[];
|
|
15200
|
+
/**
|
|
15201
|
+
* @remarks
|
|
15202
|
+
* The name of the tool item required for this condition to
|
|
15203
|
+
* pass.
|
|
15204
|
+
*
|
|
15205
|
+
*/
|
|
15206
|
+
readonly itemName: string;
|
|
15207
|
+
/**
|
|
15208
|
+
* @remarks
|
|
15209
|
+
* Array of item tags which ALL must be matched for this
|
|
15210
|
+
* condition to pass.
|
|
15211
|
+
*
|
|
15212
|
+
*/
|
|
15213
|
+
readonly itemTagsAll: string[];
|
|
15214
|
+
/**
|
|
15215
|
+
* @remarks
|
|
15216
|
+
* Array of item tags, from which at least 1 must be matched
|
|
15217
|
+
* for this condition to pass.
|
|
15218
|
+
*
|
|
15219
|
+
*/
|
|
15220
|
+
readonly itemTagsAny: string[];
|
|
15221
|
+
/**
|
|
15222
|
+
* @remarks
|
|
15223
|
+
* Array of item tags, from which exactly zero must match for
|
|
15224
|
+
* this condition to pass.
|
|
15225
|
+
*
|
|
15226
|
+
*/
|
|
15227
|
+
readonly itemTagsNone: string[];
|
|
15228
|
+
}
|
|
15229
|
+
|
|
15003
15230
|
/**
|
|
15004
15231
|
* @beta
|
|
15005
15232
|
* A specific currently-internal event used for passing
|
|
@@ -15138,6 +15365,22 @@ export class PackSettingChangeAfterEventSignal {
|
|
|
15138
15365
|
unsubscribe(callback: (arg0: PackSettingChangeAfterEvent) => void): void;
|
|
15139
15366
|
}
|
|
15140
15367
|
|
|
15368
|
+
/**
|
|
15369
|
+
* @beta
|
|
15370
|
+
* Loot item condition that checks whether the looting entity
|
|
15371
|
+
* is currently a passenger of a specific type of entity.
|
|
15372
|
+
*/
|
|
15373
|
+
// @ts-ignore Class inheritance allowed for native defined classes
|
|
15374
|
+
export class PassengerOfEntityCondition extends LootItemCondition {
|
|
15375
|
+
private constructor();
|
|
15376
|
+
/**
|
|
15377
|
+
* @remarks
|
|
15378
|
+
* The entity type required for this condition to pass.
|
|
15379
|
+
*
|
|
15380
|
+
*/
|
|
15381
|
+
readonly entityType: string;
|
|
15382
|
+
}
|
|
15383
|
+
|
|
15141
15384
|
/**
|
|
15142
15385
|
* Contains information related to changes to a piston
|
|
15143
15386
|
* expanding or retracting.
|
|
@@ -15457,6 +15700,16 @@ export class Player extends Entity {
|
|
|
15457
15700
|
*
|
|
15458
15701
|
*/
|
|
15459
15702
|
getAimAssist(): PlayerAimAssist;
|
|
15703
|
+
/**
|
|
15704
|
+
* @beta
|
|
15705
|
+
* @remarks
|
|
15706
|
+
* Returns the player's current control scheme.
|
|
15707
|
+
*
|
|
15708
|
+
* @throws This function can throw errors.
|
|
15709
|
+
*
|
|
15710
|
+
* {@link InvalidEntityError}
|
|
15711
|
+
*/
|
|
15712
|
+
getControlScheme(): ControlScheme;
|
|
15460
15713
|
/**
|
|
15461
15714
|
* @remarks
|
|
15462
15715
|
* Retrieves the active gamemode for this player, if specified.
|
|
@@ -15689,6 +15942,33 @@ export class Player extends Entity {
|
|
|
15689
15942
|
* ```
|
|
15690
15943
|
*/
|
|
15691
15944
|
sendMessage(message: (RawMessage | string)[] | RawMessage | string): void;
|
|
15945
|
+
/**
|
|
15946
|
+
* @beta
|
|
15947
|
+
* @remarks
|
|
15948
|
+
* Set a player's control scheme. The player's active camera
|
|
15949
|
+
* preset must be set by scripts like with camera.setCamera()
|
|
15950
|
+
* or commands.
|
|
15951
|
+
*
|
|
15952
|
+
* This function can't be called in read-only mode.
|
|
15953
|
+
*
|
|
15954
|
+
* @param controlScheme
|
|
15955
|
+
* Control scheme type. If this argument is undefined, this
|
|
15956
|
+
* method will clear the player's control scheme back to the
|
|
15957
|
+
* player camera's default control scheme.
|
|
15958
|
+
* @returns
|
|
15959
|
+
* Returns nothing if the control scheme was added or updated
|
|
15960
|
+
* successfully. This can throw an InvalidArgumentError if the
|
|
15961
|
+
* control scheme is not allowed by the player's current
|
|
15962
|
+
* camera.
|
|
15963
|
+
* @throws This function can throw errors.
|
|
15964
|
+
*
|
|
15965
|
+
* {@link minecraftcommon.EngineError}
|
|
15966
|
+
*
|
|
15967
|
+
* {@link minecraftcommon.InvalidArgumentError}
|
|
15968
|
+
*
|
|
15969
|
+
* {@link InvalidEntityError}
|
|
15970
|
+
*/
|
|
15971
|
+
setControlScheme(controlScheme?: string): void;
|
|
15692
15972
|
/**
|
|
15693
15973
|
* @remarks
|
|
15694
15974
|
* Sets a gamemode override for this player.
|
|
@@ -17283,6 +17563,80 @@ export class PlayerSwingStartAfterEventSignal {
|
|
|
17283
17563
|
unsubscribe(callback: (arg0: PlayerSwingStartAfterEvent) => void): void;
|
|
17284
17564
|
}
|
|
17285
17565
|
|
|
17566
|
+
/**
|
|
17567
|
+
* @beta
|
|
17568
|
+
* Contains information related to when a player successfully
|
|
17569
|
+
* names an Entity with a named Name Tag item.
|
|
17570
|
+
*/
|
|
17571
|
+
export class PlayerUseNameTagAfterEvent {
|
|
17572
|
+
private constructor();
|
|
17573
|
+
/**
|
|
17574
|
+
* @remarks
|
|
17575
|
+
* The entity that was named by the player.
|
|
17576
|
+
*
|
|
17577
|
+
* This property can't be edited in read-only mode.
|
|
17578
|
+
*
|
|
17579
|
+
*/
|
|
17580
|
+
entityNamed: Entity;
|
|
17581
|
+
/**
|
|
17582
|
+
* @remarks
|
|
17583
|
+
* The new name that the player has given to the entity.
|
|
17584
|
+
*
|
|
17585
|
+
* This property can't be edited in read-only mode.
|
|
17586
|
+
*
|
|
17587
|
+
*/
|
|
17588
|
+
newName: string;
|
|
17589
|
+
/**
|
|
17590
|
+
* @remarks
|
|
17591
|
+
* Handle to the player that used the name tag.
|
|
17592
|
+
*
|
|
17593
|
+
* This property can't be edited in read-only mode.
|
|
17594
|
+
*
|
|
17595
|
+
*/
|
|
17596
|
+
player: Player;
|
|
17597
|
+
/**
|
|
17598
|
+
* @remarks
|
|
17599
|
+
* The previous name of the entity before the player used the
|
|
17600
|
+
* name tag. This will be undefined if the entity was not
|
|
17601
|
+
* previously named.
|
|
17602
|
+
*
|
|
17603
|
+
* This property can't be edited in read-only mode.
|
|
17604
|
+
*
|
|
17605
|
+
*/
|
|
17606
|
+
previousName?: string;
|
|
17607
|
+
}
|
|
17608
|
+
|
|
17609
|
+
/**
|
|
17610
|
+
* @beta
|
|
17611
|
+
* Manages callbacks that are connected to when a player
|
|
17612
|
+
* successfully names an Entity with a named Name Tag item.
|
|
17613
|
+
*/
|
|
17614
|
+
export class PlayerUseNameTagAfterEventSignal {
|
|
17615
|
+
private constructor();
|
|
17616
|
+
/**
|
|
17617
|
+
* @remarks
|
|
17618
|
+
* Subscribes the specified callback to a player use name tag
|
|
17619
|
+
* after event.
|
|
17620
|
+
*
|
|
17621
|
+
* This function can't be called in read-only mode.
|
|
17622
|
+
*
|
|
17623
|
+
* This function can be called in early-execution mode.
|
|
17624
|
+
*
|
|
17625
|
+
*/
|
|
17626
|
+
subscribe(callback: (arg0: PlayerUseNameTagAfterEvent) => void): (arg0: PlayerUseNameTagAfterEvent) => void;
|
|
17627
|
+
/**
|
|
17628
|
+
* @remarks
|
|
17629
|
+
* Removes the specified callback from a player use name tag
|
|
17630
|
+
* after event.
|
|
17631
|
+
*
|
|
17632
|
+
* This function can't be called in read-only mode.
|
|
17633
|
+
*
|
|
17634
|
+
* This function can be called in early-execution mode.
|
|
17635
|
+
*
|
|
17636
|
+
*/
|
|
17637
|
+
unsubscribe(callback: (arg0: PlayerUseNameTagAfterEvent) => void): void;
|
|
17638
|
+
}
|
|
17639
|
+
|
|
17286
17640
|
/**
|
|
17287
17641
|
* @beta
|
|
17288
17642
|
* Represents how the potion effect is delivered.
|
|
@@ -17640,6 +17994,82 @@ export class ProjectileHitEntityAfterEventSignal {
|
|
|
17640
17994
|
unsubscribe(callback: (arg0: ProjectileHitEntityAfterEvent) => void): void;
|
|
17641
17995
|
}
|
|
17642
17996
|
|
|
17997
|
+
/**
|
|
17998
|
+
* @beta
|
|
17999
|
+
* Loot item condition that applies a given value to the
|
|
18000
|
+
* chances that loot will drop.
|
|
18001
|
+
*/
|
|
18002
|
+
// @ts-ignore Class inheritance allowed for native defined classes
|
|
18003
|
+
export class RandomChanceCondition extends LootItemCondition {
|
|
18004
|
+
private constructor();
|
|
18005
|
+
/**
|
|
18006
|
+
* @remarks
|
|
18007
|
+
* The chance, from 0.0-1.0, that loot will drop.
|
|
18008
|
+
*
|
|
18009
|
+
*/
|
|
18010
|
+
readonly chance: number;
|
|
18011
|
+
}
|
|
18012
|
+
|
|
18013
|
+
/**
|
|
18014
|
+
* @beta
|
|
18015
|
+
* Loot item condition that applies a given value to the
|
|
18016
|
+
* chances that loot will drop, modified by the level of
|
|
18017
|
+
* looting enchantment on the tool used.
|
|
18018
|
+
*/
|
|
18019
|
+
// @ts-ignore Class inheritance allowed for native defined classes
|
|
18020
|
+
export class RandomChanceWithLootingCondition extends LootItemCondition {
|
|
18021
|
+
private constructor();
|
|
18022
|
+
/**
|
|
18023
|
+
* @remarks
|
|
18024
|
+
* The base chance, from 0.0-1.0, that loot will drop. Will be
|
|
18025
|
+
* modified by the 'lootingMultiplier' value.
|
|
18026
|
+
*
|
|
18027
|
+
*/
|
|
18028
|
+
readonly chance: number;
|
|
18029
|
+
/**
|
|
18030
|
+
* @remarks
|
|
18031
|
+
* The increase in drop chance per looting enchant level.
|
|
18032
|
+
*
|
|
18033
|
+
*/
|
|
18034
|
+
readonly lootingMultiplier: number;
|
|
18035
|
+
}
|
|
18036
|
+
|
|
18037
|
+
/**
|
|
18038
|
+
* @beta
|
|
18039
|
+
* Loot item condition that applies given values to the chances
|
|
18040
|
+
* that loot will drop based on the current difficulty level.
|
|
18041
|
+
*/
|
|
18042
|
+
// @ts-ignore Class inheritance allowed for native defined classes
|
|
18043
|
+
export class RandomDifficultyChanceCondition extends LootItemCondition {
|
|
18044
|
+
private constructor();
|
|
18045
|
+
/**
|
|
18046
|
+
* @remarks
|
|
18047
|
+
* A four-element array containing the chance of a loot drop
|
|
18048
|
+
* occurring for each difficulty level, in order: Peaceful,
|
|
18049
|
+
* Easy, Normal, Hard.
|
|
18050
|
+
*
|
|
18051
|
+
*/
|
|
18052
|
+
readonly chances: number[];
|
|
18053
|
+
}
|
|
18054
|
+
|
|
18055
|
+
/**
|
|
18056
|
+
* @beta
|
|
18057
|
+
* Loot item condition that applies a given value to the
|
|
18058
|
+
* chances that loot will drop, modified by the region the drop
|
|
18059
|
+
* is happening within.
|
|
18060
|
+
*/
|
|
18061
|
+
// @ts-ignore Class inheritance allowed for native defined classes
|
|
18062
|
+
export class RandomRegionalDifficultyChanceCondition extends LootItemCondition {
|
|
18063
|
+
private constructor();
|
|
18064
|
+
/**
|
|
18065
|
+
* @remarks
|
|
18066
|
+
* The base chance, from 0.0-1.0, that loot will drop. Will be
|
|
18067
|
+
* modified by the current region's multiplier.
|
|
18068
|
+
*
|
|
18069
|
+
*/
|
|
18070
|
+
readonly maxChance: number;
|
|
18071
|
+
}
|
|
18072
|
+
|
|
17643
18073
|
/**
|
|
17644
18074
|
* Contains objectives and participants for the scoreboard.
|
|
17645
18075
|
* @example updateScoreboard.ts
|
|
@@ -20382,6 +20812,16 @@ export class WorldAfterEvents {
|
|
|
20382
20812
|
*
|
|
20383
20813
|
*/
|
|
20384
20814
|
readonly playerSwingStart: PlayerSwingStartAfterEventSignal;
|
|
20815
|
+
/**
|
|
20816
|
+
* @beta
|
|
20817
|
+
* @remarks
|
|
20818
|
+
* An event for when a player uses a named name tag on an
|
|
20819
|
+
* entity.
|
|
20820
|
+
*
|
|
20821
|
+
* This property can be read in early-execution mode.
|
|
20822
|
+
*
|
|
20823
|
+
*/
|
|
20824
|
+
readonly playerUseNameTag: PlayerUseNameTagAfterEventSignal;
|
|
20385
20825
|
/**
|
|
20386
20826
|
* @remarks
|
|
20387
20827
|
* A pressure plate has popped back up (i.e., there are no
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@minecraft/server",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.4.0-beta.1.21.120-preview.20",
|
|
4
4
|
"description": "",
|
|
5
5
|
"contributors": [
|
|
6
6
|
{
|
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
],
|
|
15
15
|
"peerDependencies": {
|
|
16
16
|
"@minecraft/common": "^1.2.0",
|
|
17
|
-
"@minecraft/vanilla-data": ">=1.20.70 || 1.21.
|
|
17
|
+
"@minecraft/vanilla-data": ">=1.20.70 || 1.21.120-preview.20"
|
|
18
18
|
},
|
|
19
19
|
"license": "MIT"
|
|
20
20
|
}
|