Minecraft to Minetest Block Converter (mcblocks)

Post Reply
dgm5555
Member
Posts: 245
Joined: Tue Apr 08, 2014 19:45

Minecraft to Minetest Block Converter (mcblocks)

by dgm5555 » Post

This mod provides a layer to make direct use of minecraft texture packs.
Download: https://github.com/dgm3333/mcblocks

It has primarily been developed to allow conversion of minecraft worlds using mcimport viewtopic.php?f=5&t=11146&start=25 without using minetest blocks

At this point it's still an alpha, but is quite functional for exploring new worlds imported with mcimport

It provides basic conversions for approximately 1000 nodes which will fit the names of the .pngs found in the current minetest (1.81) and associated texture packs.

I've also provided a map_content.txt file which will enable worlds to be imported by mcimport. You'll need to replace the one in mcimport with this file to fully enable mcblocks during an import.

TO USE:
1. Download a minecraft texture pack
2. Extract the assets folder into the mod folder (retain the name and folder structure).
When the mod is loaded by minetest it will will automatically move the files from the relevant directories into the texture folder, overwrite any existing files (ie replacing an exisiting texture pack unless there are any missing files), and delete the assets folder (at least on linux).
3. If you want a new texture pack, just copy a new assets folder into the mod folder.

NB not all texture packs are complete, so if you have missing textures, try another pack. Any existing files will be overwritten, but files which don't have a replacement won't be deleted. Please follow the licenses, so although you could also start by extracting the assets folder directly from minecraft I'm not sure that using these textures in minetest would be licensed)


Caveats:
Currently there is no functionality for the blocks (eg furnaces don't burn, chests don't work, nor do crafting tables, crops don't grow, etc)
I haven't tested for texture packs from versions prior to 1.8.
The names of nodes within the mod aren't exactly the same as the newer style of minecraft, there were some inconsistencies in my sources and it took me a while to realise what was correct. Anyone who wishes to do so is welcome to rename them all and push to git (but you'll have to do it in one go, I'm not going to import them piecemeal).

-- TODO:
-- Version 1: Still outstanding:-
-- TODO:
-- NB currently doors aren't working, rotation of many blocks is incorrect
(there is a mcDriver tool which provides a de-complexified screwdriver and displays corrected values if you want to figure out what rotation (param2) values in map_content.txt should be)
-- Working Doors, Gates, Fence
-- Correct node registration to give blocks 'usual' properties (eg diggable, flammable, etc)
-- utilise 3D models: /assets/minecraft/models, and 3D textures /assets/minecraft/textures/entity (eg for chests, skulls, hoppers, ...)
-- Special Block Functions (doors, chests, enchanting table, crafting table/workbench, furnace, anvil, cake, signs, ladders, rails, growing crops) - some of this will require edits of both mcimport and this mod.
-- Fix glitchy water and lava (which flows more widely the minecraft equivalents and currently varies between block types

-- Version 2 plans:
-- Functioning Redstone
-- Import most/all entities (eg mobs)


The following are from various minecraft worlds (from planetminecraft) using the OzoCraft-1.8b texture pack
Theltsoh's texture pack test track:
Image
Theltsoh's texture pack test track:
Image
TheTourist v1.2:
Image
TheTempleOfNotch v1.4.6-disco:
Image
Last edited by dgm5555 on Sun Jan 31, 2016 16:01, edited 3 times in total.

User avatar
Hybrid Dog
Member
Posts: 2835
Joined: Thu Nov 01, 2012 12:46
GitHub: HybridDog

Re: Minecraft Texture Pack Converter

by Hybrid Dog » Post

There are already lots of other mc → mt texture pack converters.
l think if you use $ ln -r you could just make links to the textures.
So you can e.g. make a folder with all texture links, which e.g. lead to ../mcTP/.

EDIT:
working code draft for a .sh file to link the textures:

Code: Select all

#!/bin/bash

# the path to the mc texture pack folder
mctp_path=./mctp

# the command used for linking
link="ln -r -s"

# the path to the block textures
block_folder=${mctp_path}/assets/minecraft/textures/blocks/


echo "linking textures…"

$link ${mctp_path}/pack.png screenshot.png

$link ${block_folder}/glass.png default_glass.png
$link ${block_folder}/obsidian.png default_obsidian.png
$link ${block_folder}/grass_side.png default_grass_side.png
$link ${block_folder}/stone.png default_stone.png
$link ${block_folder}/planks_jungle.png default_junglewood.png
$link ${block_folder}/sand.png default_sand.png

echo "done!"
the code doesn't require an available texture pack
but to test if it works, put the mc TP folder into the folder with the links and call it mctp
if it was finished, you would only need to download the folder with links, put the mc texture pack into it and name this mc TP folder mctp

‮‪‮
‮‪‮
‮‪‮
‮‪‮
‮‪‮
‮‪‮
‮‪‮
‮‪‮
‮‪

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

Re: Minecraft Texture Pack Converter

by dgm5555 » Post

@HybridDog: This mod links up the textures with the names of the blocks/items in minecraft, and enables minecraft-style blocks to be used in minetest. What you seem to have described is nothing but moving files around, and the graphic is useless without being actually linked to something. I also can't see any point of adding a bash script when the lua code does it perfectly well and unlike bash should be independent of os. However if there are actually lots of other converters of a similar nature (I couldn't find any), it would be helpful if you could provide links. I would much rather work on a project with someone else than build my own. Tx

User avatar
Hybrid Dog
Member
Posts: 2835
Joined: Thu Nov 01, 2012 12:46
GitHub: HybridDog

Re: Minecraft Texture Pack Converter

by Hybrid Dog » Post


‮‪‮
‮‪‮
‮‪‮
‮‪‮
‮‪‮
‮‪‮
‮‪‮
‮‪‮
‮‪

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

Re: Minecraft to Minetest Block Converter

by dgm5555 » Post

Oh I get what you mean.
The problem is that when converting a minecraft world, using minetest blocks doesn't necessarily work very well. Amongst others, problems were that doors didn't open correctly, rotation of blocks is very random and difficult to predict, even simple items such as the anvil don't have a direct equivalent, even simple things like layered snow although available again required a whole new mod, and ultimately some of the redstone circuits will never function if converted into mesecon without drastic remodling of the world or a code rewrite.
Also I ended up needing over 10 different mods to get the relative basics of a minecraft world functioning, and even then it was pretty glitchy, and having thousands of un-used blocks seemed potentially a bit resource heavy.
I therefore decided it would be easier to have one mod which could hold the functions of the minecraft blocks as they were meant to work so imports were far more consistent.
Actually when it comes down to it this mod is far less about the textures and more about the function of the blocks, so you are right your mod does a perfectly adequate job of converting the textures, and actually from one point of view it would be far more sensible to use the very sophisticated minetest mods to supply the features, I just wanted something a bit 'tidier' (which I haven't yet got)...
Anyway, I've renamed the post to reflect this...

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

Re: Minecraft to Minetest Block Converter

by Sokomine » Post

I've found your posting a bit too late. Anyway, my own version has to do part of the conversion of nodenames for the actual import script and was thus initially created by taking a list of MC nodenames and their textures. The doors are working; but that is due to the import script asking twice if it encounters such a strange node (same for double plants). If anyone comes up with better node definitions for one of the mods, it might be of intrest to the other one as well.
A list of my mods can be found here.

Post Reply

Who is online

Users browsing this forum: Google [Bot] and 30 guests