Source: Decompiled from
HytaleServer.jar(pre-release2026.02.05-9ce2783f7)
The WorldStructureAsset is the root definition of a V2 world generation configuration. It defines which biomes exist, how they are selected based on noise, and how transitions between them work. There is currently one registered type: NoiseRange.
Class: BasicWorldStructureAsset
Type String: "NoiseRange"
The NoiseRange world structure maps a density function's output to biome ranges, creating a noise-driven biome distribution system.
| Field | Type | Required | Default | Description |
|---|---|---|---|---|
Biomes |
BiomeRangeAsset[] |
Yes | [] |
Array of biome-to-noise-range mappings |
Density |
DensityAsset |
Yes | Constant(0) |
Density function used for biome selection noise |
DefaultBiome |
string |
Yes | "" |
Asset ID of the fallback biome when no range matches |
DefaultTransitionDistance |
int |
Yes | 32 |
Distance (in blocks) for biome edge transitions. Must be > 0 |
MaxBiomeEdgeDistance |
int |
Yes | 0 |
Maximum distance to track from biome edges. Must be >= 0 |
Framework |
FrameworkAsset[] |
No | [] |
Shared constants/positions available to all child assets |
SpawnPositions |
PositionProviderAsset |
No | List() |
Position provider for world spawn point candidates |
Each entry in the Biomes array maps a biome to a noise value range:
| Field | Type | Required | Default | Description |
|---|---|---|---|---|
Biome |
string |
Yes | "" |
Reference to a BiomeAsset by ID |
Min |
double |
Yes | -1.0 |
Minimum noise value (inclusive) |
Max |
double |
Yes | 1.0 |
Maximum noise value (inclusive) |
{
"Biomes": {
"plains_range": {
"Biome": "plains",
"Min": -0.3,
"Max": 0.3
},
"mountains_range": {
"Biome": "mountains",
"Min": 0.3,
"Max": 1.0
},
"desert_range": {
"Biome": "desert",
"Min": -1.0,
"Max": -0.3
}
}
}The NoiseRange structure uses SimpleNoiseCarta to map density values to biome IDs at runtime.
- The
Densityfunction is evaluated at position(x, 0, z)— note Y is always 0 for biome selection - The resulting noise value is looked up in a
DoubleRangeMap - If a matching range is found, the corresponding biome is returned
- If no range matches, the
DefaultBiomeis returned
// From SimpleNoiseCarta.apply()
Density.Context context = new Density.Context();
context.position = new Vector3d(x, 0.0, z);
double noiseValue = this.density.process(context);
T value = this.rangeMap.get(noiseValue);
return value == null ? this.defaultValue : value;The biome selection is purely 2D (XZ plane), meaning biomes don't vary vertically — only terrain shape within a biome changes with Y.
The DefaultTransitionDistance controls how biome edges are smoothed:
- A larger value creates smoother, more gradual transitions between biomes
- A value of
1creates hard biome boundaries (minimum allowed) - The default of
32blocks provides moderate blending
The MaxBiomeEdgeDistance works with the DistanceToBiomeEdge density function type, allowing terrain features to react to proximity to biome boundaries.
graph TD
A[BasicWorldStructureAsset.build] --> B[Build Framework references]
B --> C[Resolve DefaultBiome asset]
C --> D[Build default Biome]
D --> E[Build Density function]
E --> F[Create Registry + SimpleNoiseCarta]
F --> G[For each BiomeRangeAsset]
G --> H[Build Biome if not cached]
H --> I[Register biome + add range to carta]
I --> J[Create WorldStructure]
The build process:
- Framework assets are built first — these provide shared constants and position references (
ReferenceBundle) - The default biome is resolved and built (cached for reuse)
- The density function is built from its asset graph
- A biome registry is created, mapping integer IDs to
Biomeinstances - Each biome range is processed — biomes are built once and cached via a
HashMap<BiomeAsset, Biome> - The
SimpleNoiseCartais populated withDoubleRange → biomeIdmappings - A
WorldStructureis returned containing the carta, registry, transition distance, and spawn positions
{
"Type": "NoiseRange",
"DefaultBiome": "plains",
"DefaultTransitionDistance": 48,
"MaxBiomeEdgeDistance": 16,
"Density": {
"Type": "SimplexNoise2D",
"Seed": "biome_selection",
"Frequency": 0.002,
"Amplitude": 1.0
},
"Biomes": {
"forest_range": {
"Biome": "forest",
"Min": 0.2,
"Max": 0.6
},
"mountains_range": {
"Biome": "mountains",
"Min": 0.6,
"Max": 1.0
},
"swamp_range": {
"Biome": "swamp",
"Min": -0.6,
"Max": -0.2
},
"tundra_range": {
"Biome": "tundra",
"Min": -1.0,
"Max": -0.6
}
},
"Framework": [],
"SpawnPositions": {
"Type": "List",
"Positions": []
}
}The built WorldStructure holds:
| Field | Type | Description |
|---|---|---|
biomeMap |
BiCarta<Integer> |
Maps (x, z) → biome registry ID |
biomeRegistry |
Registry<Biome> |
Maps integer IDs → Biome instances |
biomeTransitionDistance |
int |
Edge blending distance |
maxBiomeEdgeDistance |
int |
Max tracked edge distance |
spawnPositions |
PositionProvider |
World spawn candidates |
Source files: BasicWorldStructureAsset.java, WorldStructure.java, BiomeRangeAsset.java, SimpleNoiseCarta.java, DoubleRangeMap.java