Command block check if entity is hovering over another entity

Command block check if entity is hovering over another entity - Unrecognizable Woman Handing Over Mobile Phone to Another Woman

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"

Command block check if entity is hovering over another entity - Crop person handing over medical thermometer
Command block check if entity is hovering over another entity - Full body ethnic girl looking at camera over shoulder while sitting on concrete block near hearth outside tent in refugee camp
Command block check if entity is hovering over another entity - Brown Humming Bird Flying





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