1
0
Fork 0
cuberite-2a/src/Blocks/BlockDirt.h

53 lines
691 B
C
Raw Normal View History

#pragma once
#include "BlockHandler.h"
2015-06-30 14:50:15 +00:00
class cBlockDirtHandler :
public cBlockHandler
{
2020-04-13 16:38:06 +00:00
using Super = cBlockHandler;
public:
cBlockDirtHandler(BLOCKTYPE a_BlockType):
2020-04-13 16:38:06 +00:00
Super(a_BlockType)
{
}
2016-02-05 21:45:45 +00:00
virtual cItems ConvertToPickups(NIBBLETYPE a_BlockMeta, cBlockEntity * a_BlockEntity, const cEntity * a_Digger, const cItem * a_Tool) override
{
2014-09-30 18:31:27 +00:00
if (a_BlockMeta == E_META_DIRT_COARSE)
{
// Drop the coarse block (dirt, meta 1)
return cItem(E_BLOCK_DIRT, 1, E_META_DIRT_COARSE);
2014-09-30 18:31:27 +00:00
}
else
{
return cItem(E_BLOCK_DIRT, 1, E_META_DIRT_NORMAL);
2014-09-30 18:31:27 +00:00
}
}
2016-02-05 21:45:45 +00:00
2015-06-30 14:50:15 +00:00
virtual ColourID GetMapBaseColourID(NIBBLETYPE a_Meta) override
{
UNUSED(a_Meta);
return 10;
2015-06-30 14:50:15 +00:00
}
} ;