Cuberite
A lightweight, fast and extensible game server for Minecraft
Wither.h
Go to the documentation of this file.
1 
2 #pragma once
3 
4 #include "AggressiveMonster.h"
5 
6 
7 
8 
9 
10 class cWither :
11  public cAggressiveMonster
12 {
14 
15 public:
16  cWither(void);
17 
19 
20  unsigned int GetWitherInvulnerableTicks(void) const { return m_WitherInvulnerableTicks; }
21 
22  void SetWitherInvulnerableTicks(unsigned int a_Ticks) { m_WitherInvulnerableTicks = a_Ticks; }
23 
25  bool IsArmored(void) const;
26 
27  // cEntity overrides
28  virtual void GetDrops(cItems & a_Drops, cEntity * a_Killer = nullptr) override;
29  virtual bool DoTakeDamage(TakeDamageInfo & a_TDI) override;
30  virtual void Tick(std::chrono::milliseconds a_Dt, cChunk & a_Chunk) override;
31  virtual void KilledBy(TakeDamageInfo & a_TDI) override;
32 
33  virtual bool IsUndead(void) override { return true; }
34 
35 private:
36 
39 
40 } ;
41 
42 
43 
44 
virtual void Tick(std::chrono::milliseconds a_Dt, cChunk &a_Chunk) override
Definition: Wither.cpp:58
unsigned int GetWitherInvulnerableTicks(void) const
Definition: Wither.h:20
bool IsArmored(void) const
Returns whether the wither is invulnerable to arrows.
Definition: Wither.cpp:25
Definition: Chunk.h:49
virtual bool DoTakeDamage(TakeDamageInfo &a_TDI) override
Makes this entity take damage specified in the a_TDI.
Definition: Wither.cpp:34
cAggressiveMonster super
Definition: Wither.h:13
virtual void GetDrops(cItems &a_Drops, cEntity *a_Killer=nullptr) override
Returns the list of drops for this pawn when it is killed.
Definition: Wither.cpp:91
void SetWitherInvulnerableTicks(unsigned int a_Ticks)
Definition: Wither.h:22
virtual bool IsUndead(void) override
Returns whether this mob is undead (skeleton, zombie, etc.)
Definition: Wither.h:33
virtual void KilledBy(TakeDamageInfo &a_TDI) override
Called when the health drops below zero.
Definition: Wither.cpp:100
Definition: Entity.h:73
unsigned int m_WitherInvulnerableTicks
The number of ticks of invulnerability left after being initially created.
Definition: Wither.h:38
#define CLASS_PROTODEF(classname)
Definition: Entity.h:11
Definition: Wither.h:10
This class bridges a vector of cItem for safe access via Lua.
Definition: Item.h:234
cWither(void)
Definition: Wither.cpp:13