Skip to main content

Comfort system

The mod introduces a comfort system that affects sleep quality. When a player goes to bed, their rest level after waking depends on the comfort level around the bed.

The comfort scan radius around the bed is defined in the configuration file:

"comfort": {
"enabled": true,
"scanRadius": 5
},

Where 5 is the number of blocks.

You can also completely disable the comfort system.

Comfort is influenced by nearby elements such as furniture, plants in pots, glass, carpets, and lanterns. Some blocks increase comfort, while others decrease it.


Comfort tags

You can extend the comfort system using data packs by adding blocks to special tags.

Place your tag files in:

data/midnightthoughts/tags/block/

Each file must contain a JSON list of blocks:

{
"replace": false,
"values": [
"minecraft:example_block"
]
}

Setting "replace": false ensures that new blocks are added without overriding the default ones. Tags in Minecraft are used to group blocks together through datapacks and mods.


Positive comfort tags

These tags increase comfort and contribute to the Well Rested level:

TagEffect
comfort_lighting+1 level
comfort_carpet+1 level
comfort_furniture+1 level
comfort_decoration+1 level
comfort_structure+1 level

Each category contributes +1 level to the effect (up to 5 levels total).


Negative comfort tags

These tags reduce comfort around the bed:

TagEffect
comfort_negative_darkReduces comfort
comfort_negative_hostileReduces comfort
comfort_negative_macabreReduces comfort
warning

Too many negative blocks may lower the final Rested level or cause nightmares.


Full block list

{
"replace": false,
"values": [
"minecraft:torch",
"minecraft:wall_torch",
"minecraft:soul_torch",
"minecraft:soul_wall_torch",
"minecraft:lantern",
"minecraft:soul_lantern",
"minecraft:glowstone",
"minecraft:sea_lantern",
"minecraft:redstone_lamp",
"minecraft:shroomlight",
"minecraft:end_rod",
"minecraft:candle",
"minecraft:white_candle",
"minecraft:orange_candle",
"minecraft:magenta_candle",
"minecraft:light_blue_candle",
"minecraft:yellow_candle",
"minecraft:lime_candle",
"minecraft:pink_candle",
"minecraft:gray_candle",
"minecraft:light_gray_candle",
"minecraft:cyan_candle",
"minecraft:purple_candle",
"minecraft:blue_candle",
"minecraft:brown_candle",
"minecraft:green_candle",
"minecraft:red_candle",
"minecraft:black_candle"
]
}