vectrix-space / ignite

A Mixin loader for Spigot/Paper
MIT License
198 stars 14 forks source link

Support loading game and mods from classpath for dev configurations #160

Open Floweynt opened 3 months ago

Floweynt commented 3 months ago

Motivation

When doing development, it's often beneficial to be able to easily run the server in a development environment (mojmapped everything). This enables features like class/mixin hotswapping.

This pull request implements loading mods and the target game from the classpath, which can be set to contain the mod classes and a mojmap server.

I have done some preliminary testing, and it doesn't seem to break other mod loading options.

Dev Env Setup

With this PR, developers can change the following to set up a sane environment: Add the following dependencies to the runtime classpath:

implementation("space.vectrix.ignite:ignite-launcher:$igniteVersion") // this needs to be published to maven
implementation("io.papermc.paper:paper-server:userdev-$paperVersion")
implementation("com.lmax:disruptor:3.4.2") // I don't know why this is needed

For IntelliJ, add an application configuration with:

Bonus: mixin hotswap works as expected, see the fabric guide