Convert Minecraft maps to Minetest worlds

Loadable maps as opposed to OldCoder's zoomable maps
sofar
Member
 
Posts: 781
Joined: Fri Jan 16, 2015 07:31
GitHub: sofar
IRC: sofar
In-game: sofar

Convert Minecraft maps to Minetest worlds

by sofar » Mon Dec 07, 2015 00:31

The mcimport project provides a World Converter for whole Minecraft Maps (Minecraft saves) and the output is a new, playable Minetest world.

This project started out as a basic python converted written by Nore and dgm555. I've updated the project and have spent a lot of time making the conversion more and more complete ever since. We've merged the two projects into the minetest-tools organization as well.

The conversion is done as a single-step process that requires Python. Once the conversion is done, your world is ready to play! For large worlds, this process can take hours, even days if your world is huge.

Github:https://github.com/minetest-tools/mcimport
Download: https://github.com/minetest-tools/mcimport/archive/master.zip
Platform: Linux (others may work, but require extra software)
License: X11

Usage:
  1. Download the tarball from here: https://github.com/minetest-tools/mcimport/archive/master.zip
  2. Extract it
  3. Launch the converter

Or, to list the exact terminal commands, cut and paste the below text into a terminal:

Your phone or window isn't wide enough to display the code box. If it's a phone, try rotating it to landscape mode.
Code: Select all
wget https://github.com/sofar/mcimport/archive/master.zip
unzip master.zip
mcimport-master/mcimport.sh


Minecraft Test Patterns:

Image

Converted Result:

Image



I'm doing things a bit differently though - my focus isn't to "copy exact", but to create a playable, approximation of the MC world.

So I expect that things like doors, beds, furnaces just work, and blocks are useful and usable. But blocks that have no purpose or don't exist in minetest are removed or replaced with equivalents that make sense in MT gameplay. Rotation of blocks is carefully done and verified.

- emerald ore is converted to stone
- redstone is as much possible converted to mese, with working pressure plates, wires, noteblocks, buttons, levers and a few more things

When you convert a MC savegame or world, it's expected to be in MC 1.11 format. I'm not supporting old formats. The code also writes a few extra files needed to make it all play nice with mapgen, mainly fixing the waterlevel and allowing you to tweak mapgen to single node easily. Note: The map now correctly leaves North in MC as North in MT (effectively changing coordinates for Every Block).

Mods: lots of mods required - none strange or obtuse, or hard to find mods, these are all very COMMON mods that most servers have, and most of them are contained within biomes_lib, plantlife, mesecons, moretrees, moreblocks, nether, flowerpot and nether mods already (and a few others on top of that). A script exists to help you download all the needed mods.

The converter creates all the required config files in the world folder, and the world should be playable without any extra configuration afterwards. You may however wish to tweak the mapgen parameters before loading the world for the first time in the minetest game. Currently, all mapgen will be disabled to prevent overwriting of the world content by mapgen.

To download all the required mods, a script is written in the world folder called get-mods.sh. Running this script will automatically get the correct mods and their latest versions for your converted world.

Fixerol wrote:Basically they are those mods:
Biomes_lib - viewtopic.php?f=11&t=12999
Plantlife - viewtopic.php?f=11&t=3898
Home Decor - viewtopic.php?f=11&t=2041
Mesecons - viewtopic.php?f=11&t=628
Moreblocks - viewtopic.php?id=509
Nether* - viewtopic.php?f=11&t=5790
Quartz - viewtopic.php?f=11&t=5682


I have a forked Nether mod in my github to add various nether brick blocks, but not very many people seem to be converting nether worlds, so you'll likely be fine without that.

You do not need to modify world.mt since the code writes out a perfectly usable version with the mod list. You just need to download these mods and install them in your mods folder. Please use the provided get-mods.sh script for this purpose - you'll find it in the written world folder.

Conversion can be slow! A 6000x6000 MC world on my system takes ~ 8 hours. Even my test map (500x500 nodes) takes 2 minutes or so without pruning the map.

