LiquidBounce
LiquidBounce copied to clipboard
[BUG] Lag in LiquidBounce scripts.
LiquidBounce Branch
Nextgen
LiquidBounce Build/Version
git-94313f5 v0.6.0
Operating System
Windows 10
Minecraft Version
1.20.6
Describe the bug
Running this script lags your game to around 5-20fps with no apparent way of optimisation (running code very similar into the liquidbounce's source code runs better)
Steps to reproduce
- Place this script into your folder
const Vec3d = Java.type("net.minecraft.util.math.Vec3d");
const script = registerScript({
name: "squidutils",
version: "0.0.0",
authors: ["@liquid.squid"]
});
script.registerModule({
name: "CustomView",
category: "Render", // Movement, Combat, Render, ...
description: "An example module created with LiquidBounce's script API."
}, (mod) => {
let frozenY = 0;
mod.on("enable", () => {
frozenY = mc.gameRenderer.camera.pos.y + 0.5;
});
mod.on("worldRender", () => {
let position = mc.gameRenderer.camera.pos
mc.gameRenderer.camera.setPos(new Vec3d(position.x, frozenY, position.z));
});
});
- Turn on the CustomView script
- Lag
Client Log
n/a (nothing special in here, no logs)
Screenshots
No response