Cuberite
A lightweight, fast and extensible game server for Minecraft
BlockRedstoneLamp.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 
20 
21 
22 
23  virtual cItems ConvertToPickups(NIBBLETYPE a_BlockMeta, cBlockEntity * a_BlockEntity, const cEntity * a_Digger, const cItem * a_Tool) override
24  {
25  // Always drop the Off variant:
26  return(cItem(E_BLOCK_REDSTONE_LAMP_OFF, 1, 0));
27  }
28 
29 
30 
31 
32 
33  virtual ColourID GetMapBaseColourID(NIBBLETYPE a_Meta) override
34  {
35  UNUSED(a_Meta);
36  return 15;
37  }
38 };
39 
40 
41 
42 
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.
#define UNUSED
Definition: Globals.h:152
Byte ColourID
Definition: Globals.h:118
Definition: Entity.h:73
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: Item.h:36
This class bridges a vector of cItem for safe access via Lua.
Definition: Item.h:234
cBlockRedstoneLampHandler(BLOCKTYPE a_BlockType)