Mods / BedSpawn

Tags:
QoL Tweak
Author:
ilan
Side:
Both
Created:
Jun 14th 2024 at 6:15 AM
Last modified:
Jun 17th at 5:53 AM
Downloads:
310257
Latest release (for Vintage Story 1.22.0 - 1.22.3, potentially outdated):
bedspawnv2_1.7.1.zip  1-click install

A simple mod that sets your spawn point when you use a bed. The spawn point is reset when the bed is destroyed.

Includes a command called /set-fatigue to allow you to set your player's "tiredness" (requires admin).

Configuration

 

The configuration file is located at <data>/ModConfig/BedSpawn.json

{
  // A list of blacklisted bed codes that won't set your spawn.
  // Useful if you want to take a hay bed for exploration, for example. In that case, the value should look like:
  // ["bed-hay"]
  "BlacklistedBeds": [],

  // If true, will only set the spawn if the player is sneaking when using the bed
  "RequireSneaking": false,
  
  "Rooms": {
    // If true, will require the bed to be in a valid room to set your spawn
    "Enabled": false,

    // A list of bed codes that will set your spawn that ignore the room requirement
    "BedsThatDontRequireRooms": []
  },

  // If true, will tell you in chat why the bed isn't setting your spawn
  "EnableDebugMessages": true,

  // If true, you will be notified when you respawn and your bed's been destroyed
  "NotifyPlayerOnBedDestroyed": false,

  // If true, requires the bed to be above sea level to set your spawn
  "DisableBelowSeaLevel": true,
  
  "Cooldown": {
    // If true, will force you to wait before you can set your spawn again
    "Enabled": true,

    // The number of days you have to wait before you can set your spawn again. Can be fractional i.e. 0.5 = half a day
    "CooldownDays": 0.5
  }
}

Mod Version Mod IdentifierFor Game version Downloads Released Changelog Download 1-click mod install*
1.7.1 bedspawnv2
1.22.0 - 1.22.3
58594 Jun 17th at 5:53 AM bedspawnv2_1.7.1.zip 1-click install

Prevent crashes if mod config load fails (usually thanks to autoconfiglib)

1.7.0 bedspawnv2
1.22.0 - 1.22.2
30811 May 11th at 2:39 PM bedspawnv2_1.7.0.zip 1-click install

Updated for 1.22

1.6.4 bedspawnv2
1.21.2 - 1.21.5
114525 Oct 8th 2025 at 9:27 AM bedspawnv2_1.6.4.zip 1-click install

Unpatch only BedSpawn patches when mod is disposed

1.6.3 bedspawnv2
1.21.2 - 1.21.4
134 Oct 8th 2025 at 9:22 AM bedspawnv2_1.6.3.zip 1-click install

Added russian translation (thanks Qua8ion!)

1.6.2 bedspawnv2 22708 Sep 14th 2025 at 5:15 AM bedspawnv2_1.6.2.zip 1-click install

Changed target game version to 1.21.0

1.6.1 bedspawnv2 1216 Sep 13th 2025 at 4:43 PM bedspawnv2_1.6.1.zip 1-click install
  • Added option to disable setting spawn below sea level - DisableBelowSeaLevel
  • Added option to have a cooldown between each spawn set - Cooldown
1.6.0 bedspawnv2 690 Sep 13th 2025 at 10:33 AM bedspawnv2_1.6.0.zip 1-click install
  • Added option to require beds be in a "room" to set your spawn
    • Controlled by config option Rooms:Enabled
    • Also includes a "whitelist" for beds that will still set your spawn, even if you use them outside of a room: Rooms:BedsThatDontRequireRooms
  • Added message when your bed has been destroyed and you respawn
    • Controlled by config option NotifyPlayerOnBedDestroyed
1.5.0 bedspawnv2 6074 Sep 9th 2025 at 11:43 AM bedspawnv2_1.5.0.zip 1-click install

Updated to 1.21.1

1.4.0 bedspawnv2 58041 Jan 26th 2025 at 9:08 AM bedspawnv2_1.4.0.zip 1-click install

Updated target game version to 1.20.3

1.3.0 bedspawnv2 7228 Nov 18th 2024 at 4:10 PM bedspawnv2_1.3.0.zip 1-click install

Added config option for only setting spawn while sneaking

1.2.0 bedspawnv2 9420 Jun 15th 2024 at 9:14 PM bedspawnv2_1.2.0.zip 1-click install

Fix localization issue, fix crash when breaking beds

1.1.0 bedspawnv2 310 Jun 15th 2024 at 3:03 PM bedspawnv2_1.1.0.zip 1-click install

Added configuration option to blacklist bed types from being used as spawn points as suggested by CKitt

1.0.0 bedspawnv2 506 Jun 14th 2024 at 7:56 AM bedspawnv2_1.0.0.zip 1-click install

Initial release


121 Comments (oldest first | newest first) (threaded | flat)

