[SOLVED] How to detect when the player right clicks on a certain entity while holding a specific item?

Started by Andygun11 on

Topic category: Help with Minecraft modding (Java Edition)

Joined Feb 2022
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
[SOLVED] How to detect when the player right clicks on a certain entity while holding a specific item?
Mon, 05/05/2025 - 00:45 (edited)

The title. here's the code currently, but it doesn't work, because source entity is not something you can use in this global trigger.. for some reason:Image of the code

Is there any way to do this?

Edited by Andygun11 on Mon, 05/05/2025 - 00:45
Joined Feb 2022
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Ah, sorry. I fixed it. I had…
Mon, 05/05/2025 - 00:44

Ah, sorry. I fixed it. I had accidently selected "Player right-clicks with item" instead of "Player right-clicks on entity". Thank you null, NaN, and nobody for the help! lol