cubiomes ships as source code — you build it into a static archive (Documentation Index
Fetch the complete documentation index at: https://mintlify.com/Cubitect/cubiomes/llms.txt
Use this file to discover all available pages before exploring further.
libcubiomes.a) or a shared library (libcubiomes.so) and then link your own programs against it. The repository includes both a makefile and a CMakeLists.txt, so you can use whichever build system fits your project.
Prerequisites
- GCC or a compatible C compiler
make(for the makefile build) or CMake ≥ 2.8 (for the CMake build)gitto clone the repository
Build with make
On Linux and macOS, the makefile automatically adds
-pthread to the linker flags and -fPIC to the release build, producing position-independent code suitable for shared libraries.Build with CMake
CMake builds both a shared library and a static library from the same object files. Position-independent code (
-fPIC) is set on the object target automatically.
Link your project
Once you have builtlibcubiomes.a or libcubiomes.so, compile and link your program from inside the cubiomes directory:
-lpthread when linking:
What gets built
The library is composed of the following translation units, each with a corresponding public header:| Source file | Header | Purpose |
|---|---|---|
generator.c | generator.h | Biome generator setup and query |
biomes.c | biomes.h | Biome IDs, versions, dimensions |
finders.c | finders.h | Structure position and viability |
layers.c | layers.h | Layered generation (≤ 1.17) |
biomenoise.c | biomenoise.h | Noise-based generation (1.18+) |
noise.c | noise.h | Perlin/simplex noise primitives |
quadbase.c | quadbase.h | Quad-structure seed bases |
util.c | util.h | Image output and utility helpers |
rng.c | rng.h | Java-compatible RNG |