Skip to content

ScriptAPI

A place to ask for help on writing scripts

309 Topics 2.3k Posts
  • Help with setting visibility

    Solved
    7
    0 Votes
    7 Posts
    547 Views
    C
    By reading your post again I think I need to use ChoiceConfigurable. And I think that's definitely possible.
  • I need help in JavaScript of liquidbounce b100

    Unsolved
    1
    0 Votes
    1 Posts
    180 Views
    No one has replied
  • 0 Votes
    3 Posts
    446 Views
    F
    @kawaiinekololis say how pls
  • I need script velogrimC07(apiv2)

    Unsolved
    5
    0 Votes
    5 Posts
    639 Views
    F
    access to host class net.minecraft.network.play.server.S12PacketEntityVelocity is not allowed or does not exist
  • Custom Script Help

    Solved
    9
    0 Votes
    9 Posts
    722 Views
    C
    You are welcome and I am willing to accept further help requests, would appreciate a example error script or errors in the logs.
  • Methods with the same name but different arguments possibly causing issues

    Unsolved
    3
    0 Votes
    3 Posts
    343 Views
    AjaxA
    Thanks for the reply. Honestly, good point about making an issue on GitHub, I dunno how that hasn't crossed my mind lol. Here's a link to my issue https://github.com/CCBlueX/LiquidBounce/issues/4964. ayaxperson created this issue in CCBlueX/LiquidBounce open [BUG] ScriptAPI mapping issue with method overloading #4964
  • TargetControll

    Unsolved
    1
    0 Votes
    1 Posts
    222 Views
    No one has replied
  • networking stuff with hypixel api

    Unsolved
    1
    0 Votes
    1 Posts
    224 Views
    No one has replied
  • get armor of facing entity

    Unsolved
    1
    0 Votes
    1 Posts
    288 Views
    No one has replied
  • Accessing non-class kotlin functions

    Solved
    2
    0 Votes
    2 Posts
    347 Views
    K
    I figured it out, lol. Just have to do Java.type("net.ccbluex.liquidbounce.utils.aiming.RotationFindingKt"); a.k.a.: add [filename]Kt at the end of the type cause that's just how Kotlin works.
  • Help with GUIs

    Unsolved
    2
    0 Votes
    2 Posts
    352 Views
    H
    you can use fabric api to click on an item in the GUI.
  • Hey

    Unsolved
    4
    0 Votes
    4 Posts
    500 Views
    EclipsesDevE
    @HieuNamYT wdym by packet codes? like C08 or smth like that?
  • This topic is deleted!

    Unsolved
    1
    0 Votes
    1 Posts
    3 Views
    No one has replied
  • massive performance issues

    Unsolved
    1
    0 Votes
    1 Posts
    227 Views
    No one has replied
  • Help With Fixing Code

    Unsolved
    11
    1 Votes
    11 Posts
    1k Views
    IgniteTNTI
    It doesn't seem to like mc.gameSettings.keyBindSneak.pressed works, weird.
  • Sneak Packet

    Unsolved
    1
    0 Votes
    1 Posts
    245 Views
    No one has replied
  • Help With Liquidbounce Nextgen ScriptingAPI

    Unsolved
    1
    0 Votes
    1 Posts
    234 Views
    No one has replied
  • mc.thePlayer is undefined

    Unsolved
    5
    0 Votes
    5 Posts
    866 Views
    182exe1
    @kawaiinekololis this is what prints if I'm just asking for mc.thePlayer [15:58:47] [Client thread/INFO]: [CHAT] undefined [15:58:47] [Client thread/INFO]: [CHAT] undefined [15:58:47] [Client thread/INFO]: [CHAT] undefined [15:58:47] [Client thread/INFO]: [CHAT] undefined [15:58:47] [Client thread/INFO]: [CHAT] undefined and if i query mc.thePlayer.motionX for example: [16:00:49] [Client thread/ERROR]: [ScriptAPI] Exception in module 'MMC Velocity'! jdk.nashorn.internal.runtime.ECMAException: TypeError: Cannot read property "motionX" from undefined at jdk.nashorn.internal.runtime.ECMAErrors.error(ECMAErrors.java:57) ~[ECMAErrors.class:?] at jdk.nashorn.internal.runtime.ECMAErrors.typeError(ECMAErrors.java:213) ~[ECMAErrors.class:?] at jdk.nashorn.internal.runtime.ECMAErrors.typeError(ECMAErrors.java:185) ~[ECMAErrors.class:?] at jdk.nashorn.internal.runtime.ECMAErrors.typeError(ECMAErrors.java:172) ~[ECMAErrors.class:?] at jdk.nashorn.internal.runtime.Undefined.get(Undefined.java:157) ~[Undefined.class:?] at jdk.nashorn.internal.scripts.Script$Recompilation$23$293$^eval_.L:12#L:13(<eval>:14) ~[?:?] at jdk.nashorn.internal.runtime.ScriptFunctionData.invoke(ScriptFunctionData.java:637) ~[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:122) [ScriptModule.class:?] at net.ccbluex.liquidbounce.script.api.ScriptModule.callEvent$default(ScriptModule.kt:120) [ScriptModule.class:?] at net.ccbluex.liquidbounce.script.api.ScriptModule.onUpdate(ScriptModule.kt:62) [ScriptModule.class:?] at sun.reflect.GeneratedMethodAccessor115.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:53) [EventManager.class:?] at net.minecraft.client.entity.EntityPlayerSP.func_70636_d(EntityPlayerSP.java:1103) [bew.class:?] at net.minecraft.entity.EntityLivingBase.func_70071_h_(EntityLivingBase.java:1614) [pr.class:?] at net.minecraft.entity.player.EntityPlayer.func_70071_h_(EntityPlayer.java:283) [wn.class:?] at net.minecraft.client.entity.EntityPlayerSP.func_70071_h_(EntityPlayerSP.java:117) [bew.class:?] at net.minecraft.world.World.func_72866_a(World.java:1862) [adm.class:?] at net.minecraft.world.World.func_72870_g(World.java:1831) [adm.class:?] at net.minecraft.world.World.func_72939_s(World.java:1663) [adm.class:?] at net.minecraft.client.Minecraft.func_71407_l(Minecraft.java:2089) [ave.class:?] at net.minecraft.client.Minecraft.func_71411_J(Minecraft.java:1024) [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:?]
  • Scripting api works for new gen? I can’t find it anywhere

    Unsolved
    5
    0 Votes
    5 Posts
    653 Views
    kawaiinekololisK
    The PR was merged, let me know if there is something missing. Documentation will follow soon.
  • Unsure how to fix script issue

    Unsolved
    3
    0 Votes
    3 Posts
    505 Views
    FaaatPotatoF
    @FaaatPotato Actually it is too cool to not be used. So I included your way of doing it and you can whitelist items via text setting ///api_version=2 (script = registerScript({ name: "DepositFish", version: "1.0", authors: ["some fisherman"] })); var GuiChest = Java.type("net.minecraft.client.gui.inventory.GuiChest"), ItemFish = Java.type("net.minecraft.item.ItemFishFood") script.registerModule({ name: "DepositFish", category: "Misc", description: "Stores fish lol", settings: { modeValue: mode = Setting.list({ name: "Mode", values: ["FaaatPotato", "ToolTip"], default: "FaaatPotato" }), itemsValue: items = Setting.text({ name: "ItemsToStore", default: "fish", isSupported: function() { return mode.get() == "ToolTip" } }) } }, function (module) { module.on("update", function() { if (mc.currentScreen instanceof GuiChest) { var inventoryContainer = Java.from(mc.thePlayer.inventoryContainer.getInventory()) var openContainer = Java.from(mc.thePlayer.openContainer.getInventory()) if (mode.get() == "FaaatPotato") { var fishSlots = inventoryContainer.filter(function (stack) stack && stack.getItem() instanceof ItemFish/*|| you can add more items here, you need to import them*/) fishSlots.length && fishSlots.forEach(function (stack) mc.playerController.windowClick(mc.thePlayer.openContainer.windowId, openContainer.indexOf(stack), 0, 1, mc.thePlayer)); } if (mode.get() == "ToolTip") { var itemsToStore = items.get().toLowerCase().split(",") var itemSlots = inventoryContainer.filter(function (stack) stack && itemsToStore.some(function (itemName) Java.from(stack.getTooltip(mc.thePlayer, true)).toString().toLowerCase().contains(itemName))) itemSlots.length && itemSlots.forEach(function (stack) mc.playerController.windowClick(mc.thePlayer.openContainer.windowId, openContainer.indexOf(stack), 0, 1, mc.thePlayer)) } } }); }); just make sure to type the whole item name in the text field so no similar items will be put in the storage e.g. .depositfish itemstostore diamond_sword,fishing_rod,fish however this could lead to issues if names contain for example fish as in fishing_rod. Thats why you checked for != contains("rod"). But that should be solvable for you.