Cuberite
A lightweight, fast and extensible game server for Minecraft
DropperEntity.cpp
Go to the documentation of this file.
1 
2 // DropperEntity.cpp
3 
4 // Implements the cRtopperEntity class representing a Dropper block entity
5 
6 #include "Globals.h"
7 #include "DropperEntity.h"
8 
9 
10 
11 
12 
13 cDropperEntity::cDropperEntity(BLOCKTYPE a_BlockType, NIBBLETYPE a_BlockMeta, Vector3i a_Pos, cWorld * a_World):
14  Super(a_BlockType, a_BlockMeta, a_Pos, a_World)
15 {
16  ASSERT(a_BlockType == E_BLOCK_DROPPER);
17 }
18 
19 
20 
21 
22 
23 void cDropperEntity::DropSpenseFromSlot(cChunk & a_Chunk, int a_SlotNum)
24 {
25  DropFromSlot(a_Chunk, a_SlotNum);
26 }
27 
28 
29 
30 
@ E_BLOCK_DROPPER
Definition: BlockType.h:176
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
cDropperEntity(BLOCKTYPE a_BlockType, NIBBLETYPE a_BlockMeta, Vector3i a_Pos, cWorld *a_World)
Constructor used for normal operation.
virtual void DropSpenseFromSlot(cChunk &a_Chunk, int a_SlotNum) override
Override this function to provide the specific behavior for item dropspensing (drop / shoot / pour / ...
void DropFromSlot(cChunk &a_Chunk, int a_SlotNum)
Helper function, drops one item from the specified slot (like a dropper)
Definition: Chunk.h:36
Definition: World.h:53