the game where you go into mines and start crafting! but for consoles (forked directly from smartcmd's github)
at main 34 lines 785 B view raw
1#pragma once 2 3#include "Goal.h" 4 5class PathNavigation; 6class TamableAnimal; 7 8class FollowOwnerGoal : public Goal 9{ 10public: 11 static const int TeleportDistance = 12; 12 13private: 14 TamableAnimal *tamable; // Owner of this goal 15 weak_ptr<LivingEntity> owner; 16 Level *level; 17 double speedModifier; 18 PathNavigation *navigation; 19 int timeToRecalcPath; 20 float stopDistance, startDistance; 21 bool oldAvoidWater; 22 23public: 24 FollowOwnerGoal(TamableAnimal *tamable, double speedModifier, float startDistance, float stopDistance); 25 26 virtual bool canUse(); 27 virtual bool canContinueToUse(); 28 virtual void start(); 29 virtual void stop(); 30 virtual void tick(); 31 32 // 4J Added override to update ai elements when loading entity from schematics 33 virtual void setLevel(Level *level) { this->level = level; } 34};