Files
brass-and-sigil/pack/overrides/kubejs
Matt 9f0c9e262a pack: content + storage batch v0.24.0 -> v0.26.0
Mods added (in lockfile):
  v0.24.0  YUNG's structure mods (9):
           - Better Dungeons, Better Mineshafts, Better Ocean
             Monuments, Better Nether Fortresses, Better End Island,
             Better Witch Huts, Better Desert Temples, Better Jungle
             Temples, Bridges, Extras
  v0.24.1  Create: Radars (Aeronautics-compatible from v0.4.5.1+)
  v0.24.2  Ars Creo + Create Ars Compact (the latter removed in 0.25.0)
  v0.24.3  FallingTree (whole-tree chop on axe hit)
  v0.24.4  Copycats+, Create: Connected, Create: Interiors
  v0.24.5  Create: Power Loader (Aeronautics-airship chunkloading)
  v0.24.6  -- KubeJS bridges only (see below)
  v0.24.7  -- Patchouli welcome book attempt 1 (kubejs/data) -- failed
  v0.24.8  -- Patchouli attempt 2 (assets/data split) -- failed
  v0.24.9  -- Patchouli attempt 3 (patchouli_books/ root path) -- worked
  v0.25.0  REMOVED Create Ars Compact (broken sauce:source_fluid recipes,
           no public tracker, half-finished compat layer);
           added Create: Dragons Plus, Create: Enchantment Industry
  v0.26.0  Sophisticated Core/Storage/Backpacks/Create-Integration,
           Create: Additional Logistics

KubeJS additions:
  - supplementaries_bridges.js: flax -> 2x string via Create Press,
    Plunderer drops 1-3 spurs via EntityEvents.drops
  - recipes_numismatics.js: renamed COIN_IDS -> COIN_RECIPE_REMOVE_IDS
    to avoid Rhino global-scope collision with numismatics_tooltips.js,
    added sprocket to the removal list (was missing)
  - welcome.js: migrated from vanilla written_book (broken Filterable
    codec in 1.21) to Patchouli book at patchouli_books/manual/

Patchouli manual:
  - 5 entries (Welcome, Waystones, Money, Plots, Rules) under one
    "Server Basics" category
  - Lives at pack/overrides/patchouli_books/ (root path) -- this is
    the modpack-author path per Patchouli docs, NOT data/+assets/
    which is for mods bundled in jars
  - Book id: patchouli:manual (default namespace in this mode)

All v0.24-v0.26 work has been live on the server and tested.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-24 22:42:32 +00:00
..

Brass & Sigil KubeJS scripts

All custom server behaviour lives here. Files in this tree ship via the modpack manifest (see scripts/Build-Pack.ps1kubejs/ is in managedRoots), get synced to both server and client installs, and are loaded by KubeJS on startup.

File layout

kubejs/
├── README.md              this file
│
├── server_scripts/        Loaded by the SERVER's KubeJS on world load.
│   ├── recipes_<x>.js     Crafting-recipe overhauls per mod.
│   ├── waystones_policy.js Waystones placement gating (1/player + bans).
│   ├── welcome.js         First-join grant: waystone + manual book.
│   ├── cc_recipes.js      Full ComputerCraft recipe overhaul.
│   └── bns_admin.js       /bns admin <subcommand> for OP diagnostics.
│
└── client_scripts/        Loaded by the CLIENT's KubeJS on game load.
    └── jei_hides.js       Hide specific items from the JEI ingredient list.

Conventions

  • Logging prefix: every console line uses [bns/<module>] so server logs can be filtered with journalctl -u brass-sigil-server.service | grep '\[bns/'. Keeps our output separate from mod output.
  • One concern per file. Recipe overhauls live in recipes_<modname>. Block/item policy goes in a <thing>_policy.js. Don't mix recipe removal with event listeners in the same file.
  • Persistent player data keys are prefixed bns to avoid clashing with other mods' use of player.persistentData. Currently used keys:
    • bnsWaystoneCount (int) — see waystones_policy.js
    • bnsWelcomeGranted (bool) — see welcome.js
  • Performance: hot-path event handlers (BlockEvents.placed/broken, PlayerEvents.loggedIn) must stay O(1). Use Set for ID lookups, never Array.includes inside an event handler. Avoid Modrinth/network calls in event handlers — never. No periodic-tick polling unless absolutely necessary.
  • Server commands are registered under the /bns namespace (/bns admin ..., future: /bns plot ...). See bns_admin.js for the registration pattern.

Diagnostics

When something looks wrong in-game, first port of call:

  1. /bns admin info — prints active flags + counts for the running player
  2. /bns admin waystone-count <player> — read stored count
  3. /bns admin reset-welcome <player> — re-trigger the first-join grant
  4. Server log: journalctl -u brass-sigil-server.service -f | grep '\[bns/'

See also

  • pack/overrides/defaultconfigs/ — first-run mod configs (auto-copied to config/ by NeoForge on first launch only)
  • scripts/Check-Deps.ps1 — pre-flight dep check, runs before any Deploy-Brass -Stage Pack deploy
  • The memory file project-mc-player-economy.md for the broader plan