CCBlueX Forum

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

    how to use new RotationUtils and MovementUtils(如何使用最新的RotationUtils和MovementUtils)

    Bug Reports
    2
    5
    61
    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.
    • ybyyby_ awa
      ybyyby_ awa last edited by ybyyby_ awa

      当我从b77 c54c5ca版本更新为b77 6d51ef3版本时
      我更新的js出现了无法放置方块,autoblock模块不工作的情况
      从日志中查看更新后尝试将
      RotationUtils.setTargetRotation();
      转换为RotationUtils.INSTACE.setTargetRotation()
      MovementUtils.strafe(0.2);
      转换为MovementUtils.INSTACE.strafe(0.2);
      但仍然无法修复
      如果可以的话请给出更新后内容js如何使用的示例
      或者方法,感谢

      When I update from the b77 c54c5ca version to the b77 6d51ef3 version
      The js I updated failed to place blocks and the autoblock module did not work
      After viewing the update from the log, try to
      RotationUtils.setTargetRotation();
      Convert to RotationUtils. INSTACE. setTargetRotation()
      MovementUtils.strafe(0.2);
      Convert to MovementUtils. INSTACE. trace (0.2);
      But it still cannot be repaired
      If possible, please provide an example of how to use the updated content js
      Or method, thank you

      bug反馈无法提交文件,所以我把我的js链接放在下面
      Bug feedback: Unable to submit the file, so I placed my js link below

      https://github.com/Hirohiko360/LiquidBounceScripts-TestScaffold

      CzechHek 1 Reply Last reply Reply Quote 0
      • CzechHek
        CzechHek @ybyyby_ awa last edited by

        @ybyyby_-awa I ported RotationUtils to kotlin, but didn't think of annotating all fields and methods with @JvmStatic and @JvmField.

        You therefore have to use RotationUtils like:
        RotationUtils.INSTANCE.setTargetRotation()

        However, I don't like this and it will probably get fixed in b78.
        MovementUtils.INSTANCE.getSpeed() is now MovementUtils.getSpeed()

        I will preferably make it so that you don't need to access the INSTANCE in the future.

        ybyyby_ awa 1 Reply Last reply Reply Quote 0
        • ybyyby_ awa
          ybyyby_ awa @CzechHek last edited by

          @CzechHek I don't know if what you said worked, so I conducted a test
          (Because I have developed a scaffold for a long time, I have found similar js for testing.)
          MatrixScaffold.js
          屏幕截图 2023-03-25 215009.png

          This is a simple scaffold that does not work in b77 6d51ef3, so I changed RotationUtils. setTargetRotation (new Rotation (mc. thePlayer. rotationYaw, 90)) to RotationUtils. INSTANCE. setTargetRotation (new Rotation (mc. thePlayer. rotationYaw, 90)) according to your method, but it still does not work

          CzechHek 1 Reply Last reply Reply Quote 0
          • CzechHek
            CzechHek @ybyyby_ awa last edited by

            @ybyyby_-awa I see, you also need to put keepLength parameter because there isn't @JvmOverloads, so just:
            RotationUtils.INSTANCE.setTargetRotation(rotation, 0)

            from src:
            fun setTargetRotation(rotation: Rotation, keepLength: Int = 0)

            after my pr gets merged, the previous syntax should work just fine:
            RotationUtils.setTargetRotation(rotation)

            ybyyby_ awa 1 Reply Last reply Reply Quote 2
            • ybyyby_ awa
              ybyyby_ awa @CzechHek last edited by

              @CzechHek Thank you for your answer:axofast:

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