mojira.dev
MC-189579

Players can be permanently prevented from respawning by trapping their bed

What is a "bed ban"?

A "bed ban" is when a griefer on a server locates the bed of another player and traps it so that the next time the player dies, the player will repeatedly die immediately after respawning. The victim is unable to continue playing (unless rescued by another player) because he/she is trapped in an infinite death cycle. Often bed bans will have the victim respawn inside an obsidian box and then be killed before he/she has time to break any blocks.

The bug

Recently, MC-176640 was fixed to try to solve this issue, but it did not completely eliminate bed bans. The "Possible Solutions" section of this report compares different ways that this issue could be solved and includes a solution that would be effective against all bed ban designs (except if the doImmediateRespawn game rule is set to true).

To reproduce

I've attached a world to this report that contains 3 designs for bed bans that still work despite the fix of MC-176640. The designs are:

  • Drowning bed ban (see MC-187495)

  • Piston & lava bed ban

  • Pufferfish bed ban

Download the attached world, unzip it, and put it into your saves folder. Open the world in the latest version of Minecraft. Set your gamemode to survival. For each design, right-click on the bed to set your spawn point and then press the button on the command block to die. You will respawn inside the trap. Observe that you repeatedly die before you are able to break any blocks and that it is impossible to escape. When you are ready to test the next design, change your gamemode to spectator to exit the trap and then change your gamemode back to survival.

Possible Solutions

Name
Description
Considerations

Make Dangerous Blocks Obstruct Beds

Blocks that harm players could be added to the list of blocks that players are not able to respawn on. If all of the blocks near a bed are obstructions, then the player will respawn at world spawn. This is the solution that was chosen to fix MC-176640.

  • This solution might slightly increase code maintenance in the future because every time a new dangerous block is added to the game, it will have to be added to the list of blocks that obstruct beds.

  • This solution does not prevent all possible infinite death cycles. Clever griefers will design bed bans that kill the player without the player respawning in a block that obstructs beds. See the "To reproduce" section for examples.

  • This solution might limit the creative freedom of players because sometimes there are situations where a player might want to respawn inside of a block that is usually dangerous. For example, water usually drowns the player (see MC-187495), but a player might have an underwater base with a conduit in which the player would want to respawn in water.

Detect Frequent Respawning

The game could detect when a player dies multiple times in a short amount of time and then automatically respawn the player at world spawn instead of at his/her bed.

This would likely have many false positives, where the player was not actually trapped in an infinite death cycle. For example, a player might die repeatedly while playing a minigame, and the player would be annoyed to suddenly respawn at world spawn instead of at the bed in the minigame.

Add "Respawn at World Spawn" Button

A new button called "Respawn at World Spawn" could be added to the death screen. After dying, the player would have the choice between clicking "Respawn" to respawn at his/her bed (if a spawn point has been set) or "Respawn at World Spawn" to respawn at world spawn.

  • A player could abuse this button to quickly teleport between world spawn and his/her base by putting all of his/her items in an enderchest, dying, and then respawing at the desired location.

  • This solution would not work if the doImmediateRespawn game rule is set to true because the death screen isn't shown when that game rule is true.

Add "Reset Spawn Point & Respawn" Button

A new button called "Reset Spawn Point & Respawn" could be added to the death screen. After dying, the player would have the choice between clicking "Respawn" to respawn at his/her bed (if a spawn point has been set) or "Reset Spawn Point & Respawn" to permanently change his/her spawn point to world spawn before respawning. The player would need to right-click his/her bed again if he/she wants to start spawning there again.

  • This solution is similar to the previous solution, except that it prevents abuse. The player's spawn point is permanently reset to world spawn until the player right-clicks on a bed (or respawn anchor) again.

  • This solution would be effective against all bed ban designs (except when the doImmediateRespawn game rule is set to true) because it lets the player respond when he/she is in an infinite death cycle.

  • This solution would not work if the doImmediateRespawn game rule is set to true because the death screen isn't shown when that game rule is true.

h3. Credit

I first heard of the concept of a "bed ban" by reading MC-174361, which was created by @unknown.

Related issues

Attachments

Comments

migrated
[media][media]
bluecrab2

Confirmed in 1.16.1

lord.quadrato

With the bed respawning changes in 20w30a I updated the reproduction world, since players would be able to spawn on the slabs.
Nothing else changed relevant to this though.

[media]

pine1needle

I recently realized that the possible solutions titled "Add 'Respawn at World Spawn' Button" and "Add 'Reset Spawn Point & Respawn' Button"  would not be effective if the doImmediateRespawn game rule is set to true because the death screen would not be shown.

migrated

Brutal!

migrated

maybe change all the "he/she" and "his/her" occurances for they and their respectively.

migrated

@ Moderators, I comment due to a similar reason as I already did here.
In order to avoid a potential discussion about this controversial topic, maybe consider to hide both of our comments on this bugpost.
Thank you.

@unknown The bugtracker's comments section is normally used to add helpful comments regarding the issue at hand.
I do understand your reasoning and I myself try my best as non-native speaker to use genderneutral pronouns since a while whenever I don't know, but, generally speaking, could we please leave out political correctness in the game and its bugtracker?

If the OP thinks of doing so when they create that bugpost, fine, but it must never be mandatory (you also wrote cautiously "maybe", I did notice that).

In case you disagree and would like to start a discussion about that, please open a post on the Mojira-Subreddit, as I already saw in similarly delicate or controversial topics that otherwise things can get out of hand easily, and upset people with differing opinions on a matter, leading to also people not playing that game anymore, or not permitting their children to do so.

Thank you.

Shuddery

Affects 1.19.1

pine1needle

(Unassigned)

Confirmed

Gameplay

Normal

Player

1.15.2, 1.16 Pre-release 5, 1.16 Pre-release 6, 1.16 Pre-release 7, 1.16 Pre-release 8, ..., 1.20 Release Candidate 1, 1.20, 1.20.2 Release Candidate 1, 1.20.2 Release Candidate 2, 1.21.4

Retrieved