[API reference](https://jsprismarine.dev/api/index.md) / [@jsprismarine/prismarine](https://jsprismarine.dev/api/@jsprismarine/prismarine/index.md) / [world/generators/datadriven/javaBlending](https://jsprismarine.dev/api/@jsprismarine/prismarine/world/generators/datadriven/javaBlending/index.md) / OldChunks

# Class: OldChunks

Defined in: [packages/prismarine/src/world/generators/datadriven/javaBlending.ts:206](https://github.com/JSPrismarine/JSPrismarine/blob/e928b08f56694af6821b757ce6b196faebd3199c/packages/prismarine/src/world/generators/datadriven/javaBlending.ts#L206)

The old chunks of one dimension's save, as the generator asks about them.

Both answers are cached up to a bound and asked again after that. Asking again gives the same
answer for whether a position is old, because a stored chunk never stops being old and a
position the save does not hold only ever becomes a new chunk. A record recalculated after it
was dropped reads the chunk's blocks again, as Java recalculates them each time it loads a
chunk.

## Constructors

### Constructor

> **new OldChunks**(`stored`, `oracle`, `fallbackBiome`): `OldChunks`

Defined in: [packages/prismarine/src/world/generators/datadriven/javaBlending.ts:213](https://github.com/JSPrismarine/JSPrismarine/blob/e928b08f56694af6821b757ce6b196faebd3199c/packages/prismarine/src/world/generators/datadriven/javaBlending.ts#L213)

#### Parameters

##### stored

[`StoredChunkReader`](https://jsprismarine.dev/api/@jsprismarine/prismarine/world/providers/Provider/index.md#storedchunkreader)

##### oracle

[`BlockOracle`](https://jsprismarine.dev/api/@jsprismarine/features/index.md#blockoracle)

##### fallbackBiome

[`BiomeResolver`](https://jsprismarine.dev/api/@jsprismarine/worldgen/index.md#biomeresolver)

#### Returns

`OldChunks`

## Methods

### anyWithin()

> **anyWithin**(`chunkX`, `chunkZ`, `radius`): `boolean`

Defined in: [packages/prismarine/src/world/generators/datadriven/javaBlending.ts:251](https://github.com/JSPrismarine/JSPrismarine/blob/e928b08f56694af6821b757ce6b196faebd3199c/packages/prismarine/src/world/generators/datadriven/javaBlending.ts#L251)

Whether any old chunk lies within a square radius of a chunk.

#### Parameters

##### chunkX

`number`

##### chunkZ

`number`

##### radius

`number`

#### Returns

`boolean`

***

### isOld()

> **isOld**(`chunkX`, `chunkZ`): `boolean`

Defined in: [packages/prismarine/src/world/generators/datadriven/javaBlending.ts:220](https://github.com/JSPrismarine/JSPrismarine/blob/e928b08f56694af6821b757ce6b196faebd3199c/packages/prismarine/src/world/generators/datadriven/javaBlending.ts#L220)

Whether the stored chunk at a position is old generation.

#### Parameters

##### chunkX

`number`

##### chunkZ

`number`

#### Returns

`boolean`

***

### recordsAround()

> **recordsAround**(`chunkX`, `chunkZ`, `radius?`): [`OldChunkRecord`](https://jsprismarine.dev/api/@jsprismarine/prismarine/world/generators/datadriven/javaBlending/index.md#oldchunkrecord)[] \| `undefined`

Defined in: [packages/prismarine/src/world/generators/datadriven/javaBlending.ts:267](https://github.com/JSPrismarine/JSPrismarine/blob/e928b08f56694af6821b757ce6b196faebd3199c/packages/prismarine/src/world/generators/datadriven/javaBlending.ts#L267)

The records of the old chunks within a square radius of a chunk, or undefined when there
are none, which is the common case and costs no record at all.

#### Parameters

##### chunkX

`number`

##### chunkZ

`number`

##### radius?

`number` = `BLENDING_RECORD_RADIUS`

[BLENDING\_RECORD\_RADIUS](https://jsprismarine.dev/api/@jsprismarine/prismarine/world/generators/datadriven/javaBlending/index.md#blending_record_radius) for one chunk; one more for a feature pass,
  whose view reaches the chunks around it.

#### Returns

[`OldChunkRecord`](https://jsprismarine.dev/api/@jsprismarine/prismarine/world/generators/datadriven/javaBlending/index.md#oldchunkrecord)[] \| `undefined`
