the game where you go into mines and start crafting! but for consoles (forked directly from smartcmd's github)
1#pragma once
2#include "CompoundTag.h"
3#include "ZonedChunkStorage.h"
4#include "com.mojang.nbt.h"
5
6class NbtSlotFile
7{
8private:
9 static byteArray READ_BUFFER;
10
11 static const int FILE_HEADER_SIZE = 1024;
12 static const int MAGIC_NUMBER = 0x13737001;
13
14 static const int FILE_SLOT_HEADER_SIZE = 12;
15 static const int FILE_SLOT_SIZE = 500;
16
17 HANDLE raf;
18 vector<int> **fileSlotMap;
19 int fileSlotMapLength;
20 vector<int> freeFileSlots;
21 int totalFileSlots;
22 static __int64 largest;
23
24public:
25 NbtSlotFile(File file);
26
27private:
28 void readHeader();
29 void writeHeader();
30 void seekSlotHeader(int fileSlot);
31 void seekSlot(int fileSlot);
32
33public:
34 vector<CompoundTag *> *readAll(int slot);
35
36private:
37 vector<int> *toReplace;
38
39 int getFreeSlot();
40
41public:
42 void replaceSlot(int slot, vector<CompoundTag *> *tags);
43 void close();
44};