Skip to content

fix: only attach Java agent for injected server quick play - #7300

Closed
sarpedondev wants to merge 1 commit into
modrinth:mainfrom
sarpedondev:main
Closed

fix: only attach Java agent for injected server quick play#7300
sarpedondev wants to merge 1 commit into
modrinth:mainfrom
sarpedondev:main

Conversation

@sarpedondev

Copy link
Copy Markdown

Description

The Theseus Java agent was previously attached to every Minecraft launch, even though its transformer only modifies Minecraft when direct server quick play must be injected into an older game version.

This change attaches the agent only when launching a server with QuickPlayServerVersion::Injected. It is no longer attached during ordinary launches or when using built-in, legacy command-line, singleplayer, or unsupported quick-play modes.

Avoiding the unnecessary agent reduces compatibility issues with mods and loaders that inspect the JVM for active Java agents.
theseus.jar remains on the classpath because it is still required by the launch and RPC bootstrap. Direct server joining on affected older Minecraft versions continues to work.

@github-actions

Copy link
Copy Markdown
Contributor

Pull request changelog

App

Added

Changed

Deprecated

Removed

Fixed

Security

Website

Added

Changed

Deprecated

Removed

Fixed

Security

Hosting

Added

Changed

Deprecated

Removed

Fixed

Security

@Hallskii
Hallskii requested a review from IMB11 September 4, 2026 16:17
@IMB11

IMB11 commented Sep 7, 2026

Copy link
Copy Markdown
Member

Hi, I've gone through this and I don't think we'll accept this PR - while yes the java agent is fine to exclude when we are not doing quickplay, future app features we have planned will depend on the java agent, and besides there isn't really a reason to exclude it as it just brings in more complexity to the launching logic

The surface area of the java agent is very small, do you have a link to any of the mods you're mentioning which have incompatibilities with the java agent?

Thank you

@IMB11 IMB11 closed this Sep 7, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants