Go to file
AFCMS d0860510e4
Merge branch 'master' of github.com:AFCMS/MineClone2_MapArt
2022-02-15 12:13:01 +01:00
.github Create dependabot.yml 2022-01-28 23:27:52 +01:00
generate_json_blocks init 2021-11-19 14:46:37 +01:00
.editorconfig init 2021-11-19 14:46:37 +01:00
.gitattributes init 2021-11-19 14:46:37 +01:00
.gitignore add some files to `.gitignore` 2022-02-15 12:12:56 +01:00
.luacheckrc init 2021-11-19 14:46:37 +01:00
LICENSE Create LICENSE 2021-11-19 18:15:58 +01:00
README.md add screenshot 2021-11-19 17:18:50 +01:00
block_colors.json init 2021-11-19 14:46:37 +01:00
create_block_colors.py fixes 2021-11-19 16:57:49 +01:00
create_map.py remove img.show() 2021-11-19 19:47:02 +01:00
mypy.ini fix mypy issues 2021-11-19 17:55:57 +01:00
requirements.txt Bump pillow from 9.0.0 to 9.0.1 2022-02-03 17:33:53 +00:00
screenshot_1.png add screenshot 2021-11-19 17:18:50 +01:00
screenshot_2.png add screenshot 2021-11-19 17:18:50 +01:00
screenshot_3.png add 3de screenshot 2021-11-19 17:24:24 +01:00

README.md

MineClone2 MapArt

This is a python3 project you can use with the MineClone2 game for Minetest.

This project take an image and output a WorldEdit shematic featuring MineClone2 blocks that matched the colors of image the best.

Screenshot1

Screenshot2

Usage

Basic Use

First, clone this project on your computer:

git clone https://github.com/AFCMS/MineClone2_MapArt
cd ./MineClone2_MapArt

Make sure dependencies are installed:

pip install -r requirements.txt

Run the main script on an image:

python3 ./create_map.py path-to-image path-output

You will get a WorldEdit shematic at path-output.

Advanced Use

Regenerate generate_json_blocks/availlable_blocks.json and block_colors.json

These files may not be 100% up to date with MineClone2 master branch then you clone the repository, or you may want to use an old MineClone2 version.

In these cases, you will need to regenerate them:

First of all, you will need to update the list of survival-usable solid construction blocks:

Link the generate_json_blocks mod to the mods folder of your minetest installation. Then, create a world with the MineClone2 game, enable the mod on it and jaunch the game. The game should close after the media loading part. You should now notice that the availlable_blocks.json in the generate_json_blocks folder has changed.

Then, you should now calculate the average color of each texture of each availlable block:

Run the create_block_colors.py file with the path where MineClone2 is installed as param.

python3 create_block_colors.py /path-to-mineclone2

It should output something like that:

Finding files...
Files: 233

You should also notice that the block_colors.json file has been updated.

You can now convert images that will make use of the all new block_colors.json file.