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: 5842
Follow Unfollow 60

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 5478 Jun 15th at 9:14 PM Show bedspawnv2_1.2.0.zip Install now
v1.1.0 101 Jun 15th at 3:03 PM Show bedspawnv2_1.1.0.zip Install now
v1.0.0 263 Jun 14th at 7:56 AM Show bedspawnv2_1.0.0.zip Install now

17 Comments (oldest first | newest first)

💬 Omikronlex, Sep 10th at 11:46 PM

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

💬 ilanAuthor, Aug 1st 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 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?

💬 ilanAuthor, Jul 19th 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..

💬 SkullyDog, Jul 16th 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?

💬 ilanAuthor, Jun 16th at 3:32 PM

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

💬 CKitt, Jun 16th 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!

💬 ilanAuthor, Jun 15th 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 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

💬 ilanAuthor, Jun 15th at 3:12 PM

😁

💬 CKitt, Jun 15th at 3:11 PM

Awesome, that was very speedy. Thank you!

💬 ilanAuthor, Jun 15th at 3:05 PM

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

💬 CKitt, Jun 15th 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!

💬 ilanAuthor, Jun 15th 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 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.

💬 ilanAuthor, Jun 14th at 6:38 PM

😄

💬 GermanKursk, Jun 14th at 5:33 PM

Thank god. Exactly what I needed.

(edit comment delete)