diff options
author | Alexander Harkness <me@bearbin.net> | 2024-11-02 22:27:47 +0100 |
---|---|---|
committer | Alexander Harkness <me@bearbin.net> | 2024-11-02 22:27:47 +0100 |
commit | cb50ec10591c0e0e4b9915e642bc50d3d8d1fd0a (patch) | |
tree | f647b20e1823f1846af88e832cf82a4a02e96e69 /src/Blocks/ChunkInterface.h | |
parent | Improve clang-format config file, remove automatically enforced code style from contrib guide. (diff) | |
download | cuberite-clang-format-codebase.tar cuberite-clang-format-codebase.tar.gz cuberite-clang-format-codebase.tar.bz2 cuberite-clang-format-codebase.tar.lz cuberite-clang-format-codebase.tar.xz cuberite-clang-format-codebase.tar.zst cuberite-clang-format-codebase.zip |
Diffstat (limited to 'src/Blocks/ChunkInterface.h')
-rw-r--r-- | src/Blocks/ChunkInterface.h | 28 |
1 files changed, 16 insertions, 12 deletions
diff --git a/src/Blocks/ChunkInterface.h b/src/Blocks/ChunkInterface.h index a8fcd6187..492390066 100644 --- a/src/Blocks/ChunkInterface.h +++ b/src/Blocks/ChunkInterface.h @@ -18,12 +18,13 @@ class cPlayer; -class cChunkInterface: - public cForEachChunkProvider +class cChunkInterface : public cForEachChunkProvider { -public: - - cChunkInterface(cChunkMap * a_ChunkMap) : m_ChunkMap(a_ChunkMap) {} + public: + cChunkInterface(cChunkMap * a_ChunkMap) : + m_ChunkMap(a_ChunkMap) + { + } bool DoWithChunkAt(Vector3i a_BlockPos, cFunctionRef<bool(cChunk &)> a_Callback); @@ -65,9 +66,16 @@ public: returns true if the use was successful, return false to use the block as a "normal" block */ bool UseBlockEntity(cPlayer * a_Player, int a_BlockX, int a_BlockY, int a_BlockZ); - virtual bool ForEachChunkInRect(int a_MinChunkX, int a_MaxChunkX, int a_MinChunkZ, int a_MaxChunkZ, cChunkDataCallback & a_Callback) override; + virtual bool ForEachChunkInRect( + int a_MinChunkX, + int a_MaxChunkX, + int a_MinChunkZ, + int a_MaxChunkZ, + cChunkDataCallback & a_Callback + ) override; - virtual bool WriteBlockArea(cBlockArea & a_Area, int a_MinBlockX, int a_MinBlockY, int a_MinBlockZ, int a_DataTypes) override; + virtual bool WriteBlockArea(cBlockArea & a_Area, int a_MinBlockX, int a_MinBlockY, int a_MinBlockZ, int a_DataTypes) + override; bool DigBlock(cWorldInterface & a_WorldInterface, Vector3i a_BlockPos, cEntity * a_Digger); @@ -75,10 +83,6 @@ public: void DropBlockAsPickups(Vector3i a_BlockPos, const cEntity * a_Digger = nullptr, const cItem * a_Tool = nullptr); -private: + private: cChunkMap * m_ChunkMap; }; - - - - |