Cuberite
A lightweight, fast and extensible game server for Minecraft
BlockCloth.h
Go to the documentation of this file.
1 
2 #pragma once
3 
4 #include "BlockHandler.h"
5 
6 
7 
8 
9 
10 class cBlockClothHandler final :
11  public cBlockHandler
12 {
13 public:
14 
16 
17 private:
18 
19  virtual ColourID GetMapBaseColourID(NIBBLETYPE a_Meta) const override
20  {
21  switch (a_Meta)
22  {
23  case E_META_WOOL_WHITE: return 14;
24  case E_META_WOOL_ORANGE: return 15;
25  case E_META_WOOL_MAGENTA: return 16;
26  case E_META_WOOL_LIGHTBLUE: return 17;
27  case E_META_WOOL_YELLOW: return 18;
28  case E_META_WOOL_LIGHTGREEN: return 19;
29  case E_META_WOOL_PINK: return 20;
30  case E_META_WOOL_GRAY: return 21;
31  case E_META_WOOL_LIGHTGRAY: return 22;
32  case E_META_WOOL_CYAN: return 23;
33  case E_META_WOOL_PURPLE: return 24;
34  case E_META_WOOL_BLUE: return 25;
35  case E_META_WOOL_BROWN: return 26;
36  case E_META_WOOL_GREEN: return 27;
37  case E_META_WOOL_RED: return 28;
38  case E_META_WOOL_BLACK: return 29;
39  default:
40  {
41  ASSERT(!"Unhandled meta in wool handler!");
42  return 0;
43  }
44  }
45  }
46 } ;
@ E_META_WOOL_CYAN
Definition: BlockType.h:1001
@ E_META_WOOL_PINK
Definition: BlockType.h:998
@ E_META_WOOL_GRAY
Definition: BlockType.h:999
@ E_META_WOOL_YELLOW
Definition: BlockType.h:996
@ E_META_WOOL_MAGENTA
Definition: BlockType.h:994
@ E_META_WOOL_RED
Definition: BlockType.h:1006
@ E_META_WOOL_PURPLE
Definition: BlockType.h:1002
@ E_META_WOOL_WHITE
Definition: BlockType.h:992
@ E_META_WOOL_LIGHTGRAY
Definition: BlockType.h:1000
@ E_META_WOOL_GREEN
Definition: BlockType.h:1005
@ E_META_WOOL_BLUE
Definition: BlockType.h:1003
@ E_META_WOOL_ORANGE
Definition: BlockType.h:993
@ E_META_WOOL_BLACK
Definition: BlockType.h:1007
@ E_META_WOOL_LIGHTBLUE
Definition: BlockType.h:995
@ E_META_WOOL_BROWN
Definition: BlockType.h:1004
@ E_META_WOOL_LIGHTGREEN
Definition: BlockType.h:997
unsigned char NIBBLETYPE
The datatype used by nibbledata (meta, light, skylight)
Definition: ChunkDef.h:44
Byte ColourID
Definition: Globals.h:162
#define ASSERT(x)
Definition: Globals.h:276
virtual ColourID GetMapBaseColourID(NIBBLETYPE a_Meta) const override
Returns the base colour ID of the block, as will be represented on a map, as per documentation: https...
Definition: BlockCloth.h:19
constexpr cBlockHandler(BLOCKTYPE a_BlockType)
Definition: BlockHandler.h:29