summaryrefslogtreecommitdiffstats
path: root/src/Blocks/BlockLadder.h
diff options
context:
space:
mode:
authorTiger Wang <ziwei.tiger@hotmail.co.uk>2014-07-14 22:57:44 +0200
committerTiger Wang <ziwei.tiger@hotmail.co.uk>2014-07-14 22:57:44 +0200
commit5b1552435f95887ba59c707e3635dcaf9cb358f4 (patch)
treef804248a5eb61c2b5a947dc574d1221f7b31b987 /src/Blocks/BlockLadder.h
parentMaybe improved arrow sinking (diff)
downloadcuberite-5b1552435f95887ba59c707e3635dcaf9cb358f4.tar
cuberite-5b1552435f95887ba59c707e3635dcaf9cb358f4.tar.gz
cuberite-5b1552435f95887ba59c707e3635dcaf9cb358f4.tar.bz2
cuberite-5b1552435f95887ba59c707e3635dcaf9cb358f4.tar.lz
cuberite-5b1552435f95887ba59c707e3635dcaf9cb358f4.tar.xz
cuberite-5b1552435f95887ba59c707e3635dcaf9cb358f4.tar.zst
cuberite-5b1552435f95887ba59c707e3635dcaf9cb358f4.zip
Diffstat (limited to '')
-rw-r--r--src/Blocks/BlockLadder.h22
1 files changed, 14 insertions, 8 deletions
diff --git a/src/Blocks/BlockLadder.h b/src/Blocks/BlockLadder.h
index a605edf3f..7efd8e444 100644
--- a/src/Blocks/BlockLadder.h
+++ b/src/Blocks/BlockLadder.h
@@ -41,21 +41,27 @@ public:
}
- static NIBBLETYPE DirectionToMetaData(eBlockFace a_Direction) // tolua_export
- { // tolua_export
+ virtual void ConvertToPickups(cItems & a_Pickups, NIBBLETYPE a_BlockMeta) override
+ {
+ a_Pickups.Add(m_BlockType, 1, 0); // Reset meta
+ }
+
+
+ static NIBBLETYPE DirectionToMetaData(eBlockFace a_Direction)
+ {
switch (a_Direction)
{
case BLOCK_FACE_ZM: return 0x2;
case BLOCK_FACE_ZP: return 0x3;
case BLOCK_FACE_XM: return 0x4;
case BLOCK_FACE_XP: return 0x5;
- default: return 0x2;
+ default: return 0x2;
}
- } // tolua_export
+ }
- static eBlockFace MetaDataToDirection(NIBBLETYPE a_MetaData) // tolua_export
- { // tolua_export
+ static eBlockFace MetaDataToDirection(NIBBLETYPE a_MetaData)
+ {
switch (a_MetaData)
{
case 0x2: return BLOCK_FACE_ZM;
@@ -64,10 +70,10 @@ public:
case 0x5: return BLOCK_FACE_XP;
default: return BLOCK_FACE_ZM;
}
- } // tolua_export
+ }
- /// Finds a suitable Direction for the Ladder. Returns BLOCK_FACE_BOTTOM on failure
+ /** Finds a suitable Direction for the Ladder. Returns BLOCK_FACE_BOTTOM on failure */
static eBlockFace FindSuitableBlockFace(cChunkInterface & a_ChunkInterface, int a_BlockX, int a_BlockY, int a_BlockZ)
{
for (int FaceInt = BLOCK_FACE_ZM; FaceInt <= BLOCK_FACE_XP; FaceInt++)