aboutsummaryrefslogtreecommitdiff
path: root/Minecraft.World/Monster.h
blob: 2bad48dadaaaaf67f70ffe496e6b9c86b4ba923c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
#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; }

protected:
	int attackDamage;

private:
	void _init();

public:
	Monster(Level *level);

    virtual void aiStep();
    virtual void tick();

protected:
	virtual shared_ptr<Entity> findAttackTarget();

public:
	virtual bool hurt(DamageSource *source, int 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();
};