Requirements to Run Your Game?

So, I’m working on a Minecraft style game and want to use their assets but not their engine. Basically, I’m making a nazi zombie survival type game, but inside a Minecraft building. I also plan to make the graphics look more updated but that’s irrelevant. Since I want it to look like Minecraft, I am using the Minecraft assets.

Okay, so long story short, due to legal reasons, in order to distribute my game, it needs to be considered a Minecraft Mod. So, I was wondering, is there any way for the unity executable to check if the user has Minecraft installed in order to run? Or possibly use the assets found in the user’s Minecraft directory so it is truly dependent on the Minecraft client?

Just check for the minecraft folder in appdata.
You can use this function to get the “%appdata%” directory:


check for the “.minecraft” folder and to access the “assets” (i guess you mean the terrain texture) you have to extract the terrain.png from the “minecraft.jar” file.



Just tested it myself and it works great:

Minecraft Terrain Texture

I’ve just written a little C# script attached to a plane-gameobject:

using UnityEngine;

class LoadMinecraftTerrainTexture : MonoBehaviour
    public static Texture2D LoadMinecraftTerrain()
        string minecraftFolder = System.Environment.GetFolderPath(System.Environment.SpecialFolder.ApplicationData) + "\\.minecraft";
        string mJAR = minecraftFolder + "\\bin\\minecraft.jar";
        if (System.IO.File.Exists(mJAR))
            Ionic.Zip.ZipFile ZF = new Ionic.Zip.ZipFile(mJAR);
            foreach (Ionic.Zip.ZipEntry E in ZF.Entries)
                if (E.FileName.Contains("terrain.png"))
                    System.IO.MemoryStream S = new System.IO.MemoryStream();
                    Texture2D T = new Texture2D(0,0);
                    return T;
        return null;

    void Start()
        renderer.material.mainTexture = LoadMinecraftTerrain();

Note: I used the free dotnetzip library to extract the texture from the .JAR file. Just download the library and place the “Ionic.Zip.dll” somewhere in your asset folder.

If the function LoadMinecraftTerrain returns “null” you can still request the user to enter the path to the minecraft.jar file. Anyway this is more a proof of concept :wink: