I made a mod that allows you to set your home as base (/setbase) then teleport to it (/base) whenever you are in danger or got lost in a cave, it only takes 1 xp level to teleport. (DO NOT SET YOUR BASE AT THE COORDINATES OF X-0 Y-0 Z-0 OR YOU WON'T BE ABLE TO TELEPORT SINCE THE MOD WILL TELL YOU THAT YOU DON'T HAVE A BASE!)
(Player while teleporting)

(Base while teleporting)