How to allow for an additional/alternative outcome for "on entity right click"?

Started by MightyMoZes on Fri, 10/28/2022 - 11:10

Topic category: Help with modding (Java Edition)

Last seen on 20:16, 12. Jan 2023
Joined Jul 2022
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • MCreator plugins:
  • Comments:
How to allow for an additional/alternative outcome for "on entity right click"?
Fri, 10/28/2022 - 11:10

Hi everyone

I feel like there should be an extremely simple solution to this but I was unable to find a similar topic.
Problem: I made a vehicle mount and gave it a horn sound via procedure bound to "on entity right click". Now it's supposed to allow the player that is riding to also use - eg. -a spyglass while riding.
I tried making the if condition dependant on "entity ... is being ridden" and "item in main hand..." but obviously this doesn't work due to "event/target entity" targeting the mount entity itself instead of the player...


I feel a bit stupid but there is probaly a ~ 10 block procedure to make this work.
Thanks in advance to everyone with an idea :)