Add AutoEat

#923
This commit is contained in:
ReinforceZwei 2020-04-08 00:28:03 +08:00 committed by ORelio
parent 70e5ae85d7
commit 2e1e79bcef
10 changed files with 128 additions and 11 deletions

View file

@ -32,20 +32,23 @@ namespace MinecraftClient.ChatBots
public override void Update()
{
if (attackCooldownCounter == 0)
if (!GetIsEating())
{
attackCooldownCounter = attackCooldown;
if (entitiesToAttack.Count > 0)
if (attackCooldownCounter == 0)
{
foreach (KeyValuePair<int, Entity> a in entitiesToAttack)
attackCooldownCounter = attackCooldown;
if (entitiesToAttack.Count > 0)
{
InteractEntity(a.Key, 1);
foreach (KeyValuePair<int, Entity> a in entitiesToAttack)
{
InteractEntity(a.Key, 1);
}
}
}
}
else
{
attackCooldownCounter--;
else
{
attackCooldownCounter--;
}
}
}