CCBlueX Forum

    • Register
    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups

    How to get the player looking pos?

    ScriptAPI
    3
    4
    249
    Loading More Posts
    • 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.
    • FaaatPotato
      FaaatPotato last edited by FaaatPotato

      I need smth like this:
      var C06PlayerPacket = Java.type('net.minecraft.network.play.client.C03PacketPlayer.C06PacketPlayerPosLook');
      and i wanna mark this like the normal Teleport with a meter counter. Then i want to get my tp (its a hclip setted to the distance) till now i just got an x axis teleport but i wanna tp u can choose how long and where u tp :C

      Smth like:

      Get Meters
      Set Meters to hclip distance
      Clip

      example:

      If Meters (10)
      set distance to hclip to (10)
      Clip

      1 Reply Last reply Reply Quote 0
      • CzechHek
        CzechHek last edited by

        var MovementUtils = Java.type("net.ccbluex.liquidbounce.utils.MovementUtils"), clipDistance;

        MovementUtils.getSpeed() >= 10 && MovementUtils.forward(clipDistance = 10);

        1 Reply Last reply Reply Quote 0
        • FaaatPotato
          FaaatPotato last edited by FaaatPotato

          @CzechHek said in How to get the player looking pos?:

          var MovementUtils = Java.type("net.ccbluex.liquidbounce.utils.MovementUtils"), clipDistance;

          so this gets the distance of looking block and sets the distance to the clipdistance?

          ive tried it with this offset

          function hClip(offset) {
          	mc.thePlayer.sendQueue.addToSendQueue(new C04PacketPlayerPosition(mc.thePlayer.posX, mc.thePlayer.posY, mc.thePlayer.posZ + offset, mc.thePlayer.onGround));
          

          then ive tried to put in ur script but it seems not to work do i have to change on urs smth like rename it to hClip not clipDistance ?

          this.onUpdate = function () {
          		if(mc.thePlayer.onGround) {
          			mc.thePlayer.motionY = 0.32
          			if(spoofGround.get()){
          		        mc.thePlayer.sendQueue.addToSendQueue(new C03PacketPlayer(true));
          		      }
          		}
          		if (mc.thePlayer.onGround && mc.gameSettings.keyBindSneak.pressed == true) {
          			MovementUtils.getSpeed() >= 10 && MovementUtils.forward(clipDistance = 10);
          			hClip(20)
          	}
              }
          
          1 Reply Last reply Reply Quote 0
          • scorpion3013
            scorpion3013 Moderator last edited by scorpion3013

            Just take a look at the teleport class of LiquidBounce, you should be able to find the code that gets the block you are looking at and how to determine the distance to it.
            By the way, if you want to teleport more than 10 blocks, you have to send several packets. 😉
            https://github.com/CCBlueX/LiquidBounce/blob/master/1.8.9-Forge/src/main/java/net/ccbluex/liquidbounce/features/module/modules/exploit/Teleport.java

            1 Reply Last reply Reply Quote 1
            • First post
              Last post
            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