* Fixed boats falling and a TP glitch #266 * Replaced every C-style cast with C++ ones * Replaced every C-style cast with C++ ones * Fixed boats falling and a TP glitch #266 * Updated NULL to nullptr and fixing some type issues * Modernized and fixed a few bugs - Replaced most instances of `NULL` with `nullptr`. - Replaced most `shared_ptr(new ...)` with `make_shared`. - Removed the `nullptr` macro as it was interfering with the actual nullptr keyword in some instances. * Fixing more conflicts * Replace int loops with size_t and start work on overrides
44 lines
836 B
C++
44 lines
836 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 nullptr; }
|
|
|
|
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();
|
|
}; |