@minecraft/server 1.4.0-rc.1.20.40-preview.20 → 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.
Files changed (2) hide show
  1. package/index.d.ts +72 -2
  2. 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.6.0-internal.1.20.40-preview.20"
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.
@@ -4107,6 +4161,12 @@ export class ScoreboardIdentity {
4107
4161
  * @throws This function can throw errors.
4108
4162
  */
4109
4163
  getEntity(): Entity | undefined;
4164
+ /**
4165
+ * @remarks
4166
+ * Returns true if the ScoreboardIdentity reference is still
4167
+ * valid.
4168
+ *
4169
+ */
4110
4170
  isValid(): boolean;
4111
4171
  }
4112
4172
 
@@ -4174,6 +4234,12 @@ export class ScoreboardObjective {
4174
4234
  * @throws This function can throw errors.
4175
4235
  */
4176
4236
  hasParticipant(participant: Entity | ScoreboardIdentity | string): boolean;
4237
+ /**
4238
+ * @remarks
4239
+ * Returns true if the ScoreboardObjective reference is still
4240
+ * valid.
4241
+ *
4242
+ */
4177
4243
  isValid(): boolean;
4178
4244
  /**
4179
4245
  * @remarks
@@ -4799,6 +4865,10 @@ export class World {
4799
4865
  *
4800
4866
  * This function can't be called in read-only mode.
4801
4867
  *
4868
+ * @param trackId
4869
+ * Identifier of the music track to play.
4870
+ * @param musicOptions
4871
+ * Additional options for the music track.
4802
4872
  * @throws
4803
4873
  * An error will be thrown if volume is less than 0.0.
4804
4874
  * An error will be thrown if fade is less than 0.0.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@minecraft/server",
3
- "version": "1.4.0-rc.1.20.40-preview.20",
3
+ "version": "1.4.0-rc.1.20.40-preview.21",
4
4
  "description": "",
5
5
  "contributors": [
6
6
  {