mirror of
https://github.com/4jcraft/4jcraft.git
synced 2026-05-23 17:52:55 +00:00
25 lines
526 B
C++
25 lines
526 B
C++
#pragma once
|
|
|
|
#include "Goal.h"
|
|
|
|
class OcelotAttackGoal : public Goal {
|
|
private:
|
|
Level* level;
|
|
Mob* mob;
|
|
std::weak_ptr<LivingEntity> target;
|
|
int attackTime;
|
|
float speed;
|
|
bool trackTarget;
|
|
|
|
public:
|
|
OcelotAttackGoal(Mob* mob);
|
|
|
|
virtual bool canUse();
|
|
virtual bool canContinueToUse();
|
|
virtual void stop();
|
|
virtual void tick();
|
|
|
|
// 4J Added override to update ai elements when loading entity from
|
|
// schematics
|
|
virtual void setLevel(Level* level) { this->level = level; }
|
|
}; |