Where is bed data stored?

Where is bed data stored? - A Young Woman Writing in a Notebook While Sitting on a Couch

In Minecraft, players use a bed to set their spawn point. If they die and the bed is gone, they are sent back to the world spawn. However, I was wondering where this data is stored and how that affects game play. If a player sleeps in a bed to set their spawn, destroys the bed, and immediately puts it back in the same place, does that destroy their spawn? If the data is stored with the bed block, it would. If the data is stored with the player data, it might not. But I haven't been able to find any information about immediate bed replacement anywhere.



Best Answer

Depending on game version, breaking and replacing a bed can reset a spawn, (currently doesn't reset). However, the data is stored in the world's metadata, not the blocks of the bed, as you still spawn next to the bed if it is in an unloaded chunk, and can you change spawn points with commands.




Pictures about "Where is bed data stored?"

Where is bed data stored? - Side view of casual woman sitting on bed and surfing laptop with blank screen while adorable kid playing with toys in cozy bedroom
Where is bed data stored? - Top view anonymous remote worker typing on keyboard of laptop with blank screen while sitting with crossed legs on bed with tea aside at home
Where is bed data stored? - Full body of happy mother surfing netbook and daughter playing with toys on bed against window





How is data stored in sql database




More answers regarding where is bed data stored?

Answer 2

The bed data is stored with that instance of the bed block. So if you break it and then immediately replace it, you would still spawn at the world spawn as the newly placed bed would be a new instance of a bed block.

Sources: Stack Exchange - This article follows the attribution requirements of Stack Exchange and is licensed under CC BY-SA 3.0.

Images: MART PRODUCTION, Tatiana Syrikova, Tatiana Syrikova, Tatiana Syrikova