Repository navigation
[Traveller's Backpack sleeping bag incompatibility] fix: keep sub-level spawn on cancelled spawn set - #1611
Open
UQuark wants to merge 1 commit into
Open
[Traveller's Backpack sleeping bag incompatibility] fix: keep sub-level spawn on cancelled spawn set#1611UQuark wants to merge 1 commit into
UQuark wants to merge 1 commit into
Conversation
setRespawnPosition unconditionally removed Sable's tracked sub-level respawn point at HEAD, before the method body (and NeoForge's PlayerSetSpawnEvent hook) ran. Mods that cancel a spawn set - e.g. Traveller's Backpack treating a sleeping bag as a temporary bed - then left the tracking UUID gone while SpawnX/Y/Z still held sub-level-local coords, so the next death respawned out of world / crashed (sable#1370). Snapshot the respawn fields and tracked point at HEAD, and only drop the tracked point at RETURN when the call actually committed a non-sub-level spawn/reset. A no-op/cancelled call keeps the point; a freshly generated sub-level point is never clobbered. Loader-agnostic: no loader-specific API used.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Hi. I encountered an issue with Traveller's Backpack sleeping bag incompatibility.
I have my respawn point set on a sublevel. I have TB configured so that sleeping on a bag does not result in a respawn point change. Whenever I sleep on the bag, my home point resets and I respawn on the server's world spawn.
This is due to Sable being unaware of the fact that Traveller's Backpack cancels the method call further down the stack.
AI Disclosure
This patch was 100% generated by an LLM.
I am a programmer and Minecraft mod developer; I reviewed and tested this code - it fixed my issue without introducing any side effects. It seems sound and reasonable to me, but I am no Sable developer.
The following is the LLM's description of the patch:
setRespawnPosition unconditionally removed Sable's tracked sub-level respawn point at HEAD, before the method body (and NeoForge's PlayerSetSpawnEvent hook) ran. Mods that cancel a spawn set - e.g. Traveller's Backpack treating a sleeping bag as a temporary bed - then left the tracking UUID gone while SpawnX/Y/Z still held sub-level-local coords, so the next death respawned out of world / crashed (related to #1370).
Snapshot the respawn fields and tracked point at HEAD, and only drop the tracked point at RETURN when the call actually committed a non-sub-level spawn/reset. A no-op/cancelled call keeps the point; a freshly generated sub-level point is never clobbered.
Loader-agnostic: no loader-specific API used.