Skip to content

Important for new members!

All future posts from members with a reputation of less than 1 will be queued for manual review to prevent forum spam. We will review your posts as soon as possible!

  • Information

    Threads containing useful information

  • Discover additional content made by the community

    29 Topics
    78 Posts
    C
    Changes the velocity direction or strength based on the incoming packet or minecraft player's facing direction. Usually not useful unless you need to be flying sideways or your facing direction. Released js for LiquidBounce Nextgen 0.28.1, Licensed under GPLv3 function __require(path) { if (path.startsWith("@embedded")) { return globalThis } if (path.startsWith("@minecraft-yarn-definitions/types/")) { return { [path.substring(path.lastIndexOf("/") + 1)]: Java.type(path .replaceAll("@minecraft-yarn-definitions/types/", "") .replaceAll("/", ".") ) } } return require(path); } var exports = {} "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); // imports /* eslint-disable unused-imports/no-unused-imports */ const _embedded_1 = __require("@embedded"); const EntityVelocityUpdateS2CPacket_1 = __require("@minecraft-yarn-definitions/types/net/minecraft/network/packet/s2c/play/EntityVelocityUpdateS2CPacket"); /* eslint-enable unused-imports/no-unused-imports */ // DO NOT TOUCH ANYTHING ABOVE THIS LINE, also not sure why it didn't work const script = _embedded_1.registerScript.apply({ name: "vectorized-velocity-xz", version: "1.0.0", authors: ["commandblock2"] }); script.registerModule({ name: "vectorized-velocity-xz", description: "Port of the old script for legacy, for those anticheat that doesn't have proper velocity detection", category: "Combat", settings: { offsetBasedOnPlayerOrIncomingVelocity: _embedded_1.Setting.choose({ name: "OffsetBasedOnPlayerOrIncomingVelocity", choices: ["player", "incoming"], default: "player" }), offset: _embedded_1.Setting.float({ name: "AngleOffset", default: 0, range: [-180, 180] }), amplitude: _embedded_1.Setting.float({ name: "Amplitude", default: 1, range: [-100, 100] }) } }, (mod) => { mod.on("packet", (event) => { if (!_embedded_1.mc.player) return; const packet = event.packet; if (packet instanceof EntityVelocityUpdateS2CPacket_1.EntityVelocityUpdateS2CPacket && packet.entityId == _embedded_1.mc.player.id) { const yaw = mod.settings.offset.get() + (mod.settings.offsetBasedOnPlayerOrIncomingVelocity.getValue() == "player" ? -_embedded_1.mc.player.yaw : (Math.atan2(packet.getVelocityX(), packet.getVelocityZ()) * 180 / Math.PI)); const velocity = Math.sqrt(packet.getVelocityX() * packet.getVelocityX() + packet.getVelocityZ() * packet.getVelocityZ()) * 8000 * mod.settings.amplitude.get(); // graaljs traps here: // 1. it eats error here when we have loss in precision and does not update the value // 2. packet.velocityX and packet.getVelocityX() is very different (public double getVelocityX() { return (double)this.velocityX / 8000.0; }) // and when reading velocityX graaljs calls getVelocityX() and when writing velocityX it directly writes that packet.velocityX = Math.round(velocity * Math.sin(yaw / 180 * Math.PI)); packet.velocityZ = Math.round(velocity * Math.cos(yaw / 180 * Math.PI)); } }); }); original typescript script, won't run directly in LiquidBounce, for more info, see https://github.com/commandblock2/minecraft-LBNG-types // imports /* eslint-disable unused-imports/no-unused-imports */ import { Setting, Vec3i, Vec3d, MathHelper, BlockPos, Hand, RotationAxis, mc, Client, RotationUtil, ItemUtil, NetworkUtil, InteractionUtil, BlockUtil, MovementUtil, ReflectionUtil, ParameterValidator, UnsafeThread, registerScript } from "@embedded"; import { EntityVelocityUpdateS2CPacket } from "@minecraft-yarn-definitions/types/net/minecraft/network/packet/s2c/play/EntityVelocityUpdateS2CPacket"; /* eslint-enable unused-imports/no-unused-imports */ // DO NOT TOUCH ANYTHING ABOVE THIS LINE, also not sure why it didn't work const script = registerScript.apply({ name: "vectorized-velocity-xz", version: "1.0.0", authors: ["commandblock2"] }); script.registerModule({ name: "vectorized-velocity-xz", description: "Port of the old script for legacy, for those anticheat that doesn't have proper velocity detection", category: "Combat", settings: { offsetBasedOnPlayerOrIncomingVelocity: Setting.choose({ name: "OffsetBasedOnPlayerOrIncomingVelocity", choices: ["player", "incoming"], default: "player" }), offset: Setting.float({ name: "AngleOffset", default: 0, range: [-180, 180] }), amplitude: Setting.float({ name: "Amplitude", default: 1, range: [-100, 100] }) } }, (mod) => { mod.on("packet", (event) => { if (!mc.player) return; const packet = event.packet if (packet instanceof EntityVelocityUpdateS2CPacket && packet.entityId == mc.player.id) { const yaw = mod.settings.offset.get() + (mod.settings.offsetBasedOnPlayerOrIncomingVelocity.getValue() == "player" ? -mc.player.yaw : (Math.atan2(packet.getVelocityX(), packet.getVelocityZ()) * 180 / Math.PI)); const velocity = Math.sqrt(packet.getVelocityX() * packet.getVelocityX() + packet.getVelocityZ() * packet.getVelocityZ()) * 8000 * mod.settings.amplitude.get(); // graaljs traps here: // 1. it eats error here when we have loss in precision and does not update the value // 2. packet.velocityX and packet.getVelocityX() is very different (public double getVelocityX() { return (double)this.velocityX / 8000.0; }) // and when reading velocityX graaljs calls getVelocityX() and when writing velocityX it directly writes that packet.velocityX = Math.round(velocity * Math.sin(yaw / 180 * Math.PI)) packet.velocityZ = Math.round(velocity * Math.cos(yaw / 180 * Math.PI)) } }) })
  • Legacy Resources

    Discover additional content made by the community

  • Support

    Stuck? Just ask for help!

  • A place to talk about anything related to LiquidBounce

    498 Topics
    3k Posts
    kawaiinekololisK
    For the sake of moderation, the content here should be mainly in English. Also you will likely get more people to respond to your question on English. We might introduce a section for Russian similiar to how we do it with Chinese though.
  • Think something is missing? Let us know!

    232 Topics
    1k Posts
    kawaiinekololisK
    Yes, we will continue to add more customization in the future, but it takes time to mature.
  • Found a bug? Report it here!

    207 Topics
    1k Posts
    Q
    in the last two updates, the hood begins to display something other than the present, you see that Targethub starts flashing and then everything in the HUD is late, up to infinity
  • A place for our Chinese community

    211 Topics
    795 Posts
    145691
    请问有没有 nextgen 的 json 文件
  • Talk about anything you like (as long as you follow the rules)!

    517 Topics
    3k Posts
    GleepyG
    Pacman vibes