Make AutoAttack check entity health

This commit is contained in:
ReinforceZwei 2020-08-14 21:26:05 +08:00
parent 1f93fdbab5
commit fe59633cd6

View file

@ -112,7 +112,7 @@ namespace MinecraftClient.ChatBots
/// <returns>If the entity should be attacked</returns>
public bool handleEntity(Entity entity)
{
if (!entity.Type.IsHostile())
if (!entity.Type.IsHostile() || entity.Health <= 0)
return false;
bool isBeingAttacked = entitiesToAttack.ContainsKey(entity.ID);