diff options
| author | salmonik <salmonik@tuta.io> | 2026-07-29 01:03:24 +0200 |
|---|---|---|
| committer | salmonik <salmonik@tuta.io> | 2026-07-29 01:03:24 +0200 |
| commit | 74d2ada067bd2fd9436710ab7ac260e0eddf1314 (patch) | |
| tree | 1f791bb895a611d8e729a735ba098a647808a157 /CONTEXT.md | |
| parent | create example config on startup (diff) | |
| download | minecraft-ui-74d2ada067bd2fd9436710ab7ac260e0eddf1314.tar.gz minecraft-ui-74d2ada067bd2fd9436710ab7ac260e0eddf1314.zip | |
Add per-instance mod management with client-side detection
- New mod validation engine (src/mods.rs) with constant-pool class-file
scanning: detects server-side content (block, tileentity, command,
worldgen) vs client-only API (gui, renderer, forge/client)
- 7 client-only mods correctly detected (AppleSkin, CraftingTweaks,
Durability101, EnchantmentDescriptions, InventoryHUD, MouseTweaks,
TrashSlot); 51 server-capable; 1 unknown
- Routes + templating for mod upload (jar/zip), listing, delete, rescan
- Multipart upload with 500MB limit (bypasses axum's default 2MB)
- Per-instance mod summary card on edit page
- Whitelist toggle checkbox on edit page (persisted, drives ENABLE_WHITELIST)
- Dynamic Java image tag (java8/java17/java21) based on MC version
- Class scan is informational-only; rejection based on metadata side=CLIENT
- has_modpack flag cleanup on mod delete
- Remove hx-boost from <body> (was corrupting multipart uploads)
Diffstat (limited to '')
| -rw-r--r-- | CONTEXT.md | 6 |
1 files changed, 6 insertions, 0 deletions
| @@ -14,6 +14,12 @@ | |||
| 14 | 14 | ||
| 15 | - **Type** — The server software flavor: `VANILLA`, `FORGE`, or `FABRIC`. Determines which mod loader is installed. Chosen during Instance creation and cannot be changed afterward (changing Type means creating a new Instance). | 15 | - **Type** — The server software flavor: `VANILLA`, `FORGE`, or `FABRIC`. Determines which mod loader is installed. Chosen during Instance creation and cannot be changed afterward (changing Type means creating a new Instance). |
| 16 | 16 | ||
| 17 | - **Mod** — A Forge or Fabric mod packaged as a `.jar` file (or nested inside a `.zip` archive) that extends the Minecraft server with new features. Uploaded per-Instance into `data/mods/`. | ||
| 18 | |||
| 19 | - **Mod Validation** — The two-layer inspection applied to every uploaded Mod before it is written to disk: (1) metadata check — reads `META-INF/mods.toml` (Forge) or `fabric.mod.json` (Fabric) for the declared side; (2) class scan — walks all `.class` entries in the jar looking for references to `net/minecraft/server` vs `net/minecraft/client`. A Mod is **accepted** if it contains any server-class reference (with or without client classes). It is **rejected** if every class references only the client side. | ||
| 20 | |||
| 21 | - **Client-side-only Mod** — A Mod that contains zero server-side classes. These are rejected because they would crash the Minecraft server with a `ClassNotFoundException` or linkage error. | ||
| 22 | |||
| 17 | - **Modpack** — An optional set of server-side mods packaged as a ZIP. Applied on top of a World + Version + Type to produce a modded Server Instance. | 23 | - **Modpack** — An optional set of server-side mods packaged as a ZIP. Applied on top of a World + Version + Type to produce a modded Server Instance. |
| 18 | 24 | ||
| 19 | - **Backup** — A full snapshot of an Instance's entire `/data` directory at a point in time (world, server properties, mods, whitelist — everything). Stored as a ZIP archive inside the Server Directory. Restoring a Backup creates a new Server Instance; it does not overwrite the original. | 25 | - **Backup** — A full snapshot of an Instance's entire `/data` directory at a point in time (world, server properties, mods, whitelist — everything). Stored as a ZIP archive inside the Server Directory. Restoring a Backup creates a new Server Instance; it does not overwrite the original. |
