884a8cea0b3b559be2d0830fcdf95407bd513c93
Build / build (push) Has been cancelled
Post-review fixes from the parallel code/security/hotkey/NPC audits. ## #35 — NBT keys (CRITICAL: screens were showing fictional data) ServerEconomyBridge.pushBountySnapshot now reads the actual KubeJS keys: - bnsBountyPool (compound id->1) — was bnsBounties.pool - bnsBountyActive (compound id->{progress,target,reward,...}) — was bnsBounties.active - bnsBountyCompleted (compound id->long cooldown-end-ms) — was bnsBounties.completed - Filters completed by `cooldown-end > now` so old cooldowns drop off ServerEconomyBridge.pushPlotSnapshot now reads server-scope state via KubeJS's MinecraftServer mixin (kjs$getPersistentData) using reflection, no compileOnly dep on KubeJS. Falls back to empty CompoundTag if the method isn't there. Resolves owner names from PlayerList for online players, GameProfileCache for offline. ## #36 — Hub UI + key rebind Single primary key: B opens HubScreen. Direct shortcut keys (K/J/N/H/M) all default to UNBOUND so they no longer compete with the ~100 other pack mods. Audit found M = vanilla Social Interactions + FTB Chunks fullscreen map (hard conflict, removed); H/N collided with Voice Chat toggles (minor, removed); K/J were safe (kept rebindable for power users). New HubScreen routes to the 5 sub-screens via labelled buttons + shows tier/balance/fee at a glance in the header. ## #37 — /bns open <screen> Java-registered Brigadier subcommand at RegisterCommandsEvent time, merges with KubeJS's /bns root. New OpenScreenPacket (S2C) pushes a screen open to the calling player. Screens: hub, tier, bounty, plot, shop, questlog. Suggests valid screens via tab-complete. This unlocks: - Easy NPC dialogue COMMAND actions calling /bns open shop, etc. - FTB Quests reward commands - Command blocks / /trigger objectives - Future scripted intros / tutorials Also: patched /srv/fast/brass-sigil-server/server/config/easy_npc/ security.cfg to allow `bns` in executeAsUserCommandAllowList.ALL. ## #38 — Network hardening - Per-player token bucket on C2S packets (10/s sustain, 20 burst). - All STRING_UTF8 codecs capped: kind=8, args=80, which=16. - Verb whitelist replaced with structured parse: args -> tokens -> per-verb regex validators -> rebuilt command. No more prefix-match surprises if /bns sell syntax expands. - Per-player in-flight guard on tier upgrades (500ms) closes the double-spend race window. - Bridge logs sanitised (control-char-stripped) so a hostile client can't inject newlines/ANSI into server logs. ## Review-driven nits also folded in - Per-player tickCount (was shared static — N-player skew) - VillagerTradeRebalance: try/catch around inner.getOffer; null cost-A passthrough; round-to-nearest denom split (was floor, ~10% price haircut) - SpurHud caches Component refs (avoid 120/s allocation) - ClientBnsState.completedIds now HashSet (O(1) per-frame lookups) - BountyBoardScreen: deleted the empty `if (isActive)` dead branch - Wire-format version bumped 0.2 -> 0.4 (added OpenScreenPacket) Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
bnstoolkit
Companion mod for the Brass and Sigil modpack. NeoForge 1.21.1.
Provides the in-game UI surface for the KubeJS-driven civic tier, bounty, plot, and shop systems. Pure client visuals + a thin C2S/S2C network bridge over the existing server-side state — no server-side gameplay logic lives here, just transport and presentation.
Status
M0 — scaffold only. Loads cleanly on client and dedicated server. No screens are open-able yet (key bindings register but their handlers are TODO). One network round-trip pair is wired as a smoke test.
See docs/bnstoolkit-architecture.md in the brass-and-sigil repo for
the full spec.
Building
./gradlew build
The output jar lands in build/libs/bnstoolkit-<version>.jar. Drop it
into the modpack's pack/overrides/mods/ directory.
Package layout
uk.sijbers.bnstoolkit
├── BnsToolkit # common mod entry
├── BnsToolkitClient # client mod entry
├── client
│ ├── BnsKeyBindings # T / B / P defaults
│ ├── hud
│ │ └── SpurHud # spurs + tier overlay
│ └── screens
│ ├── BaseBnsScreen # shared parent (will swap to FTB Library)
│ ├── TierUpgradeScreen
│ ├── BountyBoardScreen
│ ├── QuestLogScreen
│ ├── PlotPurchaseScreen
│ └── ShopBrowserScreen
└── network
├── BnsNetwork # payload registrar
├── c2s
│ └── RequestTierStatePacket
└── s2c
└── TierStateUpdatePacket
Milestones
| Milestone | Scope |
|---|---|
| M0 (now) | Scaffold, keybinds, network smoke-test packet pair |
| M1 | Tier upgrade screen + KubeJS bridge for tier/balance |
| M2 | Quest log + shop browser screens |
| M3 | Bounty board + plot purchase screens |
| M4 | HUD overlay, mod settings screen, FTB Library swap |
Description
Brass and Sigil companion mod — economy UI, FTB Chunks plot integration, tier upgrade screens.
Languages
Java
100%