[Mod] mcimport - import Minecraft classic maps

Post Reply
Sokomine
Member
Posts: 4276
Joined: Sun Sep 09, 2012 17:31
GitHub: Sokomine
IRC: Sokomine
In-game: Sokomine

[Mod] mcimport - import Minecraft classic maps

by Sokomine » Post

This mod allows to import Minecraft classic maps into Minetest. To some degree.

The main limit is that the area you want to import your buildings to does have to be generated and maybe even loaded. This may take a long time while you walk around. With the recommended super flat mapgen, you get flat worlds which is very beneficial in two ways: First, no map has to be generated cpu-intensively just to be overwritten later, and second, the space "above ground" will be mostly free (apart from the tree here and there).

Explore (a mod) may help you in getting your world generated and loaded.

WorldEdit is recommended because it helps you to remove anything you imported at the wrong place or don't like.

Known limits of the mod:
- Small maps, say, 64x64x64, work fine; larger ones may fail due to too much area required to actually place them on
- Right now, air and dirt (except dirt_with_grass) are not imported at all. That means that cellars and any other holes beneath the grass level will remain filled with stone. Trees and other things that are already on your Minetest map will not be removed as long as there is no block to be imported to the space they occupy.
- Water is a special case. This needs improvement. Maybe a future version will place real default:water_source where it is safe.
- No privs yet. Do not use on a productive server!

