A Minecraft datapack that stores the coordinates of the player's last death and shows them in the action bar when holding a recovery compass.
- Stores the last death location for each player
- Shows death coordinates when holding a recovery compass
- Displays remaining recovery time in the action bar
- Default item expiration logic can be adjusted for testing
- Copy the entire
Edd's Recovery Compassfolder into your world'sdatapacksfolder. - Open the world and run:
/reload- Confirm the datapack is loaded with:
/datapack list- Die once to save the death location.
- Hold a recovery compass in your main hand.
- The action bar will show:
Death Location: X Y Z- Remaining time until the death items expire
The death timer is controlled in:
data/recompass/function/on_death.mcfunction
By default, the timer is set with:
scoreboard players add @s deathTime 1200This value is in ticks:
1200ticks =1minute12000ticks =10minutes36000ticks =30minutes
For testing, set a smaller value such as:
scoreboard players add @s deathTime 1200- This datapack uses Minecraft functions, predicates, and scoreboards.
- Make sure your server or client supports the target Minecraft data pack version.
pack.mcmeta— datapack metadatadata/recompass/function/load.mcfunction— initializes scoreboardsdata/recompass/function/tick.mcfunction— main tick update logicdata/recompass/function/on_death.mcfunction— stores death coordinates and tags death dropsdata/recompass/function/show_coordinates.mcfunction— shows action bar textdata/recompass/function/format_timer.mcfunction— formats the timer displaydata/recompass/predicate/holding_compass.json— checks for a recovery compass in hand