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. Resources
  3. Scripts
  4. [Kotlin] Matrix new longjump

[Kotlin] Matrix new longjump

Scheduled Pinned Locked Moved Scripts
6 Posts 3 Posters 750 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.
  • K Offline
    K Offline
    konfeta6664
    wrote on last edited by
    #1

    Bypass matrix today (Matrix7145FlagLongJump outdated)

    package net.ccbluex.liquidbounce.features.module.modules.movement.longjump.modes
    
    import net.ccbluex.liquidbounce.config.types.Choice
    import net.ccbluex.liquidbounce.config.types.ChoiceConfigurable
    import net.ccbluex.liquidbounce.config.types.NamedChoice
    import net.ccbluex.liquidbounce.event.events.PacketEvent
    import net.ccbluex.liquidbounce.event.handler
    import net.ccbluex.liquidbounce.event.tickHandler
    import net.ccbluex.liquidbounce.features.module.modules.movement.longjump.ModuleLongJump
    import net.ccbluex.liquidbounce.utils.entity.withStrafe
    import net.ccbluex.liquidbounce.utils.math.copy
    import net.minecraft.network.packet.c2s.play.PlayerMoveC2SPacket
    import net.minecraft.network.packet.s2c.play.PlayerPositionLookS2CPacket
    
    internal object MatrixNewLongJump : Choice("MatrixNew") {
    
        override val parent: ChoiceConfigurable<*>
            get() = ModuleLongJump.mode
    
        private enum class MotionMode(override val choiceName: String) : NamedChoice {
            Stable("Stable"),
            Last("Last")
        }
    
        private enum class BypassMethod(override val choiceName: String) : NamedChoice {
            Fall("Fall"),
            NoGround("NoGround")
        }
    
        private val motionMode by enumChoice("MotionMode", MotionMode.Stable)
        private val bypassMethod by enumChoice("BypassMethod", BypassMethod.Fall)
        private val boostSpeed by float("MatrixNew-BoostSpeed", 2.1f, -3.0f..8.0f)
        private val motionY by float("MotionY", 0.42f, 0.0f..5.0f)
    
        private var savedX = 0.0
        private var savedY = 0.0
        private var savedZ = 0.0
    
        private var receivedFlag = false
        private var canBoost = false
        private var boosted = false
        private var touchGround = false
    
        override fun enable() {
            receivedFlag = false
            canBoost = false
            boosted = false
            touchGround = false
    
            if (bypassMethod == BypassMethod.NoGround) {
                if (player.isOnGround) player.jump()
                touchGround = true
            }
        }
    
        override fun disable() {
            receivedFlag = false
            canBoost = false
            boosted = false
            touchGround = false
        }
    
        @Suppress("unused")
        private val packetRecv = handler<PacketEvent> {
            val packet = it.packet
            if (packet is PlayerPositionLookS2CPacket) {
                receivedFlag = true
                if (motionMode == MotionMode.Last) {
                    canBoost = false
                    val vel = player.velocity
                    savedX = vel.x
                    savedY = vel.y
                    savedZ = vel.z
                }
            }
        }
    
        @Suppress("unused")
        private val packetSend = handler<PacketEvent> {
            val packet = it.packet
            if (packet is PlayerMoveC2SPacket) {
                if (motionMode == MotionMode.Last && receivedFlag) {
                    player.velocity = player.velocity.copy(x = savedX, y = savedY, z = savedZ)
    
                    canBoost = false
                    receivedFlag = false
                }
            }
        }
    
        @Suppress("unused")
        private val tick = tickHandler {
            if (!player.isOnGround && touchGround) touchGround = false
    
            if (player.isOnGround && !touchGround) {
                player.jump()
                boosted = false
                if (bypassMethod == BypassMethod.NoGround && !boosted) {
                    canBoost = true
                }
            }
    
            if (player.fallDistance >= 0.25f && !boosted && bypassMethod == BypassMethod.Fall) {
                canBoost = true
            }
    
            if (canBoost) {
                val yaw = player.yaw
                player.velocity = player.velocity
                    .withStrafe(speed = boostSpeed.toDouble(), yaw = yaw, input = null)
                    .copy(y = motionY.toDouble())
                boosted = true
            }
    
            if (receivedFlag && boosted) {
                canBoost = false
                receivedFlag = false
            }
        }
    }
    

    ported from - https://yougame.biz/threads/360241/

    1 Reply Last reply
    0
    • T Offline
      T Offline
      ThatMadCat
      wrote last edited by
      #2

      how to use that? am i suposed to recompile liquidbounce with that?

      1 Reply Last reply
      0
      • T Offline
        T Offline
        ThatMadCat
        wrote last edited by
        #3

        how exactly it is used? My only tought is recompiling LiquidBounce with this file

        K 1 Reply Last reply
        0
        • T ThatMadCat

          how exactly it is used? My only tought is recompiling LiquidBounce with this file

          K Offline
          K Offline
          konfeta6664
          wrote last edited by
          #4

          @ThatMadCat
          if you are asking about how to insert this into liquidbounce
          1 Create new .kt mode file in the longjump modes folder
          2 Fix the imports for the version what you are using
          3 Register the new mode in longjumpmodule.kt

          1 Reply Last reply
          0
          • T Offline
            T Offline
            ThatMadCat
            wrote last edited by
            #5

            @konfeta6664 so recompile liquidbounce with it?

            1 Reply Last reply
            0
            • C Offline
              C Offline
              c00lkidd228
              wrote last edited by
              #6

              What settings may bypass MLegacy?

              1 Reply Last reply
              0
              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