Skip to content

Instantly share code, notes, and snippets.

@ReperakDev
Last active July 16, 2023 22:03
Show Gist options
  • Save ReperakDev/ebdf98c128757ba26774f2568c7a18b6 to your computer and use it in GitHub Desktop.
Save ReperakDev/ebdf98c128757ba26774f2568c7a18b6 to your computer and use it in GitHub Desktop.
Document containing instructions on building the Iris shaders mod for Fabric in protest of Coderbot's recent decision regarding precompiled binaries.

Created in the spirit of free information, this document details the process of building Iris for Fabric, along with prerequisites.

Under the GNU GPLv3 license, anyone is fully allowed to share this information regarding the build process and distribute binaries.

Prereqisites

First, you'll need a Java 8 JDK, which is a suite of tools used for developing and compiling with Java. OpenJDK is recommended.

Windows

On Windows, you can get it from here (this link automatically selects the right JDK you'll need, just press the blue button)

The defaults for the installer should be sufficient.

Linux

Ubuntu

sudo apt install openjdk-8-jdk

Arch/Manjaro

sudo pacman -S jdk8-openjdk

Compiling

These instructions are made for Windows users, but for us Linux users, the commands can easily be substituted.

Sodium Compatibility

First, head to the Iris GitHub repository. From there, find the button to the left that says "trunk", and click on it to expand it. From the opened menu, look for the branch titled "sodium-compatibility", and click on it. Then, click on the green "Code" button to the right, and select "Download ZIP". Save that file to your computer.

Next, unzip the file into a folder. Open command prompt (or a terminal for Linux) and enter the directory you've just unzipped. Type dir and check to see if there's a file called "README.md". If there is, you're in the right place. Run gradlew.bat build, and wait. It should download Gradle, and begin compiling. If all has gone well, you should be greeted by a bright green message that says "BUILD SUCCESSFUL". Open your file browser, and open the new folder created called "build", and then into "libs". You should be presented with four jars, copy the one without "sources" or "dev" in the name (e.g. "iris-0.1.0-sodium_compatibility.jar"), and move it to your downloads folder.

Normal Sodium won't work with this jar you've just created, you'll need to compile the custom fork also maintained by Coderbot. Head to the Iris Sodium fork repository and just click the green button and download as zip again. Unzip the file, and repeat the same process as before, gradlew.bat build etc. This build will fail; this is expected. After the build fails, copy the jar you compiled from before (e.g. "iris-0.1.0-sodium_compatibility.jar") and paste the jar in the folder in "build" named "loom-cache" (Remember to copy the file, not cut! You'll need that jar later!). Now, rerun gradlew.bat build. If you've done everything right, the build should be successful this time. Open "build", then "libs", and take out the jar without "sources" or "dev" in the name (e.g. "sodium-fabric-mc1.16.4-IRIS-SNAPSHOT.jar")

You should have two jars now, named something like, "iris-0.1.0-sodium_compatibility.jar", and "sodium-fabric-mc1.16.4-IRIS-SNAPSHOT.jar". If the version numbers are different, then it had an update from when this document was written. If you have both of these jars, you are done with the hard part! Hooray!

Installing

The two jars you've made can be thrown into your "mods" folder like any other mod. If you don't know how to install a mod, you can find out here.

Wrapping Up

If you've done everything right, you should have the Iris mod running without donating! If possible, share this document with anyone who would like to get this mod free of charge.

Enjoy!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment