Command block check if entity is hovering over another entity

//ads -- adsterra.com -- native banner
?>
Can I do a command to check if a dropped item is hovering over a villager named miner and then tp
that item to a position?
Best Answer
Setup:
/scoreboard objective add Marker dummy
Clock (20tps):
/scoreboard players set @e[type=Item] Marker 0
/execute @e[type=Villager,name=miner] ~ ~ ~ scoreboard players set @e[type=Item,r=1] Marker 1
/tp @e[type=Item,score_Marker_min=1] <X> <Y> <Z>
Pictures about "Command block check if entity is hovering over another entity"



3 Deadly Command Blocks (Minecraft PE)
Sources: Stack Exchange - This article follows the attribution requirements of Stack Exchange and is licensed under CC BY-SA 3.0.
Images: Max Mishin, Ave Calvar Martinez, Ahmed akacha, Piper Ashton