Cuberite
A lightweight, fast and extensible game server for Minecraft
EndPortalEntity.cpp
Go to the documentation of this file.
1 
2 #include "Globals.h" // NOTE: MSVC stupidness requires this to be the same across all modules
3 
4 #include "EndPortalEntity.h"
5 #include "../ClientHandle.h"
6 
7 
8 
9 
10 
11 cEndPortalEntity::cEndPortalEntity(BLOCKTYPE a_BlockType, NIBBLETYPE a_BlockMeta, Vector3i a_Pos, cWorld * a_World) :
12  Super(a_BlockType, a_BlockMeta, a_Pos, a_World)
13 {
14  ASSERT(a_BlockType == E_BLOCK_END_PORTAL);
15 }
16 
17 
18 
19 
20 
22 {
23  Super::CopyFrom(a_Src);
24 }
25 
26 
27 
28 
29 
31 {
32  UNUSED(a_Player);
33  return true;
34 }
35 
36 
37 
38 
39 
41 {
42  a_Client.SendUpdateBlockEntity(*this);
43 }
@ E_BLOCK_END_PORTAL
Definition: BlockType.h:134
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 ASSERT(x)
Definition: Globals.h:276
#define UNUSED
Definition: Globals.h:72
virtual void CopyFrom(const cBlockEntity &a_Src)
Copies all properties of a_Src into this entity, except for its m_World and location.
Definition: BlockEntity.cpp:66
virtual bool UsedBy(cPlayer *a_Player) override
Called when a player uses this entity; should open the UI window.
virtual void SendTo(cClientHandle &a_Client) override
Sends the packet defining the block entity to the client specified.
cEndPortalEntity(BLOCKTYPE a_BlockType, NIBBLETYPE a_BlockMeta, Vector3i a_Pos, cWorld *a_World)
virtual void CopyFrom(const cBlockEntity &a_Src) override
Copies all properties of a_Src into this entity, except for its m_World and location.
void SendUpdateBlockEntity(cBlockEntity &a_BlockEntity)
Definition: Player.h:29
Definition: World.h:53