NOTE: This is not a tutorial for making mods with ModLoader, if you would like me to make one for that, make a comment about it, and I may consider doing it.
Today, I'll be showing you how to setup Eclipse for MCP. I'm going off the assumption that you have read the first part, so you have all your MCP set up and all. Now, you will only need one more thing for this tutorial, Eclipse, so head over to eclipse.org/downloads/ to and download Eclipse IDE for Java EE Developers, you don't HAVE to use Eclipse, however, I do highly recommend it, and it's what I will be using.
Once you've installed/extracted Eclipse, open up eclipse.exe (or the IDE you are using.)

The text field will start off at a different workspace, so just click the "Browse" button and direct it to your mcp__/eclipse/ folder, then hit "OK". (The good thing about MCP is that they have the workspace setup already for you, so you don't have to manually add packages, etc.)
Now, you'll see a screen pop up with "Package Explorer" on it, and 2 folders that say "Client" and "Server", if you don't want to make a server mod, you can just delete that folder. For a client mod, just click the drop down arrow on "Client", then on "src" and finally on "net.minecraft.src", and you'll see this large list of .java files.

This is the Minecraft source code (De-compiled to the best of our current ability.) You can edit and these files by double clicking on one, and then you can edit anything in the file. Another great thing about Eclipse, is these 2 buttons.
The one on the left is for debugging, and the one on the right is just play. This way, you can play with your mod, and edit things without having to recompile yet, in case you make any mistakes. With debug mode, you can actually make changes, that will occur instantly, with no need to restart the game, so you can for instance, add a block to the creative mode inventory, and then open your inventory, and it will be there without having restarted the game. Very useful buttons.
Next part, I'll show you how to actually edit the game (such as add a block or something.) and then recompile and re-obfuscate.
No comments:
Post a Comment