API reference / @jsprismarine/worldgen / BiomeManager
Class: BiomeManager
Defined in: biome/BiomeManager.ts:93
The per-block biome getter the surface pass reads.
A biome source answers per 4 by 4 by 4 cell. Java does not snap a block to its own cell; it picks whichever of the eight surrounding cell corners is nearest after a seeded jitter, so a biome edge wanders by a block or two instead of following the cell grid. The surface pass needs that, because a biome-conditioned rule resolved per chunk instead of per column puts the wrong block on every column the chunk's other biomes own.
Constructors
Constructor
new BiomeManager(
resolver,zoomSeed):BiomeManager
Defined in: biome/BiomeManager.ts:111
Parameters
resolver
zoomSeed
bigint
The jitter seed, which Java derives from the world seed with obfuscateSeed.
Returns
BiomeManager
Properties
zoomSeed
readonlyzoomSeed:bigint
Defined in: biome/BiomeManager.ts:114
The jitter seed, which Java derives from the world seed with obfuscateSeed.
Methods
getBiome()
getBiome(
x,y,z):string
Defined in: biome/BiomeManager.ts:139
Returns the biome identifier at one block position.
Parameters
x
number
y
number
z
number
Returns
string
withResolver()
withResolver(
resolver):BiomeManager
Defined in: biome/BiomeManager.ts:134
Returns a source with the same jitter seed but a different biome layout.
Parameters
resolver
Returns
BiomeManager
obfuscateSeed()
staticobfuscateSeed(seed):bigint
Defined in: biome/BiomeManager.ts:127
Derives the jitter seed from a world seed.
Java hashes the seed with SHA-256 and reads the first eight bytes of the digest as a little-endian long, which is Guava's Hashing.sha256().hashLong(seed).asLong().
Parameters
seed
bigint
Returns
bigint