Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse

LiquidBounce Forum

  1. Home
  2. Kotlin/Java
  3. [TUTORIAL] How to add a basic speed mode

[TUTORIAL] How to add a basic speed mode

Scheduled Pinned Locked Moved Kotlin/Java
1 Posts 1 Posters 278 Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • G Offline
    G Offline
    Gabriel
    wrote on last edited by
    #1

    Re: [SUPPORT] How to make a basic speed mode?
    Since this post, I have gotten way better at coding, and can explain some things about how to make speed modes. Ok, so first, you have to choose which folder you're going to use, or if you're going to make a new one.
    For an example, I'm going to choose to make it in the “other” folder, since that's really used anyway. I'm going to name the file “Strafe” with the Kotlin file extension, so it's going to be “Strafe.kt”.
    Here's how the file's going to start:

    /*
     * LiquidBounce Hacked Client
     * A free open source mixin-based injection hacked client for Minecraft using Minecraft Forge.
     * https://github.com/CCBlueX/LiquidBounce/
     */
    

    Now, I'm going to set the package used, by adding this:

    package net.ccbluex.liquidbounce.features.module.modules.movement.speedmodes.other
    

    Now, we want to get the proper imports (to be able to add the stuff), so, we're going to have to add those imports (you only have to add the ones you're going to use).

    import net.ccbluex.liquidbounce.features.module.modules.movement.speedmodes.SpeedMode // To register the speed mode
    import net.ccbluex.liquidbounce.utils.MovementUtils.isMoving // To check if the player is moving
    import net.ccbluex.liquidbounce.utils.MovementUtils.strafe // To make the player strafe
    

    Great, now that we have done that, let's register the speed mode properly; for the example, I'm going to name it “Strafe”, as the file name suggests.

    object Strafe : SpeedMode("Strafe")
    

    Now, we have to add the {} at the start and end of the file (DO NOT FORGET THIS).
    Since you have done that by now, I'm going to show you the rest of the code, with code commentary.

        override fun onUpdate() {
            if (mc.thePlayer == null) {
                return
            }
            if (mc.thePlayer.onGround && isMoving) {
                mc.thePlayer.jump()
            }
            strafe()
        }
    

    The full file should look like this:

    /*
     * LiquidBounce Hacked Client
     * A free open source mixin-based injection hacked client for Minecraft using Minecraft Forge.
     * https://github.com/CCBlueX/LiquidBounce/
     */
    package net.ccbluex.liquidbounce.features.module.modules.movement.speedmodes.other
    
    import net.ccbluex.liquidbounce.features.module.modules.movement.speedmodes.SpeedMode // To register the speed mode
    import net.ccbluex.liquidbounce.utils.MovementUtils.isMoving // To check if the player is moving
    import net.ccbluex.liquidbounce.utils.MovementUtils.strafe // To make the player strafe
    
    object Strafe : SpeedMode("Strafe") {
        override fun onUpdate() {
            if (mc.thePlayer == null) {
                return
            }
            if (mc.thePlayer.onGround && isMoving) {
                mc.thePlayer.jump()
            }
            strafe()
        }
    }
    

    Now, we have to make the speed mode actually show on Speed. Therefore, we have to access Speed.kt, and add this to line 54: , Strafe

    Now, you are good to go! You have made a speed mode.

    1 Reply Last reply
    1
    Reply
    • Reply as topic
    Log in to reply
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes


    About
    • Terms of Service
    • Privacy Policy
    • Status
    • Contact Us
    Downloads
    • Releases
    • Source code
    • License
    Docs
    • Tutorials
    • CustomHUD
    • AutoSettings
    • ScriptAPI
    Community
    • Forum
    • Guilded
    • YouTube
    • Twitter
    • D.Tube
    • Login

    • Login or register to search.
    • First post
      Last post
    0
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups