final NearbyComponentsSensor humanSensor = new NearbyComponentsSensor(getAI(), Human.class);
humanSensor.setSensorRadius(10);
getAI().registerSensor(humanSensor);
//Go attack nearby players AI
getAI().registerGoal(new AttackPlayerGoal(getAI()));
getAI().registerAction(new ActionAttack(getAI()));
// Add villager state metadata
getOwner().add(MetadataComponent.class).addBoolMeta(16, VanillaData.WAS_VILLAGER);
}