How to Mod your MineCraft game using MineBack Ultimate

Overview:
This is a quick guide to modding MineCraft using MineBack Ultimate.

I will show you how to: Update Graphics , Alter Names and Text and Apply 3rd Party Mod's .
 
Summary:
Launch MineBack Ultimate, then from the main screen check the Details check box to reveal the World Summary pane 1. Click on the button 'Modding Helper' found below the World Summary Pane. A window titled 'MineCraft Moding - Helper Utilities' will appear with a set of basic instructions on how to proceed. To begin modification click the button 'Extract MineCraft.jar (Prepare)' which will extract the MineCraft game files into a location on your computer and open up an Explorer Window giving you access to all the MineCraft files. When you have finished updating the MineCraft files, simply click 'Update MineCraft.jar (Apply Changes)' to apply your mod.
 
When you launch MineBack Ultimate you will be presented with a screen similar to the one that follows. In the top left corner of the screen there is a blue check box entitled '(Details)' (if you do not see this checkbox, you may need to update your copy of MineBack from the main page, this feature first appeared in version v10.5.0.0).
  1. Tick the World(s) (Details) check box to show the World Summary Pane (seen to the right hand side of the main window when the checkbox is checked; Contains world related details such as World Name, World Folder, Dimensions(s), Spawn Point etc).


  2. Click the Modding Helper button to open the Moding Utilities Window

When you first use MineBack to begin modding, be sure to click the Extract MineCraft.jar (Prepare) button to perform the initial extraction. Once the extraction process completes a Windows Explorer window will open listing the extracted files:

Extraction Folder

Full extraction of the MineCraft.jar only needs to be performed once, afterwards you can simply click the Open Extraction Folder (Make Changes) button to make further updates.

The moding helper utilities window itself explains an overview of how to use its buttons, so for this guide I will now focus on specific MineCraft moding activities:


Altering MineCraft Graphics

Overview :
MineCraft uses Portable Network Graphic (PNG) format images for all its graphics. There are many uses of graphics in the game, but gladly they tend to be grouped together into logical sub-groups (for example, all the graphics for the title screen are in the title folder). Most of the games graphics can be modified via a texture pack and this should be the preferred approach where possible (since it allows you to more easily return to the default look and feel).

Summary :
In general terms, locate the folder containing the graphic you wish to update and then double click on that graphic.

For example, to modify the splash logo, double click on the 'title' folder, then right click on the file 'mojang.png' and select the 'Open With' option followed by choosing the editing program of your choice2. How to edit Splash Screen

2. Microsoft Paint supports very basic PNG image editing, but it is rather crippled in terms of functionality (transparency not supported). I recommend acquiring a good image editing tool such as Paint Shop Pro or perhaps the open source Gimp (if your on a tight budget).

Here is a list of the graphics which can be customised (with the folder to find them listed in the brackets):
 

Altering MineCraft Text / Names

Overview :
MineCraft is rather disorganised when it comes to where it stores names and text, but since multi-lingual support was added there is one central repository for most display names. Some values are hardcoded into the class files and great care needs to be taken when updating those files (since some names may also be keywords).

