Cuberite
A lightweight, fast and extensible game server for Minecraft
FallingBlock.h
Go to the documentation of this file.
1 
2 #pragma once
3 
4 #include "Entity.h"
5 
6 
7 
8 
9 
10 // tolua_begin
12  public cEntity
13 {
14  // tolua_end
15 
16  using Super = cEntity;
17 
18 public: // tolua_export
19 
21 
22 
24  cFallingBlock(Vector3d a_Position, BLOCKTYPE a_BlockType, NIBBLETYPE a_BlockMeta);
25 
26  // tolua_begin
27 
28  BLOCKTYPE GetBlockType(void) const { return m_BlockType; }
29  NIBBLETYPE GetBlockMeta(void) const { return m_BlockMeta; }
30 
31  // tolua_end
32 
33  // cEntity overrides:
34  virtual void SpawnOn(cClientHandle & a_ClientHandle) override;
35  virtual void Tick(std::chrono::milliseconds a_Dt, cChunk & a_Chunk) override;
36 
37 private:
40 } ; // tolua_export
41 
42 
43 
44 
unsigned char NIBBLETYPE
The datatype used by nibbledata (meta, light, skylight)
Definition: ChunkDef.h:44
unsigned char BLOCKTYPE
The datatype used by blockdata.
Definition: ChunkDef.h:41
#define CLASS_PROTODEF(classname)
Definition: Entity.h:13
Definition: Chunk.h:36
Definition: Entity.h:76
cEntity(eEntityType a_EntityType, Vector3d a_Pos, float a_Width, float a_Height)
Definition: Entity.cpp:37
cFallingBlock(Vector3d a_Position, BLOCKTYPE a_BlockType, NIBBLETYPE a_BlockMeta)
Creates a new falling block.
NIBBLETYPE GetBlockMeta(void) const
Definition: FallingBlock.h:29
BLOCKTYPE GetBlockType(void) const
Definition: FallingBlock.h:28
virtual void SpawnOn(cClientHandle &a_ClientHandle) override
Descendants override this function to send a command to the specified client to spawn the entity on t...
virtual void Tick(std::chrono::milliseconds a_Dt, cChunk &a_Chunk) override
BLOCKTYPE m_BlockType
Definition: FallingBlock.h:38
NIBBLETYPE m_BlockMeta
Definition: FallingBlock.h:39