@minecraft/server 1.4.0-rc.1.20.30-preview.25 → 1.4.0-rc.1.20.40-preview.21
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 +76 -8
- package/package.json +1 -1
package/index.d.ts
CHANGED
|
@@ -16,7 +16,7 @@
|
|
|
16
16
|
* ```json
|
|
17
17
|
* {
|
|
18
18
|
* "module_name": "@minecraft/server",
|
|
19
|
-
* "version": "1.
|
|
19
|
+
* "version": "1.7.0-internal.1.20.40-preview.21"
|
|
20
20
|
* }
|
|
21
21
|
* ```
|
|
22
22
|
*
|
|
@@ -72,10 +72,29 @@ export enum Direction {
|
|
|
72
72
|
|
|
73
73
|
/**
|
|
74
74
|
* @beta
|
|
75
|
+
* Specifies a mechanism for displaying scores on a scoreboard.
|
|
75
76
|
*/
|
|
76
77
|
export enum DisplaySlotId {
|
|
78
|
+
/**
|
|
79
|
+
* @beta
|
|
80
|
+
* @remarks
|
|
81
|
+
* Displays the score below the player's name.
|
|
82
|
+
*
|
|
83
|
+
*/
|
|
77
84
|
BelowName = 'BelowName',
|
|
85
|
+
/**
|
|
86
|
+
* @beta
|
|
87
|
+
* @remarks
|
|
88
|
+
* Displays the score as a list on the pause screen.
|
|
89
|
+
*
|
|
90
|
+
*/
|
|
78
91
|
List = 'List',
|
|
92
|
+
/**
|
|
93
|
+
* @beta
|
|
94
|
+
* @remarks
|
|
95
|
+
* Displays the score on the side of the player's screen.
|
|
96
|
+
*
|
|
97
|
+
*/
|
|
79
98
|
Sidebar = 'Sidebar',
|
|
80
99
|
}
|
|
81
100
|
|
|
@@ -1994,7 +2013,9 @@ export class EntityGroundOffsetComponent extends EntityComponent {
|
|
|
1994
2013
|
private constructor();
|
|
1995
2014
|
/**
|
|
1996
2015
|
* @remarks
|
|
1997
|
-
* Value of this particular ground offset.
|
|
2016
|
+
* Value of this particular ground offset. Note that this value
|
|
2017
|
+
* is effectively read only; setting the ground offset value
|
|
2018
|
+
* will not have an impact on the related entity.
|
|
1998
2019
|
*
|
|
1999
2020
|
* This property can't be edited in read-only mode.
|
|
2000
2021
|
*
|
|
@@ -2973,6 +2994,16 @@ export class ItemReleaseUseAfterEventSignal {
|
|
|
2973
2994
|
* Defines a collection of items.
|
|
2974
2995
|
*/
|
|
2975
2996
|
export class ItemStack {
|
|
2997
|
+
/**
|
|
2998
|
+
* @remarks
|
|
2999
|
+
* Number of the items in the stack. Valid values range between
|
|
3000
|
+
* 1-255. The provided value will be clamped to the item's
|
|
3001
|
+
* maximum stack size.
|
|
3002
|
+
*
|
|
3003
|
+
* @throws
|
|
3004
|
+
* Throws if the value is outside the range of 1-255.
|
|
3005
|
+
*/
|
|
3006
|
+
readonly amount: number;
|
|
2976
3007
|
/**
|
|
2977
3008
|
* @remarks
|
|
2978
3009
|
* Returns whether the item is stackable. An item is considered
|
|
@@ -2981,6 +3012,19 @@ export class ItemStack {
|
|
|
2981
3012
|
*
|
|
2982
3013
|
*/
|
|
2983
3014
|
readonly isStackable: boolean;
|
|
3015
|
+
/**
|
|
3016
|
+
* @remarks
|
|
3017
|
+
* Gets or sets whether the item is kept on death.
|
|
3018
|
+
*
|
|
3019
|
+
*/
|
|
3020
|
+
readonly keepOnDeath: boolean;
|
|
3021
|
+
/**
|
|
3022
|
+
* @remarks
|
|
3023
|
+
* Gets or sets the item's lock mode. The default value is
|
|
3024
|
+
* `ItemLockMode.none`.
|
|
3025
|
+
*
|
|
3026
|
+
*/
|
|
3027
|
+
readonly lockMode: ItemLockMode;
|
|
2984
3028
|
/**
|
|
2985
3029
|
* @remarks
|
|
2986
3030
|
* The maximum stack size. This value varies depending on the
|
|
@@ -2989,6 +3033,16 @@ export class ItemStack {
|
|
|
2989
3033
|
*
|
|
2990
3034
|
*/
|
|
2991
3035
|
readonly maxAmount: number;
|
|
3036
|
+
/**
|
|
3037
|
+
* @remarks
|
|
3038
|
+
* Given name of this stack of items. The name tag is displayed
|
|
3039
|
+
* when hovering over the item. Setting the name tag to an
|
|
3040
|
+
* empty string or `undefined` will remove the name tag.
|
|
3041
|
+
*
|
|
3042
|
+
* @throws
|
|
3043
|
+
* Throws if the length exceeds 255 characters.
|
|
3044
|
+
*/
|
|
3045
|
+
readonly nameTag?: string;
|
|
2992
3046
|
/**
|
|
2993
3047
|
* @remarks
|
|
2994
3048
|
* The type of the item.
|
|
@@ -3693,8 +3747,6 @@ export class Player extends Entity {
|
|
|
3693
3747
|
*
|
|
3694
3748
|
* This function can't be called in read-only mode.
|
|
3695
3749
|
*
|
|
3696
|
-
* @param soundID
|
|
3697
|
-
* Identifier of the sound to play.
|
|
3698
3750
|
* @param soundOptions
|
|
3699
3751
|
* Additional optional options for the sound.
|
|
3700
3752
|
* @throws This function can throw errors.
|
|
@@ -3723,7 +3775,7 @@ export class Player extends Entity {
|
|
|
3723
3775
|
* players[0].playSound("bucket.fill_water", playerSoundOptions);
|
|
3724
3776
|
* ```
|
|
3725
3777
|
*/
|
|
3726
|
-
playSound(
|
|
3778
|
+
playSound(soundId: string, soundOptions?: PlayerSoundOptions): void;
|
|
3727
3779
|
/**
|
|
3728
3780
|
* @beta
|
|
3729
3781
|
* @remarks
|
|
@@ -4109,6 +4161,12 @@ export class ScoreboardIdentity {
|
|
|
4109
4161
|
* @throws This function can throw errors.
|
|
4110
4162
|
*/
|
|
4111
4163
|
getEntity(): Entity | undefined;
|
|
4164
|
+
/**
|
|
4165
|
+
* @remarks
|
|
4166
|
+
* Returns true if the ScoreboardIdentity reference is still
|
|
4167
|
+
* valid.
|
|
4168
|
+
*
|
|
4169
|
+
*/
|
|
4112
4170
|
isValid(): boolean;
|
|
4113
4171
|
}
|
|
4114
4172
|
|
|
@@ -4176,6 +4234,12 @@ export class ScoreboardObjective {
|
|
|
4176
4234
|
* @throws This function can throw errors.
|
|
4177
4235
|
*/
|
|
4178
4236
|
hasParticipant(participant: Entity | ScoreboardIdentity | string): boolean;
|
|
4237
|
+
/**
|
|
4238
|
+
* @remarks
|
|
4239
|
+
* Returns true if the ScoreboardObjective reference is still
|
|
4240
|
+
* valid.
|
|
4241
|
+
*
|
|
4242
|
+
*/
|
|
4179
4243
|
isValid(): boolean;
|
|
4180
4244
|
/**
|
|
4181
4245
|
* @remarks
|
|
@@ -4754,7 +4818,7 @@ export class World {
|
|
|
4754
4818
|
* players[0].playSound("bucket.fill_water", playerSoundOptions);
|
|
4755
4819
|
* ```
|
|
4756
4820
|
*/
|
|
4757
|
-
playMusic(
|
|
4821
|
+
playMusic(trackId: string, musicOptions?: MusicOptions): void;
|
|
4758
4822
|
/**
|
|
4759
4823
|
* @beta
|
|
4760
4824
|
* @remarks
|
|
@@ -4792,7 +4856,7 @@ export class World {
|
|
|
4792
4856
|
* players[0].playSound("bucket.fill_water", playerSoundOptions);
|
|
4793
4857
|
* ```
|
|
4794
4858
|
*/
|
|
4795
|
-
playSound(
|
|
4859
|
+
playSound(soundId: string, location: Vector3, soundOptions?: WorldSoundOptions): void;
|
|
4796
4860
|
/**
|
|
4797
4861
|
* @beta
|
|
4798
4862
|
* @remarks
|
|
@@ -4801,12 +4865,16 @@ export class World {
|
|
|
4801
4865
|
*
|
|
4802
4866
|
* This function can't be called in read-only mode.
|
|
4803
4867
|
*
|
|
4868
|
+
* @param trackId
|
|
4869
|
+
* Identifier of the music track to play.
|
|
4870
|
+
* @param musicOptions
|
|
4871
|
+
* Additional options for the music track.
|
|
4804
4872
|
* @throws
|
|
4805
4873
|
* An error will be thrown if volume is less than 0.0.
|
|
4806
4874
|
* An error will be thrown if fade is less than 0.0.
|
|
4807
4875
|
*
|
|
4808
4876
|
*/
|
|
4809
|
-
queueMusic(
|
|
4877
|
+
queueMusic(trackId: string, musicOptions?: MusicOptions): void;
|
|
4810
4878
|
/**
|
|
4811
4879
|
* @beta
|
|
4812
4880
|
* @remarks
|