How do you make keybinds only work on effect, etc? (SOLVED)

Started by nemesis104 on

Topic category: Help with modding (Java Edition)

Last seen on 22:35, 6. Nov 2022
Joined Nov 2022
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
How do you make keybinds only work on effect, etc? (SOLVED)
Tue, 11/01/2022 - 19:47 (edited)

I am making a mod with a custom enderpearl, that after you throw it will give you an effect called Endermans Grace. This effect would allow you to teleport with a keybind, but I dont know how to implement this. I got the pearl and effect, but I need help on making the keybind only work if you have the effect.

Edited by nemesis104 on Tue, 11/01/2022 - 19:47
Last seen on 22:35, 6. Nov 2022
Joined Nov 2022
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Nevermind, when you press…
Tue, 11/01/2022 - 19:47

Nevermind, when you press the keybind, run a procedure that checks if you have the effect, then lets you teleport.