Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
wants to merge 1 commit into
base: main/1.0.0
Choose a base branch
from

Conversation

Floweynt
Copy link

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.

None yet

2 participants