All source files of My-web.xyz Minetest-MM FULLY OPEN-SOURCE Server (CZE) (Address: my-web.xyz, Port: 30001/30003 or 30002 for Devel)
  • PostScript 57.3%
  • Lua 40.4%
  • Python 1.5%
  • Shell 0.4%
  • HTML 0.2%
Find a file
2026-11-01 12:58:26 +01:00
build-fixes merge develop_ai_recipes_fixes: 5.17.0 upgrade, craft/node gates, vendored game, README rewrite (tested on devel-testing) 2026-09-23 07:10:09 +02:00
compat mapgen-closure: bucket reasons cite Milan admin-only decisions 2026-10-31 15:35:07 +01:00
docs mapgen-closure: v6 world-obtainability gate + recrafts (acacia/aspen/bushes/coral/dry/agave/bridger/wagons) 2026-10-29 14:59:13 +01:00
games/minetest merge develop_ai_recipes_fixes: 5.17.0 upgrade, craft/node gates, vendored game, README rewrite (tested on devel-testing) 2026-09-23 07:10:09 +02:00
hooks Fix all 6 gpt-audit findings: setup-mt stop guard + spatialindex pin; pre-push pushed-commit secrets scan (+minetest.conf, fixed dead dbl-backslash regex); mods-download hard-fail on unreachable pin + lock only on --fresh + patch failures tracked; game-download set -e + explicit clone/checkout checks; player_visuals per-player eye height (no global mutation) 2026-10-27 15:19:33 +01:00
mm_compat mapgen-closure: gate GREEN (UNOBTAINABLE 73->0), fixes + buckets 2026-10-30 21:57:22 +01:00
mm_info polish: readable README, scoped license, mod.conf licenses + texture attribution 2026-10-22 10:10:34 +02:00
mods mapgen-closure: gate GREEN (UNOBTAINABLE 73->0), fixes + buckets 2026-10-30 21:57:22 +01:00
patches mob_horse eye 9 -> 7 (Milan playtest: still half a head high after #48; body untouched) 2026-10-27 18:57:02 +01:00
.gitignore cleanup: drop git-push, wave2/tumeni one-shot gens; lib-config.sh -x + README row; ignore *.rej 2026-10-23 11:45:53 +02:00
config-file-example Wave 2e weather: non-slip thin ice patch + snow_griefing off (managed key) 2026-10-06 19:58:57 +02:00
game-versions.lock merge develop_ai_recipes_fixes: 5.17.0 upgrade, craft/node gates, vendored game, README rewrite (tested on devel-testing) 2026-09-23 07:10:09 +02:00
lib-config.sh cleanup: drop git-push, wave2/tumeni one-shot gens; lib-config.sh -x + README row; ignore *.rej 2026-10-23 11:45:53 +02:00
LICENSE merge develop_ai_recipes_fixes: 5.17.0 upgrade, craft/node gates, vendored game, README rewrite (tested on devel-testing) 2026-09-23 07:10:09 +02:00
minetest-game-download Fix all 6 gpt-audit findings: setup-mt stop guard + spatialindex pin; pre-push pushed-commit secrets scan (+minetest.conf, fixed dead dbl-backslash regex); mods-download hard-fail on unreachable pin + lock only on --fresh + patch failures tracked; game-download set -e + explicit clone/checkout checks; player_visuals per-player eye height (no global mutation) 2026-10-27 15:19:33 +01:00
mods-apply-patches Revert ts_furniture seat rise (mistake: move_to puts feet at node centre = seat level; baseline was correct, rise made it +0.5 too high) 2026-10-27 16:30:10 +01:00
mods-apply-world.mt-regenerate-from-config-file deploy: run mods-apply-patches in apply/reset scripts (smartshop prune was skipped on deploy) 2026-09-24 22:34:00 +02:00
mods-audit.sh issue #47: translate Czech docs/comments to English (FUTURE_PLANS, DEPRECATED, MOD_STATE, ALIAS_COVERAGE, mods-audit.sh) + README language note 2026-09-25 18:14:26 +02:00
mods-download Fix all 6 gpt-audit findings: setup-mt stop guard + spatialindex pin; pre-push pushed-commit secrets scan (+minetest.conf, fixed dead dbl-backslash regex); mods-download hard-fail on unreachable pin + lock only on --fresh + patch failures tracked; game-download set -e + explicit clone/checkout checks; player_visuals per-player eye height (no global mutation) 2026-10-27 15:19:33 +01:00
mods-list mm_info server guide (CZ/EN) + sync/patches/content gates 2026-10-08 12:03:56 +02:00
mods-versions.lock mm_info content gates: source URL+pin required, junk-EN banned 2026-10-08 12:21:35 +02:00
README.md cleanup: drop git-push, wave2/tumeni one-shot gens; lib-config.sh -x + README row; ignore *.rej 2026-10-23 11:45:53 +02:00
regenerate-minetest-conf config handling: validate vars, idempotent minetest.conf/world.mt (fixes empty-conf lockout) 2026-09-24 10:04:23 +02:00
reset-all-world.mt-regenerate-from-config-file deploy: run mods-apply-patches in apply/reset scripts (smartshop prune was skipped on deploy) 2026-09-24 22:34:00 +02:00
reset-map-and-players config handling: validate vars, idempotent minetest.conf/world.mt (fixes empty-conf lockout) 2026-09-24 10:04:23 +02:00
setup-mt Fix all 6 gpt-audit findings: setup-mt stop guard + spatialindex pin; pre-push pushed-commit secrets scan (+minetest.conf, fixed dead dbl-backslash regex); mods-download hard-fail on unreachable pin + lock only on --fresh + patch failures tracked; game-download set -e + explicit clone/checkout checks; player_visuals per-player eye height (no global mutation) 2026-10-27 15:19:33 +01:00

minetest-mm

Language: this repository is maintained in English. All docs, comments, and commit messages must be in English so anyone can collaborate (issue #47).

Reproducible Luanti / Minetest server platform. One repo builds the engine, vendors the game and all mods, and deploys them with pinned versions — so every install and every upgrade is repeatable.

Tested with Luanti engine 5.17.0 + vendored minetest_game c42e4d0c.

Start here

New server? Copy config-file-example to config-file, edit it (versions, passwords, ports), then:

./setup-mt                                      # builds engine + deploys game
./mods-apply-world.mt-regenerate-from-config-file  # deploys mods + world.mt, starts server
./mods-audit.sh --mods /home/minetest/.minetest/mods \
  --worldmt /home/minetest/.minetest/worlds/world/world.mt
# must report 0 dead / 0 inactive

Then check debug.txt: 0x ERROR in the whole boot log (including the segment before World at), server listening.

Existing server (data-safe, map + DB kept)?

git pull                                        # in the repo clone on the server
# If pull aborts on local changes in regenerated files
# (mods-versions.lock, patched files under mods/ — both are regenerated,
# nothing precious), first run:
#   git checkout -- mods-versions.lock mods/
# then pull again and VERIFY the hash: git rev-parse HEAD (must equal the
# pushed commit). Never pipe pull through tail — it masks the exit code
# and a failed pull silently deploys the stale tree.
# review config-file (mt_version; set BEFORE running setup-mt)
./setup-mt                                      # rebuilds engine + deploys vendored game
./mods-apply-world.mt-regenerate-from-config-file  # deploys mods/, regenerates world.mt, starts server
./mods-audit.sh --mods /home/minetest/.minetest/mods \
  --worldmt /home/minetest/.minetest/worlds/world/world.mt

Then check debug.txt as above (0x ERROR in the whole boot segment).

Trying the newest upstreams? Do it on a test machine first, then commit the resulting lock files:

./mods-download --fresh            # newest mods, rewrites mods-versions.lock
./minetest-game-download --fresh   # newest game, rewrites game-versions.lock
# test, then commit + push both lock files

After the initial installation, switch first_install in config-file to anything other than y.

Repository layout

Path What it is
setup-mt Builds the Luanti engine and deploys the vendored game. Stops the server itself.
mods-download Rebuilds disposable mods/ from locked upstream commits.
minetest-game-download Rebuilds vendored games/minetest/ from the locked upstream commit.
mods-apply-world.mt-regenerate-from-config-file Deploys mods/ from the repo, regenerates world.mt, starts the server.
mods-apply-patches Applies patches/*.patch idempotently (also run by mods-download).
mods-audit.sh Verifies deployed mods against world.mt (must report 0 dead / 0 inactive).
regenerate-minetest-conf Rewrites the managed settings block of the live minetest.conf from config-file (data-safe, optional --restart).
lib-config.sh Shared shell library (sourced, never executed): loads + validates config-file, idempotently rewrites minetest.conf / world.mt. Used by setup-mt, regenerate-minetest-conf, mods-apply-*, reset-*.
reset-all-world.mt-regenerate-from-config-file Destructive: wipes DBs + world, redeploys everything from the repo.
reset-map-and-players Destructive: wipes map + players + auth, keeps world.mt.
mods/ Disposable mod tree (never hand-edit; rebuilt by mods-download).
games/minetest/ Vendored minetest_game snapshot (never hand-edit; rebuilt by minetest-game-download).
mods-list Enabled mods (load_mod_X = true, one per line, appended to world.mt verbatim); the single = false is intentional (interact).
mods-versions.lock / game-versions.lock Pinned upstream commits (reproducibility). Never deleted.
patches/ Reproducible fixes applied on top of upstreams.
mm_compat/ Our own compat mod (additive aliases + craft fixes), copied into mods/. See mm_compat/README.md.
mm_info/ Our own in-game server guide (welcome window, CZ/EN mod catalogue, rules).
compat/ Upgrade gates: node registry + craft-conflict detection. See compat/README.md.
hooks/ Git hooks (pre-push gate). Install with ./hooks/install.sh.
docs/ ALIAS_COVERAGE.txt (alias rationale), DEPRECATED.md (stale-mod decisions), FUTURE_PLANS.md (constraints + open questions), MOD_STATE.csv (mod health overview), RECIPE_CHANGES.md (player-facing recipe contract).
build-fixes/ Legacy patch for building engine 5.4.1 on new systems (unreferenced since the 5.17.0 upgrade; kept for history).
config-file-example Template for the server's private config-file (never committed). Key vars: mt_version (engine tag), mt_game_version (game branch for --fresh), first_install, DB passwords, ports, mt_* gameplay flags.

Script reference (all parameters)

Download scripts share one flag convention: --flag on the command line or FLAG=1 in the environment (--fresh / FRESH=1, --vanilla / VANILLA=1). Flags combine in any order (--fresh --vanilla = newest upstreams, no local modifications).

  • ./mods-download [--fresh] [--vanilla] — rebuild disposable mods/ from upstream clones. Default uses mods-versions.lock pins (reproducible; first run with no lock behaves like --fresh). --fresh ignores the lock, clones newest upstreams, rewrites the lock. --vanilla skips OUR modifications (patches/, mm_compat/) to test plain upstreams. Env equivalents: FRESH=1, VANILLA=1.
  • ./minetest-game-download [--fresh] — rebuild vendored games/minetest/ from the upstream game. Default uses the game-versions.lock pin. --fresh (or FRESH=1) clones newest upstream master and rewrites the lock — commit + push it.
  • ./regenerate-minetest-conf [--restart] — idempotently (re)writes the managed settings block of the LIVE minetest.conf from config-file. Data-safe (map + DBs kept, engine defaults untouched); repairs legacy tails including empty values. Restarts the server only with --restart.
  • ./setup-mt — no parameters. Builds the Luanti engine (mt_version from config-file), deploys the vendored game via plain copy. On first_install=y it also writes minetest.conf + the world.mt skeleton (incl. creative_mode from $mt_creative_mode); on upgrade runs it only rebuilds + redeploys. Run from the repo root.
  • ./mods-apply-world.mt-regenerate-from-config-file — no parameters. Deploys mods/ from the repo, regenerates world.mt from config-file + mods-list, restarts the server. Data-safe (map + DB kept).
  • ./mods-apply-patches [MODS_DIR] — apply patches/*.patch onto a mods tree (default: ./mods). Idempotent, safe to re-run.
  • ./mods-audit.sh [--mods DIR] [--worldmt FILE] [-q|--quiet] — audit world.mt (load_mod_*) vs mods on disk (modpack-aware, CRLF-tolerant). Defaults: --mods ./mods, --worldmt world.mt. Exit 0 = OK, 1 = problems found, 2 = bad arguments/files.
  • ./reset-all-world.mt-regenerate-from-config-file [anything] — no engine build here (that is setup-mt's job): destructive, drops + recreates all DBs, wipes the world dir, redeploys game + mods from the repo. With any argument (e.g. yes) it skips the "start service?" prompt (for automation); bare run asks before starting the server.
  • ./reset-map-and-players — no parameters. Destructive: drops map + players + auth DBs, cleans the world dir (keeps world.mt). Asks before starting the server.
  • ./hooks/install.sh — no parameters. Installs hooks/pre-push into .git/hooks/ and runs it once. Safe to re-run.
  • ./compat/node-registry.sh [--mods DIR] [--game DIR] [-o OUTPUT] — statically extract register_node / register_alias names (defaults: --mods ./mods, no game, -o compat/nodes.txt). mm_compat/ is always excluded (it is coverage, not a source).
  • python3 compat/craft-analyze.py [--allowlist FILE] [--compat FILE] [--witnesses FILE] [--player-doc FILE] [--mode gate|report] DUMP — analyze a runtime recipe dump (mm_craftdump_recipes.json). gate (default) exits 1 on any non-fixed HARD conflict; report only prints. --compat points at mm_compat/craft_recipes.lua so fixed pairs are excluded; --witnesses writes the probe input for craft-probe.lua; --player-doc writes the player-facing recipe summary.
  • python3 compat/tests/test_mm_compat_selfcheck.py — static self-check of our own fixes (no server needed, ~0.1 s, runs in the pre-push hook): every fix cites its -- PAIR:, every loser-new shape differs from every winner grid (fail = the "fix" changes nothing), new shapes are pairwise free. Needs compat/craft-dump-5.17.0.json for the served-vs-universe check — refresh it with craft-dump.lua on testing after every fix round and commit it; without it that section reports SKIP (never silent).
  • compat/ helpers: craft-dump.lua (recipe dump on the running server), craft-probe.lua (engine get_craft_result ground truth for witnesses), runtime-dump.lua (node dump), craft-allowlist.txt, frozen baselines (nodes-static-*.txt, nodes-runtime-*.txt, craft-baseline-5.17.0.txt), tests/test_craft_analyze.py (12 analyzer regression cases).
  • docs/: ALIAS_COVERAGE.txt (why each mm_compat alias exists), DEPRECATED.md, MOD_STATE.csv (mod health overview).

Principles

  • mods/ is disposable. It is wiped and rebuilt purely from mods-download (clone list) + generated content + our modifications (patches/, mm_compat/). Never hand-edit anything inside mods/; fix the upstream URL, patches/<name>.patch, or mm_compat/ instead.
  • games/minetest/ is vendored. A committed snapshot of upstream minetest_game, pinned by game-versions.lock. setup-mt and reset-all-* deploy it via plain copy — no network at deploy time. Never hand-edit it.
  • Everything is pinned. mods-versions.lock (mods) and game-versions.lock (game) record the exact tested commits. Default runs use the locks (reproducible). No lock file is ever deleted.
  • Every server file regenerates from config-file. minetest.conf (managed block via regenerate-minetest-conf) and world.mt (skeleton
    • mods-list) are rewritten idempotently from validated variables — re-running any script yields the same result. Scripts abort (exit 2) instead of writing half-empty files when a required variable is unset or empty, and they resolve the repo root from their own path (so the calling directory does not matter).
  • One flag convention, repo-wide:
    • --fresh (or FRESH=1) — ignore the lock, clone newest upstreams, rewrite the lock. Commit + push the new lock.
    • --vanilla (or VANILLA=1, mods-download only) — skip OUR modifications (patches/, mm_compat/) to test plain upstreams. Combine with --fresh for a fully vanilla tree.

Requirements

  • Ubuntu 22.04 (works in LXD; PostgreSQL 14 is the default there).
  • config-file is private and never committed (it holds passwords). Copy it from the template and edit it before the first run:
cp config-file-example config-file
# edit config-file with your preferences

Our modifications (patches/, mm_compat/)

  • mods-apply-patches [MODS_DIR] applies patches/*.patch idempotently (run automatically by mods-download unless --vanilla).
  • mm_compat/ is a repo-owned mod copied into mods/ by mods-download: additive register_alias entries so old maps never show unknown blocks, plus deterministic fixes for conflicting craft recipes. Rule: every upstream rename gets a matching alias here (see compat/ gate).
  • To check whether upstreams already fixed what we patch, compare a vanilla boot against a patched boot: ./mods-download --fresh --vanilla → boot → compare debug.txt logs. (The homedecor kitchen fix for issue #34 is a regular patch now: patches/homedecor_kitchen-run_at_every_load.patch, applied via mods-apply-patches like all others.)

Upgrade safety gates (compat/)

Long-running maps must never show unknown blocks or lose craftable items after an upgrade. Two gates guard this (details in compat/README.md):

  • Node registry — static extraction of register_node / register_alias from mods/ + games/minetest/, diffed against frozen baselines. mm_compat is scanned as coverage (aliases), never as a source.
  • Craft gate — runtime recipe dump (get_all_craft_recipes) analyzed for HARD conflicts (same inputs, different outputs); fixes live in mm_compat/craft_recipes.lua and are verified by an engine probe (get_craft_result ground truth).

Git hooks

./hooks/install.sh

The pre-push hook (~10 min, full-tree scans) blocks the push on: mm_compat/ / mm_info out of sync with mods/ copies, staged secrets (config-file, world.mt copies, *.db / *.sqlite, debug.txt / minetest.conf — this repo is public), failing compat/tests/ (analyzer regressions + mm_compat self-check), node-baseline regressions, unsatisfied mod dependencies, or a missing/invalid game-versions.lock. Slow checks (full craft analysis ~4 min, runtime dumps) do not run here — refresh them on testing and commit the results.

License

Our own work in this repository — scripts (setup-mt, mods-download, mods-apply-*, reset-*, mods-audit.sh, hooks/, compat/ tooling), patches/, mm_compat/, mm_info/, docs/ and this README — is released under the WTFPL: do what the fuck you want to.

mods/ and games/minetest/ are not ours: every mod and the game keep their own upstream licenses (see the license files shipped inside each directory, e.g. mods/<name>/LICENSE*, plus license fields in mod.conf). Those licenses always apply — the WTFPL above covers only our own files and never overrides them. patches/*.patch are diffs against specific upstream commits; applying or redistributing a patch means redistributing the upstream code it touches, so the target mod's license terms travel with it.