Skip to content

Commit

Permalink
Put the client extra artifact on the classpath (#29)
Browse files Browse the repository at this point in the history
So IJ can find it
  • Loading branch information
Matyrobbrt authored Jun 16, 2024
1 parent a7f059a commit ae4f8ae
Showing 1 changed file with 1 addition and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -236,13 +236,7 @@ public void apply(Project project) {
config.setCanBeConsumed(false);
config.withDependencies(dependencies -> {
dependencies.addLater(minecraftClassesArtifact.map(dependencyFactory::create));
// In Vanilla-Mode, we have to add the Vanilla resources too since the legacy
// classpath (where they normally are) is ignored
dependencies.addLater(project.getProviders().zip(
createArtifacts.map(task -> project.files(task.getResourcesArtifact())),
hasNeoForge,
(resources, hasNeoForgeValue) -> !hasNeoForgeValue ? dependencyFactory.create(resources) : null
));
dependencies.addLater(createArtifacts.map(task -> project.files(task.getResourcesArtifact())).map(dependencyFactory::create));

// Technically the Minecraft dependencies do not strictly need to be on the classpath because they are pulled from the legacy class path.
// However, we do it anyway because this matches production environments, and allows launch proxies such as DevLogin to use Minecraft's libraries.
Expand Down

0 comments on commit ae4f8ae

Please sign in to comment.