How to cancel right-click but left-handed?

Started by RtCd on

Topic category: Help with Minecraft modding (Java Edition)

Joined Jul 2024
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
How to cancel right-click but left-handed?
Mon, 07/08/2024 - 16:50 (edited)

Hi all! 

The global trigger "player right-clicks on an entity" does not work correctly? 

I managed to make a procedure for canceling a player's right-click on a mob, but it cannot cancel a left-handed press.

 Apparently, the trigger only applies to the right hand, and pressing with the left hand is a separate event. 

Are there ways to undo this click?

Edited by RtCd on Mon, 07/08/2024 - 16:50
Joined Jul 2024
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
As of my last update,…
Tue, 07/09/2024 - 09:23

As of my last update, MCreator does not have a built-in global trigger specifically for left-hand clicks on entities. However, you can work around this limitation by checking for a left-hand action within a more general event trigger. 

Joined Jul 2024
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Hi, thanks for the reply!…
Tue, 07/09/2024 - 19:49

Hi, thanks for the reply! Most likely you misunderstood me. I'm trying to make a procedure that cancels right clicking on a sheep. By setting the global trigger “the player presses RMB by entity,” I was able to cancel pressing RMB with the right hand, but pressing RMB with the left still works! Simply put, if I press RMB while holding an object in my right hand, the procedure is canceled, if in my left hand, it is not canceled