Cuberite
A lightweight, fast and extensible game server for Minecraft
Guardian.h
Go to the documentation of this file.
1 
2 #pragma once
3 
4 #include "AggressiveMonster.h"
5 
6 
7 
8 
9 
10 class cGuardian :
11  public cAggressiveMonster
12 {
14 
15 public:
16  cGuardian();
17 
18  virtual void Tick(std::chrono::milliseconds a_Dt, cChunk & a_Chunk) override;
19 
21 
22  virtual void GetDrops(cItems & a_Drops, cEntity * a_Killer = nullptr) override;
23 
24  // Guardians do not drown (or float)
25  virtual void HandleAir(void) override {}
26  virtual void SetSwimState(cChunk & a_Chunk) override {}
27 } ;
28 
29 
30 
31 
virtual void GetDrops(cItems &a_Drops, cEntity *a_Killer=nullptr) override
Returns the list of drops for this pawn when it is killed.
Definition: Guardian.cpp:20
Definition: Chunk.h:49
virtual void HandleAir(void) override
Called in each tick to handle air-related processing i.e.
Definition: Guardian.h:25
virtual void SetSwimState(cChunk &a_Chunk) override
Called once per tick to set m_IsInFire, m_IsInLava, m_IsInWater and m_IsHeadInWater.
Definition: Guardian.h:26
cAggressiveMonster super
Definition: Guardian.h:13
Definition: Entity.h:73
virtual void Tick(std::chrono::milliseconds a_Dt, cChunk &a_Chunk) override
Definition: Guardian.cpp:37
#define CLASS_PROTODEF(classname)
Definition: Entity.h:11
This class bridges a vector of cItem for safe access via Lua.
Definition: Item.h:234