Player Tracking Compass

A compass that can track any player or any entity!

Supported Versions:

1.21.101.21.11+

Tutorial Steps:

  1. use Row 1 to summon a compass and put that compass in slot 1 of a chest
  2. Change Row 2 chest coordinates to your actual chest coordinate
  3. Tag the player or entity with compassTagged

Commands by Row:

Row 1

1. [impulse] /give @p minecraft:compass[minecraft:lodestone_tracker={target:{dimension:"minecraft:overworld",pos:[I;0,0,0]},tracked:false}]

Row 2

2. [repeat] /data modify block -277 4 -113 Items[0].components.minecraft:lodestone_tracker.target.pos set from entity @e[tag=compassTagged,limit=1] Pos
3. [chain] /data modify block -277 4 -113 Items[0].components.minecraft:lodestone_tracker.target.dimension set from entity @e[tag=compassTagged,limit=1] Dimension
4. [chain] /execute as @a[nbt={SelectedItem:{id:"minecraft:compass"}}] at @s run item replace entity @s weapon.mainhand from block -277 4 -113 container.0

Preview

impulse
repeat
chain
chain

Video

Too lazy to copy and paste each command?