Players always want more features that developers have the time and inclination to add, and the more technically able look for ways to change and exploit the software themselves. In my opinion, The modding communities generally strengthen and add to the game, extending the lifetime of a product and often producing high quality output. Developers of games have understood this relationship and lots of games support modding in various ways (level generation, adding features, scripting etc…) E.G. most Valve games, World of Warcraft, Skyrim, and many others.
Minecraft is written in Java and currently doesn’t support modding directly. however because it is written in Java the game can be decompiled from the delivered “executable” to sources that can be modified, changed and recompiled. That statement is a gross over-simplification of the process, but is in essence what people have been doing to Minecraft almost since it was released.
The modding community in Minecraft have extended the basic sandbox game greatly by adding new Blocks, Items and behaviors to the game; In some cases making it almost unrecognizable to the vanilla game. There is a Darwinian process where Minecraft is the ancestor and still thrives, but modded offshoots grow and multiply. If you look at the rise of modded minecraft it is linked to the current trend for people to produce content for YouTube or live streams (e.g. twitch). People record themselves playing and publish that for others to watch and learn from.
Actually running modded minecraft was a problem for a lot of players since it required a level of technical expertise, or proficiency. Now thanks to launchers produced by the community (E.G. Feed the Beast [FTB] ), the bar to entry has lowered and anyone can play minecraft with the mods people produce. These launchers handle the installation of the software to actually run the mods, and web sites and third party software like Curse collate lists of Mods for Minecraft (for many games actually). There is a planned union of FTB and Curse underway and this merger will unify the process of getting mods and running them still further.
The Modding process
As alluded to above, decompiling the executable downloaded from Mojang into source code is only the first step required. The source is Obfuscated when compiled and so the output of decompilers will be convoluted and hard to read.
public static final Block field_71981_t = (new BlockStone(1)).func_71848_c(1.5F).func_71894_b(10.0F).func_71884_a(field_71976_h).func_71864_b("stone").func_111022_d("stone");
public static final BlockGrass field_71980_u = (BlockGrass)(new BlockGrass(2)).func_71848_c(0.6F).func_71884_a(field_71965_g).func_71864_b("grass").func_111022_d("grass");
public static final Block field_71979_v = (new BlockDirt(3)).func_71848_c(0.5F).func_71884_a(field_71964_f).func_71864_b("dirt").func_111022_d("dirt");
Some of that code *is* understandable to a human reader,
BlockGrass for example, and it is from these clues and hours spent in debuggers that the community was able to produce tools to turn the above into something much more usable.
public static final Block stone = (new BlockStone(1)).setHardness(1.5F).setResistance(10.0F).setStepSound(soundStoneFootstep).setUnlocalizedName("stone").setTextureName("stone");
public static final BlockGrass grass = (BlockGrass)(new BlockGrass(2)).setHardness(0.6F).setStepSound(soundGrassFootstep).setUnlocalizedName("grass").setTextureName("grass");
public static final Block dirt = (new BlockDirt(3)).setHardness(0.5F).setStepSound(soundGravelFootstep).setUnlocalizedName("dirt").setTextureName("dirt");
Mod Coder Pack (MCP) is a set of tools that will Decompile and Deobfuscate the Minecraft “executable” allowing modifications to be made to the basic code. It also provides a way to then package up the code into a working java “executable” again once you are done.
The proliferation of mods and peoples desire to use them together means that simply using MCP on its own quickly becomes a bit of a nightmare. Each mod author has his own copy of the source code and modifies it to achieve his desired effects. To make these mods play together you would need to have all the mod authors work together and then compile everything at the same time. You need to coordinate all the mods in Java source code so they play well together or it won’t work. (Identifiers, use of resources etc…) The other thing is that with MCP alone, adding new mods to your game also required going through the whole cycle again.
So the community created Mod loaders (plugin loaders). This is essentially code that modifies the original minecraft sources once, and in a standard way for all mod authors. The added loader provides a standard way for others to add functionality to Minecraft which is loaded dynamically from a separate zip or Jar file (Bukkit or FML are examples of this type of modification again )
Minecraft Forge is a framework that facilitates the creation of “mods” that extend and enhance “vanilla” Minecraft . It uses MCP to set up the sources for a development environment, adds changes from FML, and then organizes the code allowing them to develop “Forge” compliant mods for the user.
Next I’ll be looking into how FML adds support for the mods…