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

mqM

mq

@mq
About
Posts
2
Topics
1
Shares
0
Groups
0
Followers
1
Following
0

Posts

Recent Best Controversial

  • How to detect if the player is crouching or jumping?
    mqM mq

    @mq ok nvm i found out how to check it

        if (mc.gameSettings.keyBindSneak.pressed == true) { /* If crouching */
            mc.thePlayer.motionY = -0.31; /* Go down */
        } else if (mc.gameSettings.keyBindJump.pressed == true) { /* If jumping */
            mc.thePlayer.motionY = 0.31; /* Go up */
        } else {
            mc.thePlayer.motionY = 0;
        }
    
    ScriptAPI

  • How to detect if the player is crouching or jumping?
    mqM mq

    How to detect if the player is crouching or jumping?

    So I'm trying to redo the Vanilla Fly as the script:

    /// api_version=2
    var script = registerScript({
        name: "VanillaFly",
        version: "1.0.0",
        authors: ["kvuqq"]
    });
    
    // Imported classes
    var MovementUtils = Java.type("net.ccbluex.liquidbounce.utils.MovementUtils");
    script.registerModule({
        name: "VanillaFly",
        category: "Movement",
        description: "Built-in vanilla fly, but as script"
    }, function(module) {
        module.on("motion", function() {
            MovementUtils.strafe(1)
            mc.thePlayer.motionY = 0;
        });
    });
    

    and the original has that:

                player.strafe(speed = 0.44)
                player.velocity.y = when {
                    player.input.jumping -> 0.31
                    player.input.sneaking -> -0.31
                    else -> 0.0
                }
    

    so I want to detect if the player is crouching/jumping.

    ScriptAPI
  • Login

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