Janeator, Aug 23rd at 8:36 PM

If I enable Rooms, is that a requirement to set the spawn point when sleeping, or a requirement when dying to ensure the bed is in a room to be elegible? Or both?

tempestinateacup, Aug 4th at 11:42 PM

is there any way you could make this compatible with the decorative bed from chiseltools? I want to make a custom bed but i want it to be my spawn point :/

AlleyBalley, Jul 3rd at 3:17 AM

I love this mod, it really is a must-have. Is there any way you could make it compatible with Double Beds?

AlleyBalley, Jul 20th at 6:09 AM (modified Jul 20th at 6:09 AM)
@ilan: Looks like they made it compatible already :)

Yessss bro. My life blood <3 <3

arcionek, Jun 25th at 7:25 AM

Mod looks absolutely great! Though, may a suggest an additional config option? It would be great help for a server I'm working on with friends. 

Durability use per respawn, with 0 being default. I was thinking if it could have another config for using temp gears, but I feel like that's a whole different can of worms... 

HuskyInABasket, Jun 6th at 5:07 AM (modified Jun 6th at 5:17 AM)

crash when trying to set spawn in bed.

looks like it some wacky code at line 115 in bedspawnsystem.cs or maybe config was not made?

version 1.22.3

 

Crash Report
Player Grignir got removed. Reason: Threw an exception at the server
5.6.2026 21:57:01 [Server Error] Exception: Object reference not set to an instance of an object.
at BedSpawn.BedSpawnModSystem.SetPlayerSpawn(IServerPlayer player, BlockSelection sel, Boolean wasSneaking) in D:\Code\VintageStory\VSMods\src\BedSpawn\BedSpawn\BedSpawnModSystem.cs:line 115
at Vintagestory.GameContent.BlockBed.OnBlockInteractStart_Patch1(BlockBed this, IWorldAccessor world, IPlayer byPlayer, BlockSelection blockSel)
at Vintagestory.Server.ServerSystemBlockSimulation.HandleBlockInteract(Packet_Client packet, ConnectedClient client) in VintagestoryLib\Server\Systems\World\BlockSimulation.cs:line 500
at Vintagestory.Server.ServerSystemInventory.HandleHandInteraction(Packet_Client packet, ConnectedClient client) in VintagestoryLib\Server\Systems\Inventory.cs:line 335
at Vintagestory.Server.ServerMain.HandleClientPacket_mainthread(ReceivedClientPacket cpk) in VintagestoryLib\Server\ServerMainNetworking.cs:line 275
at Vintagestory.Server.ServerMain.ProcessMain() in VintagestoryLib\Server\ServerMain.cs:line 964
HuskyInABasket, Jun 13th at 3:00 AM
@ilan: You probably have autoconfiglib installed, which changes how the game creates/loads configs. Remove it and it'll work just fine :)

I do but I need it for other things in my modpack. can i temporarily unistall it then load a bedspawn config then reinstall autoconfiglib?

ilan , Jun 17th at 5:54 AM
@HuskyInABasket: I do but I need it for other things in my modpack. can i temporarily unistall it then load a bedspawn config then reinstall autoconfiglib?

That wouldn't work, as mod configs are loaded every time you load up a world. I released a new version just now (1.7.1) that should prevent crashes, but it's just a bandaid.. since autoconfiglib literally changes/breaks how mod configs are loaded, the best I could do is use a default config if loading the config fails

charliebrown53, May 19th at 11:47 AM

Hello! Any idea why, in 1.22.2, I set my spawn to my bed and occasionally when I die I respawn in place?

ilan , May 22nd at 5:13 AM
@charliebrown53: Hello! Any idea why, in 1.22.2, I set my spawn to my bed and occasionally when I die I respawn in place?

Dunno, this mod only sets your spawn like a temporal gear. You probably have a different mod that changes the respawn location?

Mr_Charles, May 17th at 6:11 PM

Hey! Thanks for this mod! It's so simple, but so useful.

Doomstrike53, Apr 23rd at 10:35 PM

radarcg Just tested, seems to work fine.

YangWenLi, May 6th at 7:26 PM
@Doomstrike53: radarcg Just tested, seems to work fine.

That seems odd. It should not, as 1.21 and 1.22 are different .net versions, requiring all mods to be recompiled. 

radarcg, Apr 22nd at 6:35 AM

does it work on 1.22?

ilan , Mar 27th at 9:49 AM

Aekiel

Once a stable build is out, sure

Aekiel, Mar 16th at 10:13 AM

port to 1.22 planed?

CYBIECK, Mar 8th at 2:52 PM

Has the mod been broken by the new update ? it doesnt seem like they changed anything relating to beds or respawns 

 

Retro96, Jan 31st at 12:08 PM

Is it possible to add the option to add a spawn cool down so say you die respawn and you can not respawn for 1 hour irl time etc?

 

Yehoria, Jan 19th at 8:33 PM

