- C 91.9%
- C++ 5.4%
- Python 1.3%
- Shell 1%
- Makefile 0.4%
| data | ||
| .gitignore | ||
| blockdata.c | ||
| blockdata.h | ||
| cargs.c | ||
| cargs.h | ||
| chunk.h | ||
| chunk_anvil.c | ||
| chunk_region.c | ||
| image.c | ||
| image.h | ||
| level.h | ||
| level_alpha.c | ||
| level_classic.c | ||
| level_region.c | ||
| LICENSE | ||
| logger.c | ||
| logger.h | ||
| Makefile | ||
| map.c | ||
| map.h | ||
| mapka.c | ||
| micronbt.c | ||
| micronbt.h | ||
| nbt_static.c | ||
| nbt_static.h | ||
| README.md | ||
| sdefl.c | ||
| sdefl.h | ||
| sinfl.c | ||
| sinfl.h | ||
| sinfl_gz.h | ||
Mapka
Mapka ("map" in Czech, pronounced as [ˈmapka]) is a simple map renderer for Minecraft. It aims to be fast and portable, and to support a wide range of versions, while maintaining the look and feel of the Minecraft map item.
Supported versions range from rd-132211 to 1.12.2 (inclusive).
Building
A basic Unix environment is sufficient to build the project. It includes:
- any C99 compiler (tested with GCC, Clang and TinyCC)
- POSIX libc (tested with glibc and musl)
- Bash (for the
data/gen_blockdatascript) - Unix core utilities
If you are on Windows, you can use w64devkit.
To build the project, just run make.
If you want to inspect Mapka with a debugger, build it with make DEBUG=1.
If you want to add additional flags to the compiler or linker, use the
EXTRA_CFLAGS and EXTRA_LDFLAGS variables. For example, if you want to use
Link Time Optimizations, build Mapka like this:
make EXTRA_CFLAGS="-flto" EXTRA_LDFLAGS="-flto"
It's highly recommended to build with LTO enabled if your compiler supports it, as it significantly improves performance.
You also can override default flags. For example:
make CFLAGS="-Os" LDFLAGS="-fuse-ld=mold"
This command will compile source files with binary size optimization and link
objects using mold instead of the default linker.
Usage
mapka [OPTIONS] LEVEL_PATH OUT_PATH LEVEL_FORMAT
Arguments:
LEVEL_PATHis a path to input worldOUT_PATHis a path to output renderLEVEL_FORMATis a world format specifier encoded as one of the following numbers:1for classic (from rd-132211 to c0.30)2for alpha (from infdev to b1.2)3for region (from b1.2 to 1.1)4for anvil (from 1.2.1 to 1.12.2)
Options:
-hor--helpshows help for the command-bor--boundssets one of the following image bounds modes:centered(default): center the world at the center of the imagemin: make the image as small as possible without preserving the center of the world
Usage example:
mapka ~/path/to/.minecraft/level/MyWorld/region/ ./map.png 3
This command will render a Beta MyWorld to map.png.
Acknowledges
The following libraries are included into the project:
- https://github.com/vurtun/lib (
sinfl.handsdefl.h, Unlicense/MIT licensed) - https://codeberg.org/arslee07/micronbt (MIT licensed)
- https://github.com/likle/cargs (MIT licensed)
License
The software is licensed under GNU General Public License v3.0