@minecraft/server 1.17.0-rc.1.21.70-preview.22 → 1.17.0
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/.eslintrc.json +23 -0
- package/README.md +0 -2
- package/index.d.ts +61 -130
- package/package.json +1 -1
- package/tsconfig.json +20 -0
package/.eslintrc.json
ADDED
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
{
|
|
2
|
+
"env": {
|
|
3
|
+
"browser": true,
|
|
4
|
+
"es2021": true
|
|
5
|
+
},
|
|
6
|
+
"extends": [
|
|
7
|
+
"eslint:recommended",
|
|
8
|
+
"plugin:@typescript-eslint/recommended"
|
|
9
|
+
],
|
|
10
|
+
"overrides": [
|
|
11
|
+
],
|
|
12
|
+
"parser": "@typescript-eslint/parser",
|
|
13
|
+
"parserOptions": {
|
|
14
|
+
"ecmaVersion": "latest",
|
|
15
|
+
"sourceType": "module"
|
|
16
|
+
},
|
|
17
|
+
"plugins": [
|
|
18
|
+
"@typescript-eslint"
|
|
19
|
+
],
|
|
20
|
+
"rules": {
|
|
21
|
+
"@typescript-eslint/no-explicit-any": "off"
|
|
22
|
+
}
|
|
23
|
+
}
|
package/README.md
CHANGED
|
@@ -2,8 +2,6 @@
|
|
|
2
2
|
|
|
3
3
|
Contains many types related to manipulating a Minecraft world, including entities, blocks, dimensions, and more.
|
|
4
4
|
|
|
5
|
-
## **NOTE: This version of this module is still in pre-release. It may change or it may be removed in future releases.**
|
|
6
|
-
|
|
7
5
|
See full documentation for this module here:
|
|
8
6
|
|
|
9
7
|
https://learn.microsoft.com/en-us/minecraft/creator/scriptapi/minecraft/server/minecraft-server
|
package/index.d.ts
CHANGED
|
@@ -7,7 +7,6 @@
|
|
|
7
7
|
Copyright (c) Microsoft Corporation.
|
|
8
8
|
***************************************************************************** */
|
|
9
9
|
/**
|
|
10
|
-
* @preview
|
|
11
10
|
* @packageDocumentation
|
|
12
11
|
* Contains many types related to manipulating a Minecraft
|
|
13
12
|
* world, including entities, blocks, dimensions, and more.
|
|
@@ -993,8 +992,6 @@ export enum EntityDamageCause {
|
|
|
993
992
|
*/
|
|
994
993
|
suffocation = 'suffocation',
|
|
995
994
|
/**
|
|
996
|
-
* @deprecated This property is deprecated and will be removed in 2.0.0.
|
|
997
|
-
*
|
|
998
995
|
* @remarks
|
|
999
996
|
* Damage caused by an Entity killing itself. For example, from
|
|
1000
997
|
* the /kill command.
|
|
@@ -1491,7 +1488,6 @@ export enum HudVisibility {
|
|
|
1491
1488
|
}
|
|
1492
1489
|
|
|
1493
1490
|
/**
|
|
1494
|
-
* @rc
|
|
1495
1491
|
* Describes the type of input of a device.
|
|
1496
1492
|
*/
|
|
1497
1493
|
export enum InputMode {
|
|
@@ -1543,7 +1539,6 @@ export enum InputPermissionCategory {
|
|
|
1543
1539
|
*/
|
|
1544
1540
|
Movement = 2,
|
|
1545
1541
|
/**
|
|
1546
|
-
* @rc
|
|
1547
1542
|
* @remarks
|
|
1548
1543
|
* Player input for moving laterally in the world. This would
|
|
1549
1544
|
* be WASD on a keyboard or the movement joystick on gamepad or
|
|
@@ -1552,7 +1547,6 @@ export enum InputPermissionCategory {
|
|
|
1552
1547
|
*/
|
|
1553
1548
|
LateralMovement = 4,
|
|
1554
1549
|
/**
|
|
1555
|
-
* @rc
|
|
1556
1550
|
* @remarks
|
|
1557
1551
|
* Player input relating to sneak. This also affects flying
|
|
1558
1552
|
* down.
|
|
@@ -1560,7 +1554,6 @@ export enum InputPermissionCategory {
|
|
|
1560
1554
|
*/
|
|
1561
1555
|
Sneak = 5,
|
|
1562
1556
|
/**
|
|
1563
|
-
* @rc
|
|
1564
1557
|
* @remarks
|
|
1565
1558
|
* Player input relating to jumping. This also affects flying
|
|
1566
1559
|
* up.
|
|
@@ -1568,14 +1561,12 @@ export enum InputPermissionCategory {
|
|
|
1568
1561
|
*/
|
|
1569
1562
|
Jump = 6,
|
|
1570
1563
|
/**
|
|
1571
|
-
* @rc
|
|
1572
1564
|
* @remarks
|
|
1573
1565
|
* Player input relating to mounting vehicles.
|
|
1574
1566
|
*
|
|
1575
1567
|
*/
|
|
1576
1568
|
Mount = 7,
|
|
1577
1569
|
/**
|
|
1578
|
-
* @rc
|
|
1579
1570
|
* @remarks
|
|
1580
1571
|
* Player input relating to dismounting. When disabled, the
|
|
1581
1572
|
* player can still dismount vehicles by other means, for
|
|
@@ -1585,28 +1576,24 @@ export enum InputPermissionCategory {
|
|
|
1585
1576
|
*/
|
|
1586
1577
|
Dismount = 8,
|
|
1587
1578
|
/**
|
|
1588
|
-
* @rc
|
|
1589
1579
|
* @remarks
|
|
1590
1580
|
* Player input relating to moving the player forward.
|
|
1591
1581
|
*
|
|
1592
1582
|
*/
|
|
1593
1583
|
MoveForward = 9,
|
|
1594
1584
|
/**
|
|
1595
|
-
* @rc
|
|
1596
1585
|
* @remarks
|
|
1597
1586
|
* Player input relating to moving the player backward.
|
|
1598
1587
|
*
|
|
1599
1588
|
*/
|
|
1600
1589
|
MoveBackward = 10,
|
|
1601
1590
|
/**
|
|
1602
|
-
* @rc
|
|
1603
1591
|
* @remarks
|
|
1604
1592
|
* Player input relating to moving the player left.
|
|
1605
1593
|
*
|
|
1606
1594
|
*/
|
|
1607
1595
|
MoveLeft = 11,
|
|
1608
1596
|
/**
|
|
1609
|
-
* @rc
|
|
1610
1597
|
* @remarks
|
|
1611
1598
|
* Player input relating to moving the player right.
|
|
1612
1599
|
*
|
|
@@ -1619,9 +1606,6 @@ export enum InputPermissionCategory {
|
|
|
1619
1606
|
* function ItemStack.getComponent.
|
|
1620
1607
|
*/
|
|
1621
1608
|
export enum ItemComponentTypes {
|
|
1622
|
-
/**
|
|
1623
|
-
* @rc
|
|
1624
|
-
*/
|
|
1625
1609
|
Compostable = 'minecraft:compostable',
|
|
1626
1610
|
/**
|
|
1627
1611
|
* @remarks
|
|
@@ -2224,7 +2208,6 @@ export class Block {
|
|
|
2224
2208
|
*/
|
|
2225
2209
|
readonly isLiquid: boolean;
|
|
2226
2210
|
/**
|
|
2227
|
-
* @rc
|
|
2228
2211
|
* @remarks
|
|
2229
2212
|
* Returns or sets whether this block has water on it.
|
|
2230
2213
|
*
|
|
@@ -2455,8 +2438,6 @@ export class Block {
|
|
|
2455
2438
|
*/
|
|
2456
2439
|
hasTag(tag: string): boolean;
|
|
2457
2440
|
/**
|
|
2458
|
-
* @deprecated This function is deprecated and will be removed in 2.0.0.
|
|
2459
|
-
*
|
|
2460
2441
|
* @remarks
|
|
2461
2442
|
* Returns true if this reference to a block is still valid
|
|
2462
2443
|
* (for example, if the block is unloaded, references to that
|
|
@@ -2551,7 +2532,6 @@ export class Block {
|
|
|
2551
2532
|
*/
|
|
2552
2533
|
setType(blockType: BlockType | string): void;
|
|
2553
2534
|
/**
|
|
2554
|
-
* @rc
|
|
2555
2535
|
* @remarks
|
|
2556
2536
|
* Sets whether this block has a water logged state - for
|
|
2557
2537
|
* example, whether stairs are submerged within water.
|
|
@@ -2811,7 +2791,7 @@ export class BlockEvent {
|
|
|
2811
2791
|
private constructor();
|
|
2812
2792
|
/**
|
|
2813
2793
|
* @remarks
|
|
2814
|
-
* Block
|
|
2794
|
+
* Block impacted by this event.
|
|
2815
2795
|
*
|
|
2816
2796
|
*/
|
|
2817
2797
|
readonly block: Block;
|
|
@@ -3640,6 +3620,8 @@ export class BlockVolume extends BlockVolumeBase {
|
|
|
3640
3620
|
* A world block location that represents a corner in a 3D
|
|
3641
3621
|
* rectangle
|
|
3642
3622
|
*
|
|
3623
|
+
* This property can't be edited in read-only mode.
|
|
3624
|
+
*
|
|
3643
3625
|
*/
|
|
3644
3626
|
'from': Vector3;
|
|
3645
3627
|
/**
|
|
@@ -3647,6 +3629,8 @@ export class BlockVolume extends BlockVolumeBase {
|
|
|
3647
3629
|
* A world block location that represents the opposite corner
|
|
3648
3630
|
* in a 3D rectangle
|
|
3649
3631
|
*
|
|
3632
|
+
* This property can't be edited in read-only mode.
|
|
3633
|
+
*
|
|
3650
3634
|
*/
|
|
3651
3635
|
to: Vector3;
|
|
3652
3636
|
constructor(from: Vector3, to: Vector3);
|
|
@@ -3656,6 +3640,8 @@ export class BlockVolume extends BlockVolumeBase {
|
|
|
3656
3640
|
* the outer surface of a BlockVolume.
|
|
3657
3641
|
*
|
|
3658
3642
|
*
|
|
3643
|
+
* This function can't be called in read-only mode.
|
|
3644
|
+
*
|
|
3659
3645
|
* @param pos
|
|
3660
3646
|
* The world block location to test
|
|
3661
3647
|
* @returns
|
|
@@ -3670,6 +3656,8 @@ export class BlockVolume extends BlockVolumeBase {
|
|
|
3670
3656
|
* Check to see if a two block volumes are directly adjacent
|
|
3671
3657
|
* and two faces touch.
|
|
3672
3658
|
*
|
|
3659
|
+
* This function can't be called in read-only mode.
|
|
3660
|
+
*
|
|
3673
3661
|
* @param other
|
|
3674
3662
|
* The volume to test
|
|
3675
3663
|
* @returns
|
|
@@ -3682,6 +3670,8 @@ export class BlockVolume extends BlockVolumeBase {
|
|
|
3682
3670
|
* Return an enumeration which represents the intersection
|
|
3683
3671
|
* between two BlockVolume objects
|
|
3684
3672
|
*
|
|
3673
|
+
* This function can't be called in read-only mode.
|
|
3674
|
+
*
|
|
3685
3675
|
*/
|
|
3686
3676
|
intersects(other: BlockVolume): BlockVolumeIntersection;
|
|
3687
3677
|
}
|
|
@@ -3696,12 +3686,16 @@ export class BlockVolumeBase {
|
|
|
3696
3686
|
* Fetch a {@link BlockLocationIterator} that represents all of
|
|
3697
3687
|
* the block world locations within the specified volume
|
|
3698
3688
|
*
|
|
3689
|
+
* This function can't be called in read-only mode.
|
|
3690
|
+
*
|
|
3699
3691
|
*/
|
|
3700
3692
|
getBlockLocationIterator(): BlockLocationIterator;
|
|
3701
3693
|
/**
|
|
3702
3694
|
* @remarks
|
|
3703
3695
|
* Return the capacity (volume) of the BlockVolume (W*D*H)
|
|
3704
3696
|
*
|
|
3697
|
+
* This function can't be called in read-only mode.
|
|
3698
|
+
*
|
|
3705
3699
|
*/
|
|
3706
3700
|
getCapacity(): number;
|
|
3707
3701
|
/**
|
|
@@ -3709,6 +3703,8 @@ export class BlockVolumeBase {
|
|
|
3709
3703
|
* Get the largest corner position of the volume (guaranteed to
|
|
3710
3704
|
* be >= min)
|
|
3711
3705
|
*
|
|
3706
|
+
* This function can't be called in read-only mode.
|
|
3707
|
+
*
|
|
3712
3708
|
* @throws This function can throw errors.
|
|
3713
3709
|
*/
|
|
3714
3710
|
getMax(): Vector3;
|
|
@@ -3717,6 +3713,8 @@ export class BlockVolumeBase {
|
|
|
3717
3713
|
* Get the smallest corner position of the volume (guaranteed
|
|
3718
3714
|
* to be <= max)
|
|
3719
3715
|
*
|
|
3716
|
+
* This function can't be called in read-only mode.
|
|
3717
|
+
*
|
|
3720
3718
|
* @throws This function can throw errors.
|
|
3721
3719
|
*/
|
|
3722
3720
|
getMin(): Vector3;
|
|
@@ -3725,6 +3723,8 @@ export class BlockVolumeBase {
|
|
|
3725
3723
|
* Get a {@link Vector3} object where each component represents
|
|
3726
3724
|
* the number of blocks along that axis
|
|
3727
3725
|
*
|
|
3726
|
+
* This function can't be called in read-only mode.
|
|
3727
|
+
*
|
|
3728
3728
|
*/
|
|
3729
3729
|
getSpan(): Vector3;
|
|
3730
3730
|
/**
|
|
@@ -3732,12 +3732,16 @@ export class BlockVolumeBase {
|
|
|
3732
3732
|
* Check to see if a given world block location is inside a
|
|
3733
3733
|
* BlockVolume
|
|
3734
3734
|
*
|
|
3735
|
+
* This function can't be called in read-only mode.
|
|
3736
|
+
*
|
|
3735
3737
|
*/
|
|
3736
3738
|
isInside(location: Vector3): boolean;
|
|
3737
3739
|
/**
|
|
3738
3740
|
* @remarks
|
|
3739
3741
|
* Move a BlockVolume by a specified amount
|
|
3740
3742
|
*
|
|
3743
|
+
* This function can't be called in read-only mode.
|
|
3744
|
+
*
|
|
3741
3745
|
* @param delta
|
|
3742
3746
|
* Amount of blocks to move by
|
|
3743
3747
|
*/
|
|
@@ -3930,8 +3934,6 @@ export class Component {
|
|
|
3930
3934
|
*/
|
|
3931
3935
|
readonly typeId: string;
|
|
3932
3936
|
/**
|
|
3933
|
-
* @deprecated This function is deprecated and will be removed in 2.0.0.
|
|
3934
|
-
*
|
|
3935
3937
|
* @remarks
|
|
3936
3938
|
* Returns whether the component is valid. A component is
|
|
3937
3939
|
* considered valid if its owner is valid, in addition to any
|
|
@@ -4118,8 +4120,6 @@ export class Container {
|
|
|
4118
4120
|
*/
|
|
4119
4121
|
getSlot(slot: number): ContainerSlot;
|
|
4120
4122
|
/**
|
|
4121
|
-
* @deprecated This function is deprecated and will be removed in 2.0.0.
|
|
4122
|
-
*
|
|
4123
4123
|
* @remarks
|
|
4124
4124
|
* Returns whether a container object (or the entity or block
|
|
4125
4125
|
* that this container is associated with) is still available
|
|
@@ -4519,8 +4519,6 @@ export class ContainerSlot {
|
|
|
4519
4519
|
*/
|
|
4520
4520
|
isStackableWith(itemStack: ItemStack): boolean;
|
|
4521
4521
|
/**
|
|
4522
|
-
* @deprecated This function is deprecated and will be removed in 2.0.0.
|
|
4523
|
-
*
|
|
4524
4522
|
* @remarks
|
|
4525
4523
|
* Returns whether the ContainerSlot is valid. The container
|
|
4526
4524
|
* slot is valid if the container exists and is loaded, and the
|
|
@@ -5048,8 +5046,24 @@ export class Dimension {
|
|
|
5048
5046
|
*/
|
|
5049
5047
|
runCommand(commandString: string): CommandResult;
|
|
5050
5048
|
/**
|
|
5051
|
-
* @
|
|
5052
|
-
*
|
|
5049
|
+
* @remarks
|
|
5050
|
+
* Runs a particular command asynchronously from the context of
|
|
5051
|
+
* the broader dimension. Note that there is a maximum queue
|
|
5052
|
+
* of 128 asynchronous commands that can be run in a given
|
|
5053
|
+
* tick.
|
|
5054
|
+
*
|
|
5055
|
+
* @param commandString
|
|
5056
|
+
* Command to run. Note that command strings should not start
|
|
5057
|
+
* with slash.
|
|
5058
|
+
* @returns
|
|
5059
|
+
* For commands that return data, returns a CommandResult with
|
|
5060
|
+
* an indicator of command results.
|
|
5061
|
+
* @throws
|
|
5062
|
+
* Throws an exception if the command fails due to incorrect
|
|
5063
|
+
* parameters or command syntax, or in erroneous cases for the
|
|
5064
|
+
* command. Note that in many cases, if the command does not
|
|
5065
|
+
* operate (e.g., a target selector found no matches), this
|
|
5066
|
+
* method will not throw an exception.
|
|
5053
5067
|
*/
|
|
5054
5068
|
runCommandAsync(commandString: string): Promise<CommandResult>;
|
|
5055
5069
|
/**
|
|
@@ -5356,8 +5370,6 @@ export class Effect {
|
|
|
5356
5370
|
*/
|
|
5357
5371
|
readonly typeId: string;
|
|
5358
5372
|
/**
|
|
5359
|
-
* @deprecated This function is deprecated and will be removed in 2.0.0.
|
|
5360
|
-
*
|
|
5361
5373
|
* @remarks
|
|
5362
5374
|
* Returns whether an effect instance is available for use in
|
|
5363
5375
|
* this context.
|
|
@@ -6192,8 +6204,6 @@ export class Entity {
|
|
|
6192
6204
|
*/
|
|
6193
6205
|
hasTag(tag: string): boolean;
|
|
6194
6206
|
/**
|
|
6195
|
-
* @deprecated This function is deprecated and will be removed in 2.0.0.
|
|
6196
|
-
*
|
|
6197
6207
|
* @remarks
|
|
6198
6208
|
* Returns whether the entity can be manipulated by script. A
|
|
6199
6209
|
* Player is considered valid when it's EntityLifetimeState is
|
|
@@ -6349,7 +6359,17 @@ export class Entity {
|
|
|
6349
6359
|
*/
|
|
6350
6360
|
runCommand(commandString: string): CommandResult;
|
|
6351
6361
|
/**
|
|
6352
|
-
* @
|
|
6362
|
+
* @remarks
|
|
6363
|
+
* Runs a particular command asynchronously from the context of
|
|
6364
|
+
* this entity. Note that there is a maximum queue of 128
|
|
6365
|
+
* asynchronous commands that can be run in a given tick.
|
|
6366
|
+
*
|
|
6367
|
+
* @param commandString
|
|
6368
|
+
* Command to run. Note that command strings should not start
|
|
6369
|
+
* with slash.
|
|
6370
|
+
* @returns
|
|
6371
|
+
* For commands that return data, returns a JSON structure with
|
|
6372
|
+
* command response values.
|
|
6353
6373
|
* @throws This function can throw errors.
|
|
6354
6374
|
*/
|
|
6355
6375
|
runCommandAsync(commandString: string): Promise<CommandResult>;
|
|
@@ -7429,6 +7449,7 @@ export class EntityInventoryComponent extends EntityComponent {
|
|
|
7429
7449
|
* Defines the container for this entity. The container will be
|
|
7430
7450
|
* undefined if the entity has been removed.
|
|
7431
7451
|
*
|
|
7452
|
+
* @throws This property can throw when used.
|
|
7432
7453
|
*/
|
|
7433
7454
|
readonly container?: Container;
|
|
7434
7455
|
/**
|
|
@@ -9529,16 +9550,12 @@ export class GameRules {
|
|
|
9529
9550
|
}
|
|
9530
9551
|
|
|
9531
9552
|
/**
|
|
9532
|
-
* @deprecated This class is deprecated and will be removed in 2.0.0.
|
|
9533
|
-
*
|
|
9534
9553
|
* Provides an adaptable interface for callers to subscribe to
|
|
9535
9554
|
* an event that fires when a button is pushed.
|
|
9536
9555
|
*/
|
|
9537
9556
|
export class IButtonPushAfterEventSignal {
|
|
9538
9557
|
private constructor();
|
|
9539
9558
|
/**
|
|
9540
|
-
* @deprecated This function is deprecated and will be removed in 2.0.0.
|
|
9541
|
-
*
|
|
9542
9559
|
* @remarks
|
|
9543
9560
|
* Subscribes to the event.
|
|
9544
9561
|
*
|
|
@@ -9547,8 +9564,6 @@ export class IButtonPushAfterEventSignal {
|
|
|
9547
9564
|
*/
|
|
9548
9565
|
subscribe(callback: (arg0: ButtonPushAfterEvent) => void): (arg0: ButtonPushAfterEvent) => void;
|
|
9549
9566
|
/**
|
|
9550
|
-
* @deprecated This function is deprecated and will be removed in 2.0.0.
|
|
9551
|
-
*
|
|
9552
9567
|
* @remarks
|
|
9553
9568
|
* Unsubscribes from the event.
|
|
9554
9569
|
*
|
|
@@ -9559,16 +9574,12 @@ export class IButtonPushAfterEventSignal {
|
|
|
9559
9574
|
}
|
|
9560
9575
|
|
|
9561
9576
|
/**
|
|
9562
|
-
* @deprecated This class is deprecated and will be removed in 2.0.0.
|
|
9563
|
-
*
|
|
9564
9577
|
* Provides an adaptable interface for callers to subscribe to
|
|
9565
9578
|
* an event that fires after a lever is used.
|
|
9566
9579
|
*/
|
|
9567
9580
|
export class ILeverActionAfterEventSignal {
|
|
9568
9581
|
private constructor();
|
|
9569
9582
|
/**
|
|
9570
|
-
* @deprecated This function is deprecated and will be removed in 2.0.0.
|
|
9571
|
-
*
|
|
9572
9583
|
* @remarks
|
|
9573
9584
|
* Subscribes to the event.
|
|
9574
9585
|
*
|
|
@@ -9577,8 +9588,6 @@ export class ILeverActionAfterEventSignal {
|
|
|
9577
9588
|
*/
|
|
9578
9589
|
subscribe(callback: (arg0: LeverActionAfterEvent) => void): (arg0: LeverActionAfterEvent) => void;
|
|
9579
9590
|
/**
|
|
9580
|
-
* @deprecated This function is deprecated and will be removed in 2.0.0.
|
|
9581
|
-
*
|
|
9582
9591
|
* @remarks
|
|
9583
9592
|
* Unsubscribes from the event.
|
|
9584
9593
|
*
|
|
@@ -9589,7 +9598,6 @@ export class ILeverActionAfterEventSignal {
|
|
|
9589
9598
|
}
|
|
9590
9599
|
|
|
9591
9600
|
/**
|
|
9592
|
-
* @rc
|
|
9593
9601
|
* Contains the input information for a client instance.
|
|
9594
9602
|
*/
|
|
9595
9603
|
export class InputInfo {
|
|
@@ -9618,16 +9626,12 @@ export class InputInfo {
|
|
|
9618
9626
|
}
|
|
9619
9627
|
|
|
9620
9628
|
/**
|
|
9621
|
-
* @deprecated This class is deprecated and will be removed in 2.0.0.
|
|
9622
|
-
*
|
|
9623
9629
|
* Provides an adaptable interface for callers to subscribe to
|
|
9624
9630
|
* an event that fires after a player joins a world.
|
|
9625
9631
|
*/
|
|
9626
9632
|
export class IPlayerJoinAfterEventSignal {
|
|
9627
9633
|
private constructor();
|
|
9628
9634
|
/**
|
|
9629
|
-
* @deprecated This function is deprecated and will be removed in 2.0.0.
|
|
9630
|
-
*
|
|
9631
9635
|
* @remarks
|
|
9632
9636
|
* Subscribes to the event.
|
|
9633
9637
|
*
|
|
@@ -9636,8 +9640,6 @@ export class IPlayerJoinAfterEventSignal {
|
|
|
9636
9640
|
*/
|
|
9637
9641
|
subscribe(callback: (arg0: PlayerJoinAfterEvent) => void): (arg0: PlayerJoinAfterEvent) => void;
|
|
9638
9642
|
/**
|
|
9639
|
-
* @deprecated This function is deprecated and will be removed in 2.0.0.
|
|
9640
|
-
*
|
|
9641
9643
|
* @remarks
|
|
9642
9644
|
* Unsubscribes from the event.
|
|
9643
9645
|
*
|
|
@@ -9648,16 +9650,12 @@ export class IPlayerJoinAfterEventSignal {
|
|
|
9648
9650
|
}
|
|
9649
9651
|
|
|
9650
9652
|
/**
|
|
9651
|
-
* @deprecated This class is deprecated and will be removed in 2.0.0.
|
|
9652
|
-
*
|
|
9653
9653
|
* Provides an adaptable interface for callers to subscribe to
|
|
9654
9654
|
* an event that fires after a player leaves a world.
|
|
9655
9655
|
*/
|
|
9656
9656
|
export class IPlayerLeaveAfterEventSignal {
|
|
9657
9657
|
private constructor();
|
|
9658
9658
|
/**
|
|
9659
|
-
* @deprecated This function is deprecated and will be removed in 2.0.0.
|
|
9660
|
-
*
|
|
9661
9659
|
* @remarks
|
|
9662
9660
|
* Subscribes to the event.
|
|
9663
9661
|
*
|
|
@@ -9666,8 +9664,6 @@ export class IPlayerLeaveAfterEventSignal {
|
|
|
9666
9664
|
*/
|
|
9667
9665
|
subscribe(callback: (arg0: PlayerLeaveAfterEvent) => void): (arg0: PlayerLeaveAfterEvent) => void;
|
|
9668
9666
|
/**
|
|
9669
|
-
* @deprecated This function is deprecated and will be removed in 2.0.0.
|
|
9670
|
-
*
|
|
9671
9667
|
* @remarks
|
|
9672
9668
|
* Unsubscribes from the event.
|
|
9673
9669
|
*
|
|
@@ -9678,16 +9674,12 @@ export class IPlayerLeaveAfterEventSignal {
|
|
|
9678
9674
|
}
|
|
9679
9675
|
|
|
9680
9676
|
/**
|
|
9681
|
-
* @deprecated This class is deprecated and will be removed in 2.0.0.
|
|
9682
|
-
*
|
|
9683
9677
|
* Provides an adaptable interface for callers to subscribe to
|
|
9684
9678
|
* an event that fires after a player spawns.
|
|
9685
9679
|
*/
|
|
9686
9680
|
export class IPlayerSpawnAfterEventSignal {
|
|
9687
9681
|
private constructor();
|
|
9688
9682
|
/**
|
|
9689
|
-
* @deprecated This function is deprecated and will be removed in 2.0.0.
|
|
9690
|
-
*
|
|
9691
9683
|
* @remarks
|
|
9692
9684
|
* Subscribes to the event.
|
|
9693
9685
|
*
|
|
@@ -9696,8 +9688,6 @@ export class IPlayerSpawnAfterEventSignal {
|
|
|
9696
9688
|
*/
|
|
9697
9689
|
subscribe(callback: (arg0: PlayerSpawnAfterEvent) => void): (arg0: PlayerSpawnAfterEvent) => void;
|
|
9698
9690
|
/**
|
|
9699
|
-
* @deprecated This function is deprecated and will be removed in 2.0.0.
|
|
9700
|
-
*
|
|
9701
9691
|
* @remarks
|
|
9702
9692
|
* Unsubscribes from the event.
|
|
9703
9693
|
*
|
|
@@ -9996,7 +9986,6 @@ export class ItemComponentUseOnEvent extends ItemUseOnEvent {
|
|
|
9996
9986
|
}
|
|
9997
9987
|
|
|
9998
9988
|
/**
|
|
9999
|
-
* @rc
|
|
10000
9989
|
* When present, the item can be composted in the composter
|
|
10001
9990
|
* block if the composting chance is in the range [1 - 100].
|
|
10002
9991
|
*/
|
|
@@ -11530,6 +11519,8 @@ export class ListBlockVolume extends BlockVolumeBase {
|
|
|
11530
11519
|
* @remarks
|
|
11531
11520
|
* Insert block locations into container.
|
|
11532
11521
|
*
|
|
11522
|
+
* This function can't be called in read-only mode.
|
|
11523
|
+
*
|
|
11533
11524
|
* @param locations
|
|
11534
11525
|
* Array of block locations to be inserted into container.
|
|
11535
11526
|
*/
|
|
@@ -11538,6 +11529,8 @@ export class ListBlockVolume extends BlockVolumeBase {
|
|
|
11538
11529
|
* @remarks
|
|
11539
11530
|
* Remove block locations from container.
|
|
11540
11531
|
*
|
|
11532
|
+
* This function can't be called in read-only mode.
|
|
11533
|
+
*
|
|
11541
11534
|
* @param locations
|
|
11542
11535
|
* Array of block locations to be removed from container.
|
|
11543
11536
|
*/
|
|
@@ -11545,21 +11538,11 @@ export class ListBlockVolume extends BlockVolumeBase {
|
|
|
11545
11538
|
}
|
|
11546
11539
|
|
|
11547
11540
|
/**
|
|
11548
|
-
* @deprecated This class is deprecated and will be removed in 2.0.0.
|
|
11549
|
-
*
|
|
11550
|
-
* Use {@link @minecraft/vanilla-data.MinecraftDimensionTypes}
|
|
11551
|
-
* instead.
|
|
11552
|
-
*
|
|
11553
11541
|
* A collection of default Minecraft dimension types.
|
|
11554
11542
|
*/
|
|
11555
11543
|
export class MinecraftDimensionTypes {
|
|
11556
11544
|
private constructor();
|
|
11557
11545
|
/**
|
|
11558
|
-
* @deprecated This property is deprecated and will be removed in 2.0.0.
|
|
11559
|
-
*
|
|
11560
|
-
* Use {@link @minecraft/vanilla-data.MinecraftDimensionTypes}
|
|
11561
|
-
* instead.
|
|
11562
|
-
*
|
|
11563
11546
|
* @remarks
|
|
11564
11547
|
* The Nether is a collection of biomes separate from the
|
|
11565
11548
|
* Overworld, including Soul Sand Valleys and Crimson forests.
|
|
@@ -11569,11 +11552,6 @@ export class MinecraftDimensionTypes {
|
|
|
11569
11552
|
*/
|
|
11570
11553
|
static readonly nether = 'minecraft:nether';
|
|
11571
11554
|
/**
|
|
11572
|
-
* @deprecated This property is deprecated and will be removed in 2.0.0.
|
|
11573
|
-
*
|
|
11574
|
-
* Use {@link @minecraft/vanilla-data.MinecraftDimensionTypes}
|
|
11575
|
-
* instead.
|
|
11576
|
-
*
|
|
11577
11555
|
* @remarks
|
|
11578
11556
|
* The overworld is a collection of biomes, including forests,
|
|
11579
11557
|
* plains, jungles, mountains, deserts, taiga, and more. This
|
|
@@ -11583,11 +11561,6 @@ export class MinecraftDimensionTypes {
|
|
|
11583
11561
|
*/
|
|
11584
11562
|
static readonly overworld = 'minecraft:overworld';
|
|
11585
11563
|
/**
|
|
11586
|
-
* @deprecated This property is deprecated and will be removed in 2.0.0.
|
|
11587
|
-
*
|
|
11588
|
-
* Use {@link @minecraft/vanilla-data.MinecraftDimensionTypes}
|
|
11589
|
-
* instead.
|
|
11590
|
-
*
|
|
11591
11564
|
* @remarks
|
|
11592
11565
|
* The End is separate from the Overworld and the Nether and is
|
|
11593
11566
|
* generated whenever you create an End portal. Here, a giant
|
|
@@ -11820,7 +11793,6 @@ export class Player extends Entity {
|
|
|
11820
11793
|
*/
|
|
11821
11794
|
readonly clientSystemInfo: ClientSystemInfo;
|
|
11822
11795
|
/**
|
|
11823
|
-
* @rc
|
|
11824
11796
|
* @remarks
|
|
11825
11797
|
* Contains the player's input information.
|
|
11826
11798
|
*
|
|
@@ -12560,7 +12532,6 @@ export class PlayerGameModeChangeBeforeEventSignal {
|
|
|
12560
12532
|
}
|
|
12561
12533
|
|
|
12562
12534
|
/**
|
|
12563
|
-
* @rc
|
|
12564
12535
|
* Event data for when a player input mode changes.
|
|
12565
12536
|
*/
|
|
12566
12537
|
export class PlayerInputModeChangeAfterEvent {
|
|
@@ -12586,7 +12557,6 @@ export class PlayerInputModeChangeAfterEvent {
|
|
|
12586
12557
|
}
|
|
12587
12558
|
|
|
12588
12559
|
/**
|
|
12589
|
-
* @rc
|
|
12590
12560
|
* Manages callbacks that are connected to player input mode.
|
|
12591
12561
|
*/
|
|
12592
12562
|
export class PlayerInputModeChangeAfterEventSignal {
|
|
@@ -12681,8 +12651,6 @@ export class PlayerInputPermissionCategoryChangeAfterEventSignal {
|
|
|
12681
12651
|
export class PlayerInputPermissions {
|
|
12682
12652
|
private constructor();
|
|
12683
12653
|
/**
|
|
12684
|
-
* @deprecated This property is deprecated and will be removed in 2.0.0.
|
|
12685
|
-
*
|
|
12686
12654
|
* @remarks
|
|
12687
12655
|
* Camera input permissions for the player. If set to true,
|
|
12688
12656
|
* input relating to camera movement is enabled for the player.
|
|
@@ -12690,8 +12658,6 @@ export class PlayerInputPermissions {
|
|
|
12690
12658
|
*/
|
|
12691
12659
|
cameraEnabled: boolean;
|
|
12692
12660
|
/**
|
|
12693
|
-
* @deprecated This property is deprecated and will be removed in 2.0.0.
|
|
12694
|
-
*
|
|
12695
12661
|
* @remarks
|
|
12696
12662
|
* Movement input permissions for the player. If set to true
|
|
12697
12663
|
* input relating to movement is enabled for the player.
|
|
@@ -12699,7 +12665,6 @@ export class PlayerInputPermissions {
|
|
|
12699
12665
|
*/
|
|
12700
12666
|
movementEnabled: boolean;
|
|
12701
12667
|
/**
|
|
12702
|
-
* @rc
|
|
12703
12668
|
* @remarks
|
|
12704
12669
|
* Returns true if an input permission is enabled.
|
|
12705
12670
|
*
|
|
@@ -12711,7 +12676,6 @@ export class PlayerInputPermissions {
|
|
|
12711
12676
|
*/
|
|
12712
12677
|
isPermissionCategoryEnabled(permissionCategory: InputPermissionCategory): boolean;
|
|
12713
12678
|
/**
|
|
12714
|
-
* @rc
|
|
12715
12679
|
* @remarks
|
|
12716
12680
|
* Enable or disable an input permission. When enabled the
|
|
12717
12681
|
* input will work, when disabled will not work.
|
|
@@ -13667,8 +13631,6 @@ export class ScoreboardIdentity {
|
|
|
13667
13631
|
*/
|
|
13668
13632
|
getEntity(): Entity | undefined;
|
|
13669
13633
|
/**
|
|
13670
|
-
* @deprecated This function is deprecated and will be removed in 2.0.0.
|
|
13671
|
-
*
|
|
13672
13634
|
* @remarks
|
|
13673
13635
|
* Returns true if the ScoreboardIdentity reference is still
|
|
13674
13636
|
* valid.
|
|
@@ -13741,8 +13703,6 @@ export class ScoreboardObjective {
|
|
|
13741
13703
|
*/
|
|
13742
13704
|
hasParticipant(participant: Entity | ScoreboardIdentity | string): boolean;
|
|
13743
13705
|
/**
|
|
13744
|
-
* @deprecated This function is deprecated and will be removed in 2.0.0.
|
|
13745
|
-
*
|
|
13746
13706
|
* @remarks
|
|
13747
13707
|
* Returns true if the ScoreboardObjective reference is still
|
|
13748
13708
|
* valid.
|
|
@@ -13879,8 +13839,6 @@ export class ScreenDisplay {
|
|
|
13879
13839
|
*/
|
|
13880
13840
|
isForcedHidden(hudElement: HudElement): boolean;
|
|
13881
13841
|
/**
|
|
13882
|
-
* @deprecated This function is deprecated and will be removed in 2.0.0.
|
|
13883
|
-
*
|
|
13884
13842
|
* @remarks
|
|
13885
13843
|
* Returns true if the current reference to this screen display
|
|
13886
13844
|
* manager object is valid and functional.
|
|
@@ -14212,8 +14170,6 @@ export class Structure {
|
|
|
14212
14170
|
*/
|
|
14213
14171
|
getIsWaterlogged(location: Vector3): boolean;
|
|
14214
14172
|
/**
|
|
14215
|
-
* @deprecated This function is deprecated and will be removed in 2.0.0.
|
|
14216
|
-
*
|
|
14217
14173
|
* @remarks
|
|
14218
14174
|
* Returns whether the Structure is valid. The Structure may
|
|
14219
14175
|
* become invalid if it is deleted.
|
|
@@ -15251,8 +15207,6 @@ export class World {
|
|
|
15251
15207
|
*/
|
|
15252
15208
|
playMusic(trackId: string, musicOptions?: MusicOptions): void;
|
|
15253
15209
|
/**
|
|
15254
|
-
* @deprecated This function is deprecated and will be removed in 2.0.0.
|
|
15255
|
-
*
|
|
15256
15210
|
* @remarks
|
|
15257
15211
|
* Plays a sound for all players. DEPRECATED: Use
|
|
15258
15212
|
* Dimension.playSound.
|
|
@@ -15635,9 +15589,9 @@ export class WorldAfterEvents {
|
|
|
15635
15589
|
readonly playerEmote: PlayerEmoteAfterEventSignal;
|
|
15636
15590
|
readonly playerGameModeChange: PlayerGameModeChangeAfterEventSignal;
|
|
15637
15591
|
/**
|
|
15638
|
-
* @rc
|
|
15639
15592
|
* @remarks
|
|
15640
|
-
* This event fires when a player's {@link
|
|
15593
|
+
* This event fires when a player's {@link
|
|
15594
|
+
* @minecraft/Server.InputMode} changes.
|
|
15641
15595
|
*
|
|
15642
15596
|
*/
|
|
15643
15597
|
readonly playerInputModeChange: PlayerInputModeChangeAfterEventSignal;
|
|
@@ -15733,8 +15687,6 @@ export class WorldAfterEvents {
|
|
|
15733
15687
|
*/
|
|
15734
15688
|
readonly weatherChange: WeatherChangeAfterEventSignal;
|
|
15735
15689
|
/**
|
|
15736
|
-
* @deprecated This property is deprecated and will be removed in 2.0.0.
|
|
15737
|
-
*
|
|
15738
15690
|
* @remarks
|
|
15739
15691
|
* This event fires when the script environment is initialized
|
|
15740
15692
|
* on a World.
|
|
@@ -15813,8 +15765,6 @@ export class WorldBeforeEvents {
|
|
|
15813
15765
|
readonly playerLeave: PlayerLeaveBeforeEventSignal;
|
|
15814
15766
|
readonly weatherChange: WeatherChangeBeforeEventSignal;
|
|
15815
15767
|
/**
|
|
15816
|
-
* @deprecated This property is deprecated and will be removed in 2.0.0.
|
|
15817
|
-
*
|
|
15818
15768
|
* @remarks
|
|
15819
15769
|
* This event fires immediately when the script environment is
|
|
15820
15770
|
* initialized on a World. Not all script functionality may be
|
|
@@ -15826,8 +15776,6 @@ export class WorldBeforeEvents {
|
|
|
15826
15776
|
}
|
|
15827
15777
|
|
|
15828
15778
|
/**
|
|
15829
|
-
* @deprecated This class is deprecated and will be removed in 2.0.0.
|
|
15830
|
-
*
|
|
15831
15779
|
* Contains information and methods that can be used at the
|
|
15832
15780
|
* initialization of the scripting environment for a World.
|
|
15833
15781
|
*/
|
|
@@ -15836,8 +15784,6 @@ export class WorldInitializeAfterEvent {
|
|
|
15836
15784
|
}
|
|
15837
15785
|
|
|
15838
15786
|
/**
|
|
15839
|
-
* @deprecated This class is deprecated and will be removed in 2.0.0.
|
|
15840
|
-
*
|
|
15841
15787
|
* Manages callbacks that are run on the first tick of the
|
|
15842
15788
|
* World. Do note that this event may run multiple times within
|
|
15843
15789
|
* a session in the case that the /reload command is used.
|
|
@@ -15845,8 +15791,6 @@ export class WorldInitializeAfterEvent {
|
|
|
15845
15791
|
export class WorldInitializeAfterEventSignal {
|
|
15846
15792
|
private constructor();
|
|
15847
15793
|
/**
|
|
15848
|
-
* @deprecated This function is deprecated and will be removed in 2.0.0.
|
|
15849
|
-
*
|
|
15850
15794
|
* @remarks
|
|
15851
15795
|
* Adds a callback that will be called when the scripting
|
|
15852
15796
|
* environment is initialized for a World.
|
|
@@ -15858,8 +15802,6 @@ export class WorldInitializeAfterEventSignal {
|
|
|
15858
15802
|
*/
|
|
15859
15803
|
subscribe(callback: (arg0: WorldInitializeAfterEvent) => void): (arg0: WorldInitializeAfterEvent) => void;
|
|
15860
15804
|
/**
|
|
15861
|
-
* @deprecated This function is deprecated and will be removed in 2.0.0.
|
|
15862
|
-
*
|
|
15863
15805
|
* @remarks
|
|
15864
15806
|
* Removes a callback from being called the scripting
|
|
15865
15807
|
* environment is initialized for a World.
|
|
@@ -15873,8 +15815,6 @@ export class WorldInitializeAfterEventSignal {
|
|
|
15873
15815
|
}
|
|
15874
15816
|
|
|
15875
15817
|
/**
|
|
15876
|
-
* @deprecated This class is deprecated and will be removed in 2.0.0.
|
|
15877
|
-
*
|
|
15878
15818
|
* Contains information and methods that can be used at the
|
|
15879
15819
|
* initialization of the scripting environment for a World.
|
|
15880
15820
|
* Also, use the supplied blockRegistry object to register
|
|
@@ -15885,8 +15825,6 @@ export class WorldInitializeBeforeEvent {
|
|
|
15885
15825
|
private constructor();
|
|
15886
15826
|
readonly blockComponentRegistry: BlockComponentRegistry;
|
|
15887
15827
|
/**
|
|
15888
|
-
* @deprecated This property is deprecated and will be removed in 2.0.0.
|
|
15889
|
-
*
|
|
15890
15828
|
* @remarks
|
|
15891
15829
|
* Provides the functionality for registering custom components
|
|
15892
15830
|
* for items.
|
|
@@ -15896,8 +15834,6 @@ export class WorldInitializeBeforeEvent {
|
|
|
15896
15834
|
}
|
|
15897
15835
|
|
|
15898
15836
|
/**
|
|
15899
|
-
* @deprecated This class is deprecated and will be removed in 2.0.0.
|
|
15900
|
-
*
|
|
15901
15837
|
* Manages callbacks that are run at the initialization of the
|
|
15902
15838
|
* scripting environment for a World. Do note that this event
|
|
15903
15839
|
* may run multiple times within a session in the case that the
|
|
@@ -15906,8 +15842,6 @@ export class WorldInitializeBeforeEvent {
|
|
|
15906
15842
|
export class WorldInitializeBeforeEventSignal {
|
|
15907
15843
|
private constructor();
|
|
15908
15844
|
/**
|
|
15909
|
-
* @deprecated This function is deprecated and will be removed in 2.0.0.
|
|
15910
|
-
*
|
|
15911
15845
|
* @remarks
|
|
15912
15846
|
* Adds a callback that will be called when the scripting
|
|
15913
15847
|
* environment is initialized for a World.
|
|
@@ -15919,8 +15853,6 @@ export class WorldInitializeBeforeEventSignal {
|
|
|
15919
15853
|
*/
|
|
15920
15854
|
subscribe(callback: (arg0: WorldInitializeBeforeEvent) => void): (arg0: WorldInitializeBeforeEvent) => void;
|
|
15921
15855
|
/**
|
|
15922
|
-
* @deprecated This function is deprecated and will be removed in 2.0.0.
|
|
15923
|
-
*
|
|
15924
15856
|
* @remarks
|
|
15925
15857
|
* Removes a callback from being called the scripting
|
|
15926
15858
|
* environment is initialized for a World.
|
|
@@ -17845,7 +17777,6 @@ export class InvalidContainerSlotError extends Error {
|
|
|
17845
17777
|
}
|
|
17846
17778
|
|
|
17847
17779
|
/**
|
|
17848
|
-
* @rc
|
|
17849
17780
|
* The error called when an entity is invalid. This can occur
|
|
17850
17781
|
* when accessing components on a removed entity.
|
|
17851
17782
|
*/
|
package/package.json
CHANGED
package/tsconfig.json
ADDED
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
{
|
|
2
|
+
"compilerOptions": {
|
|
3
|
+
"module": "commonjs",
|
|
4
|
+
"lib": ["es6"],
|
|
5
|
+
"target": "es6",
|
|
6
|
+
"forceConsistentCasingInFileNames": true,
|
|
7
|
+
"noEmit": true,
|
|
8
|
+
"noImplicitAny": true,
|
|
9
|
+
"noImplicitThis": true,
|
|
10
|
+
"strictFunctionTypes": true,
|
|
11
|
+
"strictNullChecks": true,
|
|
12
|
+
"baseUrl": "../",
|
|
13
|
+
"typeRoots": ["../"],
|
|
14
|
+
"types": []
|
|
15
|
+
},
|
|
16
|
+
"files": [
|
|
17
|
+
"index.d.ts",
|
|
18
|
+
"tests.ts"
|
|
19
|
+
]
|
|
20
|
+
}
|