FollowPlayer: Improve player detection

This commit is contained in:
ReinforceZwei 2023-03-25 17:29:30 +08:00
parent 8b27386a5b
commit 29be211946

View file

@ -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;