-
Notifications
You must be signed in to change notification settings - Fork 268
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
fix inputGameJars ObjectShare mutating after being set #876
Conversation
@@ -243,7 +243,7 @@ public boolean locateGame(FabricLauncher launcher, String[] args) { | |||
// expose obfuscated jar locations for mods to more easily remap code from obfuscated to intermediary | |||
ObjectShare share = FabricLoaderImpl.INSTANCE.getObjectShare(); | |||
share.put("fabric-loader:inputGameJar", gameJars.get(0)); // deprecated | |||
share.put("fabric-loader:inputGameJars", gameJars); | |||
share.put("fabric-loader:inputGameJars", new ArrayList<>(gameJars)); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would use unmodifiableList
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
wrapping gameJars with Collections.unmodifiableList doesn't fix the issue that the underlying list is mutated in place. I could make the new list unmodifiable if that's what you mean.
|
It seems like the shared list ends up with intermediary remapped jar in the end when accessing it. |
What modifies the underlying jar? I don't think it's Fabric Loader, but a misbehaving mod? |
Please add a comment explaining that it gets modified subsequently by remapping |
done |
Upstream from fabric-loader: FabricMC/fabric-loader@1030e56 (Original PR: FabricMC/fabric-loader#876 )
No description provided.