From 6928cd40fdd5cee8625dce61b076a8dc6f5c005a Mon Sep 17 00:00:00 2001 From: Daenges <57369924+Daenges@users.noreply.github.com> Date: Fri, 29 Oct 2021 06:45:30 +0200 Subject: [PATCH] Add toggle to head movement while walking (#1805) * Add toggle to head movement while walking * correct typo * Correcting the correcting * Improve description. Co-authored-by: ReinforceZwei <39955851+ReinforceZwei@users.noreply.github.com> Co-authored-by: ReinforceZwei <39955851+ReinforceZwei@users.noreply.github.com> --- MinecraftClient/McClient.cs | 6 +++++- MinecraftClient/Resources/config/MinecraftClient.ini | 1 + MinecraftClient/Settings.cs | 2 ++ 3 files changed, 8 insertions(+), 1 deletion(-) diff --git a/MinecraftClient/McClient.cs b/MinecraftClient/McClient.cs index 26b91b82..22ffdf4a 100644 --- a/MinecraftClient/McClient.cs +++ b/MinecraftClient/McClient.cs @@ -348,7 +348,11 @@ namespace MinecraftClient { Location next = path.Dequeue(); steps = Movement.Move2Steps(location, next, ref motionY); - UpdateLocation(location, next + new Location(0, 1, 0)); // Update yaw and pitch to look at next step + + if (Settings.MoveHeadWhileWalking) // Disable head movements to avoid anti-cheat triggers + { + UpdateLocation(location, next + new Location(0, 1, 0)); // Update yaw and pitch to look at next step + } } else { diff --git a/MinecraftClient/Resources/config/MinecraftClient.ini b/MinecraftClient/Resources/config/MinecraftClient.ini index 6fe3f28e..892abbec 100644 --- a/MinecraftClient/Resources/config/MinecraftClient.ini +++ b/MinecraftClient/Resources/config/MinecraftClient.ini @@ -45,6 +45,7 @@ scriptcache=true # Cache compiled scripts for faster load on l timestamps=false # Prepend timestamps to chat messages autorespawn=false # Toggle auto respawn if client player was dead (make sure your spawn point is safe) minecraftrealms=true # Enable support for joining Minecraft Realms worlds +moveheadwhilewalking=true # Enable head movement while walking to avoid anti-cheat triggers [Logging] # Only affect the messages on console. diff --git a/MinecraftClient/Settings.cs b/MinecraftClient/Settings.cs index ca19262d..f0ab16e7 100644 --- a/MinecraftClient/Settings.cs +++ b/MinecraftClient/Settings.cs @@ -101,6 +101,7 @@ namespace MinecraftClient public static bool EntityHandling = false; public static bool AutoRespawn = false; public static bool MinecraftRealmsEnabled = true; + public static bool MoveHeadWhileWalking = true; // Logging public enum FilterModeEnum { Blacklist, Whitelist } @@ -368,6 +369,7 @@ namespace MinecraftClient // Backward compatible so people can still enable debug with old config format case "debugmessages": DebugMessages = str2bool(argValue); return true; case "minecraftrealms": MinecraftRealmsEnabled = str2bool(argValue); return true; + case "moveheadwhilewalking": MoveHeadWhileWalking = str2bool(argValue); return true; case "botowners": Bots_Owners.Clear();