Cuberite
A lightweight, fast and extensible game server for Minecraft
src
Blocks
BlockPlanks.h
Go to the documentation of this file.
1
2
#pragma once
3
4
#include "
BlockHandler.h
"
5
6
7
8
9
10
class
cBlockPlanksHandler
final :
11
public
cBlockHandler
12
{
13
using
Super
=
cBlockHandler
;
14
15
public
:
16
17
using
Super::Super;
18
19
private
:
20
21
virtual
ColourID
GetMapBaseColourID
(
NIBBLETYPE
a_Meta)
const override
22
{
23
switch
(a_Meta)
24
{
25
case
E_META_PLANKS_BIRCH
:
return
2;
26
case
E_META_PLANKS_JUNGLE
:
return
10;
27
case
E_META_PLANKS_OAK
:
return
13;
28
case
E_META_PLANKS_ACACIA
:
return
15;
29
case
E_META_PLANKS_DARK_OAK
:
return
26;
30
case
E_META_PLANKS_SPRUCE
:
return
34;
31
default
:
32
{
33
ASSERT
(!
"Unhandled meta in planks handler!"
);
34
return
0;
35
}
36
}
37
}
38
} ;
39
40
41
42
BlockHandler.h
E_META_PLANKS_BIRCH
@ E_META_PLANKS_BIRCH
Definition:
BlockType.h:761
E_META_PLANKS_SPRUCE
@ E_META_PLANKS_SPRUCE
Definition:
BlockType.h:760
E_META_PLANKS_ACACIA
@ E_META_PLANKS_ACACIA
Definition:
BlockType.h:763
E_META_PLANKS_DARK_OAK
@ E_META_PLANKS_DARK_OAK
Definition:
BlockType.h:764
E_META_PLANKS_JUNGLE
@ E_META_PLANKS_JUNGLE
Definition:
BlockType.h:762
E_META_PLANKS_OAK
@ E_META_PLANKS_OAK
Definition:
BlockType.h:759
NIBBLETYPE
unsigned char NIBBLETYPE
The datatype used by nibbledata (meta, light, skylight)
Definition:
ChunkDef.h:44
ColourID
Byte ColourID
Definition:
Globals.h:162
ASSERT
#define ASSERT(x)
Definition:
Globals.h:276
cBlockHandler
Definition:
BlockHandler.h:26
cBlockHandler::cBlockHandler
constexpr cBlockHandler(BLOCKTYPE a_BlockType)
Definition:
BlockHandler.h:29
cBlockPlanksHandler
Definition:
BlockPlanks.h:12
cBlockPlanksHandler::GetMapBaseColourID
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:
BlockPlanks.h:21
Generated on Fri Oct 25 2024 05:01:07 for Cuberite by
1.9.1