Cuberite
A lightweight, fast and extensible game server for Minecraft
Enderman.h
Go to the documentation of this file.
1 
2 #pragma once
3 
5 
6 
7 
8 
9 
10 class cEnderman :
12 {
14 
15 public:
16  cEnderman(void);
17 
19 
20  virtual void GetDrops(cItems & a_Drops, cEntity * a_Killer = nullptr) override;
21  virtual void CheckEventSeePlayer(cChunk & a_Chunk) override;
22  virtual void CheckEventLostPlayer(void) override;
23  virtual void EventLosePlayer(void) override;
24  virtual void Tick(std::chrono::milliseconds a_Dt, cChunk & a_Chunk) override;
25 
26  bool IsScreaming(void) const {return m_bIsScreaming; }
27  BLOCKTYPE GetCarriedBlock(void) const {return m_CarriedBlock; }
28  NIBBLETYPE GetCarriedMeta(void) const {return m_CarriedMeta; }
29 
31  bool CheckLight(void);
32 
33 private:
34 
38 
39 } ;
Definition: FastNBT.h:131
NIBBLETYPE GetCarriedMeta(void) const
Definition: Enderman.h:28
NIBBLETYPE m_CarriedMeta
Definition: Enderman.h:37
unsigned char BLOCKTYPE
The datatype used by blockdata.
Definition: ChunkDef.h:42
bool IsScreaming(void) const
Definition: Enderman.h:26
BLOCKTYPE GetCarriedBlock(void) const
Definition: Enderman.h:27
virtual void CheckEventSeePlayer(cChunk &a_Chunk) override
Definition: Enderman.cpp:101
virtual void Tick(std::chrono::milliseconds a_Dt, cChunk &a_Chunk) override
Definition: Enderman.cpp:188
virtual void GetDrops(cItems &a_Drops, cEntity *a_Killer=nullptr) override
Returns the list of drops for this pawn when it is killed.
Definition: Enderman.cpp:87
cEnderman(void)
Definition: Enderman.cpp:75
unsigned char NIBBLETYPE
The datatype used by nibbledata (meta, light, skylight)
Definition: ChunkDef.h:45
Definition: Chunk.h:49
virtual void CheckEventLostPlayer(void) override
Definition: Enderman.cpp:139
cPassiveAggressiveMonster super
Definition: Enderman.h:13
virtual void EventLosePlayer(void) override
Definition: Enderman.cpp:152
Definition: Entity.h:73
bool CheckLight(void)
Returns if the current sky light level is sufficient for the enderman to become aggravated.
Definition: Enderman.cpp:163
#define CLASS_PROTODEF(classname)
Definition: Entity.h:11
bool m_bIsScreaming
Definition: Enderman.h:35
BLOCKTYPE m_CarriedBlock
Definition: Enderman.h:36
This class bridges a vector of cItem for safe access via Lua.
Definition: Item.h:234