Skip to main content

Config

The config lives at config/midnightthoughts.json and is created on first launch.

info

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
}
}
Version differences

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

SectionExplained on
sleepOverlaySleep overlay, plus custom facts for useFactsApi and userContentReplaces, and summary screen for enableDailySummaryScreen
wellRestedWell Rested
mvpPlayer statistics
comfortComfort system
serverFor servers
uiSee the table below

UI settings

The ui section is spread across several features, so here it is in one place:

ParameterDefaultDescription
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
hideWellRestedHudfalseHides the Rested effect bar with its level and remaining time — see Well Rested
hideSleepingPlayersHudfalseHides the Sleeping 2/5 plate shown while anyone on the server is asleep — see for servers
hideThemeSwitchButtonfalseRemoves the gear button, so players cannot pick their own theme — see summary screen
note

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.

tip

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.

Out-of-range numbers are pulled back to the nearest valid value.

SettingAllowed range
minSlideDisplayTimeMs, maxSlideDisplayTimeMs500 – 120000
fadeInDurationMs, fadeOutDurationMs0 – 10000
overlayOpacity, textOpacity, imageOpacity, specialSlideChance0.0 – 1.0
durationMinutes, mvpWellRestedDurationMinutes1 – 1440
Speed / strength / attack speed phases-5.0 – 5.0
healthBonus0.0 – 200.0
regenBonus0.0 – 1.0
scanRadius0 – 8
nightmareThreshold, sleepBlockThreshold-100 – 100
Comfort weights-100 – 100
MVP point values0 – 100000

If maxSlideDisplayTimeMs ends up below minSlideDisplayTimeMs, it is raised to match.


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.

note

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.