Skip to content

Latest commit

 

History

History
55 lines (35 loc) · 1.2 KB

HACKING.md

File metadata and controls

55 lines (35 loc) · 1.2 KB

These instructions are written with Linux in mind because that is my development environment.

Java Environment

Create a ".env" file, and assign the JAVA_HOME variable to the path of the Java 21 JDK. E.g.,

# Define the version of Java to use with Gradle (i.e., "./gradlew").
JAVA_HOME=/usr/lib/jvm/java-21-openjdk

The "env-gradlew" script is a wrapper around "gradlew", and loads the ".env" file to ensure Gradle is run with the proper version of Java.

IDE Projects

Project files for IntelliJ IDEA and Eclipse can be generated by running the "idea" and "eclipse" tasks, respectively:

./env-gradlew idea
# OR
./env-gradlew eclipse

Playtesting

The Minecraft client can be run directly with the mod by running the "runClient" task:

./env-gradlew runClient

Once a world has been launched within Minecraft, the metrics can be inspected by running:

curl -Ss 'http://localhost:19565/metrics'

Compiling

The release JAR can be compiled by running the "assemble" task:

./env-gradlew assemble

The release JAR will be located at "build/libs/Prometheus-Exporter-{MC Version}-forge-{Mod Version}.jar".