Convert Minecraft maps to Minetest WorldEdit schematics

Loadable maps as opposed to OldCoder's zoomable maps
twoelk
Member
 
Posts: 1092
Joined: Fri Apr 19, 2013 16:19

Re: Convert Minecraft Maps to Minetest WE Schematics

by twoelk » Mon May 05, 2014 22:21

davi54l wrote:and what makes this dropbox link?


If the question is how to make this work read the first post:

first post wrote:Download: https://dl.dropboxusercontent.com/u/302 ... weschem.py (Right click then click “Save link as...”)
Put this in MCEdit-folder/filters


where "tomtweschem.py" is a script written in Python
where "MCEdit" is a Program that can read Minecraft worlds/maps
where ".../filters.." is a folder in the MCEdit installation

If the question is what the output file is:

The generated file is in the "*.we" format,
where "*.we" is a Minetest schematic file(ascii) that WorldEdit can import into an existing Minetest world/map
 

User avatar
davi54l
Member
 
Posts: 16
Joined: Sun Apr 13, 2014 16:21

Re: Convert Minecraft maps to Minetest WorldEdit schematics

by davi54l » Wed May 21, 2014 15:29

Good idea. Now i can play on Hogwarts map.
 

User avatar
davi54l
Member
 
Posts: 16
Joined: Sun Apr 13, 2014 16:21

Re: Convert Minecraft maps to Minetest WorldEdit schematics

by davi54l » Fri May 23, 2014 19:18

How to set position 1?
 

User avatar
sfan5
Member
 
Posts: 3636
Joined: Wed Aug 24, 2011 09:44
GitHub: sfan5
IRC: sfan5

Re: Convert Minecraft maps to Minetest WorldEdit schematics

by sfan5 » Fri May 23, 2014 19:53

davi54l wrote:How to set position 1?


https://github.com/Uberi/Minetest-World ... ds.md#pos1
Mods: Mesecons | WorldEdit | Nuke
Minetest builds for Windows (32-bit & 64-bit)
 

User avatar
davi54l
Member
 
Posts: 16
Joined: Sun Apr 13, 2014 16:21

Re: Convert Minecraft maps to Minetest WorldEdit schematics

by davi54l » Sat May 24, 2014 17:29

I typed / / pos1 and the block appeared after / brand / load Quidditch and did not show anything
 

User avatar
sfan5
Member
 
Posts: 3636
Joined: Wed Aug 24, 2011 09:44
GitHub: sfan5
IRC: sfan5

Re: Convert Minecraft maps to Minetest WorldEdit schematics

by sfan5 » Tue Jul 15, 2014 07:55

A beta version of this filter that creates .mts schematics (faster to import) is now available: https://dl.dropboxusercontent.com/u/302 ... tsschem.py
Mods: Mesecons | WorldEdit | Nuke
Minetest builds for Windows (32-bit & 64-bit)
 

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

Re: Convert Minecraft maps to Minetest WorldEdit schematics

by Sokomine » Fri Jul 18, 2014 02:00

sfan5 wrote:An beta version of this filter that creates .mts schematics (faster to import) is now available: https://dl.dropboxusercontent.com/u/302 ... tsschem.py

Probably also a way to import Minecraft classic maps faster. Just converting them to an .mts file sounds like a good approach. There'll be no trouble with facedir either (Classic has none).
A list of my mods can be found here.
 

shaheerziya
Member
 
Posts: 51
Joined: Sat Dec 07, 2013 06:57

Re:

by shaheerziya » Tue Aug 26, 2014 15:26

Evergreen wrote:
Hybrid Dog wrote:great, but mlnecraft doesn't work for me

You don't need minecraft. You only need a world file, MCedit, his filter, and minetest.

It doesnot for me too
 

User avatar
Evergreen
Member
 
Posts: 2131
Joined: Sun Jan 06, 2013 01:22
GitHub: 4Evergreen4
IRC: EvergreenTree
In-game: Evergreen

Re: Re:

by Evergreen » Tue Aug 26, 2014 15:47