Usage: Get a level.dat that contains your Minecraft classic map. Rename that file to level.dat.gz and uncompress it so that a level.dat (this one uncompressed) remains. Put it into your worlds/NameOfYourWorld/schems/ folder. Type e.g.
/mcimport level 128x128x128 100:0:0
in your chat window to import that level (if it's not 128x128x128 blocks in size adopt that part) to the position 100,0,0 on your Minetest world. Half of the imported world will be sunk into the ground since the mod assumes that the lower half is filled with dirt. After issuing the command, wait until the game moves you around and then have a look at your imported map.

There is no point in giving screenshots as what you will see depends on the map you import and on the textures you use. The script terrain2mt.sh in the textures folder can convert a textures.png texture pack in Minecraft classic format into individual files which will then be used for your nodes.

Please consult the README.md for more details.

Download: https://github.com/Sokomine/mcimport/zipball/master
Browse code: https://github.com/Sokomine/mcimport

Recommends: super flat mapgen (not a mod!), WorldEdit, Explore.
A list of my mods can be found here.

rarkenin
Member
Posts: 668
Joined: Tue Nov 20, 2012 20:48

by rarkenin » Post

I think that to avoid having the loaded chunk issue, queue up chunk updates into a file and then actually update the chunks when the player gets near.
Admin pro tempore on 0gb.us:30000. Ask me if you have a problem, or just want help.
This is a signature virus. Add me to your signature so that I can multiply.
Now working on my own clone, Mosstest.
I guess I'm back for some time.

Sokomine
Member
Posts: 4276
Joined: Sun Sep 09, 2012 17:31
GitHub: Sokomine
IRC: Sokomine
In-game: Sokomine

by Sokomine » Post

That might be a good idea. I'd just have to remember somewhere which blocks to put where. Or override on_mapgen alltogether and just do the import at that time.

Mysterious random screenshot:
screenshot_20220818_060116.png
screenshot_20220818_060116.png (933.06 KiB) Viewed 1309 times
Last edited by Sokomine on Thu Aug 18, 2022 23:21, edited 1 time in total.
A list of my mods can be found here.

User avatar
rubenwardy
Moderator
Posts: 6973
Joined: Tue Jun 12, 2012 18:11
GitHub: rubenwardy
IRC: rubenwardy
In-game: rubenwardy
Location: Bristol, United Kingdom
Contact:

by rubenwardy » Post

Very good, it was a lot more difficult before this.
Renewed Tab (my browser add-on) | Donate | Mods | Minetest Modding Book

Hello profile reader

Josh
Member
Posts: 1146
Joined: Fri Jun 29, 2012 23:11
Location: Victoria, Australia

by Josh » Post

Cool! I have never played Minecraft classic, but this could be handy.

EnryStar
New member
Posts: 8
Joined: Thu Dec 27, 2012 11:15

by EnryStar » Post

Excellent! The mod has bugs or anything, converts all without problems?

Sokomine
Member
Posts: 4276
Joined: Sun Sep 09, 2012 17:31
GitHub: Sokomine
IRC: Sokomine
In-game: Sokomine

by Sokomine » Post

The mod has limits. Up to 64x64x64 it works fine. But keep in mind that it uses a modified water which at the moment is not very useful - and it does not place dirt and air (but that can be changed easily in the code). Larger maps may work if you ensure that the area you want to import to exists and is loaded completely. That is rather difficult for large maps :-(
Also I tried it only with those levels I had at hand. They're exports from the worldofminecraft client.
A list of my mods can be found here.

Sachou
New member
Posts: 3
Joined: Fri Aug 15, 2014 15:27
GitHub: Sachou205
IRC: Sachou205
In-game: Sachou

Re: [Mod] mcimport - import Minecraft classic maps

by Sachou » Post

Is that possible to take a part of a minetest map and import it into minecraft ?

twoelk
Member
Posts: 1482
Joined: Fri Apr 19, 2013 16:19
GitHub: twoelk
IRC: twoelk
In-game: twoelk
Location: northern Germany

Re: [Mod] mcimport - import Minecraft classic maps

by twoelk » Post

Sachou wrote:Is that possible to take a part of a minetest map and import it into minecraft ?
there seems to be no tool for that at the moment.
with all them different blocks it may be a little difficult

Sokomine
Member
Posts: 4276
Joined: Sun Sep 09, 2012 17:31
GitHub: Sokomine
IRC: Sokomine
In-game: Sokomine

Re: [Mod] mcimport - import Minecraft classic maps

by Sokomine » Post

twoelk wrote: there seems to be no tool for that at the moment.
with all them different blocks it may be a little difficult
It might work if players restricted themshelves to some blocks for which there are counterparts in MC. As this tool here is for the Classic version, the amount of blocks would be even more limited. MC Classic is no longer supported by MC - you need to use an alternate client called ClassiCube.
A list of my mods can be found here.

User avatar
Phoenixflo44
Member
Posts: 639
Joined: Fri Jul 28, 2017 15:01
In-game: EvilPhoenix
Location: Behind my PC, in Germany

Re: [Mod] mcimport - import Minecraft classic maps

by Phoenixflo44 » Post

When I load the mod comes the problem:

Code: Select all

2018-07-22 19:03:26: WARNING[Main]: NodeDefManager: Ignoring CONTENT_IGNORE redefinition
2018-07-22 19:03:26: ERROR[Main]: ModError: Failed to load and run script from /home/spike/.minetest/worlds/tjhjtrtjddtjdtjh/worldmods/mcimport/init.lua:
2018-07-22 19:03:26: ERROR[Main]: ...test/worlds/tjhjtrtjddtjdtjh/worldmods/mcimport/init.lua:51: invalid escape sequence near '"([^%s]+)%s+(%d+)x(%d+)x(%d+)%s+([+-]?%d+)'
2018-07-22 19:03:26: ERROR[Main]: Siehe debug.txt für Details.
Spoiler
I hate my life

tilt
New member
Posts: 4
Joined: Wed Jun 10, 2020 00:47

Re: [Mod] mcimport - import Minecraft classic maps

by tilt » Post

Phoenixflo44 wrote:
Sun Jul 22, 2018 17:04
When I load the mod comes the problem:

Code: Select all

2018-07-22 19:03:26: WARNING[Main]: NodeDefManager: Ignoring CONTENT_IGNORE redefinition
2018-07-22 19:03:26: ERROR[Main]: ModError: Failed to load and run script from /home/spike/.minetest/worlds/tjhjtrtjddtjdtjh/worldmods/mcimport/init.lua:
2018-07-22 19:03:26: ERROR[Main]: ...test/worlds/tjhjtrtjddtjdtjh/worldmods/mcimport/init.lua:51: invalid escape sequence near '"([^%s]+)%s+(%d+)x(%d+)x(%d+)%s+([+-]?%d+)'
2018-07-22 19:03:26: ERROR[Main]: Siehe debug.txt für Details.
Did you solve the problem? I have the same error and I don't know what to do.

Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest