summaryrefslogtreecommitdiffstats
path: root/src/Blocks/BlockTorch.h
diff options
context:
space:
mode:
authorTiger Wang <ziwei.tiger@hotmail.co.uk>2015-07-15 18:13:55 +0200
committerTiger Wang <ziwei.tiger@hotmail.co.uk>2015-07-15 18:13:55 +0200
commitc390604bc1343705ee17d6466da8dc53b5fa3b0e (patch)
treecbf9db66aae0fd8a85c88b0b1ef5ae9aea4d20ea /src/Blocks/BlockTorch.h
parentMerge pull request #2036 from cuberite/sign-metamirror (diff)
parentImproved maps (diff)
downloadcuberite-c390604bc1343705ee17d6466da8dc53b5fa3b0e.tar
cuberite-c390604bc1343705ee17d6466da8dc53b5fa3b0e.tar.gz
cuberite-c390604bc1343705ee17d6466da8dc53b5fa3b0e.tar.bz2
cuberite-c390604bc1343705ee17d6466da8dc53b5fa3b0e.tar.lz
cuberite-c390604bc1343705ee17d6466da8dc53b5fa3b0e.tar.xz
cuberite-c390604bc1343705ee17d6466da8dc53b5fa3b0e.tar.zst
cuberite-c390604bc1343705ee17d6466da8dc53b5fa3b0e.zip
Diffstat (limited to 'src/Blocks/BlockTorch.h')
-rw-r--r--src/Blocks/BlockTorch.h15
1 files changed, 7 insertions, 8 deletions
diff --git a/src/Blocks/BlockTorch.h b/src/Blocks/BlockTorch.h
index 0a834d13d..db66259e9 100644
--- a/src/Blocks/BlockTorch.h
+++ b/src/Blocks/BlockTorch.h
@@ -17,7 +17,6 @@ public:
{
}
-
virtual bool GetPlacementBlockTypeMeta(
cChunkInterface & a_ChunkInterface, cPlayer * a_Player,
int a_BlockX, int a_BlockY, int a_BlockZ, eBlockFace a_BlockFace,
@@ -47,7 +46,6 @@ public:
a_BlockMeta = DirectionToMetaData(a_BlockFace);
return true;
}
-
inline static NIBBLETYPE DirectionToMetaData(eBlockFace a_Direction)
{
@@ -67,7 +65,6 @@ public:
};
return 0x0;
}
-
inline static eBlockFace MetaDataToDirection(NIBBLETYPE a_MetaData)
{
@@ -88,7 +85,6 @@ public:
return BLOCK_FACE_TOP;
}
-
static bool CanBePlacedOn(BLOCKTYPE a_BlockType, NIBBLETYPE a_BlockMeta, eBlockFace a_BlockFace)
{
switch (a_BlockType)
@@ -119,7 +115,7 @@ public:
// Toches can be placed on the top of these slabs only if the occupy the top half of the voxel
return ((a_BlockFace == BLOCK_FACE_YP) && ((a_BlockMeta & 0x08) == 0x08));
}
- case E_BLOCK_WOODEN_STAIRS:
+ case E_BLOCK_OAK_WOOD_STAIRS:
case E_BLOCK_COBBLESTONE_STAIRS:
case E_BLOCK_BRICK_STAIRS:
case E_BLOCK_STONE_BRICK_STAIRS:
@@ -147,7 +143,6 @@ public:
}
}
-
/** Finds a suitable face to place the torch, returning BLOCK_FACE_NONE on failure */
static eBlockFace FindSuitableFace(cChunkInterface & a_ChunkInterface, int a_BlockX, int a_BlockY, int a_BlockZ)
{
@@ -172,7 +167,6 @@ public:
return BLOCK_FACE_NONE;
}
-
virtual bool CanBeAt(cChunkInterface & a_ChunkInterface, int a_RelX, int a_RelY, int a_RelZ, const cChunk & a_Chunk) override
{
eBlockFace Face = MetaDataToDirection(a_Chunk.GetMeta(a_RelX, a_RelY, a_RelZ));
@@ -188,12 +182,17 @@ public:
return CanBePlacedOn(BlockInQuestion, BlockInQuestionMeta, Face);
}
-
virtual void ConvertToPickups(cItems & a_Pickups, NIBBLETYPE a_BlockMeta) override
{
// Always drop meta = 0
a_Pickups.push_back(cItem(m_BlockType, 1, 0));
}
+
+ virtual ColourID GetMapBaseColourID(NIBBLETYPE a_Meta) override
+ {
+ UNUSED(a_Meta);
+ return 0;
+ }
} ;