aboutsummaryrefslogtreecommitdiff
path: root/Minecraft.World/ZoneFile.h
diff options
context:
space:
mode:
authordaoge_cmd <3523206925@qq.com>2026-03-01 12:16:08 +0800
committerdaoge_cmd <3523206925@qq.com>2026-03-01 12:16:08 +0800
commitb691c43c44ff180d10e7d4a9afc83b98551ff586 (patch)
tree3e9849222cbc6ba49f2f1fc6e5fe7179632c7390 /Minecraft.World/ZoneFile.h
parentdef8cb415354ac390b7e89052a50605285f1aca9 (diff)
Initial commit
Diffstat (limited to 'Minecraft.World/ZoneFile.h')
-rw-r--r--Minecraft.World/ZoneFile.h42
1 files changed, 42 insertions, 0 deletions
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);
+};