how to detect when a player left clicks?

Started by Mecho on

Topic category: Help with modding (Java Edition)

Last seen on 06:34, 13. Jun 2024
Joined Feb 2023
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
how to detect when a player left clicks?

im making a mod that need to detect when you left click (attack) with a weapon, for the most time 'on player swing item' was sufficient until it was activating when interacting with things like buttons, crafting tables and item frames. can anyone help me? 

Last seen on 20:51, 30. May 2024
Joined Dec 2022
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
I think if you search well…
Fri, 05/03/2024 - 15:12

I think if you search well enough in the trigger list when you create a procedure, there is a "on player left click" or something like that.

Then you just have to check if the player is holding the right item in his main hand. If you need more information just tell me

Last seen on 08:10, 28. May 2024
Joined Dec 2023
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
You can also use a keybind,…
Sat, 05/04/2024 - 00:13

You can also use a keybind, but it's probably a bit over the top.

Last seen on 19:48, 11. Jun 2024
Joined Aug 2018
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
i can only find "left clicks…
Tue, 05/21/2024 - 17:58

i can only find "left clicks on block" but i need just left clicks for in air