@minecraft/server 2.1.0-rc.1.21.110-preview.20 → 2.1.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 +11 -47
- package/package.json +5 -3
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.
|
|
@@ -123,7 +122,6 @@ export enum ButtonState {
|
|
|
123
122
|
}
|
|
124
123
|
|
|
125
124
|
/**
|
|
126
|
-
* @rc
|
|
127
125
|
* The required permission level to execute the custom command.
|
|
128
126
|
*/
|
|
129
127
|
export enum CommandPermissionLevel {
|
|
@@ -160,7 +158,6 @@ export enum CommandPermissionLevel {
|
|
|
160
158
|
}
|
|
161
159
|
|
|
162
160
|
/**
|
|
163
|
-
* @rc
|
|
164
161
|
* Reason why custom command registration failed.
|
|
165
162
|
*/
|
|
166
163
|
export enum CustomCommandErrorReason {
|
|
@@ -207,7 +204,6 @@ export enum CustomCommandErrorReason {
|
|
|
207
204
|
}
|
|
208
205
|
|
|
209
206
|
/**
|
|
210
|
-
* @rc
|
|
211
207
|
* The types of paramaters accepted by a custom command.
|
|
212
208
|
*/
|
|
213
209
|
export enum CustomCommandParamType {
|
|
@@ -281,7 +277,6 @@ export enum CustomCommandParamType {
|
|
|
281
277
|
}
|
|
282
278
|
|
|
283
279
|
/**
|
|
284
|
-
* @rc
|
|
285
280
|
* Who executed the command.
|
|
286
281
|
*/
|
|
287
282
|
export enum CustomCommandSource {
|
|
@@ -306,9 +301,6 @@ export enum CustomCommandSource {
|
|
|
306
301
|
Server = 'Server',
|
|
307
302
|
}
|
|
308
303
|
|
|
309
|
-
/**
|
|
310
|
-
* @rc
|
|
311
|
-
*/
|
|
312
304
|
export enum CustomCommandStatus {
|
|
313
305
|
Success = 0,
|
|
314
306
|
Failure = 1,
|
|
@@ -929,7 +921,6 @@ export enum EntityComponentTypes {
|
|
|
929
921
|
*/
|
|
930
922
|
OnFire = 'minecraft:onfire',
|
|
931
923
|
/**
|
|
932
|
-
* @rc
|
|
933
924
|
* @remarks
|
|
934
925
|
* Use this component to read the exhaustion of a player. This
|
|
935
926
|
* is only available on players.
|
|
@@ -937,7 +928,6 @@ export enum EntityComponentTypes {
|
|
|
937
928
|
*/
|
|
938
929
|
Exhaustion = 'minecraft:player.exhaustion',
|
|
939
930
|
/**
|
|
940
|
-
* @rc
|
|
941
931
|
* @remarks
|
|
942
932
|
* Use this component to read the hunger of a player. This is
|
|
943
933
|
* only available on players.
|
|
@@ -945,7 +935,6 @@ export enum EntityComponentTypes {
|
|
|
945
935
|
*/
|
|
946
936
|
Hunger = 'minecraft:player.hunger',
|
|
947
937
|
/**
|
|
948
|
-
* @rc
|
|
949
938
|
* @remarks
|
|
950
939
|
* Use this component to read the saturation of a player. This
|
|
951
940
|
* is only available on players.
|
|
@@ -2256,7 +2245,6 @@ export enum PlatformType {
|
|
|
2256
2245
|
}
|
|
2257
2246
|
|
|
2258
2247
|
/**
|
|
2259
|
-
* @rc
|
|
2260
2248
|
* Specifies the player inventory type.
|
|
2261
2249
|
*/
|
|
2262
2250
|
export enum PlayerInventoryType {
|
|
@@ -2275,7 +2263,6 @@ export enum PlayerInventoryType {
|
|
|
2275
2263
|
}
|
|
2276
2264
|
|
|
2277
2265
|
/**
|
|
2278
|
-
* @rc
|
|
2279
2266
|
* The player permission level.
|
|
2280
2267
|
*/
|
|
2281
2268
|
export enum PlayerPermissionLevel {
|
|
@@ -2872,7 +2859,6 @@ export class Block {
|
|
|
2872
2859
|
*/
|
|
2873
2860
|
readonly isWaterlogged: boolean;
|
|
2874
2861
|
/**
|
|
2875
|
-
* @rc
|
|
2876
2862
|
* @remarks
|
|
2877
2863
|
* Key for the localization of this block's name used in .lang
|
|
2878
2864
|
* files.
|
|
@@ -4982,7 +4968,6 @@ export class Container {
|
|
|
4982
4968
|
*/
|
|
4983
4969
|
clearAll(): void;
|
|
4984
4970
|
/**
|
|
4985
|
-
* @rc
|
|
4986
4971
|
* @remarks
|
|
4987
4972
|
* Attempts to find an item inside the container
|
|
4988
4973
|
*
|
|
@@ -4994,7 +4979,6 @@ export class Container {
|
|
|
4994
4979
|
*/
|
|
4995
4980
|
contains(itemStack: ItemStack): boolean;
|
|
4996
4981
|
/**
|
|
4997
|
-
* @rc
|
|
4998
4982
|
* @remarks
|
|
4999
4983
|
* Find the index of the first instance of an item inside the
|
|
5000
4984
|
* container
|
|
@@ -5007,7 +4991,6 @@ export class Container {
|
|
|
5007
4991
|
*/
|
|
5008
4992
|
find(itemStack: ItemStack): number | undefined;
|
|
5009
4993
|
/**
|
|
5010
|
-
* @rc
|
|
5011
4994
|
* @remarks
|
|
5012
4995
|
* Find the index of the last instance of an item inside the
|
|
5013
4996
|
* container
|
|
@@ -5020,7 +5003,6 @@ export class Container {
|
|
|
5020
5003
|
*/
|
|
5021
5004
|
findLast(itemStack: ItemStack): number | undefined;
|
|
5022
5005
|
/**
|
|
5023
|
-
* @rc
|
|
5024
5006
|
* @remarks
|
|
5025
5007
|
* Finds the index of the first empty slot inside the container
|
|
5026
5008
|
*
|
|
@@ -5030,7 +5012,6 @@ export class Container {
|
|
|
5030
5012
|
*/
|
|
5031
5013
|
firstEmptySlot(): number | undefined;
|
|
5032
5014
|
/**
|
|
5033
|
-
* @rc
|
|
5034
5015
|
* @remarks
|
|
5035
5016
|
* Finds the index of the first item inside the container
|
|
5036
5017
|
*
|
|
@@ -5597,7 +5578,6 @@ export class ContainerSlot {
|
|
|
5597
5578
|
}
|
|
5598
5579
|
|
|
5599
5580
|
/**
|
|
5600
|
-
* @rc
|
|
5601
5581
|
* Details about the origins of the command.
|
|
5602
5582
|
*/
|
|
5603
5583
|
export class CustomCommandOrigin {
|
|
@@ -5632,7 +5612,6 @@ export class CustomCommandOrigin {
|
|
|
5632
5612
|
}
|
|
5633
5613
|
|
|
5634
5614
|
/**
|
|
5635
|
-
* @rc
|
|
5636
5615
|
* Provides the functionality for registering custom commands.
|
|
5637
5616
|
*/
|
|
5638
5617
|
export class CustomCommandRegistry {
|
|
@@ -5775,7 +5754,6 @@ export class Dimension {
|
|
|
5775
5754
|
*/
|
|
5776
5755
|
readonly id: string;
|
|
5777
5756
|
/**
|
|
5778
|
-
* @rc
|
|
5779
5757
|
* @remarks
|
|
5780
5758
|
* Key for the localization of a dimension's name used by
|
|
5781
5759
|
* language files.
|
|
@@ -6877,7 +6855,6 @@ export class Entity {
|
|
|
6877
6855
|
*/
|
|
6878
6856
|
readonly isValid: boolean;
|
|
6879
6857
|
/**
|
|
6880
|
-
* @rc
|
|
6881
6858
|
* @remarks
|
|
6882
6859
|
* Key for the localization of this entity's name used in .lang
|
|
6883
6860
|
* files.
|
|
@@ -7083,7 +7060,8 @@ export class Entity {
|
|
|
7083
7060
|
/**
|
|
7084
7061
|
* @remarks
|
|
7085
7062
|
* Applies impulse vector to the current velocity of the
|
|
7086
|
-
* entity.
|
|
7063
|
+
* entity. Note that this method throws an error if called on
|
|
7064
|
+
* Players and will have no impact.
|
|
7087
7065
|
*
|
|
7088
7066
|
* This function can't be called in read-only mode.
|
|
7089
7067
|
*
|
|
@@ -7094,6 +7072,8 @@ export class Entity {
|
|
|
7094
7072
|
* {@link minecraftcommon.ArgumentOutOfBoundsError}
|
|
7095
7073
|
*
|
|
7096
7074
|
* {@link InvalidEntityError}
|
|
7075
|
+
*
|
|
7076
|
+
* {@link minecraftcommon.UnsupportedFunctionalityError}
|
|
7097
7077
|
* @example applyImpulse.ts
|
|
7098
7078
|
* ```typescript
|
|
7099
7079
|
* import { DimensionLocation } from "@minecraft/server";
|
|
@@ -7159,13 +7139,17 @@ export class Entity {
|
|
|
7159
7139
|
clearDynamicProperties(): void;
|
|
7160
7140
|
/**
|
|
7161
7141
|
* @remarks
|
|
7162
|
-
* Sets the current velocity of the Entity to zero.
|
|
7142
|
+
* Sets the current velocity of the Entity to zero. Note that
|
|
7143
|
+
* this method throws an error if called on Players and will
|
|
7144
|
+
* have no impact.
|
|
7163
7145
|
*
|
|
7164
7146
|
* This function can't be called in read-only mode.
|
|
7165
7147
|
*
|
|
7166
7148
|
* @throws This function can throw errors.
|
|
7167
7149
|
*
|
|
7168
7150
|
* {@link InvalidEntityError}
|
|
7151
|
+
*
|
|
7152
|
+
* {@link minecraftcommon.UnsupportedFunctionalityError}
|
|
7169
7153
|
* @example applyImpulse.ts
|
|
7170
7154
|
* ```typescript
|
|
7171
7155
|
* import { DimensionLocation } from "@minecraft/server";
|
|
@@ -8347,7 +8331,6 @@ export class EntityDieAfterEventSignal {
|
|
|
8347
8331
|
export class EntityEquippableComponent extends EntityComponent {
|
|
8348
8332
|
private constructor();
|
|
8349
8333
|
/**
|
|
8350
|
-
* @rc
|
|
8351
8334
|
* @remarks
|
|
8352
8335
|
* Returns the total Armor level of the owner.
|
|
8353
8336
|
*
|
|
@@ -8357,7 +8340,6 @@ export class EntityEquippableComponent extends EntityComponent {
|
|
|
8357
8340
|
*/
|
|
8358
8341
|
readonly totalArmor: number;
|
|
8359
8342
|
/**
|
|
8360
|
-
* @rc
|
|
8361
8343
|
* @remarks
|
|
8362
8344
|
* Returns the total Toughness level of the owner.
|
|
8363
8345
|
*
|
|
@@ -8408,7 +8390,6 @@ export class EntityEquippableComponent extends EntityComponent {
|
|
|
8408
8390
|
}
|
|
8409
8391
|
|
|
8410
8392
|
/**
|
|
8411
|
-
* @rc
|
|
8412
8393
|
* Defines the interactions with this entity for Exhaustion.
|
|
8413
8394
|
* Wraps the `minecraft.player.exhaustion` attribute.
|
|
8414
8395
|
*/
|
|
@@ -8706,7 +8687,6 @@ export class EntityHitEntityAfterEventSignal {
|
|
|
8706
8687
|
}
|
|
8707
8688
|
|
|
8708
8689
|
/**
|
|
8709
|
-
* @rc
|
|
8710
8690
|
* Defines the interactions with this entity for hunger. Wraps
|
|
8711
8691
|
* the `minecraft.player.hunger` attribute.
|
|
8712
8692
|
*/
|
|
@@ -10038,7 +10018,6 @@ export class EntityRidingComponent extends EntityComponent {
|
|
|
10038
10018
|
}
|
|
10039
10019
|
|
|
10040
10020
|
/**
|
|
10041
|
-
* @rc
|
|
10042
10021
|
* Defines the interactions with this entity for Saturation.
|
|
10043
10022
|
* Wraps the `minecraft.player.saturation` attribute.
|
|
10044
10023
|
*/
|
|
@@ -11802,7 +11781,6 @@ export class ItemStack {
|
|
|
11802
11781
|
*/
|
|
11803
11782
|
keepOnDeath: boolean;
|
|
11804
11783
|
/**
|
|
11805
|
-
* @rc
|
|
11806
11784
|
* @remarks
|
|
11807
11785
|
* Key for the localization of this items's name used in .lang
|
|
11808
11786
|
* files.
|
|
@@ -12952,7 +12930,6 @@ export class Player extends Entity {
|
|
|
12952
12930
|
*/
|
|
12953
12931
|
readonly clientSystemInfo: ClientSystemInfo;
|
|
12954
12932
|
/**
|
|
12955
|
-
* @rc
|
|
12956
12933
|
* @remarks
|
|
12957
12934
|
* This property can't be edited in read-only mode.
|
|
12958
12935
|
*
|
|
@@ -13035,7 +13012,6 @@ export class Player extends Entity {
|
|
|
13035
13012
|
*/
|
|
13036
13013
|
readonly onScreenDisplay: ScreenDisplay;
|
|
13037
13014
|
/**
|
|
13038
|
-
* @rc
|
|
13039
13015
|
* @throws This property can throw when used.
|
|
13040
13016
|
*
|
|
13041
13017
|
* {@link InvalidEntityError}
|
|
@@ -13885,7 +13861,6 @@ export class PlayerGameModeChangeBeforeEventSignal {
|
|
|
13885
13861
|
}
|
|
13886
13862
|
|
|
13887
13863
|
/**
|
|
13888
|
-
* @rc
|
|
13889
13864
|
* Contains information regarding an event after changing the
|
|
13890
13865
|
* selected hotbar slot for a player.
|
|
13891
13866
|
*/
|
|
@@ -13918,7 +13893,6 @@ export class PlayerHotbarSelectedSlotChangeAfterEvent {
|
|
|
13918
13893
|
}
|
|
13919
13894
|
|
|
13920
13895
|
/**
|
|
13921
|
-
* @rc
|
|
13922
13896
|
* Manages callbacks that are connected after a player selected
|
|
13923
13897
|
* hotbar slot is changed.
|
|
13924
13898
|
*/
|
|
@@ -14400,7 +14374,6 @@ export class PlayerInteractWithEntityBeforeEventSignal {
|
|
|
14400
14374
|
}
|
|
14401
14375
|
|
|
14402
14376
|
/**
|
|
14403
|
-
* @rc
|
|
14404
14377
|
* Contains information regarding an event after a player's
|
|
14405
14378
|
* inventory item changes.
|
|
14406
14379
|
*/
|
|
@@ -14439,7 +14412,6 @@ export class PlayerInventoryItemChangeAfterEvent {
|
|
|
14439
14412
|
}
|
|
14440
14413
|
|
|
14441
14414
|
/**
|
|
14442
|
-
* @rc
|
|
14443
14415
|
* Manages callbacks that are connected after a player's
|
|
14444
14416
|
* inventory item is changed.
|
|
14445
14417
|
*/
|
|
@@ -15748,7 +15720,6 @@ export class StartupEvent {
|
|
|
15748
15720
|
*/
|
|
15749
15721
|
readonly blockComponentRegistry: BlockComponentRegistry;
|
|
15750
15722
|
/**
|
|
15751
|
-
* @rc
|
|
15752
15723
|
* @remarks
|
|
15753
15724
|
* This property can be read in early-execution mode.
|
|
15754
15725
|
*
|
|
@@ -16316,6 +16287,8 @@ export class System {
|
|
|
16316
16287
|
* Causes an event to fire within script with the specified
|
|
16317
16288
|
* message ID and payload.
|
|
16318
16289
|
*
|
|
16290
|
+
* This function can't be called in read-only mode.
|
|
16291
|
+
*
|
|
16319
16292
|
* @param id
|
|
16320
16293
|
* Identifier of the message to send. This is custom and
|
|
16321
16294
|
* dependent on the kinds of behavior packs and content you may
|
|
@@ -17455,7 +17428,6 @@ export class WorldAfterEvents {
|
|
|
17455
17428
|
*/
|
|
17456
17429
|
readonly playerGameModeChange: PlayerGameModeChangeAfterEventSignal;
|
|
17457
17430
|
/**
|
|
17458
|
-
* @rc
|
|
17459
17431
|
* @remarks
|
|
17460
17432
|
* This event fires when a player's selected slot changes.
|
|
17461
17433
|
*
|
|
@@ -17496,7 +17468,6 @@ export class WorldAfterEvents {
|
|
|
17496
17468
|
*/
|
|
17497
17469
|
readonly playerInteractWithEntity: PlayerInteractWithEntityAfterEventSignal;
|
|
17498
17470
|
/**
|
|
17499
|
-
* @rc
|
|
17500
17471
|
* @remarks
|
|
17501
17472
|
* This event fires when an item gets added or removed to the
|
|
17502
17473
|
* player's inventory.
|
|
@@ -18094,7 +18065,6 @@ export interface CameraTargetOptions {
|
|
|
18094
18065
|
}
|
|
18095
18066
|
|
|
18096
18067
|
/**
|
|
18097
|
-
* @rc
|
|
18098
18068
|
* Define the custom command, including name, permissions, and
|
|
18099
18069
|
* parameters.
|
|
18100
18070
|
*/
|
|
@@ -18139,7 +18109,6 @@ export interface CustomCommand {
|
|
|
18139
18109
|
}
|
|
18140
18110
|
|
|
18141
18111
|
/**
|
|
18142
|
-
* @rc
|
|
18143
18112
|
* Definition for each parameter expected by the custom
|
|
18144
18113
|
* command.
|
|
18145
18114
|
*/
|
|
@@ -18159,7 +18128,6 @@ export interface CustomCommandParameter {
|
|
|
18159
18128
|
}
|
|
18160
18129
|
|
|
18161
18130
|
/**
|
|
18162
|
-
* @rc
|
|
18163
18131
|
* Interface returned from custom command callback function.
|
|
18164
18132
|
*/
|
|
18165
18133
|
export interface CustomCommandResult {
|
|
@@ -18961,7 +18929,6 @@ export interface GreaterThanOrEqualsComparison {
|
|
|
18961
18929
|
}
|
|
18962
18930
|
|
|
18963
18931
|
/**
|
|
18964
|
-
* @rc
|
|
18965
18932
|
* Contains additional filtering options for hotbar events.
|
|
18966
18933
|
*/
|
|
18967
18934
|
export interface HotbarEventOptions {
|
|
@@ -18998,7 +18965,6 @@ export interface InputEventOptions {
|
|
|
18998
18965
|
}
|
|
18999
18966
|
|
|
19000
18967
|
/**
|
|
19001
|
-
* @rc
|
|
19002
18968
|
* Contains additional filtering options for inventory item
|
|
19003
18969
|
* events.
|
|
19004
18970
|
*/
|
|
@@ -19888,7 +19854,6 @@ export class ContainerRulesError extends Error {
|
|
|
19888
19854
|
}
|
|
19889
19855
|
|
|
19890
19856
|
/**
|
|
19891
|
-
* @rc
|
|
19892
19857
|
* Error object thrown when CustomCommandRegistry errors occur.
|
|
19893
19858
|
*/
|
|
19894
19859
|
// @ts-ignore Class inheritance allowed for native defined classes
|
|
@@ -19941,7 +19906,6 @@ export class EntitySpawnError extends Error {
|
|
|
19941
19906
|
}
|
|
19942
19907
|
|
|
19943
19908
|
/**
|
|
19944
|
-
* @rc
|
|
19945
19909
|
* The container is invalid. This can occur if the container is
|
|
19946
19910
|
* missing or deleted.
|
|
19947
19911
|
*/
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@minecraft/server",
|
|
3
|
-
"version": "2.1.0
|
|
3
|
+
"version": "2.1.0",
|
|
4
4
|
"description": "",
|
|
5
5
|
"contributors": [
|
|
6
6
|
{
|
|
@@ -12,9 +12,11 @@
|
|
|
12
12
|
"email": "mikeam@microsoft.com"
|
|
13
13
|
}
|
|
14
14
|
],
|
|
15
|
+
"dependencies": {
|
|
16
|
+
"@minecraft/common": "^1.2.0"
|
|
17
|
+
},
|
|
15
18
|
"peerDependencies": {
|
|
16
|
-
"@minecraft/
|
|
17
|
-
"@minecraft/vanilla-data": ">=1.20.70 || 1.21.110-preview.20"
|
|
19
|
+
"@minecraft/vanilla-data": ">=1.20.70"
|
|
18
20
|
},
|
|
19
21
|
"license": "MIT"
|
|
20
22
|
}
|