LatvianModder's Modding Tutorials


  1. Intro
  2. Setting up workspace in IntelliJ IDEA
  3. gradle.properties & Dependencies
  4. GitHub & Multitple mods in one Project
  5. Proxy, Sides, Event Handlers & Basic mod files
  6. Items & Recipes
  7. Blocks
  8. Block States
  9. Tile Entities
  10. Tile Entity Special Renderers
  11. Commands & Server/Client only mods
  12. Config
  13. Capabilities
  14. Guis and Containers
  15. Network & IMessages
  16. Entities
  17. Loot Tables
  18. Sounds
  19. Access Transformers & Reflection
  20. Advanced IRecipes
  21. Other useful resources

GitHub & Multitple mods in one Project

What is Git/GitHub?

  1. You have probably seen it before if you have submitted an issue for a mod, because that's where they usually go.
  2. In simple words, git keeps track of your code changes as Commits in different Repositories (Projects).
  3. A single repo can also have multiple branches, which in Minecraft modding are usually used for different MC versions.

Create GitHub repository

  1. Go to https://github.com/, register if you haven't already, and in your Repositories page, create new.
  2. Make sure you set "Initialize this repository with a README" to true.

Optional step - Access Token

  1. I recommend to use tokens instead of email+password.
  2. You need to go to https://github.com/settings/tokens and generate a new one if you dont have one.
  3. Choose name, permissions (select everything, if you don't really care, or just "repo" and "gist" for minimum).
  4. Don't lose the code that gets generated, because you won't be able to see it again later.
  5. You can delete tokens, create multiple for different needs, etc.
  6. Don't share this token with anyone else, because anyone who has it, can upload to your GitHub.

Git executable

  1. If you don't have git installed, get it from https://git-scm.com/ and follow instructions for your OS.
  2. You might have to add it's bin folder to path, just like with Java

Idea Project Setup

  1. Open Idea
  2. Create a new Project, select it's name and location.
  3. Change default module name to "MC".
  4. When project is created, delete the "src" folder in MC module.

Mod module

  1. Click VCS -> Checkout from Version Control -> GitHub.
  2. If it asks you, Enter "github.com" as hostname, and your token or email+password.
  3. Select the GitHub project your want to clone, change "Parent Directory" to the location of this project, and press Clone.
  4. If you have a previous mod, unlinked with GitHub, you just copy all of it's files to the directory that was created/cloned.
  5. To add your mod to project, go to File -> Project Structure -> Modules -> Import Module -> /build.gradle.
  6. Unselect "Create module per source set", and click OK.
  7. Run "setupDecompWorkspace" Gradle task for this module and refresh it afterwards.
  8. Go back to Project Structure, and select MC module -> Dependencies -> + -> Select your mod module and add it, change Scope Compile to Runtime.

Run Configuration

  1. Create new "Application" run config and name it "Client".
  2. Enter "GradleStart" as "Main class".
  3. Add "\MC" to "Working directory".
  4. You can leave "Program arguments" blank, check first tutorial for more info on them.
  5. Select MC in "Use classpath of module".