AGPLv3 license

This commit is contained in:
2026-10-12 15:09:22 -03:00
parent c1dd0e62a8
commit 48c6f0ec1d
263 changed files with 1446 additions and 0 deletions
+3
View File
@@ -1,3 +1,6 @@
// SPDX-FileCopyrightText: 2026 Paula Wisnievski
// SPDX-License-Identifier: AGPL-3.0-or-later
// what color each biome tints grass, leaves and water, as 0xRRGGBB, from its "colors" (see biomes.ts). blocks pick
// them with "tint"
import { get_biome } from "./biomes.ts";
+3
View File
@@ -1,3 +1,6 @@
// SPDX-FileCopyrightText: 2026 Paula Wisnievski
// SPDX-License-Identifier: AGPL-3.0-or-later
// biomes as data: worldgen/biomes/<name>.json in a mod, see docs/modding/worldgen/biomes.md. which biome a column
// gets is the generator's biome rules (worldgen/biome_source), these say what a biome looks like once it's picked
import { EverythingRegistry } from "../everything_registry.ts";
+3
View File
@@ -1,3 +1,6 @@
// SPDX-FileCopyrightText: 2026 Paula Wisnievski
// SPDX-License-Identifier: AGPL-3.0-or-later
// world generation as data: noises, density functions, noise settings (a generator) and biome sources, see
// docs/modding/worldgen/terrain.md. checked here, compiled by density.ts and generator.ts. the names follow
// minecraft's (density functions, the noise router, surface rules) where the idea is the same
+3
View File
@@ -1,3 +1,6 @@
// SPDX-FileCopyrightText: 2026 Paula Wisnievski
// SPDX-License-Identifier: AGPL-3.0-or-later
// compiles density functions (see data.ts) into plain closures, once per seed, so generating a chunk never reads json.
// every operation is a pair, so it rounds exactly like the code it was written from: a world generated from the same
// data is the same block for block. named functions that don't change with y are worked out once per column
+3
View File
@@ -1,3 +1,6 @@
// SPDX-FileCopyrightText: 2026 Paula Wisnievski
// SPDX-License-Identifier: AGPL-3.0-or-later
// data features: worldgen/features/<path>.json in a mod, a feature's type and config (what) with a list of placement
// modifiers (where), see docs/modding/worldgen/index.md. like minecraft's configured and placed features joined into
// one file. the types and modifiers here are built in, worldgen scripts register more
+3
View File
@@ -1,3 +1,6 @@
// SPDX-FileCopyrightText: 2026 Paula Wisnievski
// SPDX-License-Identifier: AGPL-3.0-or-later
// a generator: noise settings, and the density functions, noises and biome rules it uses. compiled once for each
// seed, see OverworldTerrain. the data comes from mods' worldgen folders, see docs/modding/worldgen/terrain.md
import { EverythingRegistry } from "../everything_registry.ts";
+3
View File
@@ -1,3 +1,6 @@
// SPDX-FileCopyrightText: 2026 Paula Wisnievski
// SPDX-License-Identifier: AGPL-3.0-or-later
// noise for world generation. everything is built from named noises, the same ones mods get through
// FeatureChunk.noise_2d and noise_3d, so a generator using them gives the same world wherever it runs
import { Alea, create_noise_2d, create_noise_3d, NoiseFunction2D, NoiseFunction3D } from "@paulaboks/rng";
+3
View File
@@ -1,3 +1,6 @@
// SPDX-FileCopyrightText: 2026 Paula Wisnievski
// SPDX-License-Identifier: AGPL-3.0-or-later
// fills a chunk with the overworld: the terrain's density sampled on a coarse grid and interpolated (minecraft's
// noise cells), caves cut out of it, then each column's biome, its surface blocks and fluids. what all of it is comes
// from the generator's noise settings, see OverworldTerrain and docs/modding/worldgen/terrain.md. trees and the rest
+3
View File
@@ -1,3 +1,6 @@
// SPDX-FileCopyrightText: 2026 Paula Wisnievski
// SPDX-License-Identifier: AGPL-3.0-or-later
// what solid blocks and empty space become, from the noise settings' surface_rule and fluids (see data.ts), compiled
// for each chunk with its block ids. like minecraft's surface rules: a rule gives a block or nothing, and a sequence
// gives its first rule's block
+3
View File
@@ -1,3 +1,6 @@
// SPDX-FileCopyrightText: 2026 Paula Wisnievski
// SPDX-License-Identifier: AGPL-3.0-or-later
// the shape of the world and which biome each column gets, from a generator's data (see generator.ts): its density
// functions compiled for one seed. generate_overworld calls density and cave through here, so engine access mods can
// hook them. bworld's overworld is shaped after tectonic (https://github.com/Apollounknowndev/tectonic, MIT), its