summaryrefslogtreecommitdiffstats
path: root/src/Blocks/BlockEntity.h
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/Blocks/BlockEntity.h35
1 files changed, 0 insertions, 35 deletions
diff --git a/src/Blocks/BlockEntity.h b/src/Blocks/BlockEntity.h
index b1aee7526..4b9de1f12 100644
--- a/src/Blocks/BlockEntity.h
+++ b/src/Blocks/BlockEntity.h
@@ -4,7 +4,6 @@
#include "BlockHandler.h"
#include "ChunkInterface.h"
#include "../Item.h"
-#include "../BlockEntities/BlockEntityWithItems.h"
@@ -44,37 +43,3 @@ private:
return true;
}
};
-
-
-
-
-
-/** Wrapper for blocks that have a cBlockEntityWithItems descendant attached to them.
-When converting to pickups, drops self with meta reset to zero, and adds the container contents. */
-template <typename Base = cBlockEntityHandler>
-class cContainerEntityHandler:
- public Base
-{
-public:
-
- constexpr cContainerEntityHandler(BLOCKTYPE a_BlockType):
- Base(a_BlockType)
- {
- }
-
-private:
-
- virtual cItems ConvertToPickups(NIBBLETYPE a_BlockMeta, cBlockEntity * a_BlockEntity, const cEntity * a_Digger, const cItem * a_Tool) const override
- {
- // Reset meta to 0
- cItems res(cItem(Base::m_BlockType, 1, 0));
-
- // Drop the contents:
- if (a_BlockEntity != nullptr)
- {
- auto container = static_cast<cBlockEntityWithItems *>(a_BlockEntity);
- res.AddItemGrid(container->GetContents());
- }
- return res;
- }
-};