From 1540fbd1fd32535c035aef6f6af20079ff30948f Mon Sep 17 00:00:00 2001 From: Atsuihsio <842960157@qq.com> Date: Thu, 24 Oct 2024 23:37:26 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E4=BD=8E=E5=B8=A7=E7=8E=87?= =?UTF-8?q?=E5=88=87=E6=8D=A2=E9=85=8D=E4=BB=B6=E5=8D=A1=E9=A3=9E=E6=A8=A1?= =?UTF-8?q?=E5=9E=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../event/ClientEventHandler.java | 23 +++++++++++-------- 1 file changed, 13 insertions(+), 10 deletions(-) diff --git a/src/main/java/net/mcreator/superbwarfare/event/ClientEventHandler.java b/src/main/java/net/mcreator/superbwarfare/event/ClientEventHandler.java index 7742d02ae..7ac86ab65 100644 --- a/src/main/java/net/mcreator/superbwarfare/event/ClientEventHandler.java +++ b/src/main/java/net/mcreator/superbwarfare/event/ClientEventHandler.java @@ -455,17 +455,20 @@ public class ClientEventHandler { moveXTime = 0; } - if (movePosX > 0) { - movePosX -= 1.5 * (Math.pow(movePosX, 2) * times) * (1 - 0.75 * zoomTime); - } else { - movePosX += 1.5 * (Math.pow(movePosX, 2) * times) * (1 - 0.75 * zoomTime); - } +// if (movePosX > 0) { +// movePosX -= 1.5 * (Math.pow(movePosX, 2) * times) * (1 - 0.75 * zoomTime); +// } else { +// movePosX += 1.5 * (Math.pow(movePosX, 2) * times) * (1 - 0.75 * zoomTime); +// } - if (movePosY > 0) { - movePosY -= 1.5 * (Math.pow(movePosY, 2) * times) * (1 - 0.75 * zoomTime); - } else { - movePosY += 1.5 * (Math.pow(movePosY, 2) * times) * (1 - 0.75 * zoomTime); - } + movePosX = Mth.lerp(0.1f * times, movePosX, 0); + movePosY = Mth.lerp(0.1f * times, movePosY, 0); + +// if (movePosY > 0) { +// movePosY -= 1.5 * (Math.pow(movePosY, 2) * times) * (1 - 0.75 * zoomTime); +// } else { +// movePosY += 1.5 * (Math.pow(movePosY, 2) * times) * (1 - 0.75 * zoomTime); +// } } if (Minecraft.getInstance().options.keyRight.isDown()) {