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. Requests
  3. [Request] Arrow avoidance script (like Enderman)

[Request] Arrow avoidance script (like Enderman)

Scheduled Pinned Locked Moved Requests
44 Posts 8 Posters 3.0k Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • C Offline
    C Offline
    commandblock2
    replied to asd dsa on last edited by commandblock2
    #27

    @asd-dsa
    now the script is updated with horizontaltp and horizontalmotion. The direction is perpendicular to arrow trajectory.

    But there is not yet a check for tp into blocks, and still sometimes you could get shot. Might just going to look into FallingPlayer/Projectiles for reference.

    Edit: hmm the it should be same as Projectiles but still strange, maybe later then.

    the related code is here, but that is spaghetti anyway. you might want to give time the sin/cos since I think it might be a bit long.

                    if (dodgeMode.get() == "HorizontalTp") {
                        mc.thePlayer.setPosition(mc.thePlayer.posX + Math.sin(Math.toRadians(rot.yaw)),
                            mc.thePlayer.posY,
                            mc.thePlayer.posZ + Math.cos(Math.toRadians(rot.yaw)))
                        
                        dodging = null
                        return
                    }
                    
                    if (dodgeMode.get() == "HorizontalMotion") {
                        mc.thePlayer.motionX = Math.sin(Math.toRadians(rot.yaw)) // * 0.5 // or something like that
                        mc.thePlayer.motionZ = Math.cos(Math.toRadians(rot.yaw))
                        
                        dodging = null
                        return
                    }
    
    asd dsaA 1 Reply Last reply
    3
    • asd dsaA Offline
      asd dsaA Offline
      asd dsa
      replied to commandblock2 on last edited by
      #28

      @commandblock2 the code didn't work for me, idk why. Nothing happens to the player after selecting any "horizontal" module.

      C 1 Reply Last reply
      0
      • C Offline
        C Offline
        commandblock2
        replied to asd dsa on last edited by commandblock2
        #29

        @asd-dsa
        quite weird, works on my machine. But usually in this case you can look into the logs to see if the script is spamming exception. The log should be at .minecraft/logs/latest.log
        Idk if it only works on my build.
        Edit: the snippet I posted in the last post was only to tell you what the new code is for, still recommended to pull the full script from github. This what has been changed actually.

        asd dsaA 1 Reply Last reply
        4
        • asd dsaA Offline
          asd dsaA Offline
          asd dsa
          replied to commandblock2 on last edited by asd dsa
          #30

          @commandblock2 yes, it's spamming this

          [12:32:09] [Client thread/ERROR]: [ScriptAPI] Exception in module 'ProjectilesPlus'!
          java.lang.ClassCastException: Cannot cast net.minecraft.util.AxisAlignedBB to net.ccbluex.liquidbounce.api.minecraft.util.IAxisAlignedBB
          	at java.lang.invoke.MethodHandleImpl.newClassCastException(MethodHandleImpl.java:361) ~[?:1.8.0_51]
          	at java.lang.invoke.MethodHandleImpl.castReference(MethodHandleImpl.java:356) ~[?:1.8.0_51]
          	at jdk.nashorn.internal.scripts.Script$Recompilation$2483$6053A$\^eval\_.onRender3D(<eval>:170) ~[?:?]
          	at jdk.nashorn.internal.scripts.Script$Recompilation$2482$1245A$\^eval\_.registerModule#L:19#L:26(<eval>:26) ~[?:?]
          	at jdk.nashorn.internal.runtime.ScriptFunctionData.invoke(ScriptFunctionData.java:639) ~[ScriptFunctionData.class:?]
          	at jdk.nashorn.internal.runtime.ScriptFunction.invoke(ScriptFunction.java:494) ~[ScriptFunction.class:?]
          	at jdk.nashorn.internal.runtime.ScriptRuntime.apply(ScriptRuntime.java:393) ~[ScriptRuntime.class:?]
          	at jdk.nashorn.api.scripting.ScriptObjectMirror.call(ScriptObjectMirror.java:117) ~[ScriptObjectMirror.class:?]
          	at net.ccbluex.liquidbounce.script.api.ScriptModule.callEvent(ScriptModule.kt:131) [ScriptModule.class:?]
          	at net.ccbluex.liquidbounce.script.api.ScriptModule.onRender3D(ScriptModule.kt:83) [ScriptModule.class:?]
          	at sun.reflect.GeneratedMethodAccessor65.invoke(Unknown Source) ~[?:?]
          	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:1.8.0_51]
          	at java.lang.reflect.Method.invoke(Method.java:497) ~[?:1.8.0_51]
          	at net.ccbluex.liquidbounce.event.EventManager.callEvent(EventManager.kt:59) [EventManager.class:?]
          	at net.minecraft.client.renderer.EntityRenderer.handler$renderWorldPass$zbn000(EntityRenderer.java:3101) [bfk.class:?]
          	at net.minecraft.client.renderer.EntityRenderer.func_175068_a(EntityRenderer.java:1928) [bfk.class:?]
          	at net.minecraft.client.renderer.EntityRenderer.func_78471_a(EntityRenderer.java:1580) [bfk.class:?]
          	at net.minecraft.client.renderer.EntityRenderer.func_181560_a(EntityRenderer.java:1372) [bfk.class:?]
          	at net.minecraft.client.Minecraft.func_71411_J(Minecraft.java:1051) [ave.class:?]
          	at net.minecraft.client.Minecraft.func_99999_d(Minecraft.java:349) [ave.class:?]
          	at net.minecraft.client.main.Main.main(SourceFile:124) [Main.class:?]
          	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_51]
          	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[?:1.8.0_51]
          	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:1.8.0_51]
          	at java.lang.reflect.Method.invoke(Method.java:497) ~[?:1.8.0_51]
          	at net.minecraft.launchwrapper.Launch.launch(Launch.java:135) [launchwrapper-1.12.jar:?]
          	at net.minecraft.launchwrapper.Launch.main(Launch.java:28) [launchwrapper-1.12.jar:?]
          

          Edit: yes, I used whole code from github, not the snippet

          C 1 Reply Last reply
          0
          • C Offline
            C Offline
            commandblock2
            replied to asd dsa on last edited by commandblock2
            #31

            @asd-dsa
            I see, the version you used is the cross version. The script was designed for none cross version 1.8. Quite surprising it was still working with other mode. If you want to use that you might need to have extra modification since the cross version has some changes in scriptAPI.
            Edit: But according to this exception, it seemed to be the one in render3D which should cause the whole script (anymode and the prediction) to break
            Edit: nvm I was dumb this exception shouldn't affect might be other exception

            asd dsaA 2 Replies Last reply
            5
            • asd dsaA Offline
              asd dsaA Offline
              asd dsa
              replied to commandblock2 on last edited by
              #32

              @commandblock2 I was on LB b73 version. I changed to b72 back and now it's working perfectly.

              1 Reply Last reply
              0
              • asd dsaA Offline
                asd dsaA Offline
                asd dsa
                replied to commandblock2 on last edited by
                #33

                @commandblock2 I did some tests and noticed that if arrow trajectory is parallel to Z axis it will teleport player to the left and right at the same time. It looks like the player rolls right and left very quickly and it causes setback. Additionally, if the arrow's trajectory is at an angle of 45 degrees to the X or Z axis, the script will teleport the player parallel to the arrow's trajectory instead of perpendicularly. Idk if it is caused by my version or what, I have stable b72 now.

                C MustishM 2 Replies Last reply
                0
                • C Offline
                  C Offline
                  commandblock2
                  replied to asd dsa on last edited by commandblock2
                  #34

                  @asd-dsa
                  it doesn't sound like some problem with your version, I think it's very much probably my fault. Will later look into it

                  1 Reply Last reply
                  5
                  • MustishM Offline
                    MustishM Offline
                    Mustish
                    replied to asd dsa on last edited by
                    #35

                    @asd-dsa Derpmc uses verus verry bad verus

                    G 1 Reply Last reply
                    0
                    • G Offline
                      G Offline
                      Gabriel
                      replied to Mustish on last edited by
                      #36

                      @mustish On bedwars, seems like matrix.

                      1 Reply Last reply
                      0
                      • C Offline
                        C Offline
                        cancer
                        replied to A Former User on last edited by
                        #37

                        @allah-gaming Just because Marco gave them permission to do it and will not take action, doesn't mean it doesn't violate the GPL. Unless he licensed LiquidBounce to them under another license, it's still a violation and he could take action if he wanted to.

                        ? 1 Reply Last reply
                        0
                        • ? Offline
                          ? Offline
                          A Former User
                          replied to cancer on last edited by
                          #38

                          @cancer said in [Request] Arrow avoidance script (like Enderman):

                          @allah-gaming Just because Marco gave them permission to do it and will not take action, doesn't mean it doesn't violate the GPL. Unless he licensed LiquidBounce to them under another license, it's still a violation and he could take action if he wanted to.

                          but yeah marco doesn't care and no one cares

                          C 1 Reply Last reply
                          0
                          • C Offline
                            C Offline
                            cancer
                            replied to A Former User on last edited by cancer
                            #39

                            @allah-gaming I know. I still point it out since I believe that software is better when it's free. Remember the updates LB got when it was licensed under the GPL?

                            1 Reply Last reply
                            0
                            • C Offline
                              C Offline
                              cancer
                              replied to asd dsa on last edited by
                              #40

                              @asd-dsa Wurst had it, maybe skidaddle skadoodle?

                              asd dsaA 1 Reply Last reply
                              0
                              • asd dsaA Offline
                                asd dsaA Offline
                                asd dsa
                                replied to cancer on last edited by
                                #41

                                @cancer which version?

                                C 1 Reply Last reply
                                0
                                • C Offline
                                  C Offline
                                  cancer
                                  replied to asd dsa on last edited by
                                  #42

                                  @asd-dsa what do you mean

                                  asd dsaA 1 Reply Last reply
                                  0
                                  • asd dsaA Offline
                                    asd dsaA Offline
                                    asd dsa
                                    replied to cancer on last edited by
                                    #43

                                    @cancer which version of Wurst had it?

                                    C 1 Reply Last reply
                                    0
                                    • C Offline
                                      C Offline
                                      cancer
                                      replied to asd dsa on last edited by
                                      #44

                                      @asd-dsa idunno

                                      1 Reply Last reply
                                      0

                                      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