Note: The most part of the code will be transformed to C++, so the project might be dhlrcpp in the future.
Although it was named as litematica_reader_c, it's not only intended to read litematica file, but process the
material list in blocks in a litematica file region. Reading litematica file is just the first step to process, or in
other words there should be a source of material list to process, and reading a litematica file is the most
convenient.
It uses libnbt as the library to read litematica file.
Since it's a general-purpose project, the assets and data file should be provided by user. Luckily, there's a simple
wizard in utility in Qt module which helps you to do this.
- libnbt (already in submodule of the repo)
zlib- cJSON
>= 1.7.13 gettext(It's a part ofglibcso you might not need to install it in GNU/Linux but other systems might need)( Optional -- if you need translation)glib2minizip-ng- dhutil (already in submodule of the repo)
Use git to get this repo, then get submodule.
git submodule update --initIf there's already CMake installed, just compile using command:
cmake -B build
cmake --build buildIf not, install one.
- NBT management (NBT
interfacesupport and NBT Reader). Note: if you want to modify the content, you might need to use theget_current_nbtmethod and modify by yourself. - Partly support of
NBT StructandLitematicusing generalRegion. Note: support easily read block state and palette, generate block list (Although it's called item list), generateNBT StructfromRegion. - Partly recipe support
Just run dhlrc.bin, and the Qt backend will start unless you are using Linux tty.
If you just want to convert file, just run dhlrc.bin conv --help and do with the instruction.