A blocky survival game.

Reply To: Protected beds

Home Forums MeseCraft Discussion Support Protected beds Reply To: Protected beds

#3116
andyiii
Participant

The reverse flag seems to be used when destructing a bed so that it isn’t removed twice (since there are two bed nodes “top” and “bottom”). The actual spawn point is set/reset in beds.set_spawns() which is called just after laying down, but it affects all people who are in bed. I don’t see where it would delete a spawn point, except when destroying the bed. I think this may be what happened:

  1. Dug minekid’s bed (resets to world spawn)
  2. Place protected bed
  3. Sleep in protected bed (doesn’t affect spawn)
  4. Die (spawn at world spawn)

If minekid had slept in a diggable (not protected or with minekid on the protection block) bed prior to sleeping in the protected bed, I think things would have been different:

  1. Dug minekid’s bed (resets to world spawn)
  2. Place protected bed
  3. Sleep in other bed (sets spawn)
  4. Sleep in protected bed (doesn’t affect spawn)
  5. Die (spawn at other bed)