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 Level;
6class PathfinderMob;
7class Path;
8
9class MeleeAttackGoal : public Goal
10{
11private:
12 Level *level;
13 PathfinderMob *mob; // Owner of this goal
14 int attackTime;
15 double speedModifier;
16 bool trackTarget;
17 Path *path;
18 eINSTANCEOF attackType;
19 int timeToRecalcPath;
20
21 void _init(PathfinderMob *mob, double speedModifier, bool trackTarget);
22
23public:
24 MeleeAttackGoal(PathfinderMob *mob, eINSTANCEOF attackType, double speedModifier, bool trackTarget);
25 MeleeAttackGoal(PathfinderMob *mob, double speedModifier, bool trackTarget);
26 ~MeleeAttackGoal();
27
28 virtual bool canUse();
29 virtual bool canContinueToUse();
30 virtual void start();
31 virtual void stop();
32 virtual void tick();
33
34 // 4J Added override to update ai elements when loading entity from schematics
35 virtual void setLevel(Level *level) { this->level = level; }
36};