c699dcc77b106e1896c13f5a8428c799a072ab4f
Tidying pass on the KubeJS suite before plot system V1 lands. Sets up
the file structure + conventions + diagnostics so the larger plot
system has a clean foundation.
Changes:
1. NEW kubejs/README.md
File layout doc + conventions: logging prefix [bns/<module>],
persistent-data key naming (bns* prefix), one concern per file,
performance discipline (O(1) lookups, no polling).
2. Split economy_policy.js -> recipes_waystones.js + recipes_numismatics.js
Single-concern files. recipes_waystones removes ALL waystones
crafting (welcome.js distributes the only allowed waystone instead).
recipes_numismatics removes the 5 coin-denomination crafts.
3. NEW kubejs/server_scripts/bns_admin.js
/bns admin subcommands for OP diagnostics:
- info calling player's flags+counts
- waystone-count <player> read stored count
- waystone-set <player> <n> override stored count
- reset-welcome <player> clear bnsWelcomeGranted -- replays
the welcome grant on next login
Registered via ServerEvents.commandRegistry with Brigadier tree,
permission level 2 (OP). No performance cost (operator-triggered only).
4. Logging added to waystones_policy.js + welcome.js
Every action prints `[bns/<module>] ...` so server logs can be
filtered with `journalctl ... | grep '\[bns/'`.
Performance discipline applied:
- All event-handler lookups use Set.has (O(1)), not Array.includes
- No periodic tick polling anywhere
- No network calls in event handlers
- console.info is cheap (no string format unless logged)
Bumps to 0.20.0. Plot system V1 follows in v0.21.x as a separate
multi-file submodule under server_scripts/plots/.
Brass & Sigil
Self-hosted Minecraft modpack distribution + administration system. Three components, one repo:
brass-and-sigil/
├── launcher/ ← Avalonia desktop client (Windows .NET 8)
│ Auths with Microsoft, syncs the modpack, launches the game.
├── server/ ← brass-sigil-server daemon (Linux .NET 8)
│ Wraps the MC subprocess, exposes the admin web panel,
│ syncs mods, runs backups + BlueMap, handles whitelist.
├── pack/ ← Modpack content
│ ├── pack.lock.json Source of truth for mod versions / URLs / hashes
│ ├── tweaks/ Hand-written data-only tweak source
│ └── overrides/ Build output / hand-placed local files (gitignored)
├── scripts/ ← Build + deploy entry points (run from repo root)
│ ├── Update-Pack.ps1 Refresh pack.lock.json from Modrinth/CurseForge
│ ├── Check-Updates.ps1 Non-mutating "what's new?" report
│ ├── Build-Tweaks.ps1 Compile tweaks/ into pack/overrides/mods/*.jar
│ ├── Build-Pack.ps1 Generate manifest.json from the lockfile
│ └── Deploy-Brass.ps1 One-shot build + deploy everything
└── docs/ ← Operational notes, deploy runbook, schema docs
Quick start
# Pull dependencies, copy and edit the deploy profile
git clone <remote> brass-and-sigil
cd brass-and-sigil
Copy-Item scripts\deploy.config.template.ps1 scripts\deploy.config.ps1
notepad scripts\deploy.config.ps1 # fill in deploy share, SSH host, etc.
# Build + deploy everything in one go
.\scripts\Deploy-Brass.ps1
deploy.config.ps1 is gitignored -- local values never get committed.
Component reference
| Component | What it does | Technology |
|---|---|---|
launcher/ |
Friend-distributed client. Auths with Microsoft via WebView2 + XboxAuthNet, downloads mods, launches Minecraft. Single self-contained .exe published from publish/. |
Avalonia 12 + CmlLib.Core |
server/ |
Daemon running alongside the MC process on Linux. Hosts a Kestrel web panel for admin (cookie-auth, rate-limited), bridges RCON, runs scheduled backups + BlueMap renders, handles whitelist requests. | ASP.NET Core minimal APIs |
pack/ |
Lockfile-driven modpack content. pack.lock.json resolves mod slug → URL+SHA-1; Build-Pack.ps1 walks it and produces manifest.json for the launcher and the server-tool to consume. |
PowerShell tooling |
Workflow
- Bump mod versions:
.\scripts\Update-Pack.ps1(queries Modrinth + manual CurseForge entries). - Sanity-check:
.\scripts\Check-Updates.ps1for a non-mutating availability report. - Edit tweaks under
pack/tweaks/<name>/if you're changing recipes / loot / etc. - Deploy:
.\scripts\Deploy-Brass.ps1-- builds launcher + server, regenerates manifest, mirrors everything to the deploy share, scp's the server binary.
Secrets / config files
| File | Tracked? | Notes |
|---|---|---|
launcher/launcher-config.template.json |
✓ | Empty placeholders, public-safe |
launcher/launcher-config.json |
✗ | Local override; merged into the published exe at build time if present |
server/deploy/server-config.example.json |
✓ | Template; rename to server-config.json on the server with real values |
server/deploy/server-config.json |
✗ | Production config; lives on the server only |
scripts/deploy.config.ps1 |
✗ | Local deploy profile (paths, SSH host, share location) |
License
See LICENSE.
Languages
C#
53.1%
JavaScript
23.9%
PowerShell
12.9%
HTML
5.3%
CSS
2.9%
Other
1.9%