ScriptAPI

A place to ask for help on writing scripts

298 Topics 2.2k Posts
  • check how many blocks are in player inventory

    2
    0 Votes
    2 Posts
    155 Views

    using dyskord.cc/Core

    count = 0; Java.from(mc.thePlayer.inventory.mainInventory).forEach(function (s) {s && s.getItem() instanceof ItemBlock && (count += s.stackSize)}); //converts java array to js array and uses js function //for (i in mc.thePlayer.inventory.mainInventory) (stack = mc.thePlayer.inventory.mainInventory[i]) && stack.getItem() instanceof ItemBlock && (count += stack.stackSize); //alternative, cycles through java array via for function chat.print(count);
  • How to Check ThePlayer teleported?

    Unsolved
    6
    0 Votes
    6 Posts
    186 Views

    Record all the player's position and check it on next tick
    Of course if there are too many players your client will crash XD

  • How can I get private/protected variables?

    Moved Solved
    4
    0 Votes
    4 Posts
    134 Views

    Btw the fields/methods of vanilla minecraft(not for forge and LB) are obfuscated, if you want to access to these you will have to use searge name to access it, you can find it in .minecraft/LiquidBounce-1.8/mcp-stable22srg(I don't remember the name exactly).

  • This topic is deleted!

    4
    0 Votes
    4 Posts
    17 Views
  • I need a better SuperKnockback than lb itself

    3
    0 Votes
    3 Posts
    151 Views

    turtl already made one months ago

  • plz add onShutdown event

    2
    0 Votes
    2 Posts
    140 Views

    we missing marco.....

  • New ScriptApi Event

    5
  • Add this please

    2
    0 Votes
    2 Posts
    62 Views

    noteplayer
    i dont think marco will add them
    becuz he sleeping

  • AutoBlockPicker for scaffold pls

    11
  • This topic is deleted!

    7
    0 Votes
    7 Posts
    109 Views
  • How to use mixins?

    Moved Solved
    3
    0 Votes
    3 Posts
    145 Views

    Btw if you are trying to use mixin in scriptAPI that should be impossible. IIRC, Senk Ju onece mentioned that mixins are loaded before the scripts, but there might still be other ways of injecting. (I tried to search in the old forum but failed to find that post)

  • 0 Votes
    5 Posts
    130 Views

    you can only spoof it (visual)

  • onPlaceBlock , onSendPacket event

    Moved
    13
    0 Votes
    13 Posts
    737 Views

    As for "onPlaceBlock", I think you can check C08PacketPlayerBlockPlacement in onPacket.
    (I don't code with mcp918 so If it's wrong way plz remind me, thanks)

  • I need a criticals script.

    Moved
    8
    0 Votes
    8 Posts
    434 Views

    no need for librecraft criticals,

  • Help

    9
    0 Votes
    9 Posts
    303 Views

    @Aftery said in Help:

    does it work on b71 then

    no

  • 0 Votes
    6 Posts
    149 Views

    Ingame Server Switcher Mod

  • This topic is deleted!

    1
    0 Votes
    1 Posts
    5 Views
    No one has replied
  • Help me how to convert?

    Moved
    5
    0 Votes
    5 Posts
    341 Views

    just remove the type C0FPacketConfirmTransaction then. Since JavaScript is a dynamically typed language, the type is determined at runtime. If the packet is a instance of a C0FPacketConfirmTransaction you can call getWindowId() and getUid() then if it is not, exceptions should be thrown.

    //if (event.getPacket() instanceof C0FPacketConfirmTransaction) packetConfirmTransaction = event.getPacket();