It takes an entire world save folder from minecraft and imports it into minetest with the only restriction being the +/-31k node limit in each direction of minetest (and I haven't found any worlds that big)
Please note this is not the same as the identically named mcimport at: https://forum.minetest.net/viewtopic.php?f=9&t=4445, which is a lua script for running within a pre-generated world, and is limited to classic minecraft maps and a small import size due to apparent lua memory management glitches.
Since mcimport isn't documented elsewhere, here are some notes:-
mcimport is run from the command line with:-
- Code: Select all
python3 mcimport.py ~/.minecraft/saves/mcImportName ~/.minetest/worlds/mtOutputName
The minecraft world can be saved anywhere (eg ~/.minetest/worlds/mcworlds)
NB 'blocks saved' progress refers to sections/chunks of 16x16x16 (= 4096) nodes...
I have created a mod (WIP) which will display all the blocks and will hopefully largely duplicate the function of minecraft blocks. For further documention on this (which supersedes much of the following), see:-
https://forum.minetest.net/viewtopic.php?f=9&t=11448
Alternatively if you want to use native minetest mods the following will provide a start (but the conversion with this is by no means completed). This mod also includes a generateCommandLine.py script which will (with a little editing on your part) generate the command lines required to automatically convert and copy the converted world.
(Or if you prefer doing it manually and want to convert multiple worlds (eg overnight) on linux put a semi-colon (;) after the command and then repeat it with edits for the next world.)
You will need to manually create the output directory before running the script
You will need to copy the file
world.mt, which contains the text:-
- Code: Select all
gameid = minetest
backend = sqlite3
load_mod_moretrees = true
load_mod_nether = true
load_mod_quartz = true
load_mod_plants_lib = true
load_mod_bushes_classic = true
load_mod_flowers_plus = true
load_mod_junglegrass = true
load_mod_poisonivy = true
load_mod_moreblocks = true
The conversion works better if the following mods are enabled:
moretrees (depends: plantlife), nether, quartz
MoreTrees: https://forum.minetest.net/viewtopic.php?f=11&t=4394&hilit=moretrees; https://github.com/VanessaE/moretrees
PlantLife: https://forum.minetest.net/viewtopic.php?f=11&t=3898; https://github.com/VanessaE/plantlife_modpack
Nether: https://forum.minetest.net/viewtopic.php?id=5790; https://github.com/PilzAdam/nether
Quartz: https://forum.minetest.net/viewtopic.php?id=5682; https://github.com/4Evergreen4/quartz
Other minetest_game mods should be enabled automatically: default, farming, flowers, stairs, wool
There are amazing minecraft worlds to be downloaded from many sites, but for starters you could try
http://www.planetminecraft.com/resources/projects/
http://www.minecraftworldmap.com/browse
This is not part of the core code, but if you want to quickly create a batch script to convert a number of worlds, you can use the following script to generate the command lines to do it (it deletes any old conversion, makes the new folder, copies player priviledges and world settings, then converts and copies the conversion to the main directory (leaving the original as a backup), then repeats for all minecraft worlds in the directory):-
- Code: Select all
import os
srcDir='/home/david/.minetest/worlds/mcw'
for x in os.listdir(srcDir):
if os.path.isfile(x): pass
else:
if not(x.find('.zip')>0 or x.find('.rar')>0 or x.find('.txt')>0 or x.find('.mt')>0 or x.find('mcw/convert')>0):
print('rm -r \"/home/david/.minetest/worlds/mcw/convert/' + x + '\"')
print('mkdir \"/home/david/.minetest/worlds/mcw/convert/' + x + '\"')
print('cp \"/home/david/.minetest/worlds/mcw/world.mt\" \"/home/david/.minetest/worlds/mcw/convert/' + x + '\"')
print('cp \"/home/david/.minetest/worlds/mcw/auth.txt\" \"/home/david/.minetest/worlds/mcw/convert/' + x + '\"')
print('python3 mcimport.py \"/home/david/.minetest/worlds/mcw/' + x + '\" \"/home/david/.minetest/worlds/mcw/convert/' + x + '\"')
print('cp -r \"/home/david/.minetest/worlds/mcw/convert/' + x + '\" \"/home/david/.minetest/worlds/' + x + '\"')
print('')
As mcimport is much better than my attempt, I'm unlikely to work more on the mineblend conversion, but will leave it available for curiosity of others, so...
IGNORE THE FOLLOWING IT IS OUTDATED:-
This is the first stage of a python3 -based minecraft to minetest map converter.
STAGE 1 WORKING: Takes a map from minecraft and produces a list of all the blocks in the map
Because I've basically crippled a blender tool the code is a total mess.
The code is on github, and you would be extremely welcome to work on it. Most of the files are totally unnecessary, but I thought I'd aim to make it available as it is.
https://github.com/dgm3333/mc2mt
https://github.com/dgm3333/mc2mt/archive/master.zip
See my next post below for instructions.
I think you will need to install the demo version of minecraft (I don't know why, but it seems to be necessary)
I'm running it from Liclipse (as below), but you can run the code more simply with
- Code: Select all
python3 __init__.py
TODO:-
STAGE 2: convert from minecraft to minetest node type
Based around conversion code from https://forum.minetest.net/viewtopic.php?f=12&t=6007
STAGE 3: mash data into a minetest map format.
Breakdown here https://forum.minetest.net/viewtopic.php?f=47&t=11157