From 29be2119469db17bf2ddd7e9f4a50085477b11ba Mon Sep 17 00:00:00 2001 From: ReinforceZwei <39955851+ReinforceZwei@users.noreply.github.com> Date: Sat, 25 Mar 2023 17:29:30 +0800 Subject: [PATCH] FollowPlayer: Improve player detection --- MinecraftClient/ChatBots/FollowPlayer.cs | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/MinecraftClient/ChatBots/FollowPlayer.cs b/MinecraftClient/ChatBots/FollowPlayer.cs index 0561bf0f..3220dfac 100644 --- a/MinecraftClient/ChatBots/FollowPlayer.cs +++ b/MinecraftClient/ChatBots/FollowPlayer.cs @@ -151,12 +151,6 @@ namespace MinecraftClient.ChatBots public override void OnEntityMove(Entity entity) { - - if (_updateCounter < Settings.DoubleToTick(Config.Update_Limit)) - return; - - _updateCounter = 0; - if (entity.Type != EntityType.Player) return; @@ -166,6 +160,11 @@ namespace MinecraftClient.ChatBots if (_playerToFollow != entity.Name.ToLower()) return; + if (_updateCounter < Settings.DoubleToTick(Config.Update_Limit)) + return; + + _updateCounter = 0; + if (!CanMoveThere(entity.Location)) return;