Skip to content
This repository was archived by the owner on Mar 19, 2021. It is now read-only.
/ mcimage Public archive

Converts PIL images into *.mcfunction files that can be executed in-game.

License

Notifications You must be signed in to change notification settings

bneils/mcimage

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

27 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

mcimage

A robust Minecraft image converter that generates *.mcfunction files that are executed in-game (within data-packs). Images are limited to 256 colors and are dithered, as indexed images provide major speed boosts.

For all high resolution images due to in-game restrictions, it's required to scale the image, as each pixel is translated to a block in-game.

To use this, run 'py mcim.py' from the command-line and pass a file path to it. Optional arguments include --dest, --scale, --suppress, --orientation, and --compress.

Pros

  • Robust (due to paletted images and NumPy).
  • Omnidirection-ability.
  • Support for run-length encoding that has a modest compression ratio with an okay best-case scenario (about 5/2 on most trials). This is essentially useless since Minecraft's fill command won't work in unloaded chunks in large images.
  • Command-line and modular support.
  • Dithered images.
  • Force-loads chunks :(

Cons

  • Scar artifacts may appear in behemoth (horizontal) images due to chunks not loading in Minecraft. This can be fixed however, by not using the compression feature.
  • Minecraft has a bug in it where after reloading, it won't set the maxCommandChainLength (how many commands can run in a single function) and you have to run it twice for it to work.
  • Won't place a platform for falling blocks to rest on, so don't try making a floating image! (Might be patched later)

Here is a generated example: Example

About

Converts PIL images into *.mcfunction files that can be executed in-game.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages