From b691c43c44ff180d10e7d4a9afc83b98551ff586 Mon Sep 17 00:00:00 2001 From: daoge_cmd <3523206925@qq.com> Date: Sun, 1 Mar 2026 12:16:08 +0800 Subject: Initial commit --- Minecraft.World/ZoneFile.h | 42 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 42 insertions(+) create mode 100644 Minecraft.World/ZoneFile.h (limited to 'Minecraft.World/ZoneFile.h') diff --git a/Minecraft.World/ZoneFile.h b/Minecraft.World/ZoneFile.h new file mode 100644 index 00000000..d7b8cc82 --- /dev/null +++ b/Minecraft.World/ZoneFile.h @@ -0,0 +1,42 @@ +#pragma once +#include "ZonedChunkStorage.h" +#include "NbtSlotFile.h" +#include "ZoneIo.h" + +class ZoneFile +{ +public: + static const int FILE_HEADER_SIZE = 1024 * 4; + +private: + static const int MAGIC_NUMBER = 0x13737000; + + static const int slotsLength; + + shortArray slots; + short slotCount; + +public: + __int64 lastUse; + +private: + HANDLE channel; + +public: + __int64 key; + File file; + + NbtSlotFile *entityFile; + + ZoneFile(__int64 key, File file, File entityFile); + ~ZoneFile(); + + void readHeader(); + + void writeHeader(); + +public: + void close(); + ZoneIo *getZoneIo(int slot); + bool containsSlot(int slot); +}; -- cgit v1.2.3