Skip to content

ScriptAPI

A place to ask for help on writing scripts

309 Topics 2.3k Posts
  • Help with setting visibility

    Unsolved 9 days ago
    0 Votes
    7 Posts
    47 Views
    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 13 days ago
    0 Votes
    1 Posts
    16 Views
    No one has replied
  • 0 Votes
    3 Posts
    275 Views
    @kawaiinekololis say how pls
  • I need script velogrimC07(apiv2)

    Unsolved 21 Jan 2024, 14:55
    0 Votes
    5 Posts
    338 Views
    access to host class net.minecraft.network.play.server.S12PacketEntityVelocity is not allowed or does not exist
  • Custom Script Help

    Solved 20 Jan 2025, 19:40
    0 Votes
    9 Posts
    214 Views
    You are welcome and I am willing to accept further help requests, would appreciate a example error script or errors in the logs.
  • 0 Votes
    3 Posts
    168 Views
    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 20 Oct 2024, 11:16
    0 Votes
    1 Posts
    161 Views
    No one has replied
  • networking stuff with hypixel api

    Unsolved 2 Sept 2024, 00:38
    0 Votes
    1 Posts
    151 Views
    No one has replied
  • get armor of facing entity

    Unsolved 25 Jul 2024, 08:52
    0 Votes
    1 Posts
    223 Views
    No one has replied
  • Accessing non-class kotlin functions

    Solved 17 Jun 2024, 13:03
    0 Votes
    2 Posts
    229 Views
    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 29 May 2024, 12:22
    0 Votes
    2 Posts
    228 Views
    you can use fabric api to click on an item in the GUI.
  • Hey

    Unsolved 5 May 2024, 09:57
    0 Votes
    4 Posts
    278 Views
    @HieuNamYT wdym by packet codes? like C08 or smth like that?
  • This topic is deleted!

    Unsolved 25 Apr 2024, 10:59
    0 Votes
    1 Posts
    3 Views
    No one has replied
  • massive performance issues

    Unsolved 25 Apr 2024, 10:28
    0 Votes
    1 Posts
    162 Views
    No one has replied
  • Help With Fixing Code

    Unsolved 11 Feb 2024, 06:07
    1 Votes
    11 Posts
    506 Views
    It doesn't seem to like mc.gameSettings.keyBindSneak.pressed works, weird.
  • Sneak Packet

    Unsolved 20 Mar 2024, 04:13
    0 Votes
    1 Posts
    177 Views
    No one has replied
  • Help With Liquidbounce Nextgen ScriptingAPI

    Unsolved 11 Feb 2024, 06:38
    0 Votes
    1 Posts
    171 Views
    No one has replied
  • mc.thePlayer is undefined

    Unsolved 6 Nov 2023, 00:29
    0 Votes
    5 Posts
    548 Views
    @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:?]
  • 0 Votes
    5 Posts
    371 Views
    The PR was merged, let me know if there is something missing. Documentation will follow soon.
  • Unsure how to fix script issue

    Unsolved 28 Nov 2023, 20:29
    0 Votes
    3 Posts
    311 Views
    @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.