Page 5 of 5

Re: Convert Minecraft maps to Minetest worlds

Posted: Wed May 22, 2019 03:22
by sofar
superschizo wrote: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.
yeah, it just dawned on me that that's likely the problem. The file needs to be TAB delimited.

Re: Convert Minecraft maps to Minetest worlds

Posted: Wed May 22, 2019 15:09
by superschizo
Here is what the stadium looks like after the conversion with the modified map_content.txt and no mods. I would post the modified map content file, but some colors are off. Thank you very much for this app.
screenshot_20190522_100009.png
(427.72 KiB) Not downloaded yet

Re: Convert Minecraft maps to Minetest worlds

Posted: Wed Sep 25, 2019 14:43
by Wuzzy
Does this work for MCL2?

Re: Convert Minecraft maps to Minetest worlds

Posted: Thu Sep 26, 2019 00:08
by sofar
Wuzzy wrote:Does this work for MCL2?
There's a PR pending for full MCL2 support, but it needs rework. If that's merged, it would fully support it.

Re: Convert Minecraft maps to Minetest worlds

Posted: Sat May 09, 2020 05:44
by xeno
i just downloaded the mc to mt map converter
viewtopic.php?t=13709
but when i launch it, it tells me "unable to locate map_content.txt fille, this is a critical error, and this program is unable to continue"
im am using linux
it commes as a terminal program and it has no graphic interface
do i have to put the mc folder in mcimport's folder or something ?

Also can anyone make a video tutorial for it pls ?

Re: Convert Minecraft maps to Minetest worlds

Posted: Mon May 18, 2020 08:53
by Rikola
Do anyone have working Minecraft converter download?
I found minecraft download here https://pobierajgry.pl/gry/minecraft-download/

Re: Convert Minecraft maps to Minetest worlds

Posted: Fri May 22, 2020 16:48
by mini
Does not seem to work for MC 1.14.4 worlds:

Code: Select all

Traceback (most recent call last):??:?? h:m:s
  File "./mcimport.py", line 107, in <module>
    mtmap.save()
  File "/home/nils/Programme/OSS/mcimport/block.py", line 455, in save
    for block in self.blocks:
  File "/home/nils/Programme/OSS/mcimport/block.py", line 439, in fromMCMapBlocksIterator
    for mcblock in mcmap.getBlocksIterator():
  File "/home/nils/Programme/OSS/mcimport/block.py", line 62, in getBlocksIterator
    blocks = self.getChunk(chkx, chkz).blocks
  File "/home/nils/Programme/OSS/mcimport/block.py", line 45, in getChunk
    return MCChunk(chkx, chkz, self.world_path, self.ext)
  File "/home/nils/Programme/OSS/mcimport/block.py", line 91, in __init__
    self.blocks.append(MCBlock(raw_data, (chkx, chkz), section["Y"], True))
  File "/home/nils/Programme/OSS/mcimport/block.py", line 108, in __init__
    self.from_section(section)
  File "/home/nils/Programme/OSS/mcimport/block.py", line 174, in from_section
    self.blocks = self.reverse_X_axis(section["Blocks"])
KeyError: 'Blocks'

Re: Convert Minecraft maps to Minetest worlds

Posted: Sat May 23, 2020 10:47
by talamh
mini wrote:
Fri May 22, 2020 16:48
Does not seem to work for MC 1.14.4 worlds:
Interesting, MC 1.14.4 is storing biome data in 256 long integers instead of the 256 integers that would be expected in maps from that period, that's possibly the cause of the issue. I'd not seen this documented anywhere so it seems you may be the first to notice that that client had a uniqueness. I have mentioned it on https://minecraft.gamepedia.com/Talk:Ja ... ion_1.14.4

*Edit posted link to where I mentioned it on gamepedia. I'm surprised those folks didn't have that info documented.

Re: Convert Minecraft maps to Minetest worlds

Posted: Tue Jun 16, 2020 23:38
by Starbeamrainbowlabs
Currently I'm aware of these 2 minecraft → minetest importers:

