Skip to content

Repository files navigation

Example Mod 1.8.9

An example mod for Minecraft Forge 1.8.9, based on the official Forge Mod Development Kit.

This example mod comes in 3 flavors, each in a separate branch, change branch to see the other examples :

BranchDescription
mastera basic example mod
mixinsan example mod with mixins ready
mwe-addonan addon for my mod MWE

Getting started

  1. Install IntelliJ IDEA Community Edition.
  2. Download the source code of this branch as a zip : master.
  3. Create a folder that will contain your project and extract the contents of the zip in it.
  4. In IntelliJ, click New project from existing sources and select the build.gradle file.
  5. (Optional) Install the Minecraft Development plugin via Ctrl+Alt+S > Plugins, then restart IntelliJ.
  6. Set the project SDK to Java 8 via File > Project Structure (Ctrl+Alt+Shift+S). IntelliJ can download one for you.
  7. In the Gradle panel, open Build Tool Settings > Gradle Settings (wrench icon) and set Gradle JVM to the same Java 8 JDK.
  8. Under Tasks > forgegradle, run setupDecompWorkspace, then restart IntelliJ.

Common tasks:

  • forgegradle > runClient – launch a Minecraft client to test your mod
  • build > build – compile your mod into a usable .jar found into ExampleMod/build/libs
  • build > clean – clear cached build files if you run into issues

Making it your own

To make the mod your own you need to update these files:

FileEdit
gradle.propertiesEdit all the fields
Package com.example.examplemodRename via Shift+F6

The modid should never change, it is used as a unique identifier by forge.

Useful IntelliJ keybinds

KeybindAction
Shift ShiftSearch everything
Ctrl+NSearch Java files
Ctrl+Shift+FSearch text in all files
Ctrl+Click / Ctrl+BGo to declaration
Alt+EnterShow fixes/suggestions
Alt+F7Find usages
Shift+F6Rename element
Ctrl+Alt+LReformat code
Ctrl+Alt+OOptimize imports
Ctrl+/Toggle comment
Alt+InsertGenerate code
Ctrl+Alt+SOpen settings

About

An Example Mod to help you get started with minecraft 1.8.9 modding with forge

Resources

Stars

25 stars

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages