Cuberite
A lightweight, fast and extensible game server for Minecraft
BlockMycelium.h
Go to the documentation of this file.
1 
2 #pragma once
3 
4 #include "BlockHandler.h"
5 
6 
7 
8 
9 
11  public cBlockHandler
12 {
13 public:
15  cBlockHandler(a_BlockType)
16  {
17  }
18 
19  // TODO: Add Mycel Spread
20 
21 
22 
23 
24 
25  virtual cItems ConvertToPickups(NIBBLETYPE a_BlockMeta, cBlockEntity * a_BlockEntity, const cEntity * a_Digger, const cItem * a_Tool) override
26  {
27  return cItem(E_BLOCK_DIRT, 1, 0);
28  }
29 
30 
31 
32 
33 
34  virtual ColourID GetMapBaseColourID(NIBBLETYPE a_Meta) override
35  {
36  UNUSED(a_Meta);
37  return 24;
38  }
39 } ;
40 
41 
42 
43 
virtual ColourID GetMapBaseColourID(NIBBLETYPE a_Meta) override
Returns the base colour ID of the block, as will be represented on a map, as per documentation: https...
Definition: BlockMycelium.h:34
unsigned char BLOCKTYPE
The datatype used by blockdata.
Definition: ChunkDef.h:42
unsigned char NIBBLETYPE
The datatype used by nibbledata (meta, light, skylight)
Definition: ChunkDef.h:45
virtual cItems ConvertToPickups(NIBBLETYPE a_BlockMeta, cBlockEntity *a_BlockEntity, const cEntity *a_Digger, const cItem *a_Tool) override
Returns the pickups that would result if the block was mined by a_Digger using a_Tool.
Definition: BlockMycelium.h:25
#define UNUSED
Definition: Globals.h:152
Byte ColourID
Definition: Globals.h:118
Definition: Entity.h:73
cBlockMyceliumHandler(BLOCKTYPE a_BlockType)
Definition: BlockMycelium.h:14
Definition: Item.h:36
This class bridges a vector of cItem for safe access via Lua.
Definition: Item.h:234