Multiple abilities for sword

Started by adamjr1 on

Topic category: Help with Minecraft modding (Java Edition)

Joined Oct 2025
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Multiple abilities for sword

Kay, I’ve seen atleast like 5 different posts like mine, however… I’m not the sharpest tool in the shed, and I take a minute to understand things, I’ve been working on a mod for silly’s for about 4 days now. I have a sword base, 2 abilities and that’s about it, I’m trying to figure out how to, with a keybind let’s say “r” you can swap between abilities say example 

Fire ball, anddddd black hole. I can swap three them, if anyone can help me please I’d appreciate that.

Joined Feb 2024
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
assign a variable to store…
Thu, 10/09/2025 - 07:53

assign a variable to store what ability is active and change the variable when the key is pressed 

Joined Oct 2020
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
For the weapon If VAR_A =…
Thu, 10/09/2025 - 11:00

For the weapon

If VAR_A = True

   do Ability_A

Else if VAR_A = False

   do Ability_B

 

For the swap keybind

If VAR_A = True

   do Set VAR_A to False

If VAR_A = False

   do Set VAR_A to True

 

If you want more abilities on the sword with the same keybind you will just need to change VAR_A into Numbers instead of Booleans.