Files
firefrost-services/docs/code-bridge/responses/RES-2026-04-13-rules-mod-config-not-read-at-runtime.md
Claude (Chronicler #83 - The Compiler) 29f0127a60 v1.0.3: Fix config read — wrong event bus + section header comments
1.20.1: ModConfigEvent fires on mod bus, not MinecraftForge.EVENT_BUS.
Moved Loading/Reloading to FMLJavaModLoadingContext.getModEventBus().
Added config file header warning about preserving [section] headers.
Debug logging in RulesCommand prints token length + channel at runtime.
All 6 builds bumped to 1.0.3.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-13 17:53:28 -05:00

1.4 KiB

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