blob: f508453209f88e38967335359a7fe8328c47959c (
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
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
|
#pragma once
#include "Monster.h"
class EnderMan : public Monster
{
public:
eINSTANCEOF GetType() { return eTYPE_ENDERMAN; }
static Entity *create(Level *level) { return new EnderMan(level); }
public:
static void staticCtor();
private:
static bool MAY_TAKE[256];
static const int DATA_CARRY_ITEM_ID = 16;
static const int DATA_CARRY_ITEM_DATA = 17;
static const int DATA_CREEPY = 18;
private:
int teleportTime;
int aggroTime;
public:
EnderMan(Level *level);
virtual int getMaxHealth();
protected:
virtual void defineSynchedData();
public:
virtual void addAdditonalSaveData(CompoundTag *tag);
virtual void readAdditionalSaveData(CompoundTag *tag);
protected:
virtual shared_ptr<Entity> findAttackTarget();
private:
bool isLookingAtMe(shared_ptr<Player> player);
public:
virtual void aiStep();
protected:
bool teleport();
bool teleportTowards(shared_ptr<Entity> e);
bool teleport(double xx, double yy, double zz);
virtual int getAmbientSound();
virtual int getHurtSound();
virtual int getDeathSound();
virtual int getDeathLoot();
virtual void dropDeathLoot(bool wasKilledByPlayer, int playerBonusLevel);
public:
// 4J Brought forward from 1.2.3 to help fix Enderman behaviour
void setCarryingTile(int carryingTile);
int getCarryingTile();
void setCarryingData(int carryingData);
int getCarryingData();
virtual bool hurt(DamageSource *source, int damage);
bool isCreepy();
void setCreepy(bool creepy);
};
|