diff options
| author | Mel <einebeere@gmail.com> | 2024-02-15 12:32:03 +0100 |
|---|---|---|
| committer | Mel <einebeere@gmail.com> | 2024-02-15 12:32:03 +0100 |
| commit | 3e6eb265a018fd0422b59ca9ea1b8918abee5c16 (patch) | |
| tree | 3ae93c50f7b75d7e03a1b5e69157e36a65d99175 /src/World/ChunkRegistry.hpp | |
| parent | 39d5b006063f27effd4bf96a0a40f02aded7c8f5 (diff) | |
| download | meowcraft-3e6eb265a018fd0422b59ca9ea1b8918abee5c16.tar.zst meowcraft-3e6eb265a018fd0422b59ca9ea1b8918abee5c16.zip | |
Not every valid block position is within a chunk, `ChunkRegistry::find` should reflect that
Diffstat (limited to 'src/World/ChunkRegistry.hpp')
| -rw-r--r-- | src/World/ChunkRegistry.hpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/World/ChunkRegistry.hpp b/src/World/ChunkRegistry.hpp index d583765..b6d1613 100644 --- a/src/World/ChunkRegistry.hpp +++ b/src/World/ChunkRegistry.hpp @@ -48,8 +48,8 @@ public: Data& get(ChunkIndex index); - Data& find(Position::BlockWorld pos); - Data& find(Position::World pos); + Data* find(Position::BlockWorld pos); + Data* find(Position::World pos); private: std::unordered_map<ChunkIndex, Data> m_chunks; }; |
