For the love of god please fix Script API mappings.
-
It's currently impossible to get the Yaw or Position or Velocity through script api, giving errors about functions like .getYaw() that they don't exist when they DO exist in Fabric. This is really annoying.

The error appears with and without Fabric API.Fabric 1.21.11 Documentation HAS getYaw

-
Yarn support has been dropped. Very confusing. If any of your scripts stopped working. Check for updated mappings here: https://mcsrc.dev/#1/1.21.11_unobfuscated/net/minecraft/world/entity/Entity%23L1877
-
D dj has marked this topic as solved
-
Yarn support has been dropped because minecraft is going to release versions that are not obfuscated at all. we had a project that generates some ts definition(https://www.npmjs.com/package/@ccbluex/liquidbounce-script-api?activeTab=versions), I started it but that's not exactly very accurate because ts and Java have a slightly different OOP model, and writing script for script api doesn't feel like writing native ts, but I think I would just wait a little bit and pick it again when obfuscation has totally dropped(I am much looking forward to it).
For a shameless self-advertising, I did have some scripts written before I got the ts generator maintained by LB maintainers, but those scripts likely won't run on current version https://github.com/commandblock2/minecraft-LBNG-types/tree/master/src , and I have yet to migrate them to our current api version.
-
From what I can tell, we will be moving the ScriptAPI into a standalone add-on and updating LiquidBounce to support add-ons, with a starter repository ready to set up. We wanted to do the same with the ScriptAPI using TS definitions. However, @Senk-Ju tried it and it was nowhere near usable.
The ScriptAPI has always worked well when we used to support a single Minecraft version (1.8.9), with no major changes to the game. However, as we are now updating to every Minecraft version, and Mojang is introducing such significant changes, we feel it is more important to have full IDE support.
Add-ons won't differ much from creating a Fabric mod based on LiquidBounce; the only difference is that we will work on providing stable APIs similar to those like the Script API.
The good news for the ScriptAPI is that it will allow us to maintain the project separately, which will enable people to extend support for languages such as Python. This should also reduce the size of LiquidBounce considerably, since we can drop shipping GraalVM code.
This is likely to be completed when upgrading to Minecraft 26.1.