add that thing

This commit is contained in:
MihailRis
2025-11-18 18:41:21 +03:00
parent 957f9f5998
commit 922a86d2b0
2 changed files with 11 additions and 1 deletions
+7 -1
View File
@@ -89,13 +89,19 @@ static inline auto load_inventories(
return invs;
}
#include "util/timeutil.hpp"
std::shared_ptr<Chunk> GlobalChunks::create(int x, int z) {
const auto& found = chunksMap.find(keyfrom(x, z));
if (found != chunksMap.end()) {
return found->second;
}
auto chunk = std::make_shared<Chunk>(x, z);
std::shared_ptr<Chunk> chunk;
{
timeutil::ScopeLogTimer log(555);
chunk = std::make_shared<Chunk>(x, z);
}
chunksMap[keyfrom(x, z)] = chunk;
World& world = *level.getWorld();