Skip to content

Scripts

41 Topics 117 Posts

Share and discover scripts for LiquidBounce

  • [Guide] Typescript definition for Minecraft and LiquidBounce

    Pinned
    4
    2
    2 Votes
    4 Posts
    4k Views
    C
    Update for LiquidBounce v0.29.0: What's new: refined disclaimer in README.md localStorage in definition (no java.utils class definition yet) multiChoose in manually maintained patch
  • [Guide] Working with Baritone API

    Pinned
    3
    1
    0 Votes
    3 Posts
    2k Views
    C
    It's definitely doable, but you need to use the unoptimized jar to directly call this. Here is the script in ts, but you may need to adapt the imports to Java.type in js. And also for the visualization manager it's not yet available outside of my project. will release once the api is well designed and performance becomes decent and after a proper name is found for the npm package. import { BaritoneAPI } from "jvm-types/baritone/api/BaritoneAPI" import { GoalXZ } from "jvm-types/baritone/api/pathing/goals/GoalXZ" import { CalculationContext } from "jvm-types/baritone/pathing/movement/CalculationContext" import { Favoring } from "jvm-types/baritone/utils/pathing/Favoring" import { BetterBlockPos } from "jvm-types/baritone/api/utils/BetterBlockPos" import { IPath } from "jvm-types/baritone/api/pathing/calc/IPath" import { VisualizationManager } from "lbng-utils-typed/dist/visualization-utils" import { PathCalculationResult$Type } from "jvm-types/baritone/api/utils/PathCalculationResult$Type" // note: this import is not from baritone-api jar // it is only presented in the baritone-unoptimized jar // as the `AStarPathFinder` class is possibly obfuscated in the baritone-standalone jar // so you will have to install the baritone-unoptimized jar to use this import import { AStarPathFinder } from "jvm-types/baritone/pathing/calc/AStarPathFinder" const script = registerScript.apply({ name: "astar-pathfinder-example", version: "1.0.0", authors: ["commandblock2"] }); script.registerModule({ name: "baritone-api-example", description: "Baritone example module", category: "Client", }, (mod) => { mod.on("enable", () => { BaritoneAPI.getSettings().allowSprint.value = true; BaritoneAPI.getSettings().primaryTimeoutMS.value = Primitives.long(2000); const baritone = BaritoneAPI.getProvider().getPrimaryBaritone(); baritone.getCustomGoalProcess().setGoalAndPath(new GoalXZ(100, 100)) }) }) script.registerModule({ name: "astar-pathfinder-example", description: "Direct AStarPathFinder construction example", category: "Client", settings: { goalX: Setting.float({ name: "Goal X", default: 100, range: [-10000, 10000] // Assuming a reasonable range }), goalZ: Setting.float({ name: "Goal Z", default: 100, range: [-10000, 10000] // Assuming a reasonable range }), recalculateInterval: Setting.int({ name: "Recalculate Interval (ticks)", default: 20, range: [1, 200] }) } }, (mod) => { const viz = new VisualizationManager(mod); let previousPath: IPath | null = null; let lastRecalculateTick = 0; const calculatePath = () => { const baritone = BaritoneAPI.getProvider().getPrimaryBaritone(); // Get current player position const playerPos = baritone.getPlayerContext().playerFeet(); const start = new BetterBlockPos(playerPos.getX(), playerPos.getY(), playerPos.getZ()); // Create calculation context for threaded use const context = new CalculationContext(baritone, true); // Create favoring (empty favoring for no preferences) const favoring = new Favoring(baritone.getPlayerContext(), previousPath as unknown as IPath, context); // Create goal using settings const goal = new GoalXZ(mod.settings.goalX.get() as unknown as number, mod.settings.goalZ.get() as unknown as number); // Construct AStarPathFinder directly const pathfinder = new AStarPathFinder( start, // realStart start.getX(), // startX start.getY(), // startY start.getZ(), // startZ goal, // goal favoring, // favoring context // context ); // @ts-expect-error UnsafeThread.run(() => { const result = pathfinder.calculate(Primitives.long(2000), Primitives.long(5000)); // Handle result if (result.getType() != PathCalculationResult$Type.CANCELLATION) { const path = result.getPath().get(); console.log("Path found! Length: " + path.length()); mc.execute(() => { viz.addVisualization({ lineData: { positions: path.positions().map((pos) => new Vec3d(pos.x + .5, pos.y, pos.z + .5)), }, durationTicks: 20 * 60, }); previousPath = path; }); // Use the path as needed - you now have direct access without execution } else { console.log("Path calculation failed: " + result.getType().toString()); } }); }; mod.on("enable", () => { viz.clearAllVisualizations(); lastRecalculateTick = 0; // Reset on enable calculatePath(); // Initial calculation }); mod.on("gametick", () => { if (mc.player && mc.world && (mc.player.age - lastRecalculateTick) >= (mod.settings.recalculateInterval.get() as unknown as number)) { calculatePath(); lastRecalculateTick = mc.player.age; } }); }); export { } [image: 1754149301736-vlcsnap-2025-08-02-23h41m20s672.png]
  • [Announcement] ScriptAPI Documentation

    Pinned Locked Moved
    1
    1 Votes
    1 Posts
    2k Views
    No one has replied
  • [Announcement] Don't use 3rd-party sites to upload scripts

    Pinned Locked Moved
    1
    1
    3 Votes
    1 Posts
    3k Views
    No one has replied
  • [Announcement] ScriptAPI Improvements in 0.18.0

    Pinned Locked Moved
    1
    1
    1 Votes
    1 Posts
    959 Views
    No one has replied
  • [SCRIPT] [LEGACY] MatrixArchiveAPIV2_b100

    2
    0 Votes
    2 Posts
    103 Views
    FaaatPotatoF
    FaaatPotato teleport showcase on funnymc.ru; they use matrix + old ncp https://youtu.be/pFdepfEVYNA
  • [Script] PerfectTime

    1
    0 Votes
    1 Posts
    109 Views
    No one has replied
  • [Script] AutoDuel for reallyworld

    1
    1
    0 Votes
    1 Posts
    55 Views
    No one has replied
  • [Script] MatrixNew LongJump (ScriptAPI Port)

    1
    1
    0 Votes
    1 Posts
    356 Views
    No one has replied
  • [Script] AutoJoin for SpookyTime

    1
    1 Votes
    1 Posts
    147 Views
    No one has replied
  • Sprint Reset for critical hit

    3
    1 Votes
    3 Posts
    319 Views
    rus109R
    Second version: SprintResetV2.js It's essentially no different from the first, but the code is less "hacky" and smarter.
  • Server List Explorer Installer

    sle installer download gui serverlist
    16
    0 Votes
    16 Posts
    3k Views
    SpoilerS
    this is a bump message
  • [Types] liquidbounce.d.ts

    1
    0 Votes
    1 Posts
    152 Views
    No one has replied
  • [Kotlin] Matrix new longjump

    6
    1 Votes
    6 Posts
    1k Views
    C
    What settings may bypass MLegacy?
  • Macros SUPPORT NEW WERSION

    1
    0 Votes
    1 Posts
    229 Views
    No one has replied
  • A TCP-based interface script

    2
    0 Votes
    2 Posts
    300 Views
    Dylanvip2024D
    My plugin doesn't seem to be loadable by the latest version of LiquidBounce (v0.35.3). So far, the tested working version is v0.35.0.
  • [Script] NES Emulator

    3
    1
    0 Votes
    3 Posts
    2k Views
    kawaiinekololisK
    The script has been updated for Minecraft 1.21.11. The download can be found on the main post. Changes: https://github.com/CCBlueX/ScriptAPI/commit/1fd1064a542036f49cd8157546860825aff41e8f 0 MukjepScarlet committed to CCBlueX/ScriptAPI fix(NESEmulator): update to 1.21.11 (#38) * fix(NESEmulator): update to 1.21.11 * Make x/y always floored * fix * add scale setting * dont use ints when not necessary --------- Co-authored-by: Senk Ju <[email protected]>
  • Help scripts

    1
    0 Votes
    1 Posts
    209 Views
    No one has replied
  • help

    1
    0 Votes
    1 Posts
    99 Views
    No one has replied
  • [Script] Macros

    4
    2
    0 Votes
    4 Posts
    3k Views
    kawaiinekololisK
    The installation is explained here: https://liquidbounce.net/docs/script-api/installation