From 1e7ee198c805a67f31d2f7d9628b4101d798a399 Mon Sep 17 00:00:00 2001 From: TheRobbie72 Date: Fri, 10 Jan 2025 14:39:51 +0800 Subject: [PATCH] add reverse hyper and also reverse super --- .../estrogen/client/features/dash/ClientDash.java | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/common/src/main/java/dev/mayaqq/estrogen/client/features/dash/ClientDash.java b/common/src/main/java/dev/mayaqq/estrogen/client/features/dash/ClientDash.java index 31091489..ffb4289c 100644 --- a/common/src/main/java/dev/mayaqq/estrogen/client/features/dash/ClientDash.java +++ b/common/src/main/java/dev/mayaqq/estrogen/client/features/dash/ClientDash.java @@ -42,6 +42,7 @@ public class ClientDash { private static boolean willSuper = false; private static boolean willBounce = false; private static Direction bounceDirection = null; + private static boolean doReverse = false; private static BlockPos lastPos = null; @@ -70,6 +71,10 @@ public static void tick() { HYPER_V_SPEED, player.getLookAngle().z * HYPER_H_SPEED ); + if (doReverse) { + doReverse = false; + hyperMotion = hyperMotion.multiply(-1, 1, -1); + } player.setDeltaMovement(hyperMotion); dashCooldown = 0; } @@ -81,6 +86,10 @@ public static void tick() { SUPER_V_SPEED, player.getLookAngle().z * SUPER_H_SPEED ); + if (doReverse) { + doReverse = false; + superMotion = superMotion.multiply(-1, 1, -1); + } player.setDeltaMovement(superMotion); dashCooldown = 0; } @@ -114,6 +123,9 @@ public static void tick() { // Hyper and Super Detection Detect: if (Minecraft.getInstance().options.keyJump.isDown()) { + if (Minecraft.getInstance().options.keyDown.isDown()) { + doReverse = true; + } if (player.onGround()) { if (dashXRot > 15 && dashXRot < 60) willHyper = true; else if (dashXRot > 0 && dashXRot < 15) willSuper = true;