Skip to content

Scripts

Share and discover scripts for LiquidBounce

1.0k Topics 9.1k Posts
  • [De3dAnge1s]SpeedMine (New ScriptsAPI)

    4
    1 Votes
    4 Posts
    490 Views
    De3dAnge1sD

    @Kasumi_Scarlet idk

  • (Reupload) [Script] EffectHUD

    3
    0 Votes
    3 Posts
    592 Views
    ?

    I18n.format is not necessary...
    and if a variable is null, then it instanceof MyClass is always false.

    if(potioneffect.getAmplifier() == 0) s1 = s1 + " I"; else if (potioneffect.getAmplifier() == 1) s1 = s1 + " II"; else if (potioneffect.getAmplifier() == 2) s1 = s1 + " III"; else if (potioneffect.getAmplifier() == 3) s1 = s1 + " IV"; else if (potioneffect.getAmplifier() == 4) s1 = s1 + " V"; else if (potioneffect.getAmplifier() == 5) s1 = s1 + " VI"; else if (potioneffect.getAmplifier() == 6) s1 = s1 + " VII"; else if (potioneffect.getAmplifier() == 7) s1 = s1 + " VIII"; else if (potioneffect.getAmplifier() == 8) s1 = s1 + " IX"; else if (potioneffect.getAmplifier() == 9) s1 = s1 + " X"; else if (potioneffect.getAmplifier() >= 10) s1 = s1 + " X+"; else s1 = s1 + "¿";

    in this part I think it's better to use switch

  • TimeChanger re-upload

    3
    0 Votes
    3 Posts
    300 Views
    AzureA

    Ah, yes,
    Thanks for telling me

  • Writed casually BlockUtils.js

    4
    3 Votes
    4 Posts
    294 Views
    ?

    Some explanation of code

    Following code in JavaScript equals number > 0 ? Math.floor(number) : Math.ceil(number)

    number |= 0 ~~number

    But according to my test, ~~x is much faster than Math.floor(x) for random positive double value. So you can use bit operation instead of Math.floor(x) and parseInt(x)

    if (block != null) blocks.set(blockPos, block); can be simplified to if (block) blocks.set(blockPos, block); or just block && blocks.set(blockPos, block);
    Because null in JavaScript is considered as false value, and && operator will not do things after it if things before it is a false value.