aboutsummaryrefslogtreecommitdiff
path: root/Minecraft.World/ChunkStorageProfileDecorator.h
blob: 02ea4dcb71b2b670229e763eadf677a6303d785c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
#pragma once
#include "ChunkStorage.h"

class Level;

class ChunkStorageProfilerDecorator : public ChunkStorage
{
private:
	ChunkStorage *capsulated;

	int64_t timeSpentLoading;
	int64_t loadCount;
	int64_t timeSpentSaving;
	int64_t saveCount;

	int counter;

public:
    ChunkStorageProfilerDecorator(ChunkStorage *capsulated);
    LevelChunk *load(Level *level, int x, int z);
    void save(Level *level, LevelChunk *levelChunk);
    void saveEntities(Level *level, LevelChunk *levelChunk);
    void tick();
    void flush();
};