Config
The config lives at config/midnightthoughts.json and is created on first launch.
A full explanation of every parameter is on the matching page in the sidebar. This page is the complete reference — the file as a whole, plus the rules the mod applies when reading it.
Full config
{
"sleepOverlay": {
"minSlideDisplayTimeMs": 6000,
"maxSlideDisplayTimeMs": 8000,
"fadeInDurationMs": 300,
"fadeOutDurationMs": 300,
"overlayOpacity": 0.4,
"textOpacity": 1.0,
"imageOpacity": 0.6,
"specialSlideChance": 0.05,
"enableStarDust": true,
"showSlideProgress": true,
"enableOverlay": true,
"enableImage": true,
"enableDailySummaryScreen": true,
"useFactsApi": false,
"userContentReplaces": false,
"hideChatWhenSleeping": true
},
"wellRested": {
"enabled": true,
"levels": {
"level5": {
"durationMinutes": 15,
"speedPhase1": 0.25,
"speedPhase2": 0.15,
"speedPhase3": 0.08,
"strengthPhase1": 1.5,
"strengthPhase2": 1.0,
"strengthPhase3": 0.5,
"attackSpeedPhase1": 0.07,
"attackSpeedPhase2": 0.04,
"attackSpeedPhase3": 0.02,
"healthBonus": 10.0,
"regenBonus": 0.05
},
"level4": {
"durationMinutes": 10,
"speedPhase1": 0.2,
"speedPhase2": 0.12,
"speedPhase3": 0.06,
"strengthPhase1": 1.0,
"strengthPhase2": 0.75,
"strengthPhase3": 0.5,
"attackSpeedPhase1": 0.06,
"attackSpeedPhase2": 0.03,
"attackSpeedPhase3": 0.02,
"healthBonus": 8.0,
"regenBonus": 0.04
},
"level3": {
"durationMinutes": 7,
"speedPhase1": 0.16,
"speedPhase2": 0.09,
"speedPhase3": 0.04,
"strengthPhase1": 0.75,
"strengthPhase2": 0.5,
"strengthPhase3": 0.25,
"attackSpeedPhase1": 0.05,
"attackSpeedPhase2": 0.03,
"attackSpeedPhase3": 0.01,
"healthBonus": 6.0,
"regenBonus": 0.03
},
"level2": {
"durationMinutes": 5,
"speedPhase1": 0.12,
"speedPhase2": 0.06,
"speedPhase3": 0.03,
"strengthPhase1": 0.5,
"strengthPhase2": 0.25,
"strengthPhase3": 0.25,
"attackSpeedPhase1": 0.04,
"attackSpeedPhase2": 0.02,
"attackSpeedPhase3": 0.01,
"healthBonus": 4.0,
"regenBonus": 0.02
},
"level1": {
"durationMinutes": 3,
"speedPhase1": 0.08,
"speedPhase2": 0.04,
"speedPhase3": 0.02,
"strengthPhase1": 0.25,
"strengthPhase2": 0.25,
"strengthPhase3": 0.25,
"attackSpeedPhase1": 0.02,
"attackSpeedPhase2": 0.01,
"attackSpeedPhase3": 0.01,
"healthBonus": 2.0,
"regenBonus": 0.01
}
}
},
"mvp": {
"enabled": true,
"minScoreRequired": 10,
"pointsPerDistance100": 2,
"pointsPerBlock": 3,
"pointsPerMob": 15,
"pointsPerJump10": 1,
"penaltyPerDeath": 30,
"mvpWellRestedDurationMinutes": 21
},
"comfort": {
"enabled": true,
"scanRadius": 5,
"weights": {
"lighting": 1,
"carpet": 1,
"furniture": 1,
"decoration": 1,
"structure": 1,
"macabre": -1,
"hostile": -1,
"dark": -1
},
"nightmareThreshold": -1,
"sleepBlockThreshold": -2,
"nightmareEnabled": true,
"sleepBlockEnabled": true
},
"server": {
"resetPhantomTimerForNonSleepers": true
},
"ui": {
"theme": "classic",
"wellRestedHudPosition": "left",
"hideWellRestedHud": false,
"hideSleepingPlayersHud": false,
"hideThemeSwitchButton": false
}
}
One group of keys is not shown above: hastePhase1 / hastePhase2 / hastePhase3 inside each Well Rested level — mining speed bonuses. Minecraft has no such attribute before 1.21, so these are absent on 1.20.1.
Where each section is explained
| Section | Explained on |
|---|---|
sleepOverlay | Sleep overlay, plus custom facts for useFactsApi and userContentReplaces, and summary screen for enableDailySummaryScreen |
wellRested | Well Rested |
mvp | Player statistics |
comfort | Comfort system |
server | For servers |
ui | See the table below |
UI settings
The ui section is spread across several features, so here it is in one place:
| Parameter | Default | Description |
|---|---|---|
theme | "classic" | Default summary screen theme for everyone on the server. One of classic, vanilla, tech, magic — see summary screen |
wellRestedHudPosition | "left" | Where the Rested bar sits on screen. One of left, bar, right — see Well Rested |
hideWellRestedHud | false | Hides the Rested effect bar with its level and remaining time — see Well Rested |
hideSleepingPlayersHud | false | Hides the Sleeping 2/5 plate shown while anyone on the server is asleep — see for servers |
hideThemeSwitchButton | false | Removes the gear button, so players cannot pick their own theme — see summary screen |
All three hide flags are false by default, which means everything is shown. Setting one to true hides that element for every player on the server.
Where the values come from
Most settings are server-authoritative. When you join a server, it sends its config to your client, and that copy wins over your local file for the session. This keeps overlay timings, opacity, comfort rules and the default theme consistent for everyone.
The exception is your personal theme. If you pick one with the gear button, it stays yours regardless of the server default — see summary screen.
Changing the config on a live server does not require a restart:
/midnightthoughts reload config
The file is re-read, validated, and pushed to everyone online. Full command reference on the commands page.
Validation
The config is checked every time it is read. Values that make no sense are corrected rather than rejected, and each correction is written to the server log so you can see what happened.
- Clamping
- Invalid values
- Missing keys
- Broken files
Out-of-range numbers are pulled back to the nearest valid value.
| Setting | Allowed range |
|---|---|
minSlideDisplayTimeMs, maxSlideDisplayTimeMs | 500 – 120000 |
fadeInDurationMs, fadeOutDurationMs | 0 – 10000 |
overlayOpacity, textOpacity, imageOpacity, specialSlideChance | 0.0 – 1.0 |
durationMinutes, mvpWellRestedDurationMinutes | 1 – 1440 |
| Speed / strength / attack speed phases | -5.0 – 5.0 |
healthBonus | 0.0 – 200.0 |
regenBonus | 0.0 – 1.0 |
scanRadius | 0 – 8 |
nightmareThreshold, sleepBlockThreshold | -100 – 100 |
| Comfort weights | -100 – 100 |
| MVP point values | 0 – 100000 |
If maxSlideDisplayTimeMs ends up below minSlideDisplayTimeMs, it is raised to match.
"theme" only accepts classic, vanilla, tech or magic. Anything else resets to classic.
Numbers that are not numbers at all — NaN, Infinity — reset to their defaults instead of being clamped.
A missing Well Rested level is restored from defaults, so deleting level3 from the file is a valid way to reset just that one.
Any key absent from the file is filled in with its default, and the file is rewritten so you can see and edit it. Values already present are preserved.
Deleting a key — or a whole section — is therefore a valid way to reset it.
If the file cannot be parsed at all — a stray comma, a truncated write — the mod does not crash and does not silently overwrite your work. The damaged file is renamed to midnightthoughts.json.broken and a fresh default config is generated.
Your original is still there under the .broken name. Fix the syntax error and rename it back.
Safe writing
The config and the statistics file are written atomically — the mod writes to a temporary file and then swaps it into place. A crash or a power cut in the middle of a save leaves the previous version intact instead of a half-written file.
Statistics are also kept in memory while the server runs and flushed on player disconnect and on shutdown, rather than re-read from disk on every access.