-
Notifications
You must be signed in to change notification settings - Fork 26
Height restrictions
All distributions have gained absolute minHeight
and maxHeight
attributes, just as <Substitute>
has had for a while. These attributes allow for asymmetric (truncated) height distributions.
While chunks have a constant surface area of 16x16, the height of a chunk can vary dramatically. It is often desirable to have ore distributions spread throughout a chunk, depending on the height. One might also want to scale the frequency by height, so that the ore density remains roughly constant.
The scaleTo
attribute addresses this issue by enabling the scaling of a setting according to a specific notion of the local height. The math is simply value*scale/base
where base
is currently fixed to 64. The value of scaleTo
is a string naming the scale, and there are currently four height scales:
- Base: the default scale of 64, essentially the identity transformation
- World: the average ground level if the world has a sky (64 for the overworld), otherwise the max height of the world (128 for the nether)
- SeaLevel: the global sealevel for the world (64 for overworld and nether)
- CloudLevel: the global level above which clouds occur (128 for overworld)
- Biome: the average of the biome min/max height; this falls back to the World scale when the world has no sky (because biome heights are meaningless, at least for the nether), or the current location has no biome.
- Position: If ATG is installed, the surface height at the current x/z position; otherwise, falls back to Biome scale.
The following settings support scaleTo
: DistributionFrequency, Frequency, Height, OreDensity, CloudHeight, CloudThickness, MotherlodeFrequency, MotherlodeHeight, and BranchHeightLimit.
This example will multiply the height value of 50 by the average height of the current biome, divided by 64, which might allow an ore to generate up into the hills.
<Setting name='CloudHeight' avg='50' scaleTo='biome'/>
Sometimes it is desirable to have an unscaled offset added to the scaled height. This would allow, for example, an ore to always generate 3 blocks under the surface. The “HeightOffset” setting addresses this need.
Example of generating 3-5 blocks under the surface:
<Setting name='CloudHeight' avg='64' scaleTo='position'/> <Setting name='HeightOffset' avg='3' range='1'/>
The <Substitute>
distribution has gained surface-relative height support through its minSurfRelHeight
and maxSurfRelHeight
attributes:
<Substitute name='Dummy' minSurfRelHeight='-2' maxSurfRelHeight='0'/>
The above would replace the top three blocks in all matching chunks. Note that the definition of surface is the highest block of material grass, ground, clay, sand (includes gravel), rock or ice.