Skip to content

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

Open
Floweynt wants to merge 1 commit intovectrix-space:main/1.0.0from
Floweynt:feat/ignite-classpath-loading
Open

Support loading game and mods from classpath for dev configurations#160
Floweynt wants to merge 1 commit intovectrix-space:main/1.0.0from
Floweynt:feat/ignite-classpath-loading

Conversation

@Floweynt
Copy link
Copy Markdown

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:

  • Classpath: module project-name.main
  • VM options (you may need to enable adding vm options with modify options dropdown): -Dignite.locator=classpath
  • Main class: space.vectrix.ignite.IgniteBootstrap
  • Program args: -nogui
  • Working dir: $PROJECT/run/

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

@vectrixdevelops vectrixdevelops added the type: enhancement New feature or request label Mar 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

type: enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants