Merge pull request #2452 from MCCTeam/improve-follow

FollowPlayer: Improve player detection
This commit is contained in:
Anon 2023-03-25 18:24:56 +00:00 committed by GitHub
commit b3d7942aca
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

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;