This mod is server-side.
Right clicking bed makes you sleep in it.
Shift right clicking sets your respawn point.
Fabric API - https://www.curseforge.com/minecraft/mc-mods/fabric-api
This is one of the most underrated mods I've ever seen. I was looking for this exact feature, I'm really glad you made it !
Please 1.18 port
Looks like someone was tired of waiting for Comfrots to update
In reply to Orii7:
Point of this mod is not to replace comforts, but to make it without any new items, so that only server needs to have it installed