summaryrefslogtreecommitdiffstats
path: root/src/Blocks/BlockDirt.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/Blocks/BlockDirt.h')
-rw-r--r--src/Blocks/BlockDirt.h14
1 files changed, 11 insertions, 3 deletions
diff --git a/src/Blocks/BlockDirt.h b/src/Blocks/BlockDirt.h
index 43cadf767..0d4f73212 100644
--- a/src/Blocks/BlockDirt.h
+++ b/src/Blocks/BlockDirt.h
@@ -20,19 +20,27 @@ public:
{
}
- virtual void ConvertToPickups(cItems & a_Pickups, NIBBLETYPE a_BlockMeta) override
+
+
+
+
+ virtual cItems ConvertToPickups(NIBBLETYPE a_BlockMeta, cBlockEntity * a_BlockEntity, const cEntity * a_Digger, const cItem * a_Tool) override
{
if (a_BlockMeta == E_META_DIRT_COARSE)
{
// Drop the coarse block (dirt, meta 1)
- a_Pickups.Add(E_BLOCK_DIRT, 1, E_META_DIRT_COARSE);
+ return cItem(E_BLOCK_DIRT, 1, E_META_DIRT_COARSE);
}
else
{
- a_Pickups.Add(E_BLOCK_DIRT, 1, E_META_DIRT_NORMAL);
+ return cItem(E_BLOCK_DIRT, 1, E_META_DIRT_NORMAL);
}
}
+
+
+
+
virtual void OnUpdate(cChunkInterface & cChunkInterface, cWorldInterface & a_WorldInterface, cBlockPluginInterface & a_PluginInterface, cChunk & a_Chunk, int a_RelX, int a_RelY, int a_RelZ) override
{
if (m_BlockType != E_BLOCK_GRASS)