This program requires Zenity and Python3. These are widely available for Linux in most distributions, but may not be available on other platforms.
Last edited by sofar on Thu Feb 23, 2017 08:43, edited 17 times in total.
 

Morn76
Member
 
Posts: 640
Joined: Sun Feb 16, 2014 19:45
GitHub: mdoege

Re: Convert whole Minecraft maps

by Morn76 » Sun Jan 17, 2016 20:36

Excellent, thanks! This is so much faster than converting maps with WorldEdit like I did before. Yay, Python! :-)

Maybe the script should also add map_meta.txt with "mg_name = singlenode"; otherwise the MT mapgen destroys the converted map immediately.
 

sofar
Member
 
Posts: 781
Joined: Fri Jan 16, 2015 07:31
GitHub: sofar
IRC: sofar
In-game: sofar

Re: Convert whole Minecraft maps

by sofar » Sun Jan 17, 2016 20:55

Morn76 wrote:Excellent, thanks! This is so much faster than converting maps with WorldEdit like I did before. Yay, Python! :-)

Maybe the script should also add map_meta.txt with "mg_name = singlenode"; otherwise the MT mapgen destroys the converted map immediately.


It creates a worldmod file that has the option of doing this:

https://github.com/sofar/mcimport/blob/master/mcimport.py#L70

All you have to do is uncomment it. I suppose that should just be the default ...
 

Morn76
Member
 
Posts: 640
Joined: Sun Feb 16, 2014 19:45
GitHub: mdoege

Re: Convert whole Minecraft maps

by Morn76 » Mon Jan 18, 2016 00:39

Yes, I saw your mention of singlenode in the first post after I posted myself. But I agree, singlenode should be the default.
 

sofar
Member
 
Posts: 781
Joined: Fri Jan 16, 2015 07:31
GitHub: sofar
IRC: sofar
In-game: sofar

Re: Convert whole Minecraft maps

by sofar » Mon Jan 18, 2016 01:29

Morn76 wrote:Yes, I saw your mention of singlenode in the first post after I posted myself. But I agree, singlenode should be the default.


yep, I just pushed a change to do just that.
 

Morn76
Member
 
Posts: 640
Joined: Sun Feb 16, 2014 19:45
GitHub: mdoege

Re: Convert whole Minecraft maps

by Morn76 » Mon Jan 18, 2016 10:48

sofar wrote:yep, I just pushed a change to do just that.

Thanks!
 

OmniStudent
Member
 
Posts: 261
Joined: Sat Nov 03, 2012 06:40

Re: Convert whole Minecraft maps

by OmniStudent » Thu Jan 21, 2016 05:43

Neat!
 

sofar
Member
 
Posts: 781
Joined: Fri Jan 16, 2015 07:31
GitHub: sofar
IRC: sofar
In-game: sofar

Re: Convert whole Minecraft maps

by sofar » Thu Jan 21, 2016 06:37

Please post some before-and-after conversion screenshots folks!
 

Morn76
Member
 
Posts: 640
Joined: Sun Feb 16, 2014 19:45
GitHub: mdoege

Re: Convert whole Minecraft maps

by Morn76 » Thu Jan 21, 2016 11:19

sofar wrote:Please post some before-and-after conversion screenshots folks!


MC:

Image

MT:

Image

Looks like the MT mods decided to plant some extra trees on the mountain. Oh well… :-)

Map download:
https://forum.minetest.net/viewtopic.php?f=12&t=13910
 

sofar
Member
 
Posts: 781
Joined: Fri Jan 16, 2015 07:31
GitHub: sofar
IRC: sofar
In-game: sofar

Re: Convert whole Minecraft maps

by sofar » Thu Jan 21, 2016 15:19

yes, you can get rid of them, though. I'll also have a better birch variant now that Aspen have landed in minetest_game.
 

Morn76
Member
 
Posts: 640
Joined: Sun Feb 16, 2014 19:45
GitHub: mdoege

Re: Convert whole Minecraft maps

by Morn76 » Thu Jan 21, 2016 16:07

