GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — GitHub - 2b2tplace/zvcr_utils: Core command line utility and library for the ZVCR file format (conversion utilities between zvcr and mca, merge, render, upgrade, datamining utilities)

BranchesTags
Open more actions menu

Latest commit

 

History

49 Commits
49 Commits

Folders and files

NameName
Last commit message
Last commit date
zvcr_utils
zvcr_utils
 
 
.gitignore
.gitignore
 
 
CMakeLists.txt
CMakeLists.txt
 
 
LICENSE
LICENSE
 
 
README.md
README.md
 
 
main.cpp
main.cpp
 
 

Repository files navigation

zvcr_utils

A collection of helpful utilities related to the zvcr file format and the Minecraft Anvil file format, in the form of a C++ library and a command line program.

Command Usage

The zvcr CLI accepts parameters in sequence, denoted by a - prefix:
zvcr -flag -arg1=value1 -arg2=value2

Basic parameter syntax:
-parameter=value
-parameter='string value with spaces'
-flag

Modes

You can choose from the following modes to do operations on zvcr / mca files, Minecraft worlds, etc.

Some commands require the use of Minecraft registries (-reg='/path/to/registries'), which you can download here. You may also optionally set the ZVCR_CLI_MINECRAFT_REGISTRIES_PATH environment variable to avoid passing in the -reg parameter every time.

In the help page,
optional parameters are denoted with []: [-optional=value],
variadic parameters are denoted with [...]: -parameters=values[...] (example: zvcr -parameters=value1 value2 value3).

  • -help: Shows all commands and their usages. Use zvcr -help <command> to see the usage of that command.
  • -merge: Merges distinct zvcr directories together, preserving their histories and combining their timelines
  • -import: Imports Minecraft anvil (mca) files to zvcr
  • -export: Exports zvcr files to Minecraft anvil (mca)
  • -level-dat: Creates a level.dat file with custom parameters in a Minecraft world folder

Merge

  • -merge: Merges distinct zvcr directories together, preserving their histories and combining their timelines
    • -dim={overworld/nether/end}
    • -in='/path/to/input-zvcr-dirs'[...]
    • -out='/path/to/output-zvcr-dir'
    • [-inputs=x.z or min_x.min_z,max_x.max_z[...] (defaults to all region files in the input directories)]
    • [-zstd-level=zstd compression level]
    • [-zstd-threads=zstd compression threads]
    • [-threads=number of threads (defaults to number of threads on this system)]
    • [-backup-existing]

Import

  • -import: Imports Minecraft anvil (mca) files to zvcr
    • -dim={overworld/nether/end}
    • -in='/path/to/minecraft-world-folder'[...]
    • -out='/path/to/zvcr-directories'
    • [-inputs=x.z or min_x.min_z,max_x.max_z[...] (defaults to all region files in the input directories)]
    • [-override-epoch=a unix timestamp (in seconds, to override the timestamp of all snapshots; defaults to the recorded timestamp of each chunk)]
    • [-zstd-level=zstd compression level]
    • [-zstd-threads=zstd compression threads]
    • [-threads=number of threads (defaults to number of threads on this system)]
    • [-backup-existing]
    • -reg='/path/to/registries' (defaults to value of ZVCR_CLI_MINECRAFT_REGISTRIES_PATH environment variable)

Export

  • -export: Exports zvcr files to Minecraft anvil (mca)
    • -dim={overworld/nether/end}
    • -in='/path/to/zvcr-directories'[...]
    • -out='/path/to/minecraft-world-folder'
    • [-inputs=x.z or min_x.min_z,max_x.max_z[...] (defaults to all region files in the input directories)]
    • [-epoch=a unix timestamp (in seconds; defaults to current time)]
    • [-threads=number of threads (defaults to number of threads on this system)]
    • -reg='/path/to/registries' (defaults to value of ZVCR_CLI_MINECRAFT_REGISTRIES_PATH environment variable)

