Convert Minecraft maps to Minetest worlds

User avatar
Diamond00744
New member
 
Posts: 1
Joined: Sun Oct 01, 2017 08:26
Location: Russia
GitHub: diamond00744
IRC: Diamond00744
In-game: Diamond00744

Re: Convert Minecraft maps to Minetest worlds

by Diamond00744 » Sun Oct 01, 2017 10:40

Successfully tested latest script on Windows.
Just installed Python 3, moved Minecraft's world in script directory and executed:
Code: Select all
python mcimport.py world out

Thank you so much for this!
Noted problems with Iron bar:
Image
Wood fence work normally. Will try install mods.
Upd: installed Nether mod, got glowstones. Can I rebuild lightmap from glowstones which was there before?
Comparsion:
Image
Image
 

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

Re: Convert Minecraft maps to Minetest worlds

by sofar » Sun Oct 01, 2017 19:22

use `/fixlight (x,y,z) (x,y,z) to fix light in a certain region. It's almost impossible to automatically fix light.
 

MysticTempest
Member
 
Posts: 32
Joined: Sun Jul 16, 2017 01:20
GitHub: MysticTempest

Re: Convert Minecraft maps to Minetest worlds

by MysticTempest » Mon Nov 20, 2017 07:08

Hey,

First off, big thanks to all of you who worked on this really fantastic tool!
I've been using it to play around in some converted worlds, and it's pretty nice!

Secondly, I recently found a bit of a hacky workaround for the iron bars/glass panes issues.
Modifying them to the following in mcimport will allow the xpanes mod to take over, & auto-connect/rotate them for the most part:

https://github.com/minetest-tools/mcimport/blob/9de6d0bd3aa105ab1c1d1f5661d60628ce971d1d/map_content.txt#L498
Code: Select all
101   xpanes:bar
102   xpanes:pane



However, there's a small issue with gaps in certain spots. I know it's fixable by adding some groups to this part of the xpanes code. (Crumbly as an example below, but more can be added to fill the gaps.)

https://github.com/minetest/minetest_game/blob/a2d7678ffd532dd82dcaa108eac3dace61ac94a2/mods/xpanes/init.lua#L139
Code: Select all
connects_to = {"group:pane", "group:stone", "group:glass", "group:wood", "group:tree", "group:crumbly" },



I'm not much of a coder though, and I was curious if there was a way to get mcimport to make this modification for the user?
As opposed to doing it manually; or forking xpanes with modifications & making it one of the worldmods needed.


Here's 2 previews. The first shows the workaround by itself. And the second, has the workaround + "group:crumbly" added to the 'connects_to' line in the xpanes mod. Just to show how it looks.

Image
Attachments
xpanesmcimportedits.png
(487.92 KiB) Not downloaded yet
 

User avatar
AccidentallyRhine
Member
 
Posts: 229
Joined: Sun Aug 02, 2015 05:43

Re: Convert Minecraft maps to Minetest worlds

by AccidentallyRhine » Wed Nov 22, 2017 03:55

Can this tool handle conversion of matchless MC blocks to MT unknown nodes? Or better yet, to air nodes? I do not plan to use some of the listed mods from my conversion and would prefer to replace by hand the nodes which do not have a MT mod equivalent.

Or maybe I'll take a look through your script and see if it would be trivial to replace home-decor/moreblocks with xdecor.

Edit: Hmmm there should be some structures... maybe I'll try a non-flat map?

Image
 

MysticTempest
Member
 
Posts: 32
Joined: Sun Jul 16, 2017 01:20
GitHub: MysticTempest

Re: Convert Minecraft maps to Minetest worlds

by MysticTempest » Wed Nov 22, 2017 14:45

AccidentallyRhine wrote:Can this tool handle conversion of matchless MC blocks to MT unknown nodes? Or better yet, to air nodes? I do not plan to use some of the listed mods from my conversion and would prefer to replace by hand the nodes which do not have a MT mod equivalent.

Or maybe I'll take a look through your script and see if it would be trivial to replace home-decor/moreblocks with xdecor.

Edit: Hmmm there should be some structures... maybe I'll try a non-flat map?

Yea, it won't bother converting unknown nodes. Check out the 'map_content.txt' file for the nodes it uses to convert. You can customize it beforehand to your liking; especially if you're going to hand-select the mods you want to use. That way you can make conversion a bit easier for yourself.

In terms of spawning where there's nothing; yea, I've been there. You need to grab the coordinates from Minecraft, as you don't spawn in Minetest where you saved in Minecraft. You'll need to teleport to the coordinates, except; invert the 'Z' axis coordinate. With unlimited view distance, and the right coordinates, you should be able to find the area you're looking for with a little bit of flying around.
 

User avatar
AccidentallyRhine
Member
 
Posts: 229
Joined: Sun Aug 02, 2015 05:43

Re: Convert Minecraft maps to Minetest worlds

by AccidentallyRhine » Wed Nov 22, 2017 20:33

Thanks for the tips. All seems to be working well, good work Sofar. I use to run some MC servers a while back and there are things I am trying to preserve long term. I equate it to converting old .doc to .odt. Things can still use a bit of tweaking (doors -> doors which are in the base game) so I will go play around with that map_content.txt.

Image

Image

Image
 

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

Re: Convert Minecraft maps to Minetest worlds

by sofar » Wed Nov 22, 2017 23:27

AccidentallyRhine wrote:Thanks for the tips. All seems to be working well, good work Sofar. I use to run some MC servers a while back and there are things I am trying to preserve long term. I equate it to converting old .doc to .odt. Things can still use a bit of tweaking (doors -> doors which are in the base game) so I will go play around with that map_content.txt.


This is most likely due to your MC save being from an older or too new MC version. The doors from v1.8 are supported and convert properly, other versions are just not tested as I'm working on other projects.
 

MysticTempest
Member
 
Posts: 32
Joined: Sun Jul 16, 2017 01:20
GitHub: MysticTempest

Re: Convert Minecraft maps to Minetest worlds

by MysticTempest » Fri Nov 24, 2017 04:46

AccidentallyRhine wrote:Thanks for the tips. All seems to be working well, good work Sofar. I use to run some MC servers a while back and there are things I am trying to preserve long term. I equate it to converting old .doc to .odt. Things can still use a bit of tweaking (doors -> doors which are in the base game) so I will go play around with that map_content.txt.


Ah, the door issue. Yea, that's due to Minetest Game getting some upgraded doors a while back.
Attached below is a copy of the older door mod taken from here: https://github.com/minetest/minetest_ga ... tag/0.4.10

If you stick that version of the 'doors' mod into the 'worldmods' folder inside your converted world folder; it'll fix that issue.


Though, I'd also recommend checking out Wuzzy's MineClone 2 sub-game: viewtopic.php?f=50&t=16407
I've been working on a fork of mcimport specifically for that sub-game: https://github.com/MysticTempest/mcimpo ... MineClone2

They're both a WIP, but it's coming along nicely. And, at the very least; is an alternative to try.

Preview of a converted test map using the MineClone2 sub-game, and my fork of mcimport:
https://imgur.com/9gehP7a
Attachments
doors.zip
(36.6 KiB) Downloaded 18 times
 

User avatar
AccidentallyRhine
Member
 
Posts: 229
Joined: Sun Aug 02, 2015 05:43

Re: Convert Minecraft maps to Minetest worlds

by AccidentallyRhine » Fri Nov 24, 2017 05:45

I did check out MineClone 2. Very well done, however only maintained by a single individual which introduces risk of it falling out of support.

My goal with this tool was only to use it to translate MC to Vanilla MT as much as possible. By that I mean: rely on 3rd party mods (which are relatively volatile) as little as possible.

And so I edited map_content.txt as follows:

- Quartz --> Silversand Stone
- Nether brick --> Desert Cobble
- Lapis Lazuli --> Blue Wool
- Sponge --> Coral
- Vines --> Ivy (Ivy is already in xdecor, I don't know why sofar used a specialized vines mod)
- Various woods --> default:<minetest woods> (Again, I don't know why this required moretrees)
- Emerald --> Tin
- Potted plants --> xdecor:<plants> (Once again, already in xdecor)
... some various others I cannot recall.

^^^ all reducing the need for fleeting 3rd party mods down to just: Mesecons, xdecor and crops - all of which are very well maintained and have been around for a while. I think some are even in the Minetest-mods github. I honestly cannot wait for some very basic functionality to get pulled into Minetest Game, why oh why do we still need playeranim?

Here is my copy of map_content.txt for anyone else who wants as-vanilla-as-possible map conversions:
Attachments
map_content.txt.zip
(5.03 KiB) Downloaded 27 times
 

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

Re: Convert Minecraft maps to Minetest worlds

by sofar » Fri Nov 24, 2017 06:25

AccidentallyRhine wrote:I did check out MineClone 2. Very well done, however only maintained by a single individual which introduces risk of it falling out of support.

My goal with this tool was only to use it to translate MC to Vanilla MT as much as possible. By that I mean: rely on 3rd party mods (which are relatively volatile) as little as possible.

And so I edited map_content.txt as follows:

- Quartz --> Silversand Stone
- Nether brick --> Desert Cobble
- Lapis Lazuli --> Blue Wool
- Sponge --> Coral
- Vines --> Ivy (Ivy is already in xdecor, I don't know why sofar used a specialized vines mod)
- Various woods --> default:<minetest woods> (Again, I don't know why this required moretrees)
- Emerald --> Tin
- Potted plants --> xdecor:<plants> (Once again, already in xdecor)
... some various others I cannot recall.

^^^ all reducing the need for fleeting 3rd party mods down to just: Mesecons, xdecor and crops - all of which are very well maintained and have been around for a while. I think some are even in the Minetest-mods github. I honestly cannot wait for some very basic functionality to get pulled into Minetest Game, why oh why do we still need playeranim?

Here is my copy of map_content.txt for anyone else who wants as-vanilla-as-possible map conversions:


Some of the map choices are simply historical (vines), some are aestetic. For instance, the xdecor potted plants only offer 4 or so variants, and they largely vary in style too much imho, which is why I ended up with `flowerpots` instead.

Xdecor's vines are probably a fine replacement, but I wouldn't remove quartz and nether brick, that's just not a fair replacement especially when people may be converting maps where they have spent a lot of time building with those materials (did you actually make desert cobble fences?) and so they'd end up with a broken conversion.

As you said in your initial paragraphs, a lot of people aren't interested in a 1:1 conversion but want a functional MT equivalent, hence this is why I don't maintain a branch or version that converts to MCL2. But I do think it should remain relatively complete, so lapis and quartz should stay.

BTW all of mesesons, xdecor and crops are in minetest-mods.
 

User avatar
AccidentallyRhine
Member
 
Posts: 229
Joined: Sun Aug 02, 2015 05:43

Re: Convert Minecraft maps to Minetest worlds

by AccidentallyRhine » Sun Nov 26, 2017 01:22

Our approaches to replacing nodes simply have different goals in mind. Many of the worlds I have been converting are from old Minecraft servers (Beta 1.5-release1.3~) so they don't even have vines or quartz. It has truly been a joy revisiting these old worlds thanks to your work.

Image
 

larajtekno
Member
 
Posts: 11
Joined: Wed Dec 13, 2017 09:48
Location: Saint Étienne

Re: Convert Minecraft maps to Minetest worlds

by larajtekno » Mon Feb 05, 2018 19:45

Hello,I try in vain for a few days, to convert a map to be able to use it in Minetest. My O.S. is windows 10, I tried mcedit without success.
Is there somewhere, a tutorial of the convert style for Dummies ??
Thank you
 

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

Re: Convert Minecraft maps to Minetest worlds

by sofar » Mon Feb 05, 2018 21:44

larajtekno wrote:Hello,I try in vain for a few days, to convert a map to be able to use it in Minetest. My O.S. is windows 10, I tried mcedit without success.
Is there somewhere, a tutorial of the convert style for Dummies ??
Thank you


The best advice I can give you is to install a virtual machine with e.g. ubuntu and try it on that. Getting this program to work on Windows is (1) untested and (2) very difficult, I don't guarantee it will work either.

If the MC map is downloadable, maybe you can tell us which map it is, and maybe someone can convert it for you?
 

larajtekno
Member
 
Posts: 11
Joined: Wed Dec 13, 2017 09:48
Location: Saint Étienne

Re: Convert Minecraft maps to Minetest worlds

by larajtekno » Tue Feb 06, 2018 18:08

Hello. I already ask to convert my map : viewtopic.php?f=12&t=13910
Dis not havé any answer.
Before installing a virtual machine, i would like to have an exemple with a map of my town.
Thank you.
 

miner2000
New member
 
Posts: 2
Joined: Sun Mar 04, 2018 10:18

Re: Convert Minecraft maps to Minetest worlds

by miner2000 » Sun Mar 04, 2018 10:27

Hello, I have converted my MC map and the process has completed without errors. When I play the map in MT it runs ok but the map looks to just be generating freshly as I explore it. I have tried teleporting to places but I can't see a trace of anything that was in the MC map.

Is there anything I need to do to stop the map from generating??
 

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

Re: Convert Minecraft maps to Minetest worlds

by sofar » Sun Mar 04, 2018 23:29

miner2000 wrote:Hello, I have converted my MC map and the process has completed without errors. When I play the map in MT it runs ok but the map looks to just be generating freshly as I explore it. I have tried teleporting to places but I can't see a trace of anything that was in the MC map.

Is there anything I need to do to stop the map from generating??


If you used it correctly, the created world has several `worldmods` that configure the world properly and disable any future mapgen already, by default.

I can't see anything wrong with the code and it works when I use it, so I think you're using it incorrectly somehow. Did you make sure you didn't have an old world with the same name? Did you check that the output folder was empty before you started? Did the worldmods get inserted properly in the map?
 

superschizo
Member
 
Posts: 121
Joined: Mon Aug 26, 2013 17:08
Location: Missouri, USA
In-game: uberdorf

Re: Convert Minecraft maps to Minetest worlds

by superschizo » Tue May 21, 2019 17:04

Hi, I have been having trouble getting this to work on my computers. On the three maps I tried, I get empty worlds. I have one computer on Debian 10 with KDE, and it has minetest 5.1-dev, python3.7, and zenity installed. I even removed python 2.7 so there would be no conflicts. Since it wasn't working right anyway, I modified the map_content.txt to include more blocks and not use mods. It still generates empty worlds and I get a lot of

WARNING:block:Unknown Minecraft Block:2:0
in addition to other minecraft block id's.

I saw that worldedit is a dependency. It is in the minetest mods folder. Should it go somewhere in the mcimport-master directory too?

These are the maps I am trying to convert. They are my creations in minecraft.
https://minecraft.curseforge.com/members/uberdorf2/projects

I don't know how to do spoilers here so I will link to my map_content.txt on my google drive. I would appreciate if someone could look at it to see if I made any obvious errors.
https://drive.google.com/open?id=1IP6_ZhkJIXXO8wp1JkIeZbR-PP7aIrfM
 

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

Re: Convert Minecraft maps to Minetest worlds

by sofar » Tue May 21, 2019 18:13

superschizo wrote:Hi, I have been having trouble getting this to work on my computers. On the three maps I tried, I get empty worlds. I have one computer on Debian 10 with KDE, and it has minetest 5.1-dev, python3.7, and zenity installed. I even removed python 2.7 so there would be no conflicts. Since it wasn't working right anyway, I modified the map_content.txt to include more blocks and not use mods. It still generates empty worlds and I get a lot of

WARNING:block:Unknown Minecraft Block:2:0
in addition to other minecraft block id's.


You need to run it from the folder that mcimport is installed to, otherwise it will fail to find the map_content.txt file. Easiest is to just `cd` into the folder and run the `mcimport.sh` script. give that a try.

FYI, 2:0 is dirt with grass. That error should never happen if the program is executed from the right folder.
 

superschizo
Member
 
Posts: 121
Joined: Mon Aug 26, 2013 17:08
Location: Missouri, USA
In-game: uberdorf

Re: Convert Minecraft maps to Minetest worlds

by superschizo » Tue May 21, 2019 18:26

Thank you for the reply. I have been running ./mcimport.sh in terminal after changing directory into the mcimport-master directory. It is the same directory that the map_content.txt is located in.
 

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

Re: Convert Minecraft maps to Minetest worlds

by sofar » Tue May 21, 2019 21:21

superschizo wrote:Thank you for the reply. I have been running ./mcimport.sh in terminal after changing directory into the mcimport-master directory. It is the same directory that the map_content.txt is located in.


Can you try running it without modifications? If it's not seeing block 2:0 then there's really something weird going on that isn't explained easily by anything else then "someone broke it".
 

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

Re: Convert Minecraft maps to Minetest worlds

by sofar » Tue May 21, 2019 21:26

superschizo wrote:I saw that worldedit is a dependency. It is in the minetest mods folder. Should it go somewhere in the mcimport-master directory too?


It is? What? I don't remember that!
 

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

Re: Convert Minecraft maps to Minetest worlds

by sofar » Tue May 21, 2019 21:31

sofar wrote:
superschizo wrote:Thank you for the reply. I have been running ./mcimport.sh in terminal after changing directory into the mcimport-master directory. It is the same directory that the map_content.txt is located in.


Can you try running it without modifications? If it's not seeing block 2:0 then there's really something weird going on that isn't explained easily by anything else then "someone broke it".


I converted it myself without any modifications, and I can (after searching for a while) find candlestick park just fine.... I really think the problem has to be with your modified map_content.txt therefore.
 

superschizo
Member
 
Posts: 121
Joined: Mon Aug 26, 2013 17:08
Location: Missouri, USA
In-game: uberdorf

Re: Convert Minecraft maps to Minetest worlds

by superschizo » Tue May 21, 2019 21:43

There is a depends.txt in the extracted mcimport-master directory and the only dependency it gives is worldedit. I'll ignore it if it isn't applicable.

I wouldn't be surprised if I did my version of the map_content.txt file wrong, which is why I linked to it. I just can't figure out what I did wrong, because I read the instructions and used what I believe to be the right pattern of tabs and spaces.

The original map_content.txt file generates some blocks, but there is a lot of empty space where there should be something. Plus, I used a lot of hardened clay in minecraft, which is not included in the original map_content.txt file.
Attachments
screenshot_20190521_163757.png
(196.59 KiB) Not downloaded yet
 

superschizo
Member
 
Posts: 121
Joined: Mon Aug 26, 2013 17:08
Location: Missouri, USA
In-game: uberdorf

Re: Convert Minecraft maps to Minetest worlds

by superschizo » Tue May 21, 2019 21:53

I found the stadium at -200 0 -1000, but I am still trying to figure out what I did wrong in the map_content. Thank you for your help.
 

superschizo
Member
 
Posts: 121
Joined: Mon Aug 26, 2013 17:08
Location: Missouri, USA
In-game: uberdorf

Re: Convert Minecraft maps to Minetest worlds

by superschizo » Tue May 21, 2019 22:42

I found the problem with my edits of map_content.txt. It was a default setting for my KDE text writers. My text writers (Kate and Kwrite) both default to a soft tab, which I guess converts the white space from a tab to spaces. So now I have changed the setting and my edits work.
 

PreviousNext

Return to Maps



Who is online

Users browsing this forum: No registered users and 2 guests