In Minecraft, a velocity hack (often called Anti-Knockback or Anti-KB) is a client-side cheat that manipulates or nullifies the knockback a player receives when hit by other players or explosions. It allows cheaters to maintain their combos and remain entirely unaffected by attacks that would normally push them back
1,First Save those code into zip file and then unzip it and open it in code editor
2,Second go to terminal and use cd command go to the path of velocity folder
3,Third use ./gradlew build
4,Fourth after build successful go to build folder and go to libs folder and then you can get velocity.jar
5,Finally you need put velocity.jar into mod folder from your minecraft folder (if you do not have mod folder, you can create it) and then you can launch your game
press "'" key in game to turn on velocity it is next to ENTER key