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

@@ -146,16 +146,10 @@ public:
/** Returns the pickups that would result if the block was mined by a_Digger using a_Tool.
Doesn't do any actual block change / mining, only calculates the pickups.
a_BlockEntity is the block entity present at the block, if any, nullptr if none.
a_Digger is the entity that caused the conversion, usually the player digging.
a_Tool is the tool used for the digging.
The default implementation drops a single item created from m_BlockType and the current meta. */
virtual cItems ConvertToPickups(
NIBBLETYPE a_BlockMeta,
cBlockEntity * a_BlockEntity,
const cEntity * a_Digger = nullptr,
const cItem * a_Tool = nullptr
) const;
virtual cItems ConvertToPickups(NIBBLETYPE a_BlockMeta, const cEntity * a_Digger = nullptr, const cItem * a_Tool = nullptr) const;
/** Checks if the block can stay at the specified relative coords in the chunk */
virtual bool CanBeAt(