- https://github.com/minetest-tools/mcimport/
- https://github.com/jonajames/mc2mt

Neither of them seem to particularly fast or stable. mcimport does appear to be able to convert some worlds, but appears to crash on others. mc2mt crashed on a few worlds, but I found one that it would work with - I haven't been able to evaluate it's performance yet though because it's so slow the conversion is still running.

I wonder if mcimport's existing algorithm could be ported easily to use a more solid / stable minecraft world parser. If anyone knows of a really solid & stable one that's well maintained and supports as many different MC versions as possible, then I might be able to write something multithreaded perhaps. C# is preferred, followed by Rust, C++, then Javascript (I love JS, but it's not suited to multithreaded).

I don't know anything about the minetest format, but I can imagine that it must be documented somewhere - I'll go and look that up if I actually end up actually writing anything.

(note: I don't own a copy of Minecraft, so if I were to write anything I'd have to source the minecraft worlds for conversion elsewhere)

Re: Convert Minecraft maps to Minetest worlds

Posted: Wed Jun 17, 2020 12:34
by talamh
Starbeamrainbowlabs wrote:
Tue Jun 16, 2020 23:38
Currently I'm aware of these 2 minecraft → minetest importers:

- https://github.com/minetest-tools/mcimport/
- https://github.com/jonajames/mc2mt

Neither of them seem to particularly fast or stable. mcimport does appear to be able to convert some worlds, but appears to crash on others. mc2mt crashed on a few worlds, but I found one that it would work with - I haven't been able to evaluate it's performance yet though because it's so slow the conversion is still running.

I wonder if mcimport's existing algorithm could be ported easily to use a more solid / stable minecraft world parser. If anyone knows of a really solid & stable one that's well maintained and supports as many different MC versions as possible, then I might be able to write something multithreaded perhaps. C# is preferred, followed by Rust, C++, then Javascript (I love JS, but it's not suited to multithreaded).

I don't know anything about the minetest format, but I can imagine that it must be documented somewhere - I'll go and look that up if I actually end up actually writing anything.

(note: I don't own a copy of Minecraft, so if I were to write anything I'd have to source the minecraft worlds for conversion elsewhere)
Mcimport crashes when the minecraft map contains chunks that are in a format that it does not support. An individual minecraft map can contain chunks that are in several different formats so you never can tell if conversion will succeed until you try. Unless it is a very recent map in which case it certainly wont be able to convert successfully.

Yes mcimport could be ported but you would still have that issue, and others issues that will result in slow and incomplete conversions. These issues could of course be addressed during the porting process so are no reason not to make a port.

I am working on map converter that is nearly ready for release (another week or two) that is written in Java and it will be multithreaded, conversion times are already faster that mcimport when running on a single thread. I'm working on adding greater map compatibility at the moment, starting with older maps and working my way towards the most recent map format.

If you do intend to do a port, I would recommend getting a copy of minecraft, being able to manipulate the input so you can check your output is a huge plus.

Re: Convert Minecraft maps to Minetest worlds

Posted: Wed Jun 17, 2020 17:33
by Starbeamrainbowlabs
Ah, I see. It sounds like it's really about finding a mature library that can parse as many different minecraft world versions as possible.

Oh, cool! Java isn't my favourite language, but it's probably worth waiting to check your port out first before writing my own (if you open source it when you're done and I can build it from source, I might be able to contribute a little bit - eg. a Docker container, since I have a Raspberry Pi cluster using the Hashicorp stack, and a Docker container would make it easy for my to queue conversions on said cluster).

Ah, right. It's sorta the principle of the thing though - the whole reason I'm using Minetest it because a) the Lua modding API and b) it's open-source - but I do see how that would be very valuable.

Re: Convert Minecraft maps to Minetest worlds

Posted: Wed Jun 17, 2020 19:14
by talamh
Starbeamrainbowlabs wrote:
Wed Jun 17, 2020 17:33
Ah, I see. It sounds like it's really about finding a mature library that can parse as many different minecraft world versions as possible.

