Started by
adamjr1
on
Topic category: Help with Minecraft modding (Java Edition)
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.
assign a variable to store what ability is active and change the variable when the key is pressed
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.