How do i make more functions on one keybind.

Started by Jaapa on

Topic category: Help with Minecraft modding (Java Edition)

Joined Nov 2022
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
How do i make more functions on one keybind.
Fri, 04/07/2023 - 10:18 (edited)

I need help with Keybinds. Am trying to do abilities on one keybind [R] but it would work somehow like this: You have 2 weapons in the mod one being katana the other spear now when you press r while the katana is in you'r hand it does for example dash ok, but then i need the same keybind to make strong slash on spear but you cant since you can use the keybind on one thing. So my question is if its possible to make one keybind have more abilities for each weapon.

Edited by Jaapa on Fri, 04/07/2023 - 10:18
Joined Jun 2020
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
yeah sure, very simpleā€¦
Mon, 02/05/2024 - 23:09

yeah sure, very simple actually. just check what item is in the main hand.

like this:

If item in main-hand of event/target entity = katana

        do dash

else if item in main-hand of event/target entity = spear

        do slash