Add ModCheckTest to test runtime mod validations and entry point superclass checks. Include Gradle verification metadata for dependency integrity.

This commit is contained in:
Overlord committed 2026-10-03 09:59:47 +02:00
1 parent 18ff32b5ce
commit 6761f2d9ea
29 files changed
+1306 -72

No files matched your search

+11 -2
View File
@@ -213,8 +213,8 @@ it earlier.
## Storage
Mod data belongs in `storage()`: tables in `zomboidforge.db`, a SQLite database in the world's
save folder. Vanilla backups include it, and deleting the world deletes it. Each mod only
reaches its own tables.
save folder. Vanilla backups include it, and deleting the world deletes it. Through the API,
each mod only reaches its own tables.
A record declares a table's columns; each row has a `String` key:
@@ -268,6 +268,10 @@ Things to know:
world goes back to its last save, but the mod data keeps later writes.
3. When a mod's id changes, list the old ids in `mod.toml` as `previous_ids`; their tables
move to the new id once.
4. While a `transaction`, `update`, or `forEach` callback runs, the storage of every mod waits.
These callbacks must not wait for other threads, for example with
`main().submit(...).join()`. A backup waits at most 10 seconds for them and then runs
without pausing storage, so its copy of `zomboidforge.db` may be incomplete.
## Checks at startup
@@ -293,6 +297,11 @@ Every problem of every mod is listed in the log.
| game jar (game code and its bundled libraries) | only with `game` declared |
| ZomboidForge internals | no |
These rules keep mods from linking against the wrong classes by accident. They are not a
sandbox: a mod runs with the full privileges of the server process. Through reflection or the
file system it can reach anything the server can, including other mods' data in
`zomboidforge.db`.
## Profiling
Main-thread tasks and event listener calls appear in JFR recordings as the event