Superseded by using a real minecraft instance with Xvfb
Run Minecraft 1.8.9 mods without a window server (headless)
The key use case is for analyzing suspicious 1.8.9 Minecraft mods
Since I'm not legally allowed to distribute the Minecraft jar, you have to add it yourself.
Find your Minecraft jar (libraries dir in MultiMC/PolyMC),
then run mvn install:install-file -Dfile=<path-to-minecraft-jar> -DgroupId=com.mojang -DartifactId=minecraft -Dversion=1.8.9 -Dpackaging=jar -DlocalRepositoryPath=<path to repo dir in this folder>
After you can run mvn package
(makes a jar, takes ~1 minute) or run from your IDE
This executes arbitrary code from external mods which may or may not be safe. If mods are untrusted, use docker or a VM.