Could you add an option that makes me spawn in a radius, as dictated by world config? This way, i won't nescessarily spawn in my base, but it won't be completely over if i moved away from worlrdspawn.

Sagesoulfx3, Dec 18th 2025 at 2:18 AM (modified Dec 18th 2025 at 7:54 AM)

Does this work with 1.21.6?

(Edit) It does work. I do not know how or why but it does please update the info ASAP for others.

brayanluc, Dec 9th 2025 at 6:06 AM

limpjellyfish Thank you!

limpjellyfish, Dec 4th 2025 at 8:38 PM (modified Dec 4th 2025 at 10:18 PM)

Does anyone know if this works for 1.21.5? 

Edit: It does indeed!

ilan , Nov 29th 2025 at 10:12 AM

Darcy you can enable the debug view from the settings (under developer options I believe), then you can see the code of each item in-game, similar to Minecraft's "advanced tooltips"

Darcy, Nov 20th 2025 at 5:16 PM

Has anyone been able to blacklist the fur roll bed from Kevin's Furniture? I've been able to blacklist the vanilla hay bed and the thatch bed (ingame called "straw bed") from Art of Growing, but I can't seem to figure out the proper code name for the fur roll. Here's what my configs look like currently - I already tried just "furroll" and that didn't work either. I've also included the .json file of the furroll from the mod. Thanks for any help.

BedSpawn Configs
{
"BlacklistedBeds": [
"bed-hay",
"bed-thatch",
"bed-furroll",
],
"RequireSneaking": false,
"Rooms": {
"Enabled": true,
"BedsThatDontRequireRooms": []
},
"EnableDebugMessages": true,
"NotifyPlayerOnBedDestroyed": true,
"DisableBelowSeaLevel": true,
"Cooldown": {
"Enabled": true,
"CooldownDays": 1.0
}
}
furroll.json
{
code: "furroll",
class: "BlockBed",
entityClassByType: {
"*-head-*": "Bed",
},
attributes: {
sleepEfficiencyByType: {
            "furroll-*" : 0.70833333
},
attachableToEntity: {
categoryCode: "bedroll",
attachedShape: { base: "item/furroll_hooved" }
}
},
entityBehaviors: [{ name: "Animatable" }],
sidesolid: {
all: false
},
sideopaque: {
all: false
},
heldTpIdleAnimation: "holdunderarm",
variantgroups: [
{ code: "part", states: ["head", "feet"] },
{ code:"side", loadFromProperties: "abstract/horizontalorientation" }
],
creativeinventory: { "general": ["*-head-north"], "decorative": ["*-head-north"], "Kevin's Furniture":["*-head-north"] },
shapeinventory: { base: "block/furrollbed-inventory" },
shapebytype: {
"*-head-north": { base: "block/furrollbed-head", rotateY: 90 },
"*-head-east": { base: "block/furrollbed-head", rotateY: 0 },
"*-head-south": { base: "block/furrollbed-head", rotateY: 270 },
"*-head-west": { base: "block/furrollbed-head", rotateY: 180 },
"*-feet-north": { base: "block/furrollbed-feet", rotateY: 90 },
"*-feet-east": { base: "block/furrollbed-feet", rotateY: 0 },
"*-feet-south": { base: "block/furrollbed-feet", rotateY: 270 },
"*-feet-west": { base: "block/furrollbed-feet", rotateY: 180 },
},
 
blockmaterial: "Wood",
replaceable: 550,
resistance: 2,
lightAbsorption: 0,
maxStackSize: 2,
guitransform: {
scale: 0.75,
},
combustibleProps: {
burnTemperature: 600,
burnDuration: 40,
},
fpHandTransform: {
translation: { x: 0.31, y: -0.2, z: 0 },
rotation: { x: -67, y: -33, z: 77 },
origin: { x: 0.5, y: 0.2, z: 0.5 },
scale: 1.35
},
groundTransform: {
origin: { x: 0.5, y: 0, z: 0.5 },
scale: 2
},
selectionbox: { x1: 0, y1: 0, z1: 0, x2: 1, y2: 0.5, z2: 1},
collisionbox: { x1: 0, y1: 0, z1: 0, x2: 1, y2: 0.5, z2: 1},
sounds: {
"place": "game:block/leather",
"hit": "game:block/leather",
"break": "game:block/leather",
"walk": "game:walk/leather"
},
materialDensity: 600
}
ilan , Nov 9th 2025 at 9:05 AM

Tvrdii the mod sets the spawn in the same way a temporal gear does - so unfortunately it's not possible in this mod

There might be a different mod that does that for you - I know there's at least one that "keeps" your hunger after you die to avoid cheesing

Tvrdii, Nov 6th 2025 at 10:12 AM

is there a way to make it so if the player dies from hunger it doesnt respawn him on the bed but at world spawn? as to remove the cheese of not having it eat

ilan , Oct 30th 2025 at 10:53 AM

Aceolu this mod works with any bed that extends BlockBed i.e. any regular bed

