Skip to content

Alexdoru/ExampleMod1.8.9

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 :

Mod Desc
Normal a basic example mod
Mixins an example mod with mixins ready
MWE Addon an addon for my mod MWE

Getting started

  1. Install IntelliJ IDEA Community Edition.
  2. In IntelliJ, click Get from VCS and paste this repo's URL: https://github.com/Alexdoru/ExampleMod1.8.9.git.
  3. (Optional) Install the Minecraft Development plugin via Ctrl+Alt+S > Plugins, then restart IntelliJ.
  4. Set the project SDK to Java 8 via File > Project Structure (Ctrl+Alt+Shift+S). IntelliJ can download one for you.
  5. In the Gradle panel, open Build Tool Settings > Gradle Settings (wrench icon) and set Gradle JVM to the same Java 8 JDK.
  6. Under Tasks > forgegradle, run setupDecompWorkspace, then restart IntelliJ.

Common tasks:

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

Making it your own

Source code lives in src/java. Update these files:

File Edit
ExampleMod.java MODID, MODNAME, VERSION
gradle.properties Edit all the fields
Package com.example.examplemod Rename via Shift+F6

Keep modid/modname consistent across all files. Each file has comments to guide you.

Useful IntelliJ keybinds

Keybind Action
Shift Shift Search everything
Ctrl+N Search Java files
Ctrl+Shift+F Search text in all files
Ctrl+Click / Ctrl+B Go to declaration
Alt+Enter Show fixes/suggestions
Alt+F7 Find usages
Shift+F6 Rename element
Ctrl+Alt+L Reformat code
Ctrl+Alt+O Optimize imports
Ctrl+/ Toggle comment
Alt+Insert Generate code
Ctrl+Alt+S Open settings

About

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

Resources

License

MIT, Unknown licenses found

Licenses found

MIT
LICENSE
Unknown
LICENSE-fml.txt

Stars

23 stars

Watchers

1 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages