Skip to content

Add vanilla run support#342

Open
mezz wants to merge 2 commits into
neoforged:mainfrom
mezz:pr/vanilla-server-runs
Open

Add vanilla run support#342
mezz wants to merge 2 commits into
neoforged:mainfrom
mezz:pr/vanilla-server-runs

Conversation

@mezz

@mezz mezz commented Jul 8, 2026

Copy link
Copy Markdown

Context

JEI is optional on both the client and server, so good client tests need to compare behavior across a matrix of possible server/client combinations:

  • NeoForge client with JEI +
    • NeoForge server with JEI
    • NeoForge server without JEI
    • vanilla server without JEI
  • vanilla client without JEI + NeoForge servers with JEI

Before this change, a NeoForge-enabled project could create client or server runs with no loaded mods, but those runs still used the NeoForge userdev runtime. For true vanilla fixtures, JEI needed separate vanilla-mode projects or custom wiring.

Changes

This change adds two run helpers:

vanillaClient()
vanillaServer()

These helpers:

  • use the vanilla run templates
  • clear loaded project mods by default
  • use a dedicated vanilla runtime classpath
  • avoid inheriting the NeoForge userdev runtime in NeoForge-enabled projects

IDE integrations also avoid using the ordinary application classpath for dedicated vanilla runs:

  • IntelliJ and Eclipse generate Gradle-backed run configurations
  • VS Code uses the generated launch classpath argfile and disables the default Java extension classpath

Why

This lets a project declare vanilla client or server fixtures alongside its NeoForge runs.

For JEI, that means vanilla client and server fixtures can live in the NeoForge project next to the other client-test fixtures, instead of needing separate vanilla-mode subprojects only for those runs.

Testing

  • ./gradlew build --no-daemon
  • Unit coverage for:
    • the vanilla runtime dependency model
    • empty loaded-mod defaults
    • IntelliJ/Eclipse/VS Code vanilla run IDE wiring
  • Functional coverage for:
    • evaluated vanilla run classpath wiring
    • vanilla run task graph scheduling with runVanillaClient --dry-run
    • preserved dev-launch wiring for ordinary runs that select a source set

## Context

JEI client tests need to compare behavior across:

- NeoForge client with JEI + NeoForge server with JEI
- NeoForge client with JEI + NeoForge server without JEI
- NeoForge client with JEI + vanilla server without JEI
- vanilla client without JEI + NeoForge servers with JEI

Before this change, a NeoForge-enabled project could create client or server runs with no loaded mods, but those runs still used the NeoForge userdev runtime. For true vanilla fixtures, JEI needed separate vanilla-mode projects or custom wiring.

## Changes

This change adds two run helpers:

```groovy
vanillaClient()
vanillaServer()
```

These helpers:

- use the vanilla run templates
- clear loaded project mods by default
- use a dedicated vanilla runtime classpath
- avoid inheriting the NeoForge userdev runtime in NeoForge-enabled projects

IDE integrations also avoid using the ordinary application classpath for dedicated vanilla runs:

- IntelliJ and Eclipse generate Gradle-backed run configurations
- VS Code uses the generated launch classpath argfile and disables the default Java extension classpath

## Why

This lets a project declare vanilla client or server fixtures alongside its NeoForge runs.

For JEI, that means vanilla client and server fixtures can live in the NeoForge project next to the other client-test fixtures, instead of needing separate vanilla-mode subprojects only for those runs.

## Testing

- `./gradlew build --no-daemon`
- Unit coverage for:
  - the vanilla runtime dependency model
  - empty loaded-mod defaults
  - IntelliJ/Eclipse/VS Code vanilla run IDE wiring
- Functional coverage for:
  - evaluated vanilla run classpath wiring
  - vanilla run task graph scheduling with `runVanillaClient --dry-run`
  - preserved dev-launch wiring for ordinary runs that select a source set
@neoforged-pr-publishing

Copy link
Copy Markdown
  • Publish PR to GitHub Packages

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant