forked from MinecraftForge/MinecraftForge
-
Notifications
You must be signed in to change notification settings - Fork 0
If you want to contribute to Forge
luacs1998 edited this page Mar 19, 2014
·
24 revisions
Prerequisites: Eclipse (3.7 or better is probably good), Ant 1.8.2+ (the java build tool)
- Fork the MinecraftForge repository
- Clone your repository, and make sure you initialize the FML submodule (
git clone --recursive [your URL]
) - Run "gradlew setupForge eclipse". If you're on Windows, do
.\fml\python\python_fml.exe setup.py
from your Forge root. If you're on Mac or Linux, you probably already have Python installed and can dopython setup.py
. This also sets up FML - You will have an "eclipse" folder in your Forge root. There will be two projects - "Clean" and "Forge". Make your changes to "Forge"
- Make sure you run and test your changes
- Run "gradlew genPatches" (in the Forge root) to generate patch files for Minecraft base classes
- Submit a pull request. Explain as much as you did
- Take your time. Make sure your code does what it's supposed to do and does it well. Your PR probably won't be accepted if it doesn't cover all the uses
- Indent your code properly, and follow the conventions (take a look at other classes and read the code before editing). Space instead of tabs, open braces on a new line, etc.
- To update your repo to latest code from the official repository:
- If it's the first time, add a remote for the official repo (
git remote add upstream [email protected]:MinecraftForge/MinecraftForge.git
) - Get the updates (
git fetch upstream
), and make sure you're on master (git checkout master
) - If you don't want to rewrite your history (e.g. others have cloned your repository), do a merge (
git merge upstream/master
). For keeping pull requests as clean as possible, do a rebase (git rebase upstream/master
). Git may reject your push the first time after each rebase and you'll have to dogit push -f origin master
(orgit push origin master --force
).
- If it's the first time, add a remote for the official repo (