a fast minecraft world renderer that supports almost every version (WIP)
  • C 91.9%
  • C++ 5.4%
  • Python 1.3%
  • Shell 1%
  • Makefile 0.4%
Find a file
2025-05-08 11:16:36 +09:00
data foorend -> mapka 2024-12-22 18:33:48 +09:00
.gitignore add gf2 project to gitignore 2025-01-12 23:35:32 +09:00
blockdata.c use palette depdending on level format 2024-11-19 12:45:30 +09:00
blockdata.h use palette depdending on level format 2024-11-19 12:45:30 +09:00
cargs.c add arguments parser 2025-03-30 14:43:42 +09:00
cargs.h add arguments parser 2025-03-30 14:43:42 +09:00
chunk.h deduplicate code 2025-03-09 15:58:03 +09:00
chunk_anvil.c deduplicate code 2025-03-09 15:58:03 +09:00
chunk_region.c chunk_region: do not warn about no shade of air 2025-03-10 15:18:03 +09:00
image.c semicolon :) 2025-03-16 18:28:16 +09:00
image.h fit image into min bounding box 2025-03-10 17:13:56 +09:00
level.h deduplicate code 2025-03-09 15:58:03 +09:00
level_alpha.c reuse chunk parser in alpha 2025-03-10 15:16:24 +09:00
level_classic.c fix debug message 2025-05-08 11:16:36 +09:00
level_region.c deduplicate code 2025-03-09 15:58:03 +09:00
LICENSE add license 2024-10-19 18:04:43 +09:00
logger.c abstract away level parsing 2024-10-27 00:23:50 +09:00
logger.h add logger 2024-10-20 17:03:33 +09:00
Makefile build process improvements 2025-03-30 16:30:06 +09:00
map.c fit image into min bounding box 2025-03-10 17:13:56 +09:00
map.h fit image into min bounding box 2025-03-10 17:13:56 +09:00
mapka.c mapka.c: improve readability 2025-03-31 00:57:56 +09:00
micronbt.c update micronbt 2025-01-24 00:51:06 +09:00
micronbt.h vendor micronbt 2024-12-15 14:03:04 +09:00
nbt_static.c vendor micronbt 2024-12-15 14:03:04 +09:00
nbt_static.h vendor micronbt 2024-12-15 14:03:04 +09:00
README.md highlight lto recommendation 2025-03-30 16:31:46 +09:00
sdefl.c replace miniz compressor with sdefl 2025-01-24 15:23:32 +09:00
sdefl.h replace miniz compressor with sdefl 2025-01-24 15:23:32 +09:00
sinfl.c replace miniz decompressor with sinfl 2025-01-24 15:23:14 +09:00
sinfl.h fix building with tcc (closes #8) 2025-03-08 16:46:29 +09:00
sinfl_gz.h replace miniz decompressor with sinfl 2025-01-24 15:23:14 +09:00

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_blockdata script)
  • 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_PATH is a path to input world
  • OUT_PATH is a path to output render
  • LEVEL_FORMAT is a world format specifier encoded as one of the following numbers:
    • 1 for classic (from rd-132211 to c0.30)
    • 2 for alpha (from infdev to b1.2)
    • 3 for region (from b1.2 to 1.1)
    • 4 for anvil (from 1.2.1 to 1.12.2)

Options:

  • -h or --help shows help for the command
  • -b or --bounds sets one of the following image bounds modes:
    • centered (default): center the world at the center of the image
    • min: 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:

License

The software is licensed under GNU General Public License v3.0