sofar wrote:yes, you can get rid of them, though. I'll also have a better birch variant now that Aspen have landed in minetest_game.

Maybe new trees should also be disabled by default in moretrees_settings.txt. Try to keep things as they are in the original MC map as much as possible when converting.
 

sofar
Member
 
Posts: 781
Joined: Fri Jan 16, 2015 07:31
GitHub: sofar
IRC: sofar
In-game: sofar

Re: Convert whole Minecraft maps

by sofar » Thu Jan 21, 2016 16:38

Actually moretrees is now optional, so I should remove it from the mod list.
 

sofar
Member
 
Posts: 781
Joined: Fri Jan 16, 2015 07:31
GitHub: sofar
IRC: sofar
In-game: sofar

Re: Convert whole Minecraft maps

by sofar » Mon Jan 25, 2016 06:40

Moretrees is now disabled.

I will change the code to use Aspen trees soon. That means that people need to use the latest git version of minetest_game to use this conversion.
 

dgm5555
Member
 
Posts: 244
Joined: Tue Apr 08, 2014 19:45

Re: Convert whole Minecraft maps

by dgm5555 » Sun Jan 31, 2016 15:56

I haven't been playing or coding minetest for some time, but was looking at the converter out of curiosity.
I presume you found the mcblocks mod which means you don't need many of the minetest mods...
However from other posts I think you really want the extra function of minetest blocks, so perhaps this isn't helpful...
https://forum.minetest.net/viewtopic.php?f=9&t=11448
Cheers
David
 

sofar
Member
 
Posts: 781
Joined: Fri Jan 16, 2015 07:31
GitHub: sofar
IRC: sofar
In-game: sofar

Re: Convert whole Minecraft maps

by sofar » Sun Jan 31, 2016 22:16

dgm5555 wrote:I haven't been playing or coding minetest for some time, but was looking at the converter out of curiosity.
I presume you found the mcblocks mod which means you don't need many of the minetest mods...
However from other posts I think you really want the extra function of minetest blocks, so perhaps this isn't helpful...
https://forum.minetest.net/viewtopic.php?f=9&t=11448
Cheers
David


Right, I did find mcblocks but I wanted to focus on bringing functional minetest equivalents (convert, not e.g. translate), instead of that. The list is not that long, and there's also a script now which will fetch all the required mods for the converted world all at once.

The code has been working well, though ;^)
 

Sokomine
Member
 
Posts: 2980
Joined: Sun Sep 09, 2012 17:31

Re: Convert whole Minecraft maps

by Sokomine » Sat Mar 12, 2016 22:15

sofar wrote:Right, I did find mcblocks but I wanted to focus on bringing functional minetest equivalents (convert, not e.g. translate), instead of that. The list is not that long, and there's also a script now which will fetch all the required mods for the converted world all at once.

My own mccompat mod works more like mcblocks as well. It would be of intrest how many nodes I forgot :-) Would it be possible to make your test pattern available as a MC .schematic file?

There's also the problem with flowing liquids that's illustrated in Morn76's screenshots. I wonder if there's a way around that.
A list of my mods can be found here.
 

User avatar
RHR
Member
 
Posts: 214
Joined: Mon Jan 27, 2014 20:07
GitHub: RHRhino

Re: Convert whole Minecraft maps

by RHR » Sat Mar 12, 2016 22:51