not sure what that mod does but if it's not implementing beds "the regular way" then yeah this mod wont work with that

Aceolu, Oct 30th 2025 at 12:23 AM (modified Oct 30th 2025 at 12:23 AM)

Does not work with the decorative beds from QP's Chisel Tools

JohnCuttler, Oct 16th 2025 at 6:44 PM

Huh, weird. πŸ€”

ilan , Oct 14th 2025 at 8:17 AM

Mrozak can you share your save, mods, and modconfigs folder? I'll try to reproduce the issue

Mrozak, Oct 13th 2025 at 7:50 AM

JohnCuttler but we are not using AutoConfigLib :-(

ilan , Oct 13th 2025 at 7:47 AM (modified Oct 13th 2025 at 7:47 AM)

JohnCuttler

No clue why that mod causes such issues with loading mod configs, but a ton of people have complained about it

JohnCuttler, Oct 12th 2025 at 8:10 PM

I can confirm, the issues Necromunger & Mrozak reported are caused by AutoConfigLib being present. Removing the latter fixed the issue for me.

ilan , Oct 8th 2025 at 9:24 AM

qlVegetalp can you share your config?

 

iLorde will fix

iLorde, Sep 29th 2025 at 9:01 AM (modified Sep 29th 2025 at 9:02 AM)

[Warning] Harmony instance "bedspawn" attempted to run UnpatchAll() with no arguments. This normally unpatches all mods, including EMTK, instead of just the harmony instance itself. Please notify the mod author to use UnpatchAll("bedspawn") instead.
- EarlyModToolKit warning.

qlVegetalp, Sep 28th 2025 at 10:39 PM (modified Sep 28th 2025 at 10:47 PM)

so i tried to disable the hay beds but they still work i think my whole config is glitched because cooldown isnt working either

 

ilan , Sep 28th 2025 at 6:52 PM

qlVegetalp try enabling debug messages in the mod config - they will tell you if you're not meeting a certain condition

qlVegetalp, Sep 28th 2025 at 5:43 PM

i cant get the hay beds not working as spawn points im not sure what im doing wrong

Mrozak, Sep 21st 2025 at 5:08 PM

ilan i am not aware of any mods that would add "fake players" or something that could result in invalid players.
Only thing that comes to my mind is a player who left and thusly their player data got wiped from server - which occasionally happens, and did happen roughly around the time these crashes started, but i don't have the exact timeline.
Here is a list of mods we currently use (categories some mods are under on this list, are not always same as on the ModDB):

 

ilan , Sep 21st 2025 at 8:35 AM

Mrozak that crash comes from the game's code itself - all this mod does is ask for the players that have the spawn position of the bed. Do you have any other mods that add "fake players" or something that could add invalid players?

 

Necromunger Yes, it's a built-in game mechanic: https://wiki.vintagestory.at/Room 

Necromunger, Sep 20th 2025 at 1:38 PM

Hello ilan, I was just curious for the config.
What exactly is a valid room? is this like a cellar rules of not being too large? 

Mrozak, Sep 20th 2025 at 3:27 AM (modified Sep 20th 2025 at 3:27 AM)

Me and others on our server crash when destroying any kind of bed (non-clutter).
We are on 1.21.1, using version 1.6.2 of this mod.

Crash Report
20.9.2025 03:13:27 [Server Error] Exception: Object reference not set to an instance of an object.
at Vintagestory.Server.ServerMain.GetSpawnPosition(String playerUID, Boolean onlyGlobalDefaultSpawn, Boolean consumeSpawn) in VintagestoryLib\Server\ServerMain.cs:line 1532
at BedSpawn.BedSpawnModSystem.<>c__DisplayClass7_0.b__0(IServerPlayer f) in D:\Code\VintageStory\VSMods\src\BedSpawn\BedSpawn\BedSpawnModSystem.cs:line 76
at System.Linq.Enumerable.WhereEnumerableIterator`1.ToList()
at BedSpawn.BedSpawnModSystem.OnBlockRemoved(BlockBed block, IWorldAccessor world, BlockPos pos) in D:\Code\VintageStory\VSMods\src\BedSpawn\BedSpawn\BedSpawnModSystem.cs:line 73
at BedSpawn.Patches.BedRemovedPatch.Postfix(BlockBed __instance, IWorldAccessor world, BlockPos pos) in D:\Code\VintageStory\VSMods\src\BedSpawn\BedSpawn\Patches\BedRemovedPatch.cs:line 26
at Vintagestory.Common.BlockAccessorBase.SetSolidBlockInternal(Int32 blockId, BlockPos pos, IWorldChunk chunk, Boolean synchronize, Boolean relight, ItemStack byItemstack) in VintagestoryLib\Common\API\BlockAccessorBase.cs:line 122
at Vintagestory.Common.BlockAccessorBase.SetBlock(Int32 blockId, BlockPos pos) in VintagestoryLib\Common\API\BlockAccessorBase.cs:line 515
at Vintagestory.GameContent.BlockBed.OnBlockRemoved_Patch1(BlockBed this, IWorldAccessor world, BlockPos pos)
at Vintagestory.Common.BlockAccessorBase.SetSolidBlockInternal(Int32 blockId, BlockPos pos, IWorldChunk chunk, Boolean synchronize, Boolean relight, ItemStack byItemstack) in VintagestoryLib\Common\API\BlockAccessorBase.cs:line 122
at Vintagestory.API.Common.Block.OnBlockBroken(IWorldAccessor world, BlockPos pos, IPlayer byPlayer, Single dropQuantityMultiplier) in VintagestoryApi\Common\Collectible\Block\Block.cs:line 1040
at Vintagestory.Server.ServerSystemBlockSimulation.TryModifyBlockInWorld(ServerPlayer player, Packet_ClientBlockPlaceOrBreak cmd) in VintagestoryLib\Server\Systems\World\BlockSimulation.cs:line 722
at Vintagestory.Server.ServerSystemBlockSimulation.HandleBlockPlaceOrBreak_Patch1(ServerSystemBlockSimulation this, Packet_Client packet, ConnectedClient client)
at Vintagestory.Server.ServerMain.HandleClientPacket_mainthread(ReceivedClientPacket cpk) in VintagestoryLib\Server\ServerMainNetworking.cs:line 280
at Vintagestory.Server.ServerMain.ProcessMain() in VintagestoryLib\Server\ServerMain.cs:line 934
Necromunger, Sep 16th 2025 at 1:42 AM

Was able to resolve our issue thankyou Ilan.

ilan , Sep 15th 2025 at 5:05 PM

Gelan you can use 1.4.0

 

Necromunger do you have AutoConfigLib installed (or another mod that modifies config loading)? The error is thrown because the mod config wasn't loaded

Necromunger, Sep 15th 2025 at 2:29 PM (modified Sep 15th 2025 at 2:30 PM)

Hello, recently started using this mod (v1.6.2) on our server and we get this crash. We are running server on 1.21.1

Crash Report
15.9.2025 10:22:00 [Server Error] Exception: Object reference not set to an instance of an object.
at BedSpawn.BedSpawnModSystem.SetPlayerSpawn(IServerPlayer player, BlockSelection sel, Boolean wasSneaking) in D:\Code\VintageStory\VSMods\src\BedSpawn\BedSpawn\BedSpawnModSystem.cs:line 115
at BedSpawn.Patches.BedInteractedPatch.Postfix(BlockBed __instance, IWorldAccessor world, IPlayer byPlayer, BlockSelection blockSel, Boolean& __result, Boolean __state) in D:\Code\VintageStory\VSMods\src\BedSpawn\BedSpawn\Patches\BedInteractedPatch.cs:line 60
at Vintagestory.GameContent.BlockBed.OnBlockInteractStart_Patch2(BlockBed this, IWorldAccessor world, IPlayer byPlayer, BlockSelection blockSel)
at Vintagestory.Server.ServerSystemBlockSimulation.HandleBlockInteract(Packet_Client packet, ConnectedClient client) in VintagestoryLib\Server\Systems\World\BlockSimulation.cs:line 483
at Vintagestory.Server.ServerSystemInventory.HandleHandInteraction(Packet_Client packet, ConnectedClient client) in VintagestoryLib\Server\Systems\Inventory.cs:line 263
at Vintagestory.Server.ServerMain.HandleClientPacket_mainthread(ReceivedClientPacket cpk) in VintagestoryLib\Server\ServerMainNetworking.cs:line 280
at Vintagestory.Server.ServerMain.ProcessMain() in VintagestoryLib\Server\ServerMain.cs:line 934

 

Gelan, Sep 15th 2025 at 11:26 AM

ilan  I am playing on 1.20.12 and not planning on updating anytime soon. Which mod file should I use?

ilan , Sep 14th 2025 at 5:15 AM

amaranthinos try 1.6.2 - I changed the minimum version to 1.21.0 instead of 1.21.1

amaranthinos, Sep 13th 2025 at 7:27 PM

It's giving an issue with being on 1.21.0 πŸ˜”  Under modmanager, it says "Unable to load mod. Requires dependency game v1.21.1"

ilan , Sep 13th 2025 at 4:42 PM

anonowo Great ideas! I implemented both in 1.6.1 :) 

anonowo, Sep 13th 2025 at 1:42 PM (modified Sep 13th 2025 at 1:46 PM)

Any chance for an option to check the world height of the bed, to prevent setting respawn inside dungeons and caves?
Or maybe a limit on how often players can move their respawn point? To prevent abuse of the mechanic by carrying a bed with you to dangerous locations for easy nearby respawns.

ilan , Sep 11th 2025 at 5:53 AM

DesolateRose Tyrnn it should be compatible with 1.21, the logic shouldn't have changed

 

Tyrnn, Sep 11th 2025 at 1:57 AM

eerino the files dont have a 1.21.0 version. You can only go back to 1.20 

eerino, Sep 9th 2025 at 5:08 PM

DesolateRose, click "Files" above (next to "Description," above the photo.) All older release are there and always available. (: 

DesolateRose, Sep 9th 2025 at 4:38 PM

hey this requires 1.21.1 is it posible for you to port a version back to 1.21?

ilan , Sep 9th 2025 at 11:43 AM

cottageCryptid I uploaded a version that is built for 1.21.1 so there shouldn't be any problems 

cottageCreature, Sep 5th 2025 at 7:32 AM

StrawberrySoda really?? it hasn't worked for me since the update :')

osayra, Aug 31st 2025 at 6:07 AM

StrawberrySoda ty for testing πŸ˜—

StrawberrySoda, Aug 28th 2025 at 11:49 AM

After testing it in 1.21, this mod still thankfully works!

OwlGuy73, Aug 28th 2025 at 12:47 AM

Will this mod be updated for 1.21?

ilan , Jul 23rd 2025 at 10:32 AM

eerino that's just a debug log, unrelated to the crash. crash logs usually start with "error"

 

DrakenRolle this mod does not affect the game world in any way, other than setting the player's respawn point (which can be overridden with a temporal gear)

 

Aleczolotl are you using Auto Config Lib or some other mod that changes how mod configs work?

eerino, Jul 21st 2025 at 6:19 PM

Just crashed and the server debug log's last log was

"[Debug] [bedspawnv2] Found 0 players with spawn point set to removed bed at 511725, 129, 511721, clearing spawn position for these players"

DrakenRolle, Jul 13th 2025 at 7:43 PM

Hey a friendly reminder, that if you add this mod. The gameworld resets itself wouldve been nice....

Aleczolotl, Jul 9th 2025 at 8:31 PM

For some reason whenever i change the config for blacklisting a bed, it just resets and doesnt save no matter what i do 

lydocia, Jul 8th 2025 at 2:59 PM

The first mod I searched for!

brayanluc, May 29th 2025 at 2:11 AM

Confirmed: Works fine with 1.20.11 (only tested in singleplayer)

Ribosom, May 4th 2025 at 9:48 AM

Thank you for the mod!

May I ask for a feature request? I would like to see a configurable time in the configuration file for how much time must pass to reset your spawn point with a bed again. Maybe every x days, or once a month. Not sure how easy it is to persist state in Vintage Story mods. The idea is to prevent me from abusing bed respawns. Even if I don't abuse it, the knowledge of being able to use it all the time breaks my survival immersion.
So I am conflicted, I love the bed respawns, but it is so easy to abuse it. I think a time constraint would be a great addition.

ilan , Apr 30th 2025 at 4:55 AM

Spiridon I haven't tested it personally but it should!

 

Spiridon, Apr 24th 2025 at 4:12 PM

does this work on 1.20.9?

ilan , Apr 9th 2025 at 5:17 AM

Drew_555 all beds work by default, did you install the mod correctly?

Drew_555, Apr 6th 2025 at 6:09 PM

hey im new to modded vs me and a few mates set up a server and are using this mod but they hay beds seem to not be working on default is that intended and we need to make a wooden one or is somthing wrong with our session

SoggyGravel, Mar 27th 2025 at 7:07 AM

seems to be working in 1.20.6

ilan , Feb 28th 2025 at 6:39 AM

diegokilla Yeah, the code that resets your spawn point when the bed is destroyed is in the mod. Remove the mod, and your spawn is no longer reset. You will need to use a temporal gear to set your spawn location.

jabes I haven't tested it, but it should work fine.

jabes, Feb 26th 2025 at 12:51 AM

Working on 1.20.4?

diegokilla, Feb 21st 2025 at 9:09 AM

So we had this mod on our server and took it off, but I continually spawn where my bed was, even if I destroy the bed. I also tried setting the temporalgearrespawn(whatever that command is) to zero and I'm still just respawning where my bed was. Any thoughts? (server spawn is not set where my bed was obviously XD )

 

ilan , Feb 11th 2025 at 7:02 AM

DecaByte Sure, I can probably add a configuration option to change the button

DecaByte, Feb 8th 2025 at 12:02 AM

I found that I accidentally will hit shift-click on beds. Could you add a config so I can change the key or Ctrl-click instead? That would be helpful.

ilan , Jan 28th 2025 at 10:31 AM

Arthemy

Kutaras

Can you share some logs? I've tested with 1.20.3 and it works fine, it could be a game bug in 1.20.1

CKitt

That's really nice to hear, glad you're enjoying the mod! πŸ™‚

CKitt, Jan 27th 2025 at 7:04 PM

ilan

I do have AutoConfigLib installed, but there had been no errors prior to this mod being installed. I've disabled AutoConfigLib for now, your mod is more important!

Arthemys, Jan 27th 2025 at 3:18 PM

Don't know what sorcery people did to say it works on 1.20.1 for me it doesn't, it throws an exception and blocks me there πŸ˜‚. 

Just play on 1.20.3 it works there πŸ’ͺπŸ’€

Kutaras, Jan 27th 2025 at 3:18 PM

1.19.8 version does not work with 1.20.1 πŸ‘„πŸ‘¨β€πŸ‘¨β€πŸ‘¦β€πŸ‘¦πŸ³οΈβ€πŸŒˆ

ilan , Jan 27th 2025 at 7:49 AM

CKitt

Did you update/install AutoConfigLib by any chance? Or did it start happening with this latest version?

In any case, the error is coming from AutoConfigLib's code πŸ˜… 

Edit: Yep, after testing myself with my mods and AutoConfigLib, it appears that mod has some issues:

27.1.2025 09:52:54 [Client Error] Failed to load AutoConfigLibConfig.json using default, exception: System.NullReferenceException: Object reference not set to an instance of an object.
at AutoConfigLib.Auto.AutoConfigGenerator.RegisterOrCollectConfigFile[T](ICoreAPI api, String configPath, T configValue) in D:\Modding\VintageStory\AutoConfigLib\AutoConfigLib\Auto\AutoConfigGenerator.cs:line 24
at AutoConfigLib.AutoConfigLibModSystem.StartPre(ICoreAPI api) in D:\Modding\VintageStory\AutoConfigLib\AutoConfigLib\AutoConfigLibModSystem.cs:line 58

CKitt, Jan 26th 2025 at 3:28 PM

Thank you! Always a pleasure to have this mod running on my server.

Edit: Uh-oh! I'm not quite sure what's going on here. Incompatibility with AutoConfig?

26.1.2025 09:38:18 [Error] [bedspawnv2] An exception was thrown when trying to start the mod:
26.1.2025 09:38:18 [Error] [bedspawnv2] Exception: Object reference not set to an instance of an object.
at AutoConfigLib.Auto.AutoConfigGenerator.RegisterOrCollectConfigFile[T](ICoreAPI api, String configPath, T configValue) in D:\Modding\VintageStory\AutoConfigLib\AutoConfigLib\Auto\AutoConfigGenerator.cs:line 24
at AutoConfigLib.HarmonyPatches.ConfigInterception.GetConfigOverride[T](ICoreAPICommon api, String fileName) in D:\Modding\VintageStory\AutoConfigLib\AutoConfigLib\HarmonyPatches\ConfigInterception.cs:line 48
at BedSpawn.Configuration.ModConfig.ReadConfig(ICoreAPI api) in D:\Code\VintageStory\VSMods\src\BedSpawn\BedSpawn\Configuration\ModConfig.cs:line 30
at BedSpawn.BedSpawnModSystem.Start(ICoreAPI api) in D:\Code\VintageStory\VSMods\src\BedSpawn\BedSpawn\BedSpawnModSystem.cs:line 25
at Vintagestory.Common.ModLoader.TryRunModPhase(Mod mod, ModSystem system, ICoreAPI api, ModRunPhase phase) in VintagestoryLib\Common\API\ModLoader.cs:line 629
26.1.2025 09:38:18 [Error] Failed to run mod phase Start for mod BedSpawn.BedSpawnModSystem

ilan , Jan 26th 2025 at 9:57 AM

I updated the mod for 1.20.3, but there are no real code changes (just changed the game version)

Retromastery, Jan 22nd 2025 at 6:22 AM

For those wondering if this mod still works as of 1.20.1

Yes, it still works, tested it and had no issues after 30+ Hours

WildWitchyNanna, Jan 19th 2025 at 11:00 AM

Are you working on an update for 1.20? please

EragonArgetlam, Dec 29th 2024 at 11:11 PM

Isochronous

Didn't use the mod yet so not fully sure, but basing on how other mod configs work you have to go to C:\Users\[Username]\AppData\Roaming\VintagestoryData\ModConfig 
and find the config file for this mod, and editting it by openning it in notepad (or other text editor) and looking for the "RequireSneaking:false," and change the false to true or BlacklistedBeds and add the ["bed-hay"] after it.

Isochronous, Dec 29th 2024 at 7:09 PM

hello :) im brand new to the game and have no idea how to edit the banlist/have sneak enable setting spawn. Could anyone help me please :) TYIA

Edit:: I guess im actually asking how to set the configurations? :)

BulletJustice, Nov 19th 2024 at 4:34 PM

"Good idea! I've gone ahead and added that :) "

EPIC, ty so much!

DejFidOFF, Nov 18th 2024 at 6:32 PM

ilan

Hi o/ 1.20 update?

ilan , Nov 18th 2024 at 4:11 PM

Xiarno BulletJustice

Good idea! I've gone ahead and added that :) 

Xiarno, Nov 14th 2024 at 5:31 PM

I agree with BulletJustice. Having "Hold sneak when using bed to set spawn" makes a lot of sense. A config to allow that would be really appreciated if possible!

BulletJustice, Nov 11th 2024 at 6:49 AM

Would it be possible to make it so you can toggle on/off the function via a keybind on client side? blacklisting a bed just doesnt really cut it when there is gate-keeping in progression to what bed you have available. Making a keybind "hold shift when using bed to set spawn" just makes more sense to me, if that would be possible?

ilan , Oct 21st 2024 at 10:11 AM

Omikronlex

The mod config folder is under the %APPDATA%\VintagestoryData\ModConfig folder in Windows.

Omikronlex, Sep 10th 2024 at 11:46 PM

Where would I find the mod settings or the configuration file to blacklist beds?

ilan , Aug 1st 2024 at 8:00 AM

Hi there,

There isn't any command to disable the respawn mechanic as the mod uses the vanilla spawn point system to change your spawn point.

 

However, you can use the "blacklisted beds" configuration in the mod settings to blacklist the hay bed, for example, so you can use a hay bed during your travels, and use a regular wooden bed at home to set your spawn point.

Razvandicoot, Jul 27th 2024 at 3:56 PM

Hi there!

Could anyone tell me if there is a command or key combination to disable the spawn set so I can use another bed while exploring without resetting the spawnpoint?

ilan , Jul 19th 2024 at 8:49 AM

Any bed that implements `BlockBed` will work, but looking at the code for the "storage bed" in Vies Blocks, it seems that they do not.

I could probably add some kind of whitelist for non-bed blocks..

Skyeena_, Jul 16th 2024 at 5:08 AM

Is there a way to allow for modded beds to set spawn? We are using Vies Blocks in our server and they add storage beds that function as both storage, and beds (hence the name) with a couple other functions. There is a large amount of the beds so would something in the config be able to be modified or a whitelist that will force a bed to allow spawn being set?

ilan , Jun 16th 2024 at 3:32 PM

Thanks for the kind words :) And I'm glad that 1.2.0 works!

CKitt, Jun 16th 2024 at 1:17 PM

I'll give it a try today! For what it's worth, 1.0.0 was working great during half a dozen hours of multiplayer.

Edit: After the usual tests, no issues at all, zero errors. I think 1.2.0 is the ticket!

ilan , Jun 15th 2024 at 9:13 PM

Oh, sorry about that. I thought I could mark the mod as server-only but it seems that makes the localizations not load in the client (and an oversight in the code made it throw an NPE..)

1.2.0 published with the fixes πŸ˜…

CKitt, Jun 15th 2024 at 8:19 PM

Interesting, after adding the hay bed (and thank you for not making it where I had to add head/foot N/E/W/S individually) and laying in a hay bed, I get the following message:

bedspawn:msgSpawnSet

Subsequently destroying the hay bed crashes the game.

 

Edit: In fact, all beds now have that behavior, even while leaving the blacklist blank. I hope my suggestion didn't just ruin your mod, as v1.0.0 worked perfectly!

Edit 2: The relevant portion of the error log follows.

System.NullReferenceException: Object reference not set to an instance of an object.
at BedSpawn.Patches.BedRemovedPatch.Postfix(BlockBed __instance, IWorldAccessor world, BlockPos pos) in D:\Code\VintageStory\VSMods\src\BedSpawn\BedSpawn\Patches\BedRemovedPatch.cs:line 21

ilan , Jun 15th 2024 at 3:12 PM

😁

CKitt, Jun 15th 2024 at 3:11 PM

Awesome, that was very speedy. Thank you!

ilan , Jun 15th 2024 at 3:05 PM

Glad to help :) I just added the feature you suggested, gonna update the docs now

CKitt, Jun 15th 2024 at 2:58 PM

Excellent, thanks for clarifying and for offering up the source. I always like taking a peek at what mods are actually doing!

ilan , Jun 15th 2024 at 2:47 PM

You can check out the source code in the GitHub repo here: https://github.com/Ilan321/VSMods/tree/master/src/BedSpawn

This mod works with any bed that extends `BlockBed`, which is every bed in the vanilla game (that you can sleep in).

Great suggestion, I will add that :) 

CKitt, Jun 15th 2024 at 2:15 PM

I have a perhaps stupid question, as I can't open the .dll to check for myself: does the type of bed matter? Would I be able to use this with hay beds, aged beds, regular beds, and Vanilla Variants beds alike? Thanks!

 

Edit: Question answered via a creative world and the included /set-fatigue command. All bed variants work as intended. Excellent mod, thank you for that! In the future, if possible, it might be worthwhile to include a config file to allow for enabling/disabling specific beds. As an example, with an older bed spawner mod I'd disable hay beds and use those for long-distance exploration.

ilan , Jun 14th 2024 at 6:38 PM

πŸ˜„

GermanKursk, Jun 14th 2024 at 5:33 PM

Thank god. Exactly what I needed.