Oh, cool! Java isn't my favourite language, but it's probably worth waiting to check your port out first before writing my own (if you open source it when you're done and I can build it from source, I might be able to contribute a little bit - eg. a Docker container, since I have a Raspberry Pi cluster using the Hashicorp stack, and a Docker container would make it easy for my to queue conversions on said cluster).

Ah, right. It's sorta the principle of the thing though - the whole reason I'm using Minetest it because a) the Lua modding API and b) it's open-source - but I do see how that would be very valuable.
It will be open source. Building should not be an issue.

Minor issue might be that I'm using libgdx to make a gameified UI and that might not be suitable for your needs but I'm using it as simplicity of use for the average desktop user is one of my top goals. Only 2 classes actually use libgdx and both of those classes are separate from the conversion process, so making a CLI version and/or porting to C# should be trivial.

Re: Convert Minecraft maps to Minetest worlds

Posted: Fri Jun 19, 2020 17:29
by Starbeamrainbowlabs
talamh wrote:
Wed Jun 17, 2020 19:14
It will be open source. Building should not be an issue.

Minor issue might be that I'm using libgdx to make a gameified UI and that might not be suitable for your needs but I'm using it as simplicity of use for the average desktop user is one of my top goals. Only 2 classes actually use libgdx and both of those classes are separate from the conversion process, so making a CLI version and/or porting to C# should be trivial.
Nice!

Ah, I see. A gamified UI sounds awesome!

Hrm, I'm hesitant to port it to C♯ because then I'd loose automatic integration of any work you do on it - so I think the most effective course of action will be to contribute via PRs to your project :D

I've done Java for Android before, so it'll be a new experience for me doing Java on the desktop.

Re: Convert Minecraft maps to Minetest worlds

Posted: Fri Jun 19, 2020 18:10
by sofar
I appreciate the attention to keeping a solution going to solve this maintenance problem. Please do make a *new* forum thread for your specific application so that the discussion can be focused and on topic.

Re: Convert Minecraft maps to Minetest worlds

Posted: Fri Jun 19, 2020 19:09
by talamh
sofar wrote:
Fri Jun 19, 2020 18:10
I appreciate the attention to keeping a solution going to solve this maintenance problem. Please do make a *new* forum thread for your specific application so that the discussion can be focused and on topic.
I agree, I have gone off topic for this thread. I could just run mcimport in Jython using my UI and be back on topic again :) Joking aside there does seem to have been an uptick of late in people showing an interest in map conversion, so maybe a thread discussing goals and potential pitfalls in the process of writing a converter might be an idea. Anyone interested in such a thread let me know and I'll start one.

Edit: Going to start one regardless of interest!

Re: Convert Minecraft maps to Minetest worlds

Posted: Wed Jul 15, 2020 14:16
by Jannusch
mini wrote:
Fri May 22, 2020 16:48
Does not seem to work for MC 1.14.4 worlds:

Code: Select all

Traceback (most recent call last):??:?? h:m:s
  File "./mcimport.py", line 107, in <module>
    mtmap.save()
  File "/home/nils/Programme/OSS/mcimport/block.py", line 455, in save
    for block in self.blocks:
  File "/home/nils/Programme/OSS/mcimport/block.py", line 439, in fromMCMapBlocksIterator
    for mcblock in mcmap.getBlocksIterator():
  File "/home/nils/Programme/OSS/mcimport/block.py", line 62, in getBlocksIterator
    blocks = self.getChunk(chkx, chkz).blocks
  File "/home/nils/Programme/OSS/mcimport/block.py", line 45, in getChunk
    return MCChunk(chkx, chkz, self.world_path, self.ext)
  File "/home/nils/Programme/OSS/mcimport/block.py", line 91, in __init__
    self.blocks.append(MCBlock(raw_data, (chkx, chkz), section["Y"], True))
  File "/home/nils/Programme/OSS/mcimport/block.py", line 108, in __init__
    self.from_section(section)
  File "/home/nils/Programme/OSS/mcimport/block.py", line 174, in from_section
    self.blocks = self.reverse_X_axis(section["Blocks"])
