mirror of
https://github.com/MCCTeam/Minecraft-Console-Client
synced 2025-10-14 21:22:49 +00:00
FollowPlayer: Improve player detection
This commit is contained in:
parent
8b27386a5b
commit
29be211946
1 changed files with 5 additions and 6 deletions
|
|
@ -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;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue