Cuberite
A lightweight, fast and extensible game server for Minecraft
Classes | Macros
Entity.h File Reference
#include "../Item.h"
Include dependency graph for Entity.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

class  cEntity
 
struct  cEntity::sPortalCooldownData
 Structure storing the portal delay timer and cooldown boolean. More...
 
struct  TakeDamageInfo
 

Macros

#define CLASS_PROTODEF(classname)
 
#define GET_AND_VERIFY_CURRENT_CHUNK(ChunkVarName, X, Z)
 
#define POS_TOINT   GetPosition().Floor()
 
#define POSX_TOINT   FloorC(GetPosX())
 
#define POSY_TOINT   FloorC(GetPosY())
 
#define POSZ_TOINT   FloorC(GetPosZ())
 

Macro Definition Documentation

#define CLASS_PROTODEF (   classname)
Value:
virtual bool IsA(const char * a_ClassName) const override\
{ \
return ((a_ClassName != nullptr) && ((strcmp(a_ClassName, #classname) == 0) || super::IsA(a_ClassName))); \
} \
virtual const char * GetClass(void) const override \
{ \
return #classname; \
} \
static const char * GetClassStatic(void) \
{ \
return #classname; \
} \
virtual const char * GetParentClass(void) const override \
{ \
return super::GetClass(); \
}

Definition at line 11 of file Entity.h.

#define GET_AND_VERIFY_CURRENT_CHUNK (   ChunkVarName,
  X,
 
)
Value:
cChunk * ChunkVarName = a_Chunk.GetNeighborChunk(X, Z); \
do { \
if ((ChunkVarName == nullptr) || !ChunkVarName->IsValid()) \
{ \
return; \
} \
} while (false)
bool IsValid(void) const
Returns true iff the chunk block data is valid (loaded / generated)
Definition: Chunk.h:72
Definition: Chunk.h:49
cChunk * GetNeighborChunk(int a_BlockX, int a_BlockZ)
Returns the chunk into which the specified block belongs, by walking the neighbors.
Definition: Chunk.cpp:2279

Definition at line 34 of file Entity.h.

#define POS_TOINT   GetPosition().Floor()

Definition at line 32 of file Entity.h.

#define POSX_TOINT   FloorC(GetPosX())

Definition at line 29 of file Entity.h.

#define POSY_TOINT   FloorC(GetPosY())

Definition at line 30 of file Entity.h.

#define POSZ_TOINT   FloorC(GetPosZ())

Definition at line 31 of file Entity.h.