* added basic support for cmake (#127)
* renamed Winter Drop version from MC_1_21_3 to MC_1_21_WD
* updated world spawn location for 1.21.2 (cubiomes-viewer #340)
* tweaked mc version to text conversion (#128)
* removed properties field in structure config and added dimension field instead
* moved biome tree selection back to biomenoise.c as it's slightly faster and avoids globals
* added pale_garden biome with 1.21.3 (version TBA)
* added small end islands and better end surface generation (#117)
* added linked end gateway finder (#117)
* fixed inaccurate End generation at large distances from 0,0
* fixed incorrect biome in outer end rings
* fixed incorrect biome area size (#122)
* much faster surface height generation for the end dimension
* added 1.21 to versions
* added trial chambers
* renamed trail_ruin to trail_ruins to match its id string
* moved biomenoise from layers.h into its own object
* moved biome tree data into separate header files for each version
* added global for the biome tree data to make runtime providers possible
* fixed outpost not generating in cherry_grove
added stopping flag for quad-base gen
fixed seed duplication when restarting quad-base generation
fixed premature stop on parameter finder when noise has only one lacunarity
The functions perform the same instructions either way, but this makes it far clearer (to me, at least) how rad and ang relate to each other, and what the runtime complexity of findFittest is (O(n^2) instead of the O(n) it might appear to be at first glance).
After estimating the approximate spawn position, Cubiomes currently centers the position in the middle of the corresponding chunk and then (I'm guessing erroneously) returns the position immediately, completely skipping all of the code fine-tuning the position to the most likely block afterwards. As a result, every single spawnpoint calculated by Cubiomes (and consequently Cubiomes Viewer) is in the middle of a chunk, leading to problems such as origin spawns always returning as (8, 8) instead of (0, 0), and so on.
(biome_tree.c)
- getOldBetaBiome: removed isWater argument.
(finders.c)
- getStructureConfig: now returns 0 for mineshafts and villages before B1.8.
(layers.h)
- Added SurfaceNoiseBeta struct:
Very similar to SurfaceNoise.
Since SurfaceNoiseBeta will only ever be used for the Overworld, the
double values saved in SurfaceNoise will be hardcoded into the
SurfaceNoiseBeta sampling function.
octSurf and octDepth in surfaceNoise are replaced with new octA and octB
OctaveNoises, used for precise terrain generation. These names are
subject to change if I come up with more meaningful names in the
future.
The oct array contains six additional PerlinNoise structs compared to
SurfaceNoise, as the 4-octave octSurf is replaced with the 10-octave
octA.
- Added BiomeNoiseBeta struct:
Mostly a cut-down version of BiomeNoise.
The climate array contains three OctaveNoise structs, corresponding to
the 4-octave temperature and humidity noise generators, as well as
an additional 2-octave generator that I'm calling "fuzz". The fuzz
noise is high-frequency and low-amplitude, and is used as a factor
applied to the raw output of both the temperature and humidity
generators before these values are used.
The PerlinNoise array oct contains 10 octaves -- 4 for temperature, 4 for
humidity, and 2 for fuzz.
nptype and mc are carried over from BiomeNoise. mc currently has no
purpose, but I've heard of a bug in some early beta versions causing
chunk biomes to generate rotated, so storing the version may
eventually prove useful.
- Added headers for 5 new functions in layers.c.
- Changed header for getOldBetaBiome (defined in biome_tree.c) to reflect new
signature.
(layers.c)
- Added initSurfaceNoiseBeta function: No-op placeholder for now.
- Added setBetaBiomeSeed function: Initializes the three climate simplex noise
generators and sets bnb->nptype to -1 by default.
- Added sampleBiomeNoiseBeta function:
sampleBiomeNoiseBeta samples climate noise at the given x and z
coordinates (1:1 scale) and returns a biome ID corresponding to the
biome at the generated temperature and humidity noise values.
The behavior of zeroing out the array np when it is passed is copied
from sampleBiomeNoise. I'm not sure about its function, so if it's
not applicable, this argument and associated behavior can be removed.
If bnb->nptype is set to NP_TEMPERATURE or NP_HUMIDITY, only that noise
value is generated and the other is ignored. The noise value is
multiplied by 10000 and returned as a signed long to match the
behavior of sampleBiomeNoise. Note that Beta climate values range from
0 to 1, not -1 to 1, so the resulting ints will all be nonnegative.
The argument nv (noise values) is a pointer to a 2-element array of
doubles. If it is present, the noise values are placed in the array
before the biome is determined.
- Added genBetaBiomeNoiseScaled function:
At 1:1 scale, every block in Range r is sampled and the return value of
sampleBiomeNoiseBeta is placed in the cache.
At higher scales, midpoints are sampled.
When ocean support is added, this function will likely behave
differently when NO_BETA_OCEAN is clear in order to maximize time
and memory efficiency.
(generator.h)
- Flags enum: Bit 1 (0x2) is now the NO_BETA_OCEAN flag.
- Generator struct: New union member for pre-B1.8: Includes BiomeNoiseBeta
and SurfaceNoiseBeta structs now defined in layers.h
(generator.c)
- setupGenearator:
New version so pre-B1.8 versions behave correctly.
For mc <= MC_B1_7, setupGenerator simply sets g->bnb.mc, as all other
setup for pre-B1.8 biome generation requires the seed to be known.
- applySeed:
When mc <= MC_B1_7, the new setBetaBiomeSeed function defined in layers.c
is called. If the NO_BETA_OCEAN flag is not set, initSurfaceNoiseBeta
is also called. initSurfaceNoiseBeta is currently just a no-op
placeholder.
- getMinCacheSize:
New version check.
Returns default size when mc <= MC_B1_7. Will likely be modified when
ocean-finding functionality is added.
- genBiomes: Calls genBetaBiomeNoiseScaled when mc <= MC_B1_7
Note: Compiling libcubiomes.a will will currently cause several warnings due to
unused parameters related to not-yet-implemented ocean finding.
* fixed biomeExists() for 1.19 end dimension
* fixed biome check position for village and bastion in 1.18+
* added support for 1:256 scale of biome locator in 1.17-
expanded support for structure variants
added end city pieces generation (WIP)
added outer end voids (MC-159283)
fixed several issues with the availablity of biomes for layered generation
fixed that about half of 1.18/1.19 end gateways have wrong positions