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 "..\Minecraft.World\SharedConstants.h"
5
6class Mob;
7
8class ControlledByPlayerGoal : public Goal
9{
10private:
11 static const int MIN_BOOST_TIME = SharedConstants::TICKS_PER_SECOND * 7;
12 static const int MAX_BOOST_TIME = SharedConstants::TICKS_PER_SECOND * 35;
13
14 Mob *mob; // Owner of this goal
15 float maxSpeed;
16 float walkSpeed;
17 float speed;
18 bool boosting;
19 int boostTime;
20 int boostTimeTotal;
21
22public:
23 ControlledByPlayerGoal(Mob *mob, float maxSpeed, float walkSpeed); // 4J Added walkSpeed param
24
25 void start();
26 void stop();
27 bool canUse();
28 void tick();
29
30private:
31 bool isNoJumpTile(int tile);
32
33public:
34 bool isBoosting();
35 void boost();
36 bool canBoost();
37};