![](/web/img/vsmoddb-logo-s.png)
Mods / BedSpawn
Category:
#QoL
#Tweak
Author: ilan
Side: Both
Created: Jun 14th at 6:15 AM
Last modified: Jun 15th at 9:14 PM
Downloads: 1200
Follow Unfollow 20
Author: ilan
Side: Both
Created: Jun 14th at 6:15 AM
Last modified: Jun 15th at 9:14 PM
Downloads: 1200
Follow Unfollow 20
Latest file for v1.19.8:
bedspawnv2_1.2.0.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
- BlacklistedBeds - A list of blacklisted bed block codes that won't set your spawn. Defaults to an empty list.
If you wish, for example, to add the hay bed to this list - just update the value in the configuration file to["bed-hay"]
Version | For Game version | Downloads | Release date | Changelog | Download | 1-click mod install* |
---|---|---|---|---|---|---|
v1.2.0 | 920 | Jun 15th at 9:14 PM | Show | bedspawnv2_1.2.0.zip | Install now | |
v1.1.0 | 67 | Jun 15th at 3:03 PM | Show | bedspawnv2_1.1.0.zip | Install now | |
v1.0.0 | 213 | Jun 14th at 7:56 AM | Show | bedspawnv2_1.0.0.zip | Install now |
Thanks for the kind words :) And I'm glad that 1.2.0 works!
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!
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 😅
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
😁
Awesome, that was very speedy. Thank you!
Glad to help :) I just added the feature you suggested, gonna update the docs now
Excellent, thanks for clarifying and for offering up the source. I always like taking a peek at what mods are actually doing!
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 :)
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.
😄
Thank god. Exactly what I needed.