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

@@ -29,6 +29,7 @@
class cChunk;
class cItems;
class cPlayer;
class cWorld;
class cBlockEntity;
@@ -83,6 +84,10 @@ public:
Uses CopyFrom() to copy the properties. */
OwnedBlockEntity Clone(Vector3i a_Pos);
/** Returns the contents of this block entity that it would drop if broken.
Note that the block itself is not included; that's handled by the block handler. */
virtual cItems ConvertToPickups() const;
/** Copies all properties of a_Src into this entity, except for its m_World and location.
Each non-abstract descendant should override to copy its specific properties, and call
Super::CopyFrom(a_Src) to copy the common ones. */