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. ScriptAPI
  3. How to get the player looking pos?

How to get the player looking pos?

Scheduled Pinned Locked Moved ScriptAPI
4 Posts 3 Posters 672 Views 1 Watching
  • 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.
  • FaaatPotatoF Offline
    FaaatPotatoF Offline
    FaaatPotato
    wrote on last edited by FaaatPotato
    #1

    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
    0
    • CzechHekC Offline
      CzechHekC Offline
      CzechHek
      wrote on last edited by
      #2

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

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

      1 Reply Last reply
      0
      • FaaatPotatoF Offline
        FaaatPotatoF Offline
        FaaatPotato
        wrote on last edited by FaaatPotato
        #3

        @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
        0
        • scorpion3013S Offline
          scorpion3013S Offline
          scorpion3013
          Moderator
          wrote on last edited by scorpion3013
          #4

          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
          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