@minecraft/server 1.5.0-rc.1.20.40-preview.20 → 1.5.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 +83 -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
 
@@ -2145,7 +2164,9 @@ export class EntityGroundOffsetComponent extends EntityComponent {
2145
2164
  private constructor();
2146
2165
  /**
2147
2166
  * @remarks
2148
- * Value of this particular ground offset.
2167
+ * Value of this particular ground offset. Note that this value
2168
+ * is effectively read only; setting the ground offset value
2169
+ * will not have an impact on the related entity.
2149
2170
  *
2150
2171
  * This property can't be edited in read-only mode.
2151
2172
  *
@@ -3124,6 +3145,16 @@ export class ItemReleaseUseAfterEventSignal {
3124
3145
  * Defines a collection of items.
3125
3146
  */
3126
3147
  export class ItemStack {
3148
+ /**
3149
+ * @remarks
3150
+ * Number of the items in the stack. Valid values range between
3151
+ * 1-255. The provided value will be clamped to the item's
3152
+ * maximum stack size.
3153
+ *
3154
+ * @throws
3155
+ * Throws if the value is outside the range of 1-255.
3156
+ */
3157
+ readonly amount: number;
3127
3158
  /**
3128
3159
  * @remarks
3129
3160
  * Returns whether the item is stackable. An item is considered
@@ -3132,6 +3163,19 @@ export class ItemStack {
3132
3163
  *
3133
3164
  */
3134
3165
  readonly isStackable: boolean;
3166
+ /**
3167
+ * @remarks
3168
+ * Gets or sets whether the item is kept on death.
3169
+ *
3170
+ */
3171
+ readonly keepOnDeath: boolean;
3172
+ /**
3173
+ * @remarks
3174
+ * Gets or sets the item's lock mode. The default value is
3175
+ * `ItemLockMode.none`.
3176
+ *
3177
+ */
3178
+ readonly lockMode: ItemLockMode;
3135
3179
  /**
3136
3180
  * @remarks
3137
3181
  * The maximum stack size. This value varies depending on the
@@ -3140,6 +3184,16 @@ export class ItemStack {
3140
3184
  *
3141
3185
  */
3142
3186
  readonly maxAmount: number;
3187
+ /**
3188
+ * @remarks
3189
+ * Given name of this stack of items. The name tag is displayed
3190
+ * when hovering over the item. Setting the name tag to an
3191
+ * empty string or `undefined` will remove the name tag.
3192
+ *
3193
+ * @throws
3194
+ * Throws if the length exceeds 255 characters.
3195
+ */
3196
+ readonly nameTag?: string;
3143
3197
  /**
3144
3198
  * @remarks
3145
3199
  * The type of the item.
@@ -3835,6 +3889,17 @@ export class MolangVariableMap {
3835
3889
  * @throws This function can throw errors.
3836
3890
  */
3837
3891
  setColorRGBA(variableName: string, color: RGBA): void;
3892
+ /**
3893
+ * @remarks
3894
+ * Sets a numeric (decimal) value within the Molang variable
3895
+ * map.
3896
+ *
3897
+ * @param variableName
3898
+ * Name of the float-based number to set.
3899
+ * @param number
3900
+ * Value for the Molang-based variable to set.
3901
+ * @throws This function can throw errors.
3902
+ */
3838
3903
  setFloat(variableName: string, number: number): void;
3839
3904
  /**
3840
3905
  * @remarks
@@ -4468,6 +4533,12 @@ export class ScoreboardIdentity {
4468
4533
  * @throws This function can throw errors.
4469
4534
  */
4470
4535
  getEntity(): Entity | undefined;
4536
+ /**
4537
+ * @remarks
4538
+ * Returns true if the ScoreboardIdentity reference is still
4539
+ * valid.
4540
+ *
4541
+ */
4471
4542
  isValid(): boolean;
4472
4543
  }
4473
4544
 
@@ -4535,6 +4606,12 @@ export class ScoreboardObjective {
4535
4606
  * @throws This function can throw errors.
4536
4607
  */
4537
4608
  hasParticipant(participant: Entity | ScoreboardIdentity | string): boolean;
4609
+ /**
4610
+ * @remarks
4611
+ * Returns true if the ScoreboardObjective reference is still
4612
+ * valid.
4613
+ *
4614
+ */
4538
4615
  isValid(): boolean;
4539
4616
  /**
4540
4617
  * @remarks
@@ -5160,6 +5237,10 @@ export class World {
5160
5237
  *
5161
5238
  * This function can't be called in read-only mode.
5162
5239
  *
5240
+ * @param trackId
5241
+ * Identifier of the music track to play.
5242
+ * @param musicOptions
5243
+ * Additional options for the music track.
5163
5244
  * @throws
5164
5245
  * An error will be thrown if volume is less than 0.0.
5165
5246
  * 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.5.0-rc.1.20.40-preview.20",
3
+ "version": "1.5.0-rc.1.20.40-preview.21",
4
4
  "description": "",
5
5
  "contributors": [
6
6
  {