1
0

Code improvements

This commit is contained in:
Howaner 2014-09-30 20:59:59 +02:00
parent 425df6b694
commit 7d3016c7ad
3 changed files with 7 additions and 3 deletions

View File

@ -24,11 +24,11 @@ public:
if (a_BlockMeta == E_META_DIRT_COARSE) if (a_BlockMeta == E_META_DIRT_COARSE)
{ {
// Drop the coarse block (dirt, meta 1) // Drop the coarse block (dirt, meta 1)
a_Pickups.Add(E_BLOCK_DIRT, 1, 1); a_Pickups.Add(E_BLOCK_DIRT, 1, E_META_DIRT_COARSE);
} }
else else
{ {
a_Pickups.Add(E_BLOCK_DIRT, 1, 0); a_Pickups.Add(E_BLOCK_DIRT, 1, E_META_DIRT_NORMAL);
} }
} }

View File

@ -185,9 +185,12 @@ public:
{ {
return true; return true;
} }
} default:
{
return false; return false;
} }
}
}
static NIBBLETYPE IsOpen(cChunkInterface & a_ChunkInterface, int a_BlockX, int a_BlockY, int a_BlockZ) static NIBBLETYPE IsOpen(cChunkInterface & a_ChunkInterface, int a_BlockX, int a_BlockY, int a_BlockZ)

View File

@ -31,6 +31,7 @@ public:
{ {
if (m_BlockType == E_BLOCK_IRON_TRAPDOOR) if (m_BlockType == E_BLOCK_IRON_TRAPDOOR)
{ {
// Iron doors can only be toggled by redstone, not by right-clicking
return; return;
} }