@minecraft/server 2.9.0-rc.1.26.40-preview.26 → 2.9.0-rc.1.26.40-preview.30

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 +50 -0
  2. package/package.json +2 -2
package/index.d.ts CHANGED
@@ -7288,6 +7288,38 @@ export class Dimension {
7288
7288
  *
7289
7289
  */
7290
7290
  readonly localizationKey: string;
7291
+ /**
7292
+ * @rc
7293
+ * @remarks
7294
+ * Calculates the location of the closest biome of a particular
7295
+ * type from the world seed. Note that
7296
+ * calculateClosestBiomeFromSeed can be an expensive operation,
7297
+ * so avoid using many of these calls within a particular tick.
7298
+ * The result is derived purely from the world generation
7299
+ * algorithm and the world seed, so the returned location may
7300
+ * not reflect the actual current terrain if biomes have been
7301
+ * modified after generation.
7302
+ *
7303
+ * @param pos
7304
+ * Starting location to look for a biome to find.
7305
+ * @param biomeToFind
7306
+ * Identifier of the biome to look for.
7307
+ * @param options
7308
+ * Additional selection criteria for a biome search.
7309
+ * @returns
7310
+ * Returns a location of the biome, or undefined if a biome
7311
+ * could not be found.
7312
+ * @throws This function can throw errors.
7313
+ *
7314
+ * {@link minecraftcommon.EngineError}
7315
+ *
7316
+ * {@link Error}
7317
+ */
7318
+ calculateClosestBiomeFromSeed(
7319
+ pos: Vector3,
7320
+ biomeToFind: BiomeType | string,
7321
+ options?: BiomeSearchOptions,
7322
+ ): Vector3 | undefined;
7291
7323
  /**
7292
7324
  * @remarks
7293
7325
  * Checks if an area contains the specified biomes. If the area
@@ -15835,6 +15867,10 @@ export class LootingEnchantFunction extends LootItemFunction {
15835
15867
  // @ts-ignore Class inheritance allowed for native defined classes
15836
15868
  export class LootItem extends LootPoolEntry {
15837
15869
  private constructor();
15870
+ /**
15871
+ * @rc
15872
+ */
15873
+ readonly conditions: LootItemCondition[];
15838
15874
  readonly functions: LootItemFunction[];
15839
15875
  /**
15840
15876
  * @remarks
@@ -22649,6 +22685,20 @@ export interface BiomeFilter {
22649
22685
  includeTags?: string[];
22650
22686
  }
22651
22687
 
22688
+ /**
22689
+ * @rc
22690
+ * Contains additional options for searches for the
22691
+ * dimension.findNearestBiome API.
22692
+ */
22693
+ export interface BiomeSearchOptions {
22694
+ /**
22695
+ * @remarks
22696
+ * Bounding volume size to look within.
22697
+ *
22698
+ */
22699
+ boundingSize?: Vector3;
22700
+ }
22701
+
22652
22702
  /**
22653
22703
  * A BlockBoundingBox is an interface to an object which
22654
22704
  * represents an AABB aligned rectangle.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@minecraft/server",
3
- "version": "2.9.0-rc.1.26.40-preview.26",
3
+ "version": "2.9.0-rc.1.26.40-preview.30",
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.26.40-preview.26"
17
+ "@minecraft/vanilla-data": ">=1.20.70 || 1.26.40-preview.30"
18
18
  },
19
19
  "license": "MIT"
20
20
  }