Mods for Minecraft Tutorial

Before you install any mods into Minecraft, it’s essential that you understand the basics or you risk damaging your copy of Minecraft.

Modding Prerequisites

  • Knowledge of Zipping/Unzipping files, and working with a good archive utility. (such as WinRAR, 7zip, etc.)
  • Knowledge of the command line.
  • Know how to read “Stack Traces”.
  • Knowing how to submit proper bug reports.
  • Knowing how to actually install the mod and it’s prerequisites.

You may be able to get by without knowing how to do some of these things, but if you ruin your copy of Minecraft, you should seek out help from the author of the mod.

So… How do Mods for Minecraft Work?
There’s a file on your computer called “minecraft.jar” that provides everything that Minecraft needs in order to run. For example: world generation, showing blocks, managing mobs, items, and recipes. When you add mods to Minecraft, you are taking Minecraft.jar and over-writing it with the changes needed. All of these files inside of minecraft.jar that make it run are run through a process called “obfuscation”. Basically what that means is that it changes the word “recipe” to the word “bf” (for the technically minded, all class names, variable names and identifiers are turned into one or two letter nonsense names).

Further, each entity in the game (a Mob, Item, Block, etc.) has an ID so they can be described on the map. As new content is added to Minecraft, new IDs are used, so you have to be careful that the Foodgate mod you just installed doesn’t conflict badly with the new update of Minecraft that added Repeaters.

This has a few very important implications:

  • This is fundamentally changing the way Minecraft was meant to be played. So Notch, and Mojang AB will not be able to help you in any way, and are no longer responsible for crashes, data loss, etc.
  • Some mods might claim to do something like add a cute puppy to your world, but could in fact do something else, such as steal your Minecraft username/password, or install a keylogger. You have been warned.
  • When Minecraft is updated, all mods needs to be re-updated by their authors, because Mojang obfuscates the source. If a mod uses an ID number that Mojang chooses to use in the update, this will cause further issues, and your world will look weird, or potentially be completely broken and unusable. Mod authors do this of their own free will, and it can take weeks for them to update. However, this doesn’t mean you should harass the author about it.
  • If two mods do similar things, they will likely be incompatible, because they both will try to change the “bf” (or “recipe”) file. (This is not strictly true, but more on this later)
  • You may be adding new entities to your worlds, so if you ever have to remove the mods (say because of a Minecraft update), that world will no longer be compatible.

How to Find Your minecraft.jar File

Windows ME/95/98/XP:

1. Click start.
2. Click Run….
3. Type %AppData%.
4. Open .minecraft.
5. Open bin.

You will see minecraft.jar (It may appear only as minecraft)

Windows Vista/7:

1. Click the Start Icon.
2. In the Search Bar, type %AppData% and press Enter.
3. Open Roaming.
4. Open .minecraft.
5. Open bin.

You will see minecraft.jar (It may appear only as minecraft)

Macintosh:

1. Click Finder.
2. From Places, choose your Username.
3. Open Library.
4. Open Application Support.
5. Open minecraft.
6. Open bin.

You will see minecraft.jar

Linux:

1. Open you Home Folder.
2. Do NOT open the Minecraft launcher, modifying this file will break your Minecraft Launcher, but will not permanently damage you Minecraft version
3. In there, press Ctrl+H to see hidden files
4. Open the .minecraft you see
5. Open the bin folder in there

You will now see you minecraft.jar file
Making Backups

If you are going to mod, you will want to do 2 things:

  • Back up your worlds
  • If you have had previous mods installed, back up the minecraft.jar too, so as not accidentally uninstall mods

Backing up your worlds should be done every time you install a new mod
Modloader, Spawnlist and friends

There are many mods for minecraft that absolutely require other mods to work, because they use some the commands these other mods give. These are also known as utility mods. These mods include modloader (for adding mods in general), audiomod (for adding sounds), ToolUtils (For making specific tool functions), spawnlist (for adding new mobs), More ID’s (to give a greater amount of items), and Turbomodel (for more advanced models). These mods that are required by some mods will need to be installed with the mod before minecraft is run. Without them, the mod will not work and can even lead to Minecraft crashing.

Managing item and block IDs

Most of the time, mod authors will give a configuration file to change item ID’s. Find the conflicting ID, and change it. Just remember that when an update for minecraft or for the mod comes out, you must use the same item ID’s, or suffer the crashes.

V4 or V5?

Modloader V4 is still a common modloader. However, as mods progress, you will find that Minecraft mod authors update their mods to work on V5 instead. Please note that V5 mods are not backwards compatible, and you will have to start with a vanilla copy of the minecraft.jar to install V5, so replacing files will not work.

Dealing with your first crash

  • Running minecraft in command line mode to get a stack trace.
  • Posting this stack trace as an error report on the mod authors website/forum/thread.
  • If using Modloader, check the log in the .minecraft folder for errors.

How to effectively get help

  • Delete the META-INF folder.
  • Check to make sure there are no conflicting mods.
  • If using a Modloader mod, make sure the correct version of Modloader is installed.

Installing Your Second Mod: Testing for Compatibility.

Open your “minecraft.jar” folder (How to Find Your minecraft.jar File) with an archiving utility such as WinRAR or 7-Zip, and drag the mod files from the folder you downloaded, to the minecraft.jar folder. Most mods require the folder “META-INF” inside of minecraft.jar be removed before the mod can work.

Dealing with Crashes

  • Your mod may be conflicting with block or item IDs. Check the place you got the mod to see if anyone else is having the same errors, and see if there is a solution.
  • You may have forgot to delete your “META-INF” folder. Most mods require that this folder be removed before loading the mod will work.

Thanks to minecraftwiki.net for the information