KeyError: 'Blocks'
Hi,
is there a fix for this? Maybe I would take care of the problem. Does anyone have more detailed information, or do you know that it is a very big problem and a big rewrite is required?

Re: Convert Minecraft maps to Minetest worlds

Posted: Wed Jul 15, 2020 14:16
by Jannusch
mini wrote:
Fri May 22, 2020 16:48
Does not seem to work for MC 1.14.4 worlds:

Code: Select all

Traceback (most recent call last):??:?? h:m:s
  File "./mcimport.py", line 107, in <module>
    mtmap.save()
  File "/home/nils/Programme/OSS/mcimport/block.py", line 455, in save
    for block in self.blocks:
  File "/home/nils/Programme/OSS/mcimport/block.py", line 439, in fromMCMapBlocksIterator
    for mcblock in mcmap.getBlocksIterator():
  File "/home/nils/Programme/OSS/mcimport/block.py", line 62, in getBlocksIterator
    blocks = self.getChunk(chkx, chkz).blocks
  File "/home/nils/Programme/OSS/mcimport/block.py", line 45, in getChunk
    return MCChunk(chkx, chkz, self.world_path, self.ext)
  File "/home/nils/Programme/OSS/mcimport/block.py", line 91, in __init__
    self.blocks.append(MCBlock(raw_data, (chkx, chkz), section["Y"], True))
  File "/home/nils/Programme/OSS/mcimport/block.py", line 108, in __init__
    self.from_section(section)
  File "/home/nils/Programme/OSS/mcimport/block.py", line 174, in from_section
    self.blocks = self.reverse_X_axis(section["Blocks"])
KeyError: 'Blocks'
Hi,
is there a fix for this? Maybe I would take care of the problem. Does anyone have more detailed information, or do you know that it is a very big problem and a big rewrite is required?

Re: Convert Minecraft maps to Minetest worlds

Posted: Sat Jul 18, 2020 17:58
by talamh
This wont help convert 0.14.4 using mcimport but a top tip is to install pypy3 and change line 37 of mcimport.sh to

Code: Select all

pypy3 mcimport.py "$IN" "${HOME}/.minetest/worlds/$OUT"
This can result in mcimport converting maps 4 or 5 times faster.

Re: Convert Minecraft maps to Minetest worlds

Posted: Tue Sep 15, 2020 18:36
by Sharpik
Hi everyone, I'd like to ask if someone tryed to convert MC world with moded blocks to Minetest. I tryed to convert blocks from my own MC mod to MT, but when I added new lines to map_content.txt Example: 3122 2 streets:asphalt
But in the converted world this blocks are converted to torches instead streets:asphalt blocks.

I'm not abe to run mcimport.sh with GUI because I'm using windows 10. So I started conversion with this param: python mcimport.py "worlds/Minecraft/convertw" "worlds/Minetest/convertw"

World is succesfully converted to MT, but blocks that I added to map_content.txt aren't coverted as it was defined. Some of them are hardened clay and some of them are torches etc..
Any idea how to force convertor to do what i set in map_content.txt?

Thanks for answers

Re: Convert Minecraft maps to Minetest worlds

Posted: Wed Sep 16, 2020 11:33
by aracnus
First, thank you very much for this tool, sofar. It did an amazing job with an old Minecraft world I have. Until now I saw only two glitches: it doesn't import pumpkin lantern (could it be substituted by any other light source on Minetest world?) and convert all blocks in a water flow as water source. For example, if you, in Minecraft, build a waterfall with only top blocks as water sources, mcimport converts all other blocks of waterfall as water sources too (you may imagine the flood mess). But these are problems that I can handle manually. :-)

And I would ask what would happen if mapgen is activated? It will alter the original world structures? I would love to continue playing this world in Minetest, with new chunks generation. And how could I turn on mapgen?