@minecraft/server 2.0.0-rc.1.21.90-preview.28 → 2.0.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/README.md +0 -2
- package/index.d.ts +0 -63
- package/package.json +1 -1
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.
|
|
@@ -1181,7 +1180,6 @@ export enum FluidType {
|
|
|
1181
1180
|
*/
|
|
1182
1181
|
export enum GameMode {
|
|
1183
1182
|
/**
|
|
1184
|
-
* @rc
|
|
1185
1183
|
* @remarks
|
|
1186
1184
|
* World is in a more locked-down experience, where blocks may
|
|
1187
1185
|
* not be manipulated.
|
|
@@ -1189,7 +1187,6 @@ export enum GameMode {
|
|
|
1189
1187
|
*/
|
|
1190
1188
|
Adventure = 'Adventure',
|
|
1191
1189
|
/**
|
|
1192
|
-
* @rc
|
|
1193
1190
|
* @remarks
|
|
1194
1191
|
* World is in a full creative mode. In creative mode, the
|
|
1195
1192
|
* player has all the resources available in the item selection
|
|
@@ -1202,7 +1199,6 @@ export enum GameMode {
|
|
|
1202
1199
|
*/
|
|
1203
1200
|
Creative = 'Creative',
|
|
1204
1201
|
/**
|
|
1205
|
-
* @rc
|
|
1206
1202
|
* @remarks
|
|
1207
1203
|
* World is in spectator mode. In spectator mode, spectators
|
|
1208
1204
|
* are always flying and cannot become grounded. Spectators can
|
|
@@ -1215,7 +1211,6 @@ export enum GameMode {
|
|
|
1215
1211
|
*/
|
|
1216
1212
|
Spectator = 'Spectator',
|
|
1217
1213
|
/**
|
|
1218
|
-
* @rc
|
|
1219
1214
|
* @remarks
|
|
1220
1215
|
* World is in a survival mode, where players can take damage
|
|
1221
1216
|
* and entities may not be peaceful. Survival mode is where the
|
|
@@ -1484,7 +1479,6 @@ export enum GameRule {
|
|
|
1484
1479
|
}
|
|
1485
1480
|
|
|
1486
1481
|
/**
|
|
1487
|
-
* @rc
|
|
1488
1482
|
* Describes the graphics mode of a client. Used by {@link
|
|
1489
1483
|
* Player.graphicsMode}
|
|
1490
1484
|
*/
|
|
@@ -2274,7 +2268,6 @@ export enum TimeOfDay {
|
|
|
2274
2268
|
}
|
|
2275
2269
|
|
|
2276
2270
|
/**
|
|
2277
|
-
* @rc
|
|
2278
2271
|
* Tint logic applied to a block or part of a block. The color
|
|
2279
2272
|
* may vary when a world position is part of the context, as
|
|
2280
2273
|
* biomes often have an influence on the resulting tint.
|
|
@@ -2573,7 +2566,6 @@ export class Block {
|
|
|
2573
2566
|
*/
|
|
2574
2567
|
readonly isLiquid: boolean;
|
|
2575
2568
|
/**
|
|
2576
|
-
* @rc
|
|
2577
2569
|
* @remarks
|
|
2578
2570
|
* Returns true if this reference to a block is still valid
|
|
2579
2571
|
* (for example, if the block is unloaded, references to that
|
|
@@ -3096,7 +3088,6 @@ export class BlockComponentOnPlaceEvent extends BlockEvent {
|
|
|
3096
3088
|
}
|
|
3097
3089
|
|
|
3098
3090
|
/**
|
|
3099
|
-
* @rc
|
|
3100
3091
|
* Contains information regarding a specific block being broken
|
|
3101
3092
|
* by a player.
|
|
3102
3093
|
*/
|
|
@@ -3254,7 +3245,6 @@ export class BlockComponentTickEvent extends BlockEvent {
|
|
|
3254
3245
|
}
|
|
3255
3246
|
|
|
3256
3247
|
/**
|
|
3257
|
-
* @rc
|
|
3258
3248
|
* An instance of a custom component on a block.
|
|
3259
3249
|
*/
|
|
3260
3250
|
// @ts-ignore Class inheritance allowed for native defined classes
|
|
@@ -3481,7 +3471,6 @@ export class BlockLocationIterator implements Iterable<Vector3> {
|
|
|
3481
3471
|
}
|
|
3482
3472
|
|
|
3483
3473
|
/**
|
|
3484
|
-
* @rc
|
|
3485
3474
|
* Represents the color of a block when displayed on a map.
|
|
3486
3475
|
*/
|
|
3487
3476
|
// @ts-ignore Class inheritance allowed for native defined classes
|
|
@@ -4378,7 +4367,6 @@ export class ButtonPushAfterEvent extends BlockEvent {
|
|
|
4378
4367
|
export class ButtonPushAfterEventSignal {
|
|
4379
4368
|
private constructor();
|
|
4380
4369
|
/**
|
|
4381
|
-
* @rc
|
|
4382
4370
|
* @remarks
|
|
4383
4371
|
* Adds a callback that will be called when a button is pushed.
|
|
4384
4372
|
*
|
|
@@ -4389,7 +4377,6 @@ export class ButtonPushAfterEventSignal {
|
|
|
4389
4377
|
*/
|
|
4390
4378
|
subscribe(callback: (arg0: ButtonPushAfterEvent) => void): (arg0: ButtonPushAfterEvent) => void;
|
|
4391
4379
|
/**
|
|
4392
|
-
* @rc
|
|
4393
4380
|
* @remarks
|
|
4394
4381
|
* Removes a callback from being called when a button is
|
|
4395
4382
|
* pushed.
|
|
@@ -4409,7 +4396,6 @@ export class ButtonPushAfterEventSignal {
|
|
|
4409
4396
|
export class Camera {
|
|
4410
4397
|
private constructor();
|
|
4411
4398
|
/**
|
|
4412
|
-
* @rc
|
|
4413
4399
|
* @remarks
|
|
4414
4400
|
* Returns whether the Camera is valid to access and use. A
|
|
4415
4401
|
* Camera is considered valid when the owning Player of the
|
|
@@ -4464,7 +4450,6 @@ export class Camera {
|
|
|
4464
4450
|
| CameraTargetOptions,
|
|
4465
4451
|
): void;
|
|
4466
4452
|
/**
|
|
4467
|
-
* @rc
|
|
4468
4453
|
* @remarks
|
|
4469
4454
|
* Sets the current active camera for the specified player and
|
|
4470
4455
|
* resets the position and rotation to the values defined in
|
|
@@ -4523,7 +4508,6 @@ export class CommandResult {
|
|
|
4523
4508
|
export class Component {
|
|
4524
4509
|
private constructor();
|
|
4525
4510
|
/**
|
|
4526
|
-
* @rc
|
|
4527
4511
|
* @remarks
|
|
4528
4512
|
* Returns whether the component is valid. A component is
|
|
4529
4513
|
* considered valid if its owner is valid, in addition to any
|
|
@@ -4631,7 +4615,6 @@ export class Container {
|
|
|
4631
4615
|
*/
|
|
4632
4616
|
readonly emptySlotsCount: number;
|
|
4633
4617
|
/**
|
|
4634
|
-
* @rc
|
|
4635
4618
|
* @remarks
|
|
4636
4619
|
* Returns whether a container object (or the entity or block
|
|
4637
4620
|
* that this container is associated with) is still available
|
|
@@ -4907,7 +4890,6 @@ export class ContainerSlot {
|
|
|
4907
4890
|
*/
|
|
4908
4891
|
readonly isStackable: boolean;
|
|
4909
4892
|
/**
|
|
4910
|
-
* @rc
|
|
4911
4893
|
* @remarks
|
|
4912
4894
|
* Returns whether the ContainerSlot is valid. The container
|
|
4913
4895
|
* slot is valid if the container exists and is loaded, and the
|
|
@@ -5235,7 +5217,6 @@ export class ContainerSlot {
|
|
|
5235
5217
|
}
|
|
5236
5218
|
|
|
5237
5219
|
/**
|
|
5238
|
-
* @rc
|
|
5239
5220
|
* Contains the custom component's JSON parameters
|
|
5240
5221
|
*/
|
|
5241
5222
|
export class CustomComponentParameters {
|
|
@@ -5471,7 +5452,6 @@ export class Dimension {
|
|
|
5471
5452
|
*/
|
|
5472
5453
|
getBlock(location: Vector3): Block | undefined;
|
|
5473
5454
|
/**
|
|
5474
|
-
* @rc
|
|
5475
5455
|
* @remarks
|
|
5476
5456
|
* Gets the first block found above a given block location
|
|
5477
5457
|
* based on the given options (by default will find the first
|
|
@@ -5487,7 +5467,6 @@ export class Dimension {
|
|
|
5487
5467
|
*/
|
|
5488
5468
|
getBlockAbove(location: Vector3, options?: BlockRaycastOptions): Block | undefined;
|
|
5489
5469
|
/**
|
|
5490
|
-
* @rc
|
|
5491
5470
|
* @remarks
|
|
5492
5471
|
* Gets the first block found below a given block location
|
|
5493
5472
|
* based on the given options (by default will find the first
|
|
@@ -6064,7 +6043,6 @@ export class Effect {
|
|
|
6064
6043
|
*/
|
|
6065
6044
|
readonly duration: number;
|
|
6066
6045
|
/**
|
|
6067
|
-
* @rc
|
|
6068
6046
|
* @remarks
|
|
6069
6047
|
* Returns whether an effect instance is available for use in
|
|
6070
6048
|
* this context.
|
|
@@ -6382,7 +6360,6 @@ export class Entity {
|
|
|
6382
6360
|
*/
|
|
6383
6361
|
readonly isSwimming: boolean;
|
|
6384
6362
|
/**
|
|
6385
|
-
* @rc
|
|
6386
6363
|
* @remarks
|
|
6387
6364
|
* Returns whether the entity can be manipulated by script. A
|
|
6388
6365
|
* Player is considered valid when it's EntityLifetimeState is
|
|
@@ -6956,7 +6933,6 @@ export class Entity {
|
|
|
6956
6933
|
*/
|
|
6957
6934
|
kill(): boolean;
|
|
6958
6935
|
/**
|
|
6959
|
-
* @rc
|
|
6960
6936
|
* @remarks
|
|
6961
6937
|
* Sets the rotation of the entity to face a target location.
|
|
6962
6938
|
* Both pitch and yaw will be set, if applicable, such as for
|
|
@@ -10655,7 +10631,6 @@ export class ItemCooldownComponent extends ItemComponent {
|
|
|
10655
10631
|
}
|
|
10656
10632
|
|
|
10657
10633
|
/**
|
|
10658
|
-
* @rc
|
|
10659
10634
|
* An instance of a custom component on an item.
|
|
10660
10635
|
*/
|
|
10661
10636
|
// @ts-ignore Class inheritance allowed for native defined classes
|
|
@@ -11976,7 +11951,6 @@ export class LeverActionAfterEvent extends BlockEvent {
|
|
|
11976
11951
|
export class LeverActionAfterEventSignal {
|
|
11977
11952
|
private constructor();
|
|
11978
11953
|
/**
|
|
11979
|
-
* @rc
|
|
11980
11954
|
* @remarks
|
|
11981
11955
|
* Adds a callback that will be called when a lever is moved
|
|
11982
11956
|
* (activates or deactivates).
|
|
@@ -11988,7 +11962,6 @@ export class LeverActionAfterEventSignal {
|
|
|
11988
11962
|
*/
|
|
11989
11963
|
subscribe(callback: (arg0: LeverActionAfterEvent) => void): (arg0: LeverActionAfterEvent) => void;
|
|
11990
11964
|
/**
|
|
11991
|
-
* @rc
|
|
11992
11965
|
* @remarks
|
|
11993
11966
|
* Removes a callback from being called when a lever is moved
|
|
11994
11967
|
* (activates or deactivates).
|
|
@@ -12248,7 +12221,6 @@ export class Player extends Entity {
|
|
|
12248
12221
|
*/
|
|
12249
12222
|
readonly clientSystemInfo: ClientSystemInfo;
|
|
12250
12223
|
/**
|
|
12251
|
-
* @rc
|
|
12252
12224
|
* @remarks
|
|
12253
12225
|
* Gets the current graphics mode of the player's client. This
|
|
12254
12226
|
* can be changed in the Video section of the settings menu
|
|
@@ -13640,7 +13612,6 @@ export class PlayerJoinAfterEvent {
|
|
|
13640
13612
|
export class PlayerJoinAfterEventSignal {
|
|
13641
13613
|
private constructor();
|
|
13642
13614
|
/**
|
|
13643
|
-
* @rc
|
|
13644
13615
|
* @remarks
|
|
13645
13616
|
* Adds a callback that will be called when a player joins the
|
|
13646
13617
|
* world.
|
|
@@ -13652,7 +13623,6 @@ export class PlayerJoinAfterEventSignal {
|
|
|
13652
13623
|
*/
|
|
13653
13624
|
subscribe(callback: (arg0: PlayerJoinAfterEvent) => void): (arg0: PlayerJoinAfterEvent) => void;
|
|
13654
13625
|
/**
|
|
13655
|
-
* @rc
|
|
13656
13626
|
* @remarks
|
|
13657
13627
|
* Removes a callback from being called when a player joins the
|
|
13658
13628
|
* world.
|
|
@@ -13693,7 +13663,6 @@ export class PlayerLeaveAfterEvent {
|
|
|
13693
13663
|
export class PlayerLeaveAfterEventSignal {
|
|
13694
13664
|
private constructor();
|
|
13695
13665
|
/**
|
|
13696
|
-
* @rc
|
|
13697
13666
|
* @remarks
|
|
13698
13667
|
* Adds a callback that will be called when a player leaves the
|
|
13699
13668
|
* world.
|
|
@@ -13705,7 +13674,6 @@ export class PlayerLeaveAfterEventSignal {
|
|
|
13705
13674
|
*/
|
|
13706
13675
|
subscribe(callback: (arg0: PlayerLeaveAfterEvent) => void): (arg0: PlayerLeaveAfterEvent) => void;
|
|
13707
13676
|
/**
|
|
13708
|
-
* @rc
|
|
13709
13677
|
* @remarks
|
|
13710
13678
|
* Removes a callback from being called when a player leaves
|
|
13711
13679
|
* the world.
|
|
@@ -13842,7 +13810,6 @@ export class PlayerSpawnAfterEvent {
|
|
|
13842
13810
|
export class PlayerSpawnAfterEventSignal {
|
|
13843
13811
|
private constructor();
|
|
13844
13812
|
/**
|
|
13845
|
-
* @rc
|
|
13846
13813
|
* @remarks
|
|
13847
13814
|
* Registers a new event receiver for this particular type of
|
|
13848
13815
|
* event.
|
|
@@ -13854,7 +13821,6 @@ export class PlayerSpawnAfterEventSignal {
|
|
|
13854
13821
|
*/
|
|
13855
13822
|
subscribe(callback: (arg0: PlayerSpawnAfterEvent) => void): (arg0: PlayerSpawnAfterEvent) => void;
|
|
13856
13823
|
/**
|
|
13857
|
-
* @rc
|
|
13858
13824
|
* @remarks
|
|
13859
13825
|
* De-registers an event receiver for the player spawn event.
|
|
13860
13826
|
*
|
|
@@ -14305,7 +14271,6 @@ export class ScoreboardIdentity {
|
|
|
14305
14271
|
*/
|
|
14306
14272
|
readonly id: number;
|
|
14307
14273
|
/**
|
|
14308
|
-
* @rc
|
|
14309
14274
|
* @remarks
|
|
14310
14275
|
* Returns true if the ScoreboardIdentity reference is still
|
|
14311
14276
|
* valid.
|
|
@@ -14349,7 +14314,6 @@ export class ScoreboardObjective {
|
|
|
14349
14314
|
*/
|
|
14350
14315
|
readonly id: string;
|
|
14351
14316
|
/**
|
|
14352
|
-
* @rc
|
|
14353
14317
|
* @remarks
|
|
14354
14318
|
* Returns true if the ScoreboardObjective reference is still
|
|
14355
14319
|
* valid.
|
|
@@ -14508,7 +14472,6 @@ export class ScoreboardScoreInfo {
|
|
|
14508
14472
|
export class ScreenDisplay {
|
|
14509
14473
|
private constructor();
|
|
14510
14474
|
/**
|
|
14511
|
-
* @rc
|
|
14512
14475
|
* @remarks
|
|
14513
14476
|
* Returns true if the current reference to this screen display
|
|
14514
14477
|
* manager object is valid and functional.
|
|
@@ -14543,7 +14506,6 @@ export class ScreenDisplay {
|
|
|
14543
14506
|
*/
|
|
14544
14507
|
isForcedHidden(hudElement: HudElement): boolean;
|
|
14545
14508
|
/**
|
|
14546
|
-
* @rc
|
|
14547
14509
|
* @remarks
|
|
14548
14510
|
* This function can't be called in read-only mode.
|
|
14549
14511
|
*
|
|
@@ -14821,7 +14783,6 @@ export class Seat {
|
|
|
14821
14783
|
}
|
|
14822
14784
|
|
|
14823
14785
|
/**
|
|
14824
|
-
* @rc
|
|
14825
14786
|
* Provides an adaptable interface for callers to subscribe to
|
|
14826
14787
|
* an event that fires before the game world shuts down. This
|
|
14827
14788
|
* event occurs after players have left, but before the world
|
|
@@ -14858,7 +14819,6 @@ export class ShutdownBeforeEventSignal {
|
|
|
14858
14819
|
}
|
|
14859
14820
|
|
|
14860
14821
|
/**
|
|
14861
|
-
* @rc
|
|
14862
14822
|
* The event object that gets dispatched when the game world is
|
|
14863
14823
|
* shutting down.
|
|
14864
14824
|
*/
|
|
@@ -14866,9 +14826,6 @@ export class ShutdownEvent {
|
|
|
14866
14826
|
private constructor();
|
|
14867
14827
|
}
|
|
14868
14828
|
|
|
14869
|
-
/**
|
|
14870
|
-
* @rc
|
|
14871
|
-
*/
|
|
14872
14829
|
export class StartupBeforeEventSignal {
|
|
14873
14830
|
private constructor();
|
|
14874
14831
|
/**
|
|
@@ -14889,9 +14846,6 @@ export class StartupBeforeEventSignal {
|
|
|
14889
14846
|
unsubscribe(callback: (arg0: StartupEvent) => void): void;
|
|
14890
14847
|
}
|
|
14891
14848
|
|
|
14892
|
-
/**
|
|
14893
|
-
* @rc
|
|
14894
|
-
*/
|
|
14895
14849
|
export class StartupEvent {
|
|
14896
14850
|
private constructor();
|
|
14897
14851
|
/**
|
|
@@ -14925,7 +14879,6 @@ export class Structure {
|
|
|
14925
14879
|
*/
|
|
14926
14880
|
readonly id: string;
|
|
14927
14881
|
/**
|
|
14928
|
-
* @rc
|
|
14929
14882
|
* @remarks
|
|
14930
14883
|
* Returns whether the Structure is valid. The Structure may
|
|
14931
14884
|
* become invalid if it is deleted.
|
|
@@ -15285,7 +15238,6 @@ export class System {
|
|
|
15285
15238
|
*/
|
|
15286
15239
|
readonly afterEvents: SystemAfterEvents;
|
|
15287
15240
|
/**
|
|
15288
|
-
* @rc
|
|
15289
15241
|
* @remarks
|
|
15290
15242
|
* Returns a collection of before-events for system-level
|
|
15291
15243
|
* operations.
|
|
@@ -15303,7 +15255,6 @@ export class System {
|
|
|
15303
15255
|
*/
|
|
15304
15256
|
readonly currentTick: number;
|
|
15305
15257
|
/**
|
|
15306
|
-
* @rc
|
|
15307
15258
|
* @remarks
|
|
15308
15259
|
* Returns true if this is a world where the editor is
|
|
15309
15260
|
* currently loaded, returns false otherwise.
|
|
@@ -15523,7 +15474,6 @@ export class SystemAfterEvents {
|
|
|
15523
15474
|
}
|
|
15524
15475
|
|
|
15525
15476
|
/**
|
|
15526
|
-
* @rc
|
|
15527
15477
|
* A set of events that fire before an actual action occurs. In
|
|
15528
15478
|
* most cases, you can potentially cancel or modify the
|
|
15529
15479
|
* impending event. Note that in before events any APIs that
|
|
@@ -16721,7 +16671,6 @@ export class WorldAfterEvents {
|
|
|
16721
16671
|
*/
|
|
16722
16672
|
readonly weatherChange: WeatherChangeAfterEventSignal;
|
|
16723
16673
|
/**
|
|
16724
|
-
* @rc
|
|
16725
16674
|
* @remarks
|
|
16726
16675
|
* This property can be read in early-execution mode.
|
|
16727
16676
|
*
|
|
@@ -16819,16 +16768,10 @@ export class WorldBeforeEvents {
|
|
|
16819
16768
|
readonly weatherChange: WeatherChangeBeforeEventSignal;
|
|
16820
16769
|
}
|
|
16821
16770
|
|
|
16822
|
-
/**
|
|
16823
|
-
* @rc
|
|
16824
|
-
*/
|
|
16825
16771
|
export class WorldLoadAfterEvent {
|
|
16826
16772
|
private constructor();
|
|
16827
16773
|
}
|
|
16828
16774
|
|
|
16829
|
-
/**
|
|
16830
|
-
* @rc
|
|
16831
|
-
*/
|
|
16832
16775
|
export class WorldLoadAfterEventSignal {
|
|
16833
16776
|
private constructor();
|
|
16834
16777
|
/**
|
|
@@ -16908,9 +16851,6 @@ export interface BlockCustomComponent {
|
|
|
16908
16851
|
*
|
|
16909
16852
|
*/
|
|
16910
16853
|
onPlace?: (arg0: BlockComponentOnPlaceEvent, arg1: CustomComponentParameters) => void;
|
|
16911
|
-
/**
|
|
16912
|
-
* @rc
|
|
16913
|
-
*/
|
|
16914
16854
|
onPlayerBreak?: (arg0: BlockComponentPlayerBreakEvent, arg1: CustomComponentParameters) => void;
|
|
16915
16855
|
/**
|
|
16916
16856
|
* @remarks
|
|
@@ -17276,7 +17216,6 @@ export interface DimensionLocation {
|
|
|
17276
17216
|
}
|
|
17277
17217
|
|
|
17278
17218
|
/**
|
|
17279
|
-
* @rc
|
|
17280
17219
|
* Contains options associated with easing between positions
|
|
17281
17220
|
* and/or rotations.
|
|
17282
17221
|
*/
|
|
@@ -18537,7 +18476,6 @@ export interface ScriptEventMessageFilterOptions {
|
|
|
18537
18476
|
}
|
|
18538
18477
|
|
|
18539
18478
|
/**
|
|
18540
|
-
* @rc
|
|
18541
18479
|
* Contains additional options for spawning an Entity.
|
|
18542
18480
|
*/
|
|
18543
18481
|
export interface SpawnEntityOptions {
|
|
@@ -19045,7 +18983,6 @@ export const HudVisibilityCount = 2;
|
|
|
19045
18983
|
*/
|
|
19046
18984
|
export const MoonPhaseCount = 8;
|
|
19047
18985
|
/**
|
|
19048
|
-
* @rc
|
|
19049
18986
|
* @remarks
|
|
19050
18987
|
* How many times the server ticks in one in-game day.
|
|
19051
18988
|
*
|