@minecraft/server 2.5.0-rc.1.26.0-preview.28 → 2.5.0-rc.1.26.10-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 +23 -39
- package/package.json +2 -2
package/index.d.ts
CHANGED
|
@@ -3308,6 +3308,7 @@ export class Block {
|
|
|
3308
3308
|
* Number of instances of this block to place in the item
|
|
3309
3309
|
* stack.
|
|
3310
3310
|
* Defaults to: 1
|
|
3311
|
+
* Bounds: [1, 255]
|
|
3311
3312
|
* @param withData
|
|
3312
3313
|
* Whether additional data facets of the item stack are
|
|
3313
3314
|
* included.
|
|
@@ -4222,6 +4223,7 @@ export class BlockPermutation {
|
|
|
4222
4223
|
* Number of instances of this block to place in the prototype
|
|
4223
4224
|
* item stack.
|
|
4224
4225
|
* Defaults to: 1
|
|
4226
|
+
* Bounds: [1, 255]
|
|
4225
4227
|
*/
|
|
4226
4228
|
getItemStack(amount?: number): ItemStack | undefined;
|
|
4227
4229
|
/**
|
|
@@ -5466,6 +5468,7 @@ export class Container {
|
|
|
5466
5468
|
*
|
|
5467
5469
|
* @param slot
|
|
5468
5470
|
* Zero-based index of the slot to retrieve items from.
|
|
5471
|
+
* Minimum value: 0
|
|
5469
5472
|
* @throws
|
|
5470
5473
|
* Throws if the container is invalid or if the `slot` index is
|
|
5471
5474
|
* out of bounds.
|
|
@@ -5499,6 +5502,7 @@ export class Container {
|
|
|
5499
5502
|
* @param slot
|
|
5500
5503
|
* The index of the slot to return. This index must be within
|
|
5501
5504
|
* the bounds of the container.
|
|
5505
|
+
* Minimum value: 0
|
|
5502
5506
|
* @throws
|
|
5503
5507
|
* Throws if the container is invalid or if the `slot` index is
|
|
5504
5508
|
* out of bounds.
|
|
@@ -5514,9 +5518,11 @@ export class Container {
|
|
|
5514
5518
|
* @param fromSlot
|
|
5515
5519
|
* Zero-based index of the slot to transfer an item from, on
|
|
5516
5520
|
* this container.
|
|
5521
|
+
* Minimum value: 0
|
|
5517
5522
|
* @param toSlot
|
|
5518
5523
|
* Zero-based index of the slot to transfer an item to, on
|
|
5519
5524
|
* `toContainer`.
|
|
5525
|
+
* Minimum value: 0
|
|
5520
5526
|
* @param toContainer
|
|
5521
5527
|
* Target container to transfer to. Note this can be the same
|
|
5522
5528
|
* container as the source.
|
|
@@ -5565,6 +5571,7 @@ export class Container {
|
|
|
5565
5571
|
*
|
|
5566
5572
|
* @param slot
|
|
5567
5573
|
* Zero-based index of the slot to set an item at.
|
|
5574
|
+
* Minimum value: 0
|
|
5568
5575
|
* @param itemStack
|
|
5569
5576
|
* Stack of items to place within the specified slot. Setting
|
|
5570
5577
|
* `itemStack` to undefined will clear the slot.
|
|
@@ -5585,8 +5592,10 @@ export class Container {
|
|
|
5585
5592
|
*
|
|
5586
5593
|
* @param slot
|
|
5587
5594
|
* Zero-based index of the slot to swap from this container.
|
|
5595
|
+
* Minimum value: 0
|
|
5588
5596
|
* @param otherSlot
|
|
5589
5597
|
* Zero-based index of the slot to swap with.
|
|
5598
|
+
* Minimum value: 0
|
|
5590
5599
|
* @param otherContainer
|
|
5591
5600
|
* Target container to swap with. Note this can be the same
|
|
5592
5601
|
* container as this source.
|
|
@@ -5609,6 +5618,7 @@ export class Container {
|
|
|
5609
5618
|
* @param fromSlot
|
|
5610
5619
|
* Zero-based index of the slot to transfer an item from, on
|
|
5611
5620
|
* this container.
|
|
5621
|
+
* Minimum value: 0
|
|
5612
5622
|
* @param toContainer
|
|
5613
5623
|
* Target container to transfer to. Note this can be the same
|
|
5614
5624
|
* container as the source.
|
|
@@ -5668,6 +5678,7 @@ export class ContainerSlot {
|
|
|
5668
5678
|
*
|
|
5669
5679
|
* This property can't be edited in restricted-execution mode.
|
|
5670
5680
|
*
|
|
5681
|
+
* Bounds: [1, 255]
|
|
5671
5682
|
* @throws
|
|
5672
5683
|
* Throws if the value is outside the range of 1-255.
|
|
5673
5684
|
*/
|
|
@@ -6281,6 +6292,7 @@ export class Dimension {
|
|
|
6281
6292
|
* The location of the explosion.
|
|
6282
6293
|
* @param radius
|
|
6283
6294
|
* Radius, in blocks, of the explosion to create.
|
|
6295
|
+
* Bounds: [0, 1000]
|
|
6284
6296
|
* @param explosionOptions
|
|
6285
6297
|
* Additional configurable options for the explosion.
|
|
6286
6298
|
* @throws This function can throw errors.
|
|
@@ -6801,6 +6813,7 @@ export class Dimension {
|
|
|
6801
6813
|
* Sets the duration of the weather (in ticks). If no duration
|
|
6802
6814
|
* is provided, the duration will be set to a random duration
|
|
6803
6815
|
* between 300 and 900 seconds.
|
|
6816
|
+
* Bounds: [1, 1000000]
|
|
6804
6817
|
* @throws This function can throw errors.
|
|
6805
6818
|
*/
|
|
6806
6819
|
setWeather(weatherType: WeatherType, duration?: number): void;
|
|
@@ -7523,6 +7536,7 @@ export class Entity {
|
|
|
7523
7536
|
* 20 ticks per second. Use {@link TicksPerSecond} constant to
|
|
7524
7537
|
* convert between ticks and seconds. The value must be within
|
|
7525
7538
|
* the range [0, 20000000].
|
|
7539
|
+
* Bounds: [1, 20000000]
|
|
7526
7540
|
* @param options
|
|
7527
7541
|
* Additional options for the effect.
|
|
7528
7542
|
* @returns
|
|
@@ -9418,37 +9432,6 @@ export class EntityHurtAfterEvent {
|
|
|
9418
9432
|
readonly hurtEntity: Entity;
|
|
9419
9433
|
}
|
|
9420
9434
|
|
|
9421
|
-
/**
|
|
9422
|
-
* Manages callbacks that are connected to when an entity is
|
|
9423
|
-
* hurt.
|
|
9424
|
-
*/
|
|
9425
|
-
export class EntityHurtAfterEventSignal {
|
|
9426
|
-
private constructor();
|
|
9427
|
-
/**
|
|
9428
|
-
* @remarks
|
|
9429
|
-
* Adds a callback that will be called when an entity is hurt.
|
|
9430
|
-
*
|
|
9431
|
-
* This function can't be called in restricted-execution mode.
|
|
9432
|
-
*
|
|
9433
|
-
* This function can be called in early-execution mode.
|
|
9434
|
-
*
|
|
9435
|
-
*/
|
|
9436
|
-
subscribe(
|
|
9437
|
-
callback: (arg0: EntityHurtAfterEvent) => void,
|
|
9438
|
-
options?: EntityEventOptions,
|
|
9439
|
-
): (arg0: EntityHurtAfterEvent) => void;
|
|
9440
|
-
/**
|
|
9441
|
-
* @remarks
|
|
9442
|
-
* Removes a callback from being called when an entity is hurt.
|
|
9443
|
-
*
|
|
9444
|
-
* This function can't be called in restricted-execution mode.
|
|
9445
|
-
*
|
|
9446
|
-
* This function can be called in early-execution mode.
|
|
9447
|
-
*
|
|
9448
|
-
*/
|
|
9449
|
-
unsubscribe(callback: (arg0: EntityHurtAfterEvent) => void): void;
|
|
9450
|
-
}
|
|
9451
|
-
|
|
9452
9435
|
/**
|
|
9453
9436
|
* Defines this entity's inventory properties.
|
|
9454
9437
|
*/
|
|
@@ -12348,6 +12331,7 @@ export class ItemDurabilityComponent extends ItemComponent {
|
|
|
12348
12331
|
* chance. Incoming unbreaking parameter must be within the
|
|
12349
12332
|
* range [0, 3].
|
|
12350
12333
|
* Defaults to: 0
|
|
12334
|
+
* Bounds: [0, 3]
|
|
12351
12335
|
* @throws This function can throw errors.
|
|
12352
12336
|
*/
|
|
12353
12337
|
getDamageChance(unbreakingEnchantmentLevel?: number): number;
|
|
@@ -12786,6 +12770,7 @@ export class ItemStack {
|
|
|
12786
12770
|
*
|
|
12787
12771
|
* This property can't be edited in restricted-execution mode.
|
|
12788
12772
|
*
|
|
12773
|
+
* Bounds: [1, 255]
|
|
12789
12774
|
* @throws
|
|
12790
12775
|
* Throws if the value is outside the range of 1-255.
|
|
12791
12776
|
*/
|
|
@@ -12883,6 +12868,7 @@ export class ItemStack {
|
|
|
12883
12868
|
* size. Note that certain items can only have one item in the
|
|
12884
12869
|
* stack.
|
|
12885
12870
|
* Defaults to: 1
|
|
12871
|
+
* Bounds: [1, 255]
|
|
12886
12872
|
* @throws
|
|
12887
12873
|
* Throws if `itemType` is invalid, or if `amount` is outside
|
|
12888
12874
|
* the range of 1-255.
|
|
@@ -14546,6 +14532,7 @@ export class Player extends Entity {
|
|
|
14546
14532
|
* @param amount
|
|
14547
14533
|
* Amount of experience to add. Note that this can be negative.
|
|
14548
14534
|
* Min/max bounds at -2^24 ~ 2^24
|
|
14535
|
+
* Bounds: [-16777216, 16777216]
|
|
14549
14536
|
* @returns
|
|
14550
14537
|
* Returns the current experience of the Player.
|
|
14551
14538
|
* @throws This function can throw errors.
|
|
@@ -14560,6 +14547,7 @@ export class Player extends Entity {
|
|
|
14560
14547
|
*
|
|
14561
14548
|
* @param amount
|
|
14562
14549
|
* Amount to add to the player. Min/max bounds at -2^24 ~ 2^24
|
|
14550
|
+
* Bounds: [-16777216, 16777216]
|
|
14563
14551
|
* @returns
|
|
14564
14552
|
* Returns the current level of the Player.
|
|
14565
14553
|
* @throws This function can throw errors.
|
|
@@ -14947,6 +14935,7 @@ export class Player extends Entity {
|
|
|
14947
14935
|
* cooldown for.
|
|
14948
14936
|
* @param tickDuration
|
|
14949
14937
|
* Duration in ticks of the item cooldown.
|
|
14938
|
+
* Bounds: [0, 32767]
|
|
14950
14939
|
* @throws This function can throw errors.
|
|
14951
14940
|
*/
|
|
14952
14941
|
startItemCooldown(cooldownCategory: string, tickDuration: number): void;
|
|
@@ -18104,6 +18093,7 @@ export class StructureManager {
|
|
|
18104
18093
|
* templates.
|
|
18105
18094
|
* @param maxDepth
|
|
18106
18095
|
* The maximum recursion depth for the jigsaw structure.
|
|
18096
|
+
* Bounds: [1, 20]
|
|
18107
18097
|
* @param dimension
|
|
18108
18098
|
* The dimension to place the jigsaw structure in.
|
|
18109
18099
|
* @param location
|
|
@@ -19364,14 +19354,6 @@ export class WorldAfterEvents {
|
|
|
19364
19354
|
*
|
|
19365
19355
|
*/
|
|
19366
19356
|
readonly entityHitEntity: EntityHitEntityAfterEventSignal;
|
|
19367
|
-
/**
|
|
19368
|
-
* @remarks
|
|
19369
|
-
* This event fires when an entity is hurt (takes damage).
|
|
19370
|
-
*
|
|
19371
|
-
* This property can be read in early-execution mode.
|
|
19372
|
-
*
|
|
19373
|
-
*/
|
|
19374
|
-
readonly entityHurt: EntityHurtAfterEventSignal;
|
|
19375
19357
|
/**
|
|
19376
19358
|
* @remarks
|
|
19377
19359
|
* Fires when an entity is loaded.
|
|
@@ -21160,6 +21142,7 @@ export interface HotbarEventOptions {
|
|
|
21160
21142
|
* The slot indexes to consider. Values should be between 0 and
|
|
21161
21143
|
* 8, inclusive. If not specified, all slots are considered.
|
|
21162
21144
|
*
|
|
21145
|
+
* Bounds: [0, 8]
|
|
21163
21146
|
*/
|
|
21164
21147
|
allowedSlots?: number[];
|
|
21165
21148
|
}
|
|
@@ -21197,6 +21180,7 @@ export interface InventoryItemEventOptions {
|
|
|
21197
21180
|
* The slot indexes to consider. Values should be positive
|
|
21198
21181
|
* numbers. If not specified, all slots are considered.
|
|
21199
21182
|
*
|
|
21183
|
+
* Bounds: [0, 1000]
|
|
21200
21184
|
*/
|
|
21201
21185
|
allowedSlots?: number[];
|
|
21202
21186
|
/**
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@minecraft/server",
|
|
3
|
-
"version": "2.5.0-rc.1.26.
|
|
3
|
+
"version": "2.5.0-rc.1.26.10-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.26.
|
|
17
|
+
"@minecraft/vanilla-data": ">=1.20.70 || 1.26.10-preview.20"
|
|
18
18
|
},
|
|
19
19
|
"license": "MIT"
|
|
20
20
|
}
|