Documentation and resources for the Minecraft Mods station
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
README.adoc

README.adoc

Minecraft Mods Station

This repository is an attempt to create documentation and manage resources for a Minecraft Mods station at Hack the Future events.

This station had focused on modding Minecraft: Java Edition. Starting with HtF 21 we’ve favored hacking Minecraft: Pi Edition or its PC implementation (RaspberryJuice). This allows use of Python and provides a much speedier setup. Read more about it on the station-raspberry-pi repo.

System Requirements

Ideally a laptop to use with the Forge modding environment should have at least

  • a Core i7 CPU

  • 8 GB of RAM

Compiling Java for such a large project can be CPU-intensive, so a slower computer may result in much waiting throughout each debug cycle. Furthermore, Forge has heavy memory requirements, and a smaller physical RAM set may result in less memory allocated to the JVM and obscure errors.

These problems are not insurmountable, but if you find yourself with an underpowered machine at the Minecraft Mods station, consider requesting a loaner laptop from the station captain.

Prerequisites

The following are recommended prerequisites for the Minecraft Mods station. Mentors can help install them at the event. However, if they are pre-installed, participants can get started even faster.

Getting Started

Most of the lesson materials are currently stored on a Google Drive folder. You can find recent versions of the above software, as well as a README.pdf with screenshots of various hack ideas.

Once you have a recent version of the JDK installed and the Forge Mdk unzipped, run ForgeGradle via:

gradlew setupDecompWorkspace idea

If you hit an error about incompatibility with Java 9, you may have to tell it explicitly to use your Java 8 installation. On Mac, set this environment variable before rerunning gradlew:

export JAVA_HOME=/Library/Java/JavaVirtualMachines/jdk1.8.0_1??.jdk/Contents/Home

or on Windows:

set JAVA_HOME="C:\Program Files\Java\jdk1.8.0_1??"

This download-and-decompile step can take a while depending on your internet connection and computer’s horsepower. Once it’s done, make the bulk of the Minecraft source code available via:

mv build/tmp/recompileMc/sources/net src/main/java/

If on Windows, use the move command and backslashes for the path separators, i.e.

move build\tmp\recompileMc\sources\net src\main\java\

From here you can launch IntelliJ IDEA, open up the project by selecting your forge folder, and select BuildBuild Project. The initial build ought to take a few minutes.

If you’ve gotten this far, you’ve completed the bulk of the "hurry up and wait" procedure. Congratulations! From here, the ensuing steps may involve some troubleshooting but you’ll no longer need wait on compiling or decompiling an entire Minecraft project.

At this point you can begin hacking, in the sense of modifying Minecraft code and testing the resultant changes. If you’re not sure what code to edit first, again go check out some pictures and examples in README.pdf linked above.

Arun Gupta has written a README called Minecraft Modding using Forge for his devoxx4kids workshop.

These tutorials have been used at past HtF events and may reference Eclipse (another IDE) or older versions of Forge. With the help of your mentors, however, these lessons can be readily adapted to our modern environment.

AsciiDoc Format

This README is in the AsciiDoc Syntax.