This code was not tested and breaks in Release builds, reverting to restore
functionality of the nightly. All in-game menus do not work and generating
a world crashes.
This reverts commit a9be52c41a.
44 lines
833 B
C++
44 lines
833 B
C++
#pragma once
|
|
using namespace std;
|
|
|
|
#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 NULL; }
|
|
|
|
public:
|
|
Monster(Level *level);
|
|
|
|
virtual void aiStep();
|
|
virtual void tick();
|
|
|
|
protected:
|
|
virtual shared_ptr<Entity> findAttackTarget();
|
|
|
|
public:
|
|
virtual bool hurt(DamageSource *source, float dmg);
|
|
virtual bool doHurtTarget(shared_ptr<Entity> target);
|
|
|
|
protected:
|
|
virtual void checkHurtTarget(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();
|
|
}; |