Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

It is possible to respawn in a bed, in a different world #22

Open
bim9262 opened this issue Nov 25, 2020 · 2 comments
Open

It is possible to respawn in a bed, in a different world #22

bim9262 opened this issue Nov 25, 2020 · 2 comments

Comments

@bim9262
Copy link

bim9262 commented Nov 25, 2020

Steps to recreate:
/world create a
/world create b
/world rejoin a
create/set a bed as a spawn point
/world rejoin b
/kill @s

Now the game thinks that you are in world b, even though you respawned in world a's bed.

I think that this line could be updated to be:

if (loc != null && loc.getWorld() == respawnWorld) {

I would think that the default would be that if you die in a world without a respawn point in that world, you go back to the spawn point for that world.

@bergerkiller
Copy link
Member

bergerkiller commented Nov 25, 2020

Part of the confusion comes from a problem I just found. World configuration has a 'bedRespawn' option, and a 'forcedRespawn' option, which both appear to do the same (but inverse) thing. If you don't want players to respawn at their bed, then disabling bed respawns should fix that.

Actually, when you die in the nether and have a bed in the overworld, you respawn at your bed in the overworld. Minecraft maintains a single global bed respawn point. World anchors are the exact same thing, basically just beds in the nether with a use limit.

With world inventory rules you can specify what worlds share what bed information, so that sleeping in a world doesn't make it use that bed when in another world.

Commands:

/world forcedrespawn [true/false] - Should enable/disable respawning at a bed when dying in a given world
/world bedrespawn [true/false] - Should enable/disable beds on a given world

@bim9262
Copy link
Author

bim9262 commented Nov 25, 2020

I'd like for players to spawn at their spawn point, if set.
I'd expect a_nehter / a_the_end would respawn to a, if there is not another ancho in that world.
If there is no anchor in a and a player dies they should go to spawn point for that world, not the bed of another world.
In the above situation I outlined, it becomes impossible for a player to rejoin world b, even though they are in world a.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants