the game where you go into mines and start crafting! but for consoles (forked directly from smartcmd's github)
1#pragma once
2
3#include "Goal.h"
4
5class ArrowAttackGoal : public Goal
6{
7public:
8 static const int ArrowType = 1;
9 static const int SnowballType = 2;
10
11 Level *level;
12 Mob *mob; // Owner of this goal
13 weak_ptr<Mob> target;
14 int attackTime;
15 float speed;
16 int seeTime;
17 int projectileType;
18 int attackInterval;
19
20 ArrowAttackGoal(Mob *mob, float speed, int projectileType, int attackInterval);
21
22 virtual bool canUse();
23 virtual bool canContinueToUse();
24 virtual void stop();
25 virtual void tick();
26
27private:
28 void fireAtTarget();
29
30public:
31 // 4J Added override to update ai elements when loading entity from schematics
32 virtual void setLevel(Level *level) { this->level = level; }
33};