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#include "SharedConstants.h"
5
6// note: Mob should implement handleEntityEvent for client state, also ate to take action upon eating
7class EatTileGoal : public Goal
8{
9private:
10 static const int EAT_ANIMATION_TICKS = SharedConstants::TICKS_PER_SECOND * 2;
11
12 Mob *mob; // Owner of this goal
13 Level *level;
14 int eatAnimationTick;
15
16public:
17 EatTileGoal(Mob *mob);
18
19 virtual bool canUse();
20 virtual void start();
21 virtual void stop();
22 virtual bool canContinueToUse();
23 virtual int getEatAnimationTick();
24 virtual void tick();
25
26 // 4J Added override to update ai elements when loading entity from schematics
27 virtual void setLevel(Level *level) { this->level = level; }
28};