# Configuration Modern True Darkness uses a JSON config file located at `config/darkness.json`. The file is created automatically on first launch with default values. Changes made in-game via Mod Menu are saved to this file. Server owners can edit this file directly and restart the server/client to apply changes. --- ## Config File Location ``` <minecraft-instance>/config/darkness.json ``` --- ## Default Config ```json { "darkOverworld": true, "darkNether": false, "darkEnd": false, "darkCreative": false, "requireMod": false, "fullMoonBrightness": 50, "gibbousMoonBrightness": 30, "quarterMoonBrightness": 15, "crescentMoonBrightness": 5, "newMoonBrightness": 0, "caveBrightness": 0 } ``` --- ## Dimension Toggles | Field | Type | Default | Description | |---|---|---|---| | `darkOverworld` | boolean | `true` | Enable darkness in the Overworld. | | `darkNether` | boolean | `false` | Enable darkness in the Nether. | | `darkEnd` | boolean | `false` | Enable darkness in the End. | Modded dimensions (any dimension that is not Overworld, Nether, or End) always have darkness applied. This is not configurable. --- ## Player Toggles | Field | Type | Default | Description | |---|---|---|---| | `darkCreative` | boolean | `false` | When `true`, darkness applies to Creative mode players. Spectator mode is always exempt. | --- ## Moon Phase Brightness These settings control how bright the night is depending on the current moon phase. The scale is **0–100** where: - **0** = pitch black (maximum darkness) - **100** = vanilla brightness (no darkness applied) | Field | Type | Default | Moon Phase (MC internal) | Description | |---|---|---|---|---| | `fullMoonBrightness` | int | `50` | Phase 0 | Brightest natural night. | | `gibbousMoonBrightness` | int | `30` | Phases 1, 7 | Waning/waxing gibbous. | | `quarterMoonBrightness` | int | `15` | Phases 2, 6 | First/last quarter. | | `crescentMoonBrightness` | int | `5` | Phases 3, 5 | Waning/waxing crescent. | | `newMoonBrightness` | int | `0` | Phase 4 | Darkest natural night. | The moon phase cycles every 8 in-game days (each day is 24000 ticks). Setting all values to `100` effectively disables nighttime darkness while keeping cave darkness active. --- ## Cave Brightness | Field | Type | Default | Description | |---|---|---|---| | `caveBrightness` | int | `0` | Ambient light level in areas with no sky light (caves, mines, enclosed buildings). 0 = pitch black, 100 = well-lit. Block light (torches, lanterns) works normally regardless of this setting. | --- ## Server Enforcement | Field | Type | Default | Description | |---|---|---|---| | `requireMod` | boolean | `false` | When `true`, the server sends a login query packet. Players without the mod installed are disconnected with the message: *"You are missing the mod: TrueDarknessRefabricated"*. | > [!note] > The `requireMod` option only functions on the **server side**. It does not affect singleplayer. When enabled, the server checks during the login handshake whether the client responds to the mod's query packet. Clients without the mod will not understand the packet and will be disconnected. --- ## Migration from Older Versions If upgrading from a version that used the old `darknessIntensity` field, the config file will migrate automatically. The old field is silently ignored, and the new moon phase brightness and cave brightness fields are populated with their defaults. No manual migration is required. --- ## Related Pages - [[Modern True Darkness/Server Owners/Overview]] - Plugin features and dependencies