Inspired by Terraria's Magic Mirror, when the magic mirror is on the hand of the player, right click it to teleport to your spawnpoint. If your bed is destroyed you will be teleported to the last place that your bed was!
How to get the magic mirror:
You can get the magic mirror from a level 5 Cleric Villager (The one with the brewing stand)
Or you can get it by having luck with the wandering trader's trades

No, the mirror can only be purchased to increase the rarity of this item. Only a powerful wizard can infuse magic properties, not the player.
Nope, the mirror has infinite uses!
No, the mirror has a tiny cooldown.