Cuberite
A lightweight, fast and extensible game server for Minecraft
Painting.h
Go to the documentation of this file.
1 
2 #pragma once
3 
4 #include "HangingEntity.h"
5 
6 
7 
8 
9 
10 // tolua_begin
11 class cPainting :
12  public cHangingEntity
13 {
14  // tolua_end
15 
17 
18 public: // tolua_export
19 
21 
22  cPainting(const AString & a_Name, eBlockFace a_Direction, Vector3d a_Pos);
23 
25  const AString & GetName(void) const { return m_Name; } // tolua_export
26 
27 private:
28 
29  virtual void SpawnOn(cClientHandle & a_Client) override;
30  virtual void GetDrops(cItems & a_Items, cEntity * a_Killer) override;
31  virtual void KilledBy(TakeDamageInfo & a_TDI) override;
32 
34 
35 }; // tolua_export
36 
37 
38 
39 
eBlockFace
Block face constants, used in PlayerDigging and PlayerBlockPlacement packets and bbox collision calc.
Definition: Defines.h:38
#define CLASS_PROTODEF(classname)
Definition: Entity.h:13
std::string AString
Definition: StringUtils.h:11
Definition: Entity.h:76
cHangingEntity(eEntityType a_EntityType, eBlockFace a_BlockFace, Vector3d a_Pos)
cPainting(const AString &a_Name, eBlockFace a_Direction, Vector3d a_Pos)
Definition: Painting.cpp:13
virtual void GetDrops(cItems &a_Items, cEntity *a_Killer) override
Returns the list of drops for this pawn when it is killed.
Definition: Painting.cpp:35
virtual void SpawnOn(cClientHandle &a_Client) override
Descendants override this function to send a command to the specified client to spawn the entity on t...
Definition: Painting.cpp:23
const AString & GetName(void) const
Returns the protocol name of the painting.
Definition: Painting.h:25
virtual void KilledBy(TakeDamageInfo &a_TDI) override
Called when the health drops below zero.
Definition: Painting.cpp:44
AString m_Name
Definition: Painting.h:33
This class bridges a vector of cItem for safe access via Lua.
Definition: Item.h:215