# Architectural Response

**Re:** REQ-2026-04-13-rules-mod-config-not-read-at-runtime
**Date:** 2026-04-13

## 1. Root Cause (two bugs)

**Bug 1: Wrong event bus (1.20.1 only).** `ModConfigEvent.Loading` and `Reloading` fire on the mod event bus, not `MinecraftForge.EVENT_BUS`. The `@SubscribeEvent` handlers were registered on the wrong bus and never fired. Fixed by switching to `FMLJavaModLoadingContext.get().getModEventBus().addListener()`.

**Bug 2: Config file section headers removed.** The Chronicler's config file had values at the top level without `[discord]` section headers. ForgeConfigSpec looks for `discord.bot_token` — without the section, it can't find the values and returns defaults.

## 2. Fixes Applied (all 6 builds, v1.0.3)
- 1.20.1: Config events moved to mod event bus
- All versions: Added prominent warning comment to generated config file
- 1.20.1: Added debug logging in RulesCommand (token length + channel ID)
- INSTALL.md: Section header preservation warning added

## 3. Chronicler Deploy Steps
1. Stop Otherworld
2. Replace jar with firefrostrules-1.0.3-1.20.1-forge.jar
3. Delete config/firefrostrules-common.toml
4. Start server — generates fresh config with section headers
5. Stop server
6. Edit ONLY the values under [discord] — keep headers intact
7. Start server — check logs for "config loaded successfully"
8. Player runs /rules — should show real Discord rules
