diff options
author | x12xx12x <44411062+12xx12@users.noreply.github.com> | 2024-11-10 00:07:11 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-11-10 00:07:11 +0100 |
commit | 44cb43f13cdd8f2b3efb9ae77daa3e994c62bc26 (patch) | |
tree | d252e4cf7abc71dd860c118ba0aed33b806c4fe2 /src/BlockArea.h | |
parent | fixes for api changes in embedtls (#5540) (diff) | |
download | cuberite-44cb43f13cdd8f2b3efb9ae77daa3e994c62bc26.tar cuberite-44cb43f13cdd8f2b3efb9ae77daa3e994c62bc26.tar.gz cuberite-44cb43f13cdd8f2b3efb9ae77daa3e994c62bc26.tar.bz2 cuberite-44cb43f13cdd8f2b3efb9ae77daa3e994c62bc26.tar.lz cuberite-44cb43f13cdd8f2b3efb9ae77daa3e994c62bc26.tar.xz cuberite-44cb43f13cdd8f2b3efb9ae77daa3e994c62bc26.tar.zst cuberite-44cb43f13cdd8f2b3efb9ae77daa3e994c62bc26.zip |
Diffstat (limited to 'src/BlockArea.h')
-rw-r--r-- | src/BlockArea.h | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/src/BlockArea.h b/src/BlockArea.h index b672a18ec..2048bb563 100644 --- a/src/BlockArea.h +++ b/src/BlockArea.h @@ -163,7 +163,7 @@ public: /** Expands the internal contents by the specified amount of blocks from each border */ void Expand(int a_SubMinX, int a_AddMaxX, int a_SubMinY, int a_AddMaxY, int a_SubMinZ, int a_AddMaxZ); - /** Merges another block area into this one, using the specified block combinating strategy + /** Merges another block area into this one, using the specified block combining strategy This function combines another BlockArea into the current object. The a_RelX, a_RelY and a_RelZ parameters specify the coords of this BA where a_Src should be copied. If both areas contain baBlockEntities, the BEs are merged (with preference of keeping this' ones) (MergeBlockEntities()). @@ -236,7 +236,7 @@ public: */ void Merge(const cBlockArea & a_Src, int a_RelX, int a_RelY, int a_RelZ, eMergeStrategy a_Strategy); - /** Merges another block area into this one, using the specified block combinating strategy. + /** Merges another block area into this one, using the specified block combining strategy. See Merge() above for details. */ void Merge(const cBlockArea & a_Src, const Vector3i & a_RelMinCoords, eMergeStrategy a_Strategy); @@ -362,7 +362,7 @@ public: bool HasBlockMetas (void) const { return (m_BlockMetas != nullptr); } bool HasBlockLights (void) const { return (m_BlockLight != nullptr); } bool HasBlockSkyLights(void) const { return (m_BlockSkyLight != nullptr); } - bool HasBlockEntities (void) const { return (m_BlockEntities != nullptr); } + bool HasBlockEntities (void) const { return m_BlockEntities.operator bool(); } /** Returns the count of blocks that are not air. Returns 0 if blocktypes not available. Block metas are ignored (if present, air with any meta is still considered air). */ @@ -423,7 +423,8 @@ public: bool ForEachBlockEntity(cBlockEntityCallback a_Callback); /** Direct read-only access to block entities. */ - const cBlockEntities & GetBlockEntities(void) const { ASSERT(HasBlockEntities()); return *m_BlockEntities; } + const cBlockEntities & GetBlockEntities(void) const { ASSERT(HasBlockEntities()); return *m_BlockEntities.get(); } + cBlockEntities & GetBlockEntities(void) { ASSERT(HasBlockEntities()); return *m_BlockEntities.get(); } |