@minecraft/server 2.3.0-rc.1.21.120-preview.21 → 2.3.0-rc.1.21.120-preview.22

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 +85 -0
  2. package/package.json +2 -2
package/index.d.ts CHANGED
@@ -3124,6 +3124,23 @@ export class Block {
3124
3124
  * {@link LocationOutOfWorldBoundariesError}
3125
3125
  */
3126
3126
  getItemStack(amount?: number, withData?: boolean): ItemStack | undefined;
3127
+ /**
3128
+ * @rc
3129
+ * @remarks
3130
+ * Returns the total brightness level of light shining on a
3131
+ * certain block.
3132
+ *
3133
+ * This function can't be called in read-only mode.
3134
+ *
3135
+ * @returns
3136
+ * The brightness level on the block.
3137
+ * @throws This function can throw errors.
3138
+ *
3139
+ * {@link minecraftcommon.InvalidArgumentError}
3140
+ *
3141
+ * {@link LocationInUnloadedChunkError}
3142
+ */
3143
+ getLightLevel(): number;
3127
3144
  /**
3128
3145
  * @remarks
3129
3146
  * Returns the net redstone power of this block.
@@ -3138,6 +3155,23 @@ export class Block {
3138
3155
  * {@link LocationOutOfWorldBoundariesError}
3139
3156
  */
3140
3157
  getRedstonePower(): number | undefined;
3158
+ /**
3159
+ * @rc
3160
+ * @remarks
3161
+ * Returns the brightness level of light shining from the sky
3162
+ * on a certain block.
3163
+ *
3164
+ * This function can't be called in read-only mode.
3165
+ *
3166
+ * @returns
3167
+ * The brightness level on the block.
3168
+ * @throws This function can throw errors.
3169
+ *
3170
+ * {@link minecraftcommon.InvalidArgumentError}
3171
+ *
3172
+ * {@link LocationInUnloadedChunkError}
3173
+ */
3174
+ getSkyLightLevel(): number;
3141
3175
  /**
3142
3176
  * @remarks
3143
3177
  * Returns a set of tags for a block.
@@ -6174,6 +6208,23 @@ export class Dimension {
6174
6208
  * {@link minecraftcommon.UnsupportedFunctionalityError}
6175
6209
  */
6176
6210
  getEntitiesFromRay(location: Vector3, direction: Vector3, options?: EntityRaycastOptions): EntityRaycastHit[];
6211
+ /**
6212
+ * @rc
6213
+ * @remarks
6214
+ * Returns the total brightness level of light shining on a
6215
+ * certain block position.
6216
+ *
6217
+ * @param location
6218
+ * Location of the block we want to check the brightness of.
6219
+ * @returns
6220
+ * The brightness level on the block.
6221
+ * @throws This function can throw errors.
6222
+ *
6223
+ * {@link minecraftcommon.InvalidArgumentError}
6224
+ *
6225
+ * {@link LocationInUnloadedChunkError}
6226
+ */
6227
+ getLightLevel(location: Vector3): number;
6177
6228
  /**
6178
6229
  * @remarks
6179
6230
  * Returns a set of players based on a set of conditions
@@ -6191,6 +6242,23 @@ export class Dimension {
6191
6242
  * {@link minecraftcommon.InvalidArgumentError}
6192
6243
  */
6193
6244
  getPlayers(options?: EntityQueryOptions): Player[];
6245
+ /**
6246
+ * @rc
6247
+ * @remarks
6248
+ * Returns the brightness level of light shining from the sky
6249
+ * on a certain block position.
6250
+ *
6251
+ * @param location
6252
+ * Position of the block we want to check the brightness of.
6253
+ * @returns
6254
+ * The brightness level on the block.
6255
+ * @throws This function can throw errors.
6256
+ *
6257
+ * {@link minecraftcommon.InvalidArgumentError}
6258
+ *
6259
+ * {@link LocationInUnloadedChunkError}
6260
+ */
6261
+ getSkyLightLevel(location: Vector3): number;
6194
6262
  /**
6195
6263
  * @remarks
6196
6264
  * Returns the highest block at the given XZ location.
@@ -19941,6 +20009,23 @@ export interface ScriptEventMessageFilterOptions {
19941
20009
  * Contains additional options for spawning an Entity.
19942
20010
  */
19943
20011
  export interface SpawnEntityOptions {
20012
+ /**
20013
+ * @rc
20014
+ * @remarks
20015
+ * Optional boolean which determines if this entity should
20016
+ * persist in the game world. Persistence prevents the entity
20017
+ * from automatically despawning.
20018
+ *
20019
+ */
20020
+ initialPersistence?: boolean;
20021
+ /**
20022
+ * @rc
20023
+ * @remarks
20024
+ * Optional initial rotation, in degrees, to set on the entity
20025
+ * when it spawns.
20026
+ *
20027
+ */
20028
+ initialRotation?: number;
19944
20029
  /**
19945
20030
  * @remarks
19946
20031
  * Optional spawn event to send to the entity after it is
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@minecraft/server",
3
- "version": "2.3.0-rc.1.21.120-preview.21",
3
+ "version": "2.3.0-rc.1.21.120-preview.22",
4
4
  "description": "",
5
5
  "contributors": [
6
6
  {
@@ -14,7 +14,7 @@
14
14
  ],
15
15
  "peerDependencies": {
16
16
  "@minecraft/common": "^1.2.0",
17
- "@minecraft/vanilla-data": ">=1.20.70 || 1.21.120-preview.21"
17
+ "@minecraft/vanilla-data": ">=1.20.70 || 1.21.120-preview.22"
18
18
  },
19
19
  "license": "MIT"
20
20
  }