I tried to convert my MC world to MT, but it seems to fail. =(

Your phone or window isn't wide enough to display the code box. If it's a phone, try rotating it to landscape mode.
Code: Select all
Traceback (most recent call last):
  File "C:\Users\Username\Downloads\mcimport\mcimport.py", line 113, in <module>
    nimap, ct = content.read_content(["NETHER", "QUARTZ"])
  File "C:\Users\Username\Downloads\mcimport\content.py", line 37, in read_content
    with open("map_content.txt", "r") as f:
FileNotFoundError: [Errno 2] No such file or directory: 'map_content.txt'
 

sofar
Member
 
Posts: 781
Joined: Fri Jan 16, 2015 07:31
GitHub: sofar
IRC: sofar
In-game: sofar

Re: Convert whole Minecraft maps

by sofar » Sat Mar 12, 2016 23:09

Make sure you execute it from within the mcimport folder.
 

User avatar
RHR
Member
 
Posts: 214
Joined: Mon Jan 27, 2014 20:07
GitHub: RHRhino

Re: Convert whole Minecraft maps

by RHR » Sat Mar 12, 2016 23:32

sofar wrote:Make sure you execute it from within the mcimport folder.

Hmm I'm not sure what I'm doing wrong. =(
I've downloaded and extracted mcimport and all mods and renamed them correctly. The mods are in the worldmods folder in the MT path. "New World" is the MC world. Both world folders MT and MC and all mods are inside mcimport. It still keeps the same error. Could it maybe be the problem that I use the latest MC version 1.9 instead of 1.8?

Your phone or window isn't wide enough to display the code box. If it's a phone, try rotating it to landscape mode.
Code: Select all
C:\Users\Username>C:\Users\Username\Downloads\mcimport\mcimport.py C:\Users\Username\Downloads\mcimport\NewWorld C:\Users\Username\Downloads\mcimport\MT
Traceback (most recent call last):
  File "C:\Users\Username\Downloads\mcimport\mcimport.py", line 113, in <module>
    nimap, ct = content.read_content(["NETHER", "QUARTZ"])
  File "C:\Users\Username\Downloads\mcimport\content.py", line 37, in read_content
    with open("map_content.txt", "r") as f:
FileNotFoundError: [Errno 2] No such file or directory: 'map_content.txt'
 

sofar
Member
 
Posts: 781
Joined: Fri Jan 16, 2015 07:31
GitHub: sofar
IRC: sofar
In-game: sofar

Re: Convert whole Minecraft maps

by sofar » Sat Mar 12, 2016 23:41

RHR wrote:
sofar wrote:Make sure you execute it from within the mcimport folder.

Hmm I'm not sure what I'm doing wrong. =(
I've downloaded and extracted mcimport and all mods and renamed them correctly. The mods are in the worldmods folder in the MT path. "New World" is the MC world. Both world folders MT and MC and all mods are inside mcimport. It still keeps the same error. Could it maybe be the problem that I use the latest MC version 1.9 instead of 1.8?

Your phone or window isn't wide enough to display the code box. If it's a phone, try rotating it to landscape mode.
Code: Select all
C:\Users\Username>C:\Users\Username\Downloads\mcimport\mcimport.py C:\Users\Username\Downloads\mcimport\NewWorld C:\Users\Username\Downloads\mcimport\MT
Traceback (most recent call last):
  File "C:\Users\Username\Downloads\mcimport\mcimport.py", line 113, in <module>
    nimap, ct = content.read_content(["NETHER", "QUARTZ"])
  File "C:\Users\Username\Downloads\mcimport\content.py", line 37, in read_content
    with open("map_content.txt", "r") as f:
FileNotFoundError: [Errno 2] No such file or directory: 'map_content.txt'



`cd` to the folder with map_content.txt first.
 

User avatar
RHR
Member
 
Posts: 214
Joined: Mon Jan 27, 2014 20:07
GitHub: RHRhino

Re: Convert whole Minecraft maps

by RHR » Sat Mar 12, 2016 23:58

omg of course ... |-___-|

Thx, it seems to work, although right now it only prints unknown blocks. I guess I'll see the result tomorrow morning. I'm already curious about it. ;p
 

sofar
Member
 
Posts: 781
Joined: Fri Jan 16, 2015 07:31
GitHub: sofar
IRC: sofar
In-game: sofar

Re: Convert whole Minecraft maps

by sofar » Sun Mar 13, 2016 00:39

RHR wrote:omg of course ... |-___-|

Thx, it seems to work, although right now it only prints unknown blocks. I guess I'll see the result tomorrow morning. I'm already curious about it. ;p


Share some screenshots with us. And, of course, let us know the result :)
 

User avatar
RHR
Member
 
Posts: 214
Joined: Mon Jan 27, 2014 20:07
GitHub: RHRhino

Re: Convert whole Minecraft maps

by RHR » Sun Mar 13, 2016 09:43

Hey sofar,
I'm very satisfied with the result of mcimport. Most stuff got converted without problems, as you will see in the following pictures. The biggest problem for me are the missing mesa blocks, because I build a lot with them and these buildings are missing or there are just parts of it on the converted map.
I think took around 3 hours to convert the map. The MT map.sqlite has a size of around 70mb.
Image
Image
Image
Image
Image
Last edited by RHR on Sun Mar 13, 2016 22:44, edited 1 time in total.
 

sofar
Member
 
Posts: 781
Joined: Fri Jan 16, 2015 07:31
GitHub: sofar
IRC: sofar
In-game: sofar

Re: Convert whole Minecraft maps

by sofar » Sun Mar 13, 2016 22:35

None of the images work - please upload them to imgur and post the links to them instead.
 

User avatar
RHR
Member
 
Posts: 214
Joined: Mon Jan 27, 2014 20:07
GitHub: RHRhino

Re: Convert whole Minecraft maps

by RHR » Sun Mar 13, 2016 22:46

Hmm strange...
I uploaded them again. If they still don't work, here is the link to the album on imgur:
album
 

sofar
Member
 
Posts: 781
Joined: Fri Jan 16, 2015 07:31
GitHub: sofar
IRC: sofar
In-game: sofar

Re: Convert whole Minecraft maps

by sofar » Sun Mar 13, 2016 22:55

now it works, how strange indeed!.

Great screenshots, thanks for sharing!

Please consider filing an issue for the missing mesa blocks, perhaps we can find a suitable replacement mod for those nodes.
 

User avatar
Nathan.S
Member
 
Posts: 679
Joined: Wed Sep 24, 2014 17:47
GitHub: NathanSalapat
IRC: NathanS21
In-game: NathanS21

Re: Convert whole Minecraft maps

by Nathan.S » Mon Mar 14, 2016 02:21

Images all seem to be working for me.
I record Minetest videos, Mod reviews, Modding tutorials, and Lets plays.
Check out my website.
 

Morn76
Member
 
Posts: 640
Joined: Sun Feb 16, 2014 19:45
GitHub: mdoege

Re: Convert whole Minecraft maps

by Morn76 » Mon Mar 14, 2016 14:29

Several hardened clay mods already exist for MT, e.g. https://github.com/mdoege/stampy_game/t ... rdenedclay

So you could just rebuild the missing buildings in MT.
 

sofar
Member
 
Posts: 781
Joined: Fri Jan 16, 2015 07:31
GitHub: sofar
IRC: sofar
In-game: sofar

Re: Convert whole Minecraft maps

by sofar » Mon Mar 14, 2016 14:47

Morn76 wrote:Several hardened clay mods already exist for MT, e.g. https://github.com/mdoege/stampy_game/t ... rdenedclay

So you could just rebuild the missing buildings in MT.


meh, that one has 32px textures... I strongly prefer keeping it 16px by default.
 

Morn76
Member
 
Posts: 640
Joined: Sun Feb 16, 2014 19:45
GitHub: mdoege

Re: Convert whole Minecraft maps

by Morn76 » Mon Mar 14, 2016 16:18

sofar wrote:
Morn76 wrote:Several hardened clay mods already exist for MT, e.g. https://github.com/mdoege/stampy_game/t ... rdenedclay

So you could just rebuild the missing buildings in MT.


meh, that one has 32px textures... I strongly prefer keeping it 16px by default.

Yes, those are from MC Faithful, so for licensing reasons you would need to use different textures.

I think my main change to the existing mod was to simplify the code and make the colors MC-compatible (i.e. add light blue or whatever MT is always missing compared to MC).
 

Next

Return to Minetest Maps

Who is online

Users browsing this forum: No registered users and 2 guests

cron