Render

  • -render: Renders 2D views of zvcr files into images
    • -dim={overworld/nether/end}
    • -in='/path/to/zvcr-directories'[...]
    • [-inputs=x.z or min_x.min_z,max_x.max_z[...] (defaults to all region files in the input directories)]
    • [-zoom-levels=n (single) or a-b (range)[...] (zoom levels to use for tiling mode; ignored when not using tiling mode)] (defaults to 0-10)
    • -out='/path/to/output-directory'
    • [-tiles (output tiled mosaic images per zoom level instead of single rendered images)]
    • [-image-format={png/webp} (file format of the output images; defaults to png for single images, webp for tile images)]
    • [-lossy-webp]
    • [-webp-quality=value (quality of webp output; only applies when using -lossy-webp)] (defaults to 0.9) (min = 0, max = 1)
    • [-epoch=a unix timestamp (in seconds; defaults to current time)] (defaults to 1786310856)
    • [-threads=number of threads (defaults to number of cores on this system)] (defaults to 16)
    • [-reg='/path/to/registries' (defaults to value of ZVCR_CLI_MINECRAFT_REGISTRIES_PATH environment variable)]
    • [-biome-blending-foliage]
    • [-biome-blend-radius-foliage=value] (defaults to 1) (min = 1, max = 16)
    • [-biome-blending-water]
    • [-biome-blend-radius-water=value] (defaults to 2) (min = 1, max = 16)
    • [-transparent-liquids] (defaults to true)
    • [-water-opacity=value] (defaults to 0.75) (min = 0, max = 1)
    • [-water-opacity=value] (defaults to 0.9) (min = 0, max = 1)
    • [-transparent-glass] (defaults to true)
    • [-water-opacity=value] (defaults to 0.25) (min = 0, max = 1)
    • [-shade] (defaults to true)
    • [-light-source-angle=value (measured in degrees; controls the shading/lighting direction)] (defaults to 90) (min = 0, max = 360)
    • [-shading-contrast=value] (defaults to 0.25) (min = 0, max = 1)
    • [-shading-threshold-low=value (lighting multiplier for shadows)] (defaults to 0.6)
    • [-shading-threshold-high=value (lighting multiplier for highlights)] (defaults to 1.4)
    • [-liquid-noise]
    • [-liquid-noise-threshold-low=value (lighting multiplier for liquid noise (low))] (defaults to 0.94)
    • [-liquid-noise-threshold-high=value (lighting multiplier for liquid noise (high))] (defaults to 1.06)
    • [-default-layers (include default layers (see below))] (defaults to true)
    • [-normal (renders the world from above into a single layer. defaults to true for single renders (overworld & end))]
    • [-normal-default-color={#RRGGBB/#RRGGBBAA/R,G,B/R,G,B,A/named_color}] (defaults to black)
    • [-normal-filename='value']
    • [-sky (selectively renders the sky layer as an overlay with transparency. defaults to true for tiled images (overworld & end))]
    • [-sky-default-color={#RRGGBB/#RRGGBBAA/R,G,B/R,G,B,A/named_color}] (defaults to transparent)
    • [-sky-filename='value']
    • [-surface (selectively renders the surface layer as a base image to overlay the sky on top of. defaults to true for tiled images (overworld & end))]
    • [-surface-default-color={#RRGGBB/#RRGGBBAA/R,G,B/R,G,B,A/named_color}] (defaults to black)
    • [-surface-filename='value']
    • [-caves (selectively renders the caves layer of the world underground. defaults to true for single renders and tiled images (nether))]
    • [-caves-default-color={#RRGGBB/#RRGGBBAA/R,G,B/R,G,B,A/named_color} (defaults to black in overworld & end, the color of netherrack in nether)]
    • [-caves-filename='value']
    • [-normal-heightmap (renders a heightmap of the normal layer)]
    • [-normal-heightmap-default-color={#RRGGBB/#RRGGBBAA/R,G,B/R,G,B,A/named_color}] (defaults to black)
    • [-normal-heightmap-filename='value']
    • [-sky-heightmap (renders a heightmap of the sky layer)]
    • [-sky-heightmap-default-color={#RRGGBB/#RRGGBBAA/R,G,B/R,G,B,A/named_color}] (defaults to black)
    • [-sky-heightmap-filename='value']
    • [-surface-heightmap (renders a heightmap of the surface layer)]
    • [-surface-heightmap-default-color={#RRGGBB/#RRGGBBAA/R,G,B/R,G,B,A/named_color}] (defaults to black)
    • [-surface-heightmap-filename='value']
    • [-caves-heightmap (renders a heightmap of the caves layer)]
    • [-caves-heightmap-default-color={#RRGGBB/#RRGGBBAA/R,G,B/R,G,B,A/named_color}] (defaults to black)
    • [-caves-heightmap-filename='value']
    • [-new-chunks (selectively renders a new chunks overlay layer. defaults to true for tiled images)]
    • [-new-chunk-color={#RRGGBB/#RRGGBBAA/R,G,B/R,G,B,A/named_color}] (defaults to red)
    • [-old-chunk-color={#RRGGBB/#RRGGBBAA/R,G,B/R,G,B,A/named_color}] (defaults to transparent)
    • [-new-chunks-filename='value']
    • [-web-filenames (use filenames compatible with the 2b2t.place website. only applies when using tiled images)] (defaults to true)

Level-dat

  • -level-dat: Creates a level.dat file with custom parameters in a Minecraft world folder
    • -path='/path/to/minecraft-world-folder'
    • [-name='name of the world' (defaults to name of the world folder)]
    • [-spawn-dim={overworld/nether/end}]
    • [-spawn-pos=x,y,z] (defaults to 0, 0, 0)
    • -reg='/path/to/registries' (defaults to value of ZVCR_CLI_MINECRAFT_REGISTRIES_PATH environment variable)

Building the CLI from Source

Note: Windows is currently not officially supported. It will probably compile, however no guarantees are made on functionality.

This project is written in C++23 and uses CMake.

Dependencies

  • Boost Iostreams

Clone & Build

git clone https://github.com/2b2tplace/zvcr_utils.git
cd zvcr_utils

# choosing clang in this example. you may choose a different compiler if you need
cmake -S . -B build -DCMAKE_BUILD_TYPE=Release -DCMAKE_C_COMPILER=clang -DCMAKE_CXX_COMPILER=clang++

# executable should appear at ./build/zvcr
cmake --build build --target zvcr_cli --parallel

Include it in your project

Add the following to your CMakeLists.txt:

include(FetchContent)

FetchContent_Declare(zvcr_utils
        GIT_REPOSITORY https://github.com/2b2tplace/zvcr_utils.git
        GIT_TAG main
        GIT_PROGRESS TRUE
        GIT_SHALLOW TRUE
)
FetchContent_MakeAvailable(zvcr_utils)
target_link_libraries(my_project
        PRIVATE zvcr_utils
)

About

Core command line utility and library for the ZVCR file format (conversion utilities between zvcr and mca, merge, render, upgrade, datamining utilities)

Resources

Readme
LGPL-3.0 license
Activity
Custom properties

Stars

3 stars

Watchers

0 watching

Forks

0 forks
Report repository

Releases

Packages

Contributors

Languages

You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.