How do you detect shift 1.19.2

Started by notAstral on

Topic category: Help with Minecraft modding (Java Edition)

Joined Sep 2023
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
How do you detect shift 1.19.2
Mon, 09/04/2023 - 15:31 (edited)

I want to detect shift on a player so if he is shifting then the other part of the code would work

Edited by notAstral on Mon, 09/04/2023 - 15:31
Joined Jul 2023
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
You create a "Key binding"…
Wed, 09/06/2023 - 01:04

You create a "Key binding" in mod elements, and make procedures for both on pressed and on released. Then, add this code into the on pressed procedure, and the same thing in on released except change the value to false. Then to use it, check if custom logic NBT tag "ShiftPressed" value is true, and if so do whatever it is you're wanting to use it for. 

""