shaheerziya wrote:
Evergreen wrote:
Hybrid Dog wrote:great, but mlnecraft doesn't work for me

You don't need minecraft. You only need a world file, MCedit, his filter, and minetest.

It doesnot for me too

Like I said, you do not need minecraft. All you need is MCedit and a world file. Also, saying "It doesn't work" is not enough information for us to help you.
 

Michael Eh?
Member
 
Posts: 282
Joined: Sun Jan 01, 2012 17:21

Re: Convert Minecraft maps to Minetest WorldEdit schematics

by Michael Eh? » Sun Oct 05, 2014 01:22

having fun just trying to get MCEdit to run... winows version... just pops up then closes. :(
 

Michael Eh?
Member
 
Posts: 282
Joined: Sun Jan 01, 2012 17:21

Re: Convert Minecraft maps to Minetest WorldEdit schematics

by Michael Eh? » Sat Oct 11, 2014 18:41

okay, we got MCEdit to work... but the .mts files come up with "unable to load" error. :(
 

User avatar
sfan5
Member
 
Posts: 3636
Joined: Wed Aug 24, 2011 09:44
GitHub: sfan5
IRC: sfan5

Re: Convert Minecraft maps to Minetest WorldEdit schematics

by sfan5 » Sun Oct 12, 2014 15:44

What does it say in debug.txt?
Mods: Mesecons | WorldEdit | Nuke
Minetest builds for Windows (32-bit & 64-bit)
 

Michael Eh?
Member
 
Posts: 282
Joined: Sun Jan 01, 2012 17:21

Re: Convert Minecraft maps to Minetest WorldEdit schematics

by Michael Eh? » Tue Oct 14, 2014 00:10

sfan5 wrote:What does it say in debug.txt?


20:07:20: ERROR[ServerThread]: core.deserialize(): ...inetest\minetest-0.4\bin\..\builtin\common\serialize.lua:181: [string "return MTSM"]:1: '<eof>' expected
20:07:20: ERROR[ServerThread]: core.deserialize(): ...inetest\minetest-0.4\bin\..\builtin\common\serialize.lua:181: [string "return MTSM"]:1: '<eof>' expected

running minetest 0.4.10
I had the directory as schema than schems but i changed it.
 

User avatar
sfan5
Member
 
Posts: 3636
Joined: Wed Aug 24, 2011 09:44
GitHub: sfan5
IRC: sfan5

Re: Convert Minecraft maps to Minetest WorldEdit schematics

by sfan5 » Tue Oct 14, 2014 12:03

You have to use //mtschemplace instead of //load to load .mts files.
Mods: Mesecons | WorldEdit | Nuke
Minetest builds for Windows (32-bit & 64-bit)
 

Michael Eh?
Member
 
Posts: 282
Joined: Sun Jan 01, 2012 17:21

Re: Convert Minecraft maps to Minetest WorldEdit schematics

by Michael Eh? » Wed Oct 15, 2014 00:26

tried it ... several times. just sits there then the 1 marker disappears. Nothing in debug txt.

I'm just going to wing it a build Big Sight myself.
 

themtsurvivor
New member
 
Posts: 9
Joined: Tue Dec 30, 2014 00:37

Re: Convert Minecraft maps to Minetest WorldEdit schematics

by themtsurvivor » Fri Jan 09, 2015 01:37

I am getting some weird things with tomsweschem.py script in mcedit 1.7.1 and 1.8
screenshot_9951686.png
steel door owned by vanessa
screenshot_9951686.png (291.7 KiB) Viewed 9182 times

a steel door that says it is owned by vanessa??
....
I have found a fix for this error in the .we files..
using notepad++ just search and replace
{ ["fields"] = { ["infotext"] = "Owned by VanessaEzekowitz", ["doors_owner"] = "VanessaEzekowitz" }
with { ["fields"] = { }
and
doors:door_steel_b_1
doors:door_steel_t_1
with doors:door_steel
in the files in your schems directory.
any ideas?
 

User avatar
sfan5
Member
 
Posts: 3636
Joined: Wed Aug 24, 2011 09:44
GitHub: sfan5
IRC: sfan5

Re: Convert Minecraft maps to Minetest WorldEdit schematics

by sfan5 » Fri Jan 09, 2015 18:36

themtsurvivor wrote:I am getting some weird things with tomsweschem.py script in mcedit 1.7.1 and 1.8
screenshot_9951686.png

a steel door that says it is owned by vanessa??
....
I have found a fix for this error in the .we files..
using notepad++ just search and replace
{ ["fields"] = { ["infotext"] = "Owned by VanessaEzekowitz", ["doors_owner"] = "VanessaEzekowitz" }
with { ["fields"] = { }
and
doors:door_steel_b_1
doors:door_steel_t_1
with doors:door_steel
in the files in your schems directory.
any ideas?

The tomtweschem.py script does not even use the Lua format of WorldEdit files.
(It uses one of the older format which does not support the metadata that is used for door ownership)
This is not a bug in this script.
Mods: Mesecons | WorldEdit | Nuke
Minetest builds for Windows (32-bit & 64-bit)
 

themtsurvivor
New member
 
Posts: 9
Joined: Tue Dec 30, 2014 00:37

Re: Convert Minecraft maps to Minetest WorldEdit schematics

by themtsurvivor » Tue Jan 13, 2015 15:02

Thanks sfan5 for your input, but I still get owned doors.
here is an example of what testing I have done;

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
filter a steel door from a 1.8 (theothermine) map using MCEdit_dev-0.1.8build799.win32
=that will create a .we file with default:door_steel_t_1   or _b_1   * 2 pieces y aligned
using minetest 4.11 with mods mesecons,homedecor.stairsplus,worldedit
commands;   
   //pos1
   //load steeldoortest
now with this door just created you cannot break it, it is owned
Attachments
screenshot_166171480.png
screenshot_166171480.png (586.3 KiB) Viewed 9182 times
screenshot_166164645.png
screenshot_166164645.png (682.87 KiB) Viewed 9182 times
 

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

Re: Convert Minecraft maps to Minetest WorldEdit schematics

by dgm5555 » Sun Feb 01, 2015 07:55

Someone mentioned a progress bar. This does happen, but is only visible from the terminal the script is run from.
If there's any way of feeding back about the beta script can I suggest adding the following around line 260 (after the output)
print("Nodes will be packed then saved to file")
-- print("Saving file at: %s/%s.mts" % (os.getcwd(), options["Output filename"]))
print("Packing %d nodes", size[0] * size[1] * size[2])

and change
sys.stdout.write(
"\r%0.2f%% done, %d nodes / sec, ETA: %d sec(s) "
to
"\r%0.2f%% packed, %d nodes / sec, ETA: %d sec(s) "

Then finally
sys.stdout.write("\rFinished packing in %0.3f seconds. Saving to file...!" % (end-start,))

Finally curiously and rather off topic. given minecraft (using anvil format) saves blocks in YZX format because it's "the most efficient" (which I would have agreed with - put the axes which will vary the most closer together), why does minetest choose ZYX?
 

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

Re: Convert Minecraft maps to Minetest WorldEdit schematics

by dgm5555 » Sun Feb 01, 2015 09:28

How difficult would it be to make a single step python converter to take a minecraft 1.x world file, extract only the block data, and convert it into an empty minetest world (or place it at eg y=500, so it doesn't get corrupted by regen). Then our tools like worldedit would work, and the toolchain would be drastically reduced.
Worldedit is totally unstable attempting to import any large volumes. The python version of Minetestmapper-numpy can read an entire minetest world in seconds (or worst case minutes). Apparently the c version is even faster, but python is so much easier for most of us to code and we don't have to recompile for every different computer. tomtsschem.py is so incredibly slow (presumably because it's relying on mcedit to access the file, but also possibly because it doesn't follow the minecraft block order, so extraction is very inefficient.
I'm thinking it would be far better to just bypass mcedit entirely.

The minecraft anvil file format is very well documented, so shouldn't be that difficult to extract from. The difficult bit I don't understand it the files seem to have compressed sections within them, and I'm not sure how you'd go about extracting that. Actually mineblend: http://randomsamples.info/project/mineblend/ has python code to extract direct to blender, so would probably be a good start, and there are probably others

Then you could have a simple text-based lookup table to convert from a minecraft block to a minetest one (just as tomtsschem.py does) and resort the blocks into chunks for minetest.

Finally put it directly into a minetest world sqlite file with any header code.

Even if it took all night for a world to convert it would be worth it as it give minetest users access to the thousands of amazing worlds and objects built by minecraft users...
EDIT: I've started a new post on this, as the more I think about it the better the idea seems:
https://forum.minetest.net/viewtopic.php?f=5&t=11146
 

User avatar
apienk
Member
 
Posts: 12
Joined: Tue Mar 10, 2015 15:38
GitHub: apienk
In-game: apienk

Re: Convert Minecraft maps to Minetest WorldEdit schematics

by apienk » Wed Mar 11, 2015 15:14

Does this filter work both sides? I'm looking for a method to export fragments of Minetest worlds to Blender. I thought I might import a .we file in MC's WorldEdit and then use the Mineblend filter to export.
 

User avatar
sfan5
Member
 
Posts: 3636
Joined: Wed Aug 24, 2011 09:44
GitHub: sfan5
IRC: sfan5

Re: Convert Minecraft maps to Minetest WorldEdit schematics

by sfan5 » Thu Mar 12, 2015 18:03

No, this only converts Minecraft to Minetest.
Mods: Mesecons | WorldEdit | Nuke
Minetest builds for Windows (32-bit & 64-bit)
 

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

Re: Convert Minecraft maps to Minetest WorldEdit schematics

by dgm5555 » Sun Mar 15, 2015 22:02

apienk wrote:Does this filter work both sides? I'm looking for a method to export fragments of Minetest worlds to Blender. I thought I might import a .we file in MC's WorldEdit and then use the Mineblend filter to export.

There is a minecraft to blender python script called mineblend, that might provide a starter if you wished to code something specifically for minetest
 

User avatar
Kociak
Member
 
Posts: 17
Joined: Fri Apr 03, 2015 20:29
In-game: kociak

Re: Convert Minecraft maps to Minetest WorldEdit schematics

by Kociak » Fri Apr 03, 2015 20:36

Hello, my first post here, so excuse me any mistakes - english is not my native language.
I've just used this filter to import a building from minecraft's world. The thing I've noticed - imported schematic needed to be flipped along X axis. I've repeated this with two independent constructions.
 

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

Re: Convert Minecraft maps to Minetest WorldEdit schematics

by Sokomine » Sat Jul 25, 2015 19:41

mccompat is based on this approach here, although it is slightly diffrent. It takes schematics more or less directly (you have to manually gunzip them) and imports them using lua via the mod handle_schematics. It's intended for smaller objects like houses or tiny villages/towns and does handle a lot of nodes.
A list of my mods can be found here.
 

User avatar
imkongfu
Member
 
Posts: 12
Joined: Mon Jul 20, 2015 08:39
GitHub: tafqif
IRC: tafqif
In-game: imkongfu

Re: Convert Minecraft maps to Minetest WorldEdit schematics

by imkongfu » Sat Sep 12, 2015 14:16

heheh thnx
 

User avatar
eduardomezencio
Member
 
Posts: 73
Joined: Tue Sep 08, 2015 17:48
GitHub: eduardomezencio

Re: Convert Minecraft maps to Minetest WorldEdit schematics

by eduardomezencio » Tue Sep 22, 2015 00:02

I got this when trying to load the schematic in worldedit:

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
2015-09-21 20:56:28: ERROR[main]: ServerError: Lua: Runtime error from mod 'worldedit_commands' in callback on_chat_message(): .../mods/Minetest-WorldEdit/worldedit_commands/init.lua:1009: attempt to concatenate local 'count' (a nil value)
2015-09-21 20:56:28: ERROR[main]: stack traceback:
2015-09-21 20:56:28: ERROR[main]:    .../mods/Minetest-WorldEdit/worldedit_commands/init.lua:1009: in function 'func'
2015-09-21 20:56:28: ERROR[main]:    /usr/share/minetest/builtin/game/chatcommands.lua:42: in function '?'
2015-09-21 20:56:28: ERROR[main]:    /usr/share/minetest/builtin/game/register.lua:355: in function </usr/share/minetest/builtin/game/register.lua:335>


I don't know if the problem is with the schematic exported from the filter or if it's a worldedit bug. Is there a way for me to check if the schematic is 'valid'?
 

User avatar
sfan5
Member
 
Posts: 3636
Joined: Wed Aug 24, 2011 09:44
GitHub: sfan5
IRC: sfan5

Re: Convert Minecraft maps to Minetest WorldEdit schematics

by sfan5 » Wed Sep 23, 2015 20:48

Possibly a WorldEdit bug, make an issue at the issue tracker.
Mods: Mesecons | WorldEdit | Nuke
Minetest builds for Windows (32-bit & 64-bit)
 

User avatar
eduardomezencio
Member
 
Posts: 73
Joined: Tue Sep 08, 2015 17:48
GitHub: eduardomezencio

Re: Convert Minecraft maps to Minetest WorldEdit schematics

by eduardomezencio » Wed Sep 23, 2015 23:05

I'm also getting errors when applying the filters. I have attached pictures using the two versions of the filter

Here's the terminal output for the division by zero:
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 "/usr/lib/mcedit/editortools/filter.py", line 32, in _func
    func(*args, **kw)
  File "/usr/lib/mcedit/editortools/filter.py", line 410, in confirm
    self.editor.addOperation(op)
  File "/usr/lib/mcedit/leveleditor.py", line 3382, in addOperation
    self.performWithRetry(op)
  File "/usr/lib/mcedit/leveleditor.py", line 3388, in performWithRetry
    op.perform(self.recordUndo)
  File "/usr/lib/mcedit/editortools/filter.py", line 317, in perform
    self.filter.perform(self.level, BoundingBox(self.box), self.options)
  File "/home/edju/.mcedit/filters/tomtsschem.py", line 301, in perform
    float(numnodes) / nps_avg,
ZeroDivisionError: float division by zero


And here's the one about 'permission denied'
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 "/usr/lib/mcedit/editortools/filter.py", line 32, in _func
    func(*args, **kw)
  File "/usr/lib/mcedit/editortools/filter.py", line 410, in confirm
    self.editor.addOperation(op)
  File "/usr/lib/mcedit/leveleditor.py", line 3382, in addOperation
    self.performWithRetry(op)
  File "/usr/lib/mcedit/leveleditor.py", line 3388, in performWithRetry
    op.perform(self.recordUndo)
  File "/usr/lib/mcedit/editortools/filter.py", line 317, in perform
    self.filter.perform(self.level, BoundingBox(self.box), self.options)
  File "/home/edju/.mcedit/filters/tomtweschem.py", line 221, in perform
    f = open("../" + options["Output filename"] + ".we", 'w')
IOError: [Errno 13] Permission denied: u'../test.we'
Attachments
Screenshot from 2015-09-23 19-50-48.png
Screenshot from 2015-09-23 19-50-48.png (593.14 KiB) Viewed 9178 times
Screenshot from 2015-09-23 19-45-54.png
Screenshot from 2015-09-23 19-45-54.png (454.01 KiB) Viewed 9178 times
 

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

Re: Convert Minecraft maps to Minetest WorldEdit schematics

by Sokomine » Sun Sep 27, 2015 20:20

If whatever you're trying to convert isn't too big (say, not several hundered/thousand nodes in each direction), you can also save it as a MC .schematic and import the file using my handle_schematics mod.
A list of my mods can be found here.
 

PreviousNext

Return to Minetest Maps

Who is online

Users browsing this forum: No registered users and 5 guests

cron