For come context: I am using 1.14 vanilla (no plugins, mods, or data packs). I want to have a small hub on me and my friend's creative world, where I can right click a certain villager to get to a certain place (there would be lots of villagers in this hub). I know how to detect the right click in general using this method, I just don't know how I would distinguish it from, say a trading with a normal villager, or right clicking a different another villager in the hub.
I don't know if this is possible without plugins or mods, but I think the best way to do this would be to somehow give the villager a scoreboard when right clicked. I would then use command blocks to detect the specific villager's score (then run the rest of my commands). I just don't know what commands I would use to do this. Any help would be appreciated.
edit: nvm I just used hit detection. If anyone still wants to inform me on how I could use right click detection, I'm all ears.
For come context: I am using 1.14 vanilla (no plugins, mods, or data packs). I want to have a small hub on me and my friend's creative world, where I can right click a certain villager to get to a certain place (there would be lots of villagers in this hub). I know how to detect the right click in general using this method, I just don't know how I would distinguish it from, say a trading with a normal villager, or right clicking a different another villager in the hub.I don't know if this is possible without plugins or mods, but I think the best way to do this would be to somehow give the villager a scoreboard when right clicked. I would then use command blocks to detect the specific villager's score (then run the rest of my commands). I just don't know what commands I would use to do this. Any help would be appreciated.edit: nvm I just used hit detection. If anyone still wants to inform me on how I could use right click detection, I'm all ears.