Respawn Obelisks

Respawn Obelisks

7.6k Downloads

[BUG] Player Cannot Respawn With 'Home Bed Only' Config Option from Sleep Tight

CraftyZombie opened this issue ยท 8 comments

commented

Describe the bug
Sleep Tight introduced a new config option which only allows you to respawn in beds after sleeping in them for a certain number of nights. When that's enabled, along with bed respawning in this mod, the player cannot respawn.

To Reproduce
Steps to reproduce the behavior:

  1. Enable bed respawning in Respawn Obelisks.
  2. Set only_respawn_in_home_bed = true in Sleep Tight's common config.
  3. Set your spawn point at a bed "you can set the number of nights to make it a home bed using commands.
  4. Use /kill.
  5. Try to respawn.

Expected behavior
I expected to respawn into the world.

Screenshots
2024-01-13_20 00 30

Versions
Architectury 9.1.12
Resourceful Config 2.1.2
Respawn Obelisks 2.4-d
Sleep Tight 1.20-1.1.14
Moonlight Library 1.20-2.8.82

Forge Version: 47.2.19
Minecraft Version: 1.20.1

Additional notes
latest.log
debug.log
(There is no crash report, it does not crash the game. In fact, the internal server is still running.)

commented

Unfortunately, you will probably have to report this to the creator of Sleep Tight, despite what the log says.
When you create that issue, I can provide some additional context, but if you want that here:

I'm not entirely sure how Forge's Capabilities system works, since I've always used my own solutions in place of it, but it is possible that the Player, being a CapabilityProvider, does not have valid capabilities when in the respawn screen, meaning CapabilityProvider#valid is false. When that is false, Player#getCapability will always return null(or rather, an empty optional):
when dead, valid is false on the player
valid being false means getCapability returns an empty optional

commented

In fact, this happens without Respawn Obelisks installed.

commented

Respawn Obelisks intentionally tries to disallow bed respawning. Can you show me your respawn obelisks config?

commented
commented

Unfortunately my phone can't seem to open jsonc files. Please could you send it in a paste, for example hastebin?
Sorry for the inconvenience.

commented

Huh, you do have it setup correctly. I'll take a look into this tomorrow. Thanks for letting me know.

commented

Of course. Much appreciated.

Also to be clear normally bed respawning works fine with both mods installed, the glitch only happens when that aforementioned config option is enabled.