yes, and that's what likely will happen - people have already written c++ converters and we'll likely port all the code changes over.theHalfBloodStanger wrote:Just an idea, but couldn't it be convenient to convert the programming into c++/c? It would be much faster.
Just an idea from an inexperienced programmer.
Convert Minecraft maps to Minetest worlds
Re: Convert Minecraft maps to Minetest worlds
- MinisterFarrigut
- Member
- Posts: 75
- Joined: Fri Oct 14, 2016 14:59
- In-game: singleplayer
- Location: The ruins of my basement
Re: Convert Minecraft maps to Minetest worlds
Dang its so weird. Minecraft maps look better in Minetest than Minecraft XD!!!
I build buildings. I don't usually make mods...I use them.
-
- Member
- Posts: 22
- Joined: Sat Nov 01, 2014 15:38
- In-game: Schmeldric
Re: Convert Minecraft maps to Minetest worlds
Hi!
I'm facing a "small" issue with this converter (great thanks for the work by the way).
I seems to me that what is called "north" in Minecraft (Z negative) becomes south in Minetest (which is logic since Minetest choosed Z positive for north).
Who bothers will you ask?
Well, I'm working with my students on a model of our town. We did parts of the town using the north as choosen in Minetest. But the whole town is a huge task.
So I found some help in using a service provided by IGN (french cartographers) who will provide a Minecraft version of a real France area. Great! So I got that map, converted it in Minetest, and... and if I do worldedit copy/paste the buildings are facing the wrong direction.
I know worldedit has the rotate option. That could be a solution, but my 13 years old student will have to learn to use it correctly.
I tried to edit the "block.py" file in order to have the conversion put north the right side. For now
- I know how to put the 16x16x16 blocks at the good place;
- but inside these blocks I have to also do a symetry : x = 15-x and z=15-z
For this problem, I tried to change line 231 " x, y, z = te["x"], te["y"], te["z"] " to " x, y, z = 15-te["x"], te["y"], 15-te["z"] " but failed.
Seems the blocks aren't taken one by one but converted as massive data.
I think the solution is in the "def extract_slice(data, yslice):" (line 150). During the conversion I'll have to cover X and Z the other way around.
The method's comment says "# Beware: impossible to understand code" so I'm now trying to figure out how it's working, but if one of you already solved that, it would really help me...
OR : there is a reverse_X_axis method called. Would replacing it by a reverse_Z_axis work?
I'm facing a "small" issue with this converter (great thanks for the work by the way).
I seems to me that what is called "north" in Minecraft (Z negative) becomes south in Minetest (which is logic since Minetest choosed Z positive for north).
Who bothers will you ask?
Well, I'm working with my students on a model of our town. We did parts of the town using the north as choosen in Minetest. But the whole town is a huge task.
So I found some help in using a service provided by IGN (french cartographers) who will provide a Minecraft version of a real France area. Great! So I got that map, converted it in Minetest, and... and if I do worldedit copy/paste the buildings are facing the wrong direction.
I know worldedit has the rotate option. That could be a solution, but my 13 years old student will have to learn to use it correctly.
I tried to edit the "block.py" file in order to have the conversion put north the right side. For now
- I know how to put the 16x16x16 blocks at the good place;
- but inside these blocks I have to also do a symetry : x = 15-x and z=15-z
For this problem, I tried to change line 231 " x, y, z = te["x"], te["y"], te["z"] " to " x, y, z = 15-te["x"], te["y"], 15-te["z"] " but failed.
Seems the blocks aren't taken one by one but converted as massive data.
I think the solution is in the "def extract_slice(data, yslice):" (line 150). During the conversion I'll have to cover X and Z the other way around.
The method's comment says "# Beware: impossible to understand code" so I'm now trying to figure out how it's working, but if one of you already solved that, it would really help me...
OR : there is a reverse_X_axis method called. Would replacing it by a reverse_Z_axis work?
Re: Convert Minecraft maps to Minetest worlds
Yup, have been breaking my head over it as well. I've been unable to solve it myself. I'm hoping we can make the C++ converter not make this mistake and push the content detail to that, since I doubt we'll maintain the python version - it is just so much slower.Schmeldric wrote: So I found some help in using a service provided by IGN (french cartographers) who will provide a Minecraft version of a real France area. Great! So I got that map, converted it in Minetest, and... and if I do worldedit copy/paste the buildings are facing the wrong direction.
Re: Convert Minecraft maps to Minetest worlds
Hi, I'm the author of that "impossible to understand code" :).
Line 231 you're talking about is used for tile entities, which are not the bulk node data, so changing it is needed, but won't change much.
The solution is indeed in extract_slice; the idea of the code in it is just to reverse the order of the axes. For that, we process the positions in the order we want them in the output, and we compute the input positions that correspond to it by increasing with the xstride each time.
Line 231 you're talking about is used for tile entities, which are not the bulk node data, so changing it is needed, but won't change much.
The solution is indeed in extract_slice; the idea of the code in it is just to reverse the order of the axes. For that, we process the positions in the order we want them in the output, and we compute the input positions that correspond to it by increasing with the xstride each time.
-
- Member
- Posts: 22
- Joined: Sat Nov 01, 2014 15:38
- In-game: Schmeldric
Re: Convert Minecraft maps to Minetest worlds
Hourray!
After spending many night hours I think I got it the right way around...
My first try was to change the "extract_slice" and "extract_slice_half_bytes" functions to read the nodes the other way around.Althought I think I understood the code, my maths didn't word :'(
Nota :
MC uses "blocks" as voxels in a 16x16x128 chunk
MT uses "nodes" as voxels in 16x16x16 blocks...
So I tried another way.
> In MTMap.save : changedto
in order to get a first rotation. This puts the MT blocks at their right place, but didn't rotate their content.
> Instead of reversing X axis (MC and MT uses left/right "trièdre" - sorry, didn't find the english for that) , I reversed Z axis
In MCBlock.reverse_X_axis and MCBlock.expand_half_bytes (yeah, data on u12 ... so easy...) I changed the order data was read, reversing Z instead of X.
By the way : I think this code could be optimised but I'm not used enought to Python
So... Do you want my file?
After spending many night hours I think I got it the right way around...
My first try was to change the "extract_slice" and "extract_slice_half_bytes" functions to read the nodes the other way around.Althought I think I understood the code, my maths didn't word :'(
Nota :
MC uses "blocks" as voxels in a 16x16x128 chunk
MT uses "nodes" as voxels in 16x16x16 blocks...
So I tried another way.
> In MTMap.save : changed
Code: Select all
(self.getBlockAsInteger((block.pos[0],block.pos[1],block.pos[2])),
Code: Select all
(self.getBlockAsInteger((-block.pos[0],block.pos[1],-block.pos[2])),
> Instead of reversing X axis (MC and MT uses left/right "trièdre" - sorry, didn't find the english for that) , I reversed Z axis
In MCBlock.reverse_X_axis and MCBlock.expand_half_bytes (yeah, data on u12 ... so easy...) I changed the order data was read, reversing Z instead of X.
By the way : I think this code could be optimised but I'm not used enought to Python
Code: Select all
l2 = l[locSt:locSt+16]
for i in l2:
l3.append(i)
Re: Convert Minecraft maps to Minetest worlds
I'll take it - can you make a PR? If not, throw the file on gist.github.com and post the URL.Schmeldric wrote:Hourray!
After spending many night hours I think I got it the right way around...
My first try was to change the "extract_slice" and "extract_slice_half_bytes" functions to read the nodes the other way around.Althought I think I understood the code, my maths didn't word :'(
Nota :
MC uses "blocks" as voxels in a 16x16x128 chunk
MT uses "nodes" as voxels in 16x16x16 blocks...
So I tried another way.
> In MTMap.save : changedtoCode: Select all
(self.getBlockAsInteger((block.pos[0],block.pos[1],block.pos[2])),
in order to get a first rotation. This puts the MT blocks at their right place, but didn't rotate their content.Code: Select all
(self.getBlockAsInteger((-block.pos[0],block.pos[1],-block.pos[2])),
> Instead of reversing X axis (MC and MT uses left/right "trièdre" - sorry, didn't find the english for that) , I reversed Z axis
In MCBlock.reverse_X_axis and MCBlock.expand_half_bytes (yeah, data on u12 ... so easy...) I changed the order data was read, reversing Z instead of X.
By the way : I think this code could be optimised but I'm not used enought to PythonSo... Do you want my file?Code: Select all
l2 = l[locSt:locSt+16] for i in l2: l3.append(i)
-
- Member
- Posts: 22
- Joined: Sat Nov 01, 2014 15:38
- In-game: Schmeldric
Re: Convert Minecraft maps to Minetest worlds
Euh... What's a PR ? Personal Release on Github?
-
- Member
- Posts: 22
- Joined: Sat Nov 01, 2014 15:38
- In-game: Schmeldric
Re: Convert Minecraft maps to Minetest worlds
Is this correctly done?
https://gist.github.com/anonymous/450c3 ... teadofx-py
https://gist.github.com/anonymous/450c3 ... teadofx-py
Re: Convert Minecraft maps to Minetest worlds
well, it works, but it does remove all the custom door/water code I added... Did you do that on purpose or did you just edit an older version?Schmeldric wrote:Is this correctly done?
https://gist.github.com/anonymous/450c3 ... teadofx-py
There's some great git how-to documents how this git/github stuff all works.
-
- Member
- Posts: 22
- Joined: Sat Nov 01, 2014 15:38
- In-game: Schmeldric
Re: Convert Minecraft maps to Minetest worlds
Thought I used the latest release, my bad.
I'll modify a more recent version, sorry.
I'll modify a more recent version, sorry.
-
- Member
- Posts: 22
- Joined: Sat Nov 01, 2014 15:38
- In-game: Schmeldric
Re: Convert Minecraft maps to Minetest worlds
So... On GitHub I forked from your source code.
I uploaded the block.py file.
I asked for a "pull request"
Was it correctly done?
I uploaded the block.py file.
I asked for a "pull request"
Was it correctly done?
Re: Convert Minecraft maps to Minetest worlds
yup! Will review but looks good so far!Schmeldric wrote:So... On GitHub I forked from your source code.
I uploaded the block.py file.
I asked for a "pull request"
Was it correctly done?
Re: Convert Minecraft maps to Minetest worlds
I upgraded the conversion test map I have to 1.11 and redid a ton of stuff, including node rotations and flowerpots (using my own flowerpot mod now! no more homedecor!) Fixed tile entites (signs!) while we're at it, although some are still not converting well (maybe I need to re-place them first).
- GreenXenith
- Member
- Posts: 1356
- Joined: Wed Oct 28, 2015 01:26
- GitHub: GreenXenith
- Location: UTC-8:00
- Contact:
Re: Convert Minecraft maps to Minetest worlds
I converted Parkour Paradise 3 (for the cliffs and water, not the parkour) and it worked very well! Just to note, the installer tried and failed to install it's necessary mods. I think it couldn't find them or something. Luckily, I had most of them anyway. I used the terminal on Xubuntu 16.04. Also, the vines on this map weren't all rotated correctly, but I didn't care because I wanted it all vanilla so I used WE and replaced them with bush leaves :D Very good work sir!
YouTube | Mods | Patreon | Minetest Discord @greenxenith
You should not be able to read this message.
You should not be able to read this message.
-
- Member
- Posts: 12
- Joined: Sun Apr 23, 2017 16:36
Re: Convert Minecraft maps to Minetest worlds
Sorry for this really dumb question, but I should just be able to run:
python mcimport.py [path to the level.dat]
And that will start the conversion process, or no?
-------------EDIT----------------------
Dumb question asked by linux noob, ran the wrapper instead, we'll see how it turns out. = )
python mcimport.py [path to the level.dat]
And that will start the conversion process, or no?
-------------EDIT----------------------
Dumb question asked by linux noob, ran the wrapper instead, we'll see how it turns out. = )
Re: Convert Minecraft maps to Minetest worlds
The wrapper uses zenity which makes it easier to use, since it makes a simple gui around the python parts, but yes, you can also just run it manually (with the right options).nightengale wrote:Sorry for this really dumb question, but I should just be able to run:
python mcimport.py [path to the level.dat]
And that will start the conversion process, or no?
-------------EDIT----------------------
Dumb question asked by linux noob, ran the wrapper instead, we'll see how it turns out. = )
Re: Convert Minecraft maps to Minetest worlds
Hello sofar!
Recently I tortured my computer with converting many Minecraft maps.
The results are really amazing. Thank you!
Some suggestions for improvement:
map_content.txt
should be
there's no lapis:lapis
I would prefer:
addition:
fixed:
It's a pity that these blocks get lost.
I made a mod for this, but I'm unsure about the license for the textures, so I don't publish it.
(I took the textures from http://hydra-media.cursecdn.com/minecra ... ockCSS.png at http://minecraft.gamepedia.com/Minecraft_Wiki)
stone and wooden buttons (77 and 143)
Often they are used just for decoration -- so perhaps an extra buttons mod?
other:
Some tips for users:
The player is not everytime spawned at the right location! Some maps contain random chunks far away from the main content, so they seem to consist only of that: use a mapper to find the area of the main content.
The lighting seems to get better corrected when flying above the dark regions in the sky while the adjacent parts of the map under them are generated. For the rest use mapfix.
In some cases antifire is useful.
Recently I tortured my computer with converting many Minecraft maps.
The results are really amazing. Thank you!
Some suggestions for improvement:
map_content.txt
Code: Select all
22 lapis:lapis
Code: Select all
22 lapis:lapisblock
Code: Select all
98 3 moreblocks:circle_stone_bricks
Code: Select all
98 3 xdecor:stone_rune
addition:
Code: Select all
116 xdecor:enchantment_table
Code: Select all
139 1 default:mossycobble // FIXME: you may not want this
139 default:cobble // FIXME: you may not want this
Code: Select all
139 1 walls:mossycobble
139 walls:cobble
Code: Select all
168 0 prismarine:prismarine
168 1 prismarine:prismarine_brick
168 2 prismarine:prismarine_dark
169 prismarine:sea_lantern
I made a mod for this, but I'm unsure about the license for the textures, so I don't publish it.
(I took the textures from http://hydra-media.cursecdn.com/minecra ... ockCSS.png at http://minecraft.gamepedia.com/Minecraft_Wiki)
stone and wooden buttons (77 and 143)
Often they are used just for decoration -- so perhaps an extra buttons mod?
other:
- doors need fix: unknown blocks because Minetest newly handles them differently.
- inner and outer corners of stairs would be fine.
Some tips for users:
The player is not everytime spawned at the right location! Some maps contain random chunks far away from the main content, so they seem to consist only of that: use a mapper to find the area of the main content.
The lighting seems to get better corrected when flying above the dark regions in the sky while the adjacent parts of the map under them are generated. For the rest use mapfix.
In some cases antifire is useful.
I am okay with using the screenshots in all my posts for the website of Minetest (http://minetest.net).
Re: Convert Minecraft maps to Minetest worlds
thanks, I pulled most of this in.PEAK wrote:Some suggestions for improvement:
Try and find a texture pack that is Public Domain or CC-BY and has their own versions for these blocks, then you can use that in your mod!PEAK wrote:It's a pity that these <prismarine> blocks get lost.
Re: Convert Minecraft maps to Minetest worlds
"Several fixes for the map content, lose moreblocks."sofar wrote:thanks, I pulled most of this in.PEAK wrote:Some suggestions for improvement:
That's fine!
I will work on that.sofar wrote:Try and find a texture pack that is Public Domain or CC-BY and has their own versions for these blocks, then you can use that in your mod!PEAK wrote:It's a pity that these <prismarine> blocks get lost.
I am okay with using the screenshots in all my posts for the website of Minetest (http://minetest.net).
Re: Convert Minecraft maps to Minetest worlds
Here is the prismarine mod. I used the textures from Faithful 1.11 as Wuzzy does for his Mineclone2.
(I would rather prefer 16x16 textures, but that is what I found...)
License
Textures: Faithful 1.11 by Vattic, xMrVizzy and many others (MIT License)
Code: by PEAK WTFPL (it's not really worth to have a license)
Usage
This mod is only intended as supplement for sofar's converter script.
So the blocks are just decorative, no crafting recipes, and the "Prismarine" is not animated.
depends: default
Put the "prismarine" folder into the "worldmods" folder of the converted map.
Test it e.g. with Pirimidin ! Apartement For People !.
map_content.txt
*****
Minetest can have nice emeralds too: oresplus by jp.
With that you can do:
map_content.txt
and
(I would rather prefer 16x16 textures, but that is what I found...)
License
Textures: Faithful 1.11 by Vattic, xMrVizzy and many others (MIT License)
Code: by PEAK WTFPL (it's not really worth to have a license)
Usage
This mod is only intended as supplement for sofar's converter script.
So the blocks are just decorative, no crafting recipes, and the "Prismarine" is not animated.
depends: default
Put the "prismarine" folder into the "worldmods" folder of the converted map.
Test it e.g. with Pirimidin ! Apartement For People !.
map_content.txt
Code: Select all
168 0 prismarine:prismarine
168 1 prismarine:prismarine_brick
168 2 prismarine:prismarine_dark
169 prismarine:sea_lantern
Minetest can have nice emeralds too: oresplus by jp.
With that you can do:
map_content.txt
Code: Select all
129 oresplus:stone_with_emerald
Code: Select all
133 oresplus:emerald_block
- Attachments
-
- prismarine.zip
- (109.86 KiB) Downloaded 206 times
-
- prismarine.png (68.42 KiB) Viewed 2259 times
I am okay with using the screenshots in all my posts for the website of Minetest (http://minetest.net).
Re: Convert Minecraft maps to Minetest worlds
Can this work on windows ?? or only for linux???
Re: Convert Minecraft maps to Minetest worlds
It's possible that it works under Windows, but nobody has tried or tested it. The script is fairly complex and you'd have to setup a lot of tools to make it work under windows, so it's not really worth anyone's time TBH.Bookkc wrote:Can this work on windows ?? or only for linux???
Re: Convert Minecraft maps to Minetest worlds
sofar wrote:It's possible that it works under Windows, but nobody has tried or tested it. The script is fairly complex and you'd have to setup a lot of tools to make it work under windows, so it's not really worth anyone's time TBH.Bookkc wrote:Can this work on windows ?? or only for linux???
So i need a linux and python ? what librarys me need ?? And if i need a Xserver???
Re: Convert Minecraft maps to Minetest worlds
It's documented in the post: python3 and Zenity. You can run the conversion without zenity if you know what you are doing.Bookkc wrote:So i need a linux and python ? what librarys me need ?? And if i need a Xserver???
Who is online
Users browsing this forum: No registered users and 11 guests