mirror of
https://github.com/4jcraft/4jcraft.git
synced 2026-04-28 01:53:41 +00:00
43 lines
902 B
C++
43 lines
902 B
C++
#pragma once
|
|
|
|
#include "PathfinderMob.h"
|
|
#include "Enemy.h"
|
|
|
|
class Level;
|
|
class CompoundTag;
|
|
class DamageSource;
|
|
|
|
class Monster : public PathfinderMob, public Enemy {
|
|
public:
|
|
eINSTANCEOF GetType() { return eTYPE_MONSTER; }
|
|
static Entity* create(Level* level) { return nullptr; }
|
|
|
|
public:
|
|
Monster(Level* level);
|
|
|
|
virtual void aiStep();
|
|
virtual void tick();
|
|
|
|
protected:
|
|
virtual std::shared_ptr<Entity> findAttackTarget();
|
|
|
|
public:
|
|
virtual bool hurt(DamageSource* source, float dmg);
|
|
virtual bool doHurtTarget(std::shared_ptr<Entity> target);
|
|
|
|
protected:
|
|
virtual void checkHurtTarget(std::shared_ptr<Entity> target,
|
|
float distance);
|
|
|
|
public:
|
|
virtual float getWalkTargetValue(int x, int y, int z);
|
|
|
|
protected:
|
|
virtual bool isDarkEnoughToSpawn();
|
|
|
|
public:
|
|
virtual bool canSpawn();
|
|
|
|
protected:
|
|
void registerAttributes();
|
|
}; |