Config is in world/serverconfig/ not config/ Applies to all three versions (1.16.5, 1.20.1, 1.21.1) README in NextCloud also updated.
27 lines
1.4 KiB
Markdown
27 lines
1.4 KiB
Markdown
# Firefrost Rules Mod — Build Environment
|
|
|
|
## Project Structure
|
|
- `1.21.1/` — NeoForge (Java 21, Gradle 8.8, moddev 2.0.141)
|
|
- `1.20.1/` — Forge (Java 17, Gradle 8.8, ForgeGradle 6.0)
|
|
- `1.16.5/` — Forge (Java 8, Gradle 7.6.4, ForgeGradle 5.1)
|
|
|
|
## What This Mod Does
|
|
Player types `/rules` → mod fetches rules from a Discord message → displays in-game with colored formatting. Admins update rules by editing a Discord message — no restarts, no file editing.
|
|
|
|
## Config Location
|
|
Config file is created at `world/serverconfig/firefrostrules-server.toml` — NOT in `config/`. This applies to all three versions.
|
|
|
|
## 7 Source Files (each version)
|
|
- ServerRules.java — main mod class
|
|
- ServerRulesConfig.java — TOML config (bot token, channel ID, message ID)
|
|
- RulesCommand.java — /rules command handler
|
|
- DiscordFetcher.java — async HTTP fetch from Discord API
|
|
- DiscordFormatter.java — Discord markdown → Minecraft chat formatting
|
|
- RulesCache.java — 30-minute cache with fallback
|
|
- CooldownManager.java — per-player 60-second cooldown
|
|
|
|
## Version Differences
|
|
- 1.21.1: `net.neoforged.*`, `ModConfigSpec`, `Component.literal()`, `java.net.http.HttpClient`
|
|
- 1.20.1: `net.minecraftforge.*`, `ForgeConfigSpec`, `Component.literal()`, `java.net.http.HttpClient`
|
|
- 1.16.5: `net.minecraftforge.*`, `ForgeConfigSpec`, `StringTextComponent`, `HttpURLConnection`, `new JsonParser().parse()`
|