summaryrefslogtreecommitdiffstats
path: root/src/BlockArea.h
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/BlockArea.h13
1 files changed, 2 insertions, 11 deletions
diff --git a/src/BlockArea.h b/src/BlockArea.h
index 9c0cb4ec9..f9dd388c0 100644
--- a/src/BlockArea.h
+++ b/src/BlockArea.h
@@ -19,6 +19,7 @@
#include "ChunkDataCallback.h"
#include "Cuboid.h"
#include "FunctionRef.h"
+#include "BlockEntities/BlockEntity.h"
@@ -456,6 +457,7 @@ protected:
using NIBBLEARRAY = std::unique_ptr<NIBBLETYPE[]>;
using BLOCKARRAY = std::unique_ptr<BLOCKTYPE[]>;
+ using cBlockEntitiesPtr = std::unique_ptr<cBlockEntities>;
Vector3i m_Origin;
Vector3i m_Size;
@@ -469,14 +471,6 @@ protected:
NIBBLEARRAY m_BlockLight; // Each light value is stored as a separate byte for faster access
NIBBLEARRAY m_BlockSkyLight; // Each light value is stored as a separate byte for faster access
- /** Deleter to clear the block entities before deleting the container. */
- struct sBlockEntitiesDeleter
- {
- void operator () (cBlockEntities * a_BlockEntities);
- };
-
- using cBlockEntitiesPtr = std::unique_ptr<cBlockEntities, sBlockEntitiesDeleter>;
-
/** The block entities contained within the area.
Only valid if the area was created / read with the baBlockEntities flag.
The block entities are owned by this object. */
@@ -512,9 +506,6 @@ protected:
template <bool MetasValid>
void MergeByStrategy(const cBlockArea & a_Src, int a_RelX, int a_RelY, int a_RelZ, eMergeStrategy a_Strategy, const NIBBLETYPE * SrcMetas, NIBBLETYPE * DstMetas);
- /** Clears the block entities from the specified container, freeing each blockentity. */
- static void ClearBlockEntities(cBlockEntities & a_BlockEntities);
-
/** Updates m_BlockEntities to remove BEs that no longer match the blocktype at their coords, and clones from a_Src the BEs that are missing.
a_RelX, a_RelY and a_RelZ are relative coords that should be added to all BEs from a_Src before checking them.
If a block should have a BE but one cannot be found in either this or a_Src, a new one is created. */