if (ai.aggressive) {
// TODO fix this to proper attacking
if (distanceToPlayer <= ai.attackDistance) {
if (tempTime - lastAttack > ai.damageFrequency) {
localPlayer.getCharacterEntity().send(
new DoDamageEvent(ai.damage, EngineDamageTypes.PHYSICAL.get(), entity));
lastAttack = CoreRegistry.get(Time.class).getGameTimeInMs();
}
}
}