Summary :
Starting from the Extracted Explorer View. Locate and open the folder called lang. This folder contains a number of files with the extension .lang, these are ASCII/ANSI format coded files using line feed (0x10) line separation. This is a Unix style encoding (windows using the more historically correct line feed [0x10] and carriage return [0x13] notation). This poses a problems for editing the files since most Windows Text editors will convert the single line feed into a line feed and carriage return (thus making the file format incorrect). Therefore I recommend using an enhanced text editor or a hex editor to modify these files3. You will need to identify the right language file for your region and then open it (so for most English speakers this will be the en_US.lang file. Each file line consists of a keyword (used to lookup the text) as the first part of the line followed by an equals character and then the value to be displayed.

For example, to modify the message displayed when the player drowns; Open the en_US.lang file (or the one appropriate for your region) and either:

death.drown=%1$s drowned

Then modify anything following the = equals character to suit.

NOTE: %1$s is a marker denoting that the player name should be inserted at that position when displayed. Since, the developers of MineBack are all non-professional coders they have not used consistent tagging in their string formats. In each case, the sequence of %#$s (where #is an ordinal number) represents something specific to that string (so, in the case of the example it means the player name. However, in other examples the same sequence denotes the key used to move left and so forth.

3. There are a number of good text editors available online. KVK Consultancy sells its own powerful hex editor which (unlike a text editor) maintains the original file format.

 

Applying third party mods (using MineBack Ultimate)

Overview :
To modifying MineCraft game code, it is necessary to replace one or more .class extension files. A .class file contains Java byte code binary which is translated / interpreted by the Java runtime into platform native code for execution. Each byte code sequence within the .class file corresponds to a Java statement or directive. There is roughly a one to one relationship between code sequences and Java statements making it possible to decompile the byte code back to a text based Java source file (usually a .java extension file). People who have made mods for MineCraft can either directly modify the byte code .class file or decompile the .class into a .java file and work with that (which is more typical). This means that when you download a mod you should look to see whether the author has provided you with the .class binary files or with some .java text based source files. If you have received the former (the .class files) then all you will be required to do to install the mod using MineBack Ultimate's Mod Helper is to copy the .class files into their correct locations (usually the mod provider will structure the release so that the files are in the right place within their archive, so extracting the files directly into the explorer window opened by MineBack for modding and then clicking the update button should by sufficient for this case). If the moder has provided the .java source files, you will have to compile these files into .class files and then place those in the correct locations within the extracted MineCraft file structure. Fortunately, most files which are of primary interest to mod developers are contained in the root of the MineCraft.jar.

NOTE: The MineCraft Java .class files have a code protection measure called obfuscation applied to them. This is most clearly evident in the naming of the .class files. Each file is named with a 1 to 3 alphabetic prefix followed by the .class extension. In the original MineCraft sources (the ones used by MoJang) each of these files has a proper useful name (for example, a.class deals with crash handling and is possibly named debug.class or crash.class in the MoJang original sources; The sources they will use to make a new release build of MineCraft). Each time Mojang rebuild the sources, they have the option off changing these randomly generated file names. It is therefore important to realise that any mod you create will have to be updated as MineCraft is updated possibly requiring the application of new file names. This is another reason why its important to get the latest version of a mod and to use mods that have ongoing support). This obfuscation is not just limited to the file names, it also effects the java variable and function names within the Java byte code. This means that when decompiling the .class files back to source java files you will get very cryptic source code. This being the case, it is inadvisable to attempt a separate mod on your own, its is better rather to download a good mod enabling package (such as FML or Buckkit, with a preference to the former) because there is a large community keeping their code up to date and compatible with releases of MineCraft.

Summary :
The first step is to find and download the mod you wish to apply; It's important to note that not all mods are compatible with all versions of MineCraft so its important that you make sure you get the version of the mod which is compatible with the current release version of MineCraft.

First, open the downloaded archive containing the mod (easiest if it comes as a .ZIP file since you then can double click the file to open it). Inspect the files inside the mod. If the files are .class files you can immediately begin applying the mod.
If they are .java files you will need to first compile the sources into their class files (for the time being such activity is out of scope of this guide).
Open the Extracted Explorer View. Then drag and drop the .class files from the mod's archive into the extracted Explorer view (agree to overwrite any files replaced. Please be careful when doing this to choose the right target so as not to overwrite any other files).

Once the copy has completed, simply click 'Update MineCraft.jar (Apply Changes)' to apply your mod. Then immediately test the mod has worked correct (NOTE: Always test a mod or mod update using a new blank world. It is possible to corrupt a world by misapplying a mod).

For example, to apply the Forge Mod Loader FML. Download the ZIP file containing the MineCraft .class files.

IMPORTANT NOTE: If the above file is unavailable for download, please take care When downloading the Forge Mod Loader (there are some sites offering versions of the Forge Mod Loader that appear to be possibly malware or spam bots; Even the main official forge site it is driven by advertisement. If possible, I recommend finding a direct link to the main official forge file share website that gives a direct .ZIP/.rar/.jar download. When applying any modification to MineCraft which adds or replaces .class files you are always at risk. Make sure you have your firewall active and you have scanned the package with an anti-virus tool as a minimum precaution.

Open the Extracted Explorer View. Extract all the files from the 'minecraftforge-universal-1.4.7-6.6.2.534.zip' archive into the .extracted(MineCraft.jar) folder prepared for you by MineBack and opened automatically in Windows Explorer.

A quick note about special filenames: MineCraft code includes a java bytecode file called aux.class. This filename is an illegal filename under Microsoft Windows. The obfuscator has probably deliberately used this filename to make it harder to extract the code base. Since this file is not legal under windows sometimes a mod provider will rename the aux.class file to another name (for example _aux.class). MineBack knows how to manage / account for this name change when recompiling the MineCraft.jar.

Click 'Update MineCraft.jar (Apply Changes)' to apply the mod loader. Then run the game and test.

If you run MineCraft normally at this stage, FML will automatically download some dependency files. If your like me and prefer to not let automated task use your internet connection without permission, here is a list of files the dependency downloader downloads, you can download each of these manually and place them in the a lib folder in the MineCraft %apppath% location.