1
0

Unify block entity pickup conversion

- Removed normal BlockHandler knowledge of block entities during conversion
+ Added cBlockEntity::ConvertToPickups that handles it
This commit is contained in:
Tiger Wang
2020-09-23 16:06:27 +01:00
committed by Alexander Harkness
parent 1a60164848
commit c53a0ba5f6
80 changed files with 179 additions and 212 deletions

View File

@@ -522,21 +522,13 @@ void cBlockHandler::NeighborChanged(cChunkInterface & a_ChunkInterface, Vector3i
cItems cBlockHandler::ConvertToPickups(
NIBBLETYPE a_BlockMeta,
cBlockEntity * a_BlockEntity,
const cEntity * a_Digger,
const cItem * a_Tool
) const
cItems cBlockHandler::ConvertToPickups(NIBBLETYPE a_BlockMeta, const cEntity * a_Digger, const cItem * a_Tool) const
{
UNUSED(a_BlockEntity);
UNUSED(a_Digger);
UNUSED(a_Tool);
// Add self:
cItems res;
res.push_back(cItem(m_BlockType, 1, a_BlockMeta));
return res;
return cItem(m_BlockType, 1, a_BlockMeta);
}