Started by
healedpack
on
Topic category: Help with Minecraft modding (Java Edition)
I want to make a mod with superpowers with the ability to fly. How could I make it where I press a key to start flying then press it again to stop flying. I have been working on it for hours and can’t figure it out still.
Use the allow fly procedure block. Additionally use a variable, eg allowFlight, on player. Now on key pressed, if allowFlight=false, set variable allowFlight to true, else set allowFlight to false.
Then on player tick update, allow flight if [allowFlight=true] otherwise don’t.
I dont understand