-
-
Notifications
You must be signed in to change notification settings - Fork 199
Updating your ModLoader mod using FML
This is a simple how to for updating your mod using FML.
- Grab the source distribution from the downloads area. They're always named
fml-src-*.zip
. - Grab MCP here.
- Download both the client and server of minecraft. FML requires clean jars—do not put anything in them.
- Unzip MCP to a new directory.
- Unzip the fml-src into the MCP directory. (It should create a directory
fml
) - Put the server jar in the
jars
directory, and the client jar in thejars/bin
directory (jars/bin
is generally a copy of a minecraft clientbin
directory). This is the standard MCP setup. Consult their directions if you are confused. - Run
install.sh
orinstall.bat
inside thefml
directory. This will run the decompilation for MCP, as well as merging the server and client code into a single source tree.
At this point you have a working FML based MCP environment. The code for minecraft is mostly located in the "common" directory, with some client specific rendering code in "client".
You should then take your code and place it in either of the directories common or minecraft, depending on where you feel is most appropriate. "recompile" works as normal, as does "reobfuscate". You can run the client and the dedicated server from MCP as you would expect. The eclipse workspace is updated to reflect the fact that there really is only one source code base, so you only see the "Minecraft" project.
Some warnings are generated by FML—they're to try and encourage good coding practice, specifically, you might see a warning about using net.minecraft.src
for mod code. This is a (maybe not very) friendly warning that it's considered less that best coding practice to put code into the net.minecraft.src
package.
If you make changes to base code (so-called base edits), you may find that the FML generated code is somewhat different because it has merged. Also, FML hooks things slightly differently, so you may find your base edits are not directly compatible to FML. In general, I recommend that if you need to base-edit, look at minecraft forge, where most base edits have been done for you already.