From 37cb3154e0521e7d35362d3e47298cfe08ad37e4 Mon Sep 17 00:00:00 2001 From: spinningtoilet <71576099+spinningtoilet0@users.noreply.github.com> Date: Mon, 7 Oct 2024 07:26:57 -0400 Subject: [PATCH] Set elytra fly acceleration to zero when going into an unloaded chunk with "No Unloaded Chunks" enabled (#4906) --- .../systems/modules/movement/elytrafly/ElytraFlightMode.java | 4 ++++ .../systems/modules/movement/elytrafly/ElytraFly.java | 1 + 2 files changed, 5 insertions(+) diff --git a/src/main/java/meteordevelopment/meteorclient/systems/modules/movement/elytrafly/ElytraFlightMode.java b/src/main/java/meteordevelopment/meteorclient/systems/modules/movement/elytrafly/ElytraFlightMode.java index 36b3374e46..fc07b278c6 100644 --- a/src/main/java/meteordevelopment/meteorclient/systems/modules/movement/elytrafly/ElytraFlightMode.java +++ b/src/main/java/meteordevelopment/meteorclient/systems/modules/movement/elytrafly/ElytraFlightMode.java @@ -190,6 +190,10 @@ public void handleAcceleration() { } } + public void zeroAcceleration() { + acceleration = 0; + } + protected double getSpeed() { return elytraFly.acceleration.get() ? acceleration : elytraFly.horizontalSpeed.get(); } diff --git a/src/main/java/meteordevelopment/meteorclient/systems/modules/movement/elytrafly/ElytraFly.java b/src/main/java/meteordevelopment/meteorclient/systems/modules/movement/elytrafly/ElytraFly.java index d3ad217585..8c65e95fdf 100644 --- a/src/main/java/meteordevelopment/meteorclient/systems/modules/movement/elytrafly/ElytraFly.java +++ b/src/main/java/meteordevelopment/meteorclient/systems/modules/movement/elytrafly/ElytraFly.java @@ -400,6 +400,7 @@ private void onPlayerMove(PlayerMoveEvent event) { if (mc.world.getChunkManager().isChunkLoaded(chunkX, chunkZ)) { if (flightMode.get() != ElytraFlightModes.Bounce) ((IVec3d) event.movement).set(currentMode.velX, currentMode.velY, currentMode.velZ); } else { + currentMode.zeroAcceleration(); ((IVec3d) event.movement).set(0, currentMode.velY, 0); } } else if (flightMode.get() != ElytraFlightModes.Bounce) ((IVec3d) event.movement).set(currentMode.velX, currentMode.velY, currentMode.velZ);