Skip to content

Commit

Permalink
fix minecraft version not being overridden by recipe viewers
Browse files Browse the repository at this point in the history
  • Loading branch information
rlnt committed Sep 3, 2024
1 parent d38e03c commit 0072bf4
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 7 deletions.
3 changes: 2 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog], and this project adheres to [Semantic Versioning].

## Unreleased
- /

- fixed `minecraftVersion` not being overridden by recipe viewer configs

## [1.0.0] - 2024-09-01

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,15 +49,13 @@ public RecipeViewerOptions(Project project, ModDependency mod) {

public Provider<ModuleDependency> getDependency() {
var almostGradle = project.getExtensions().getByType(AlmostGradleExtension.class);
return getVersion().map(v -> mod.createDependency(almostGradle.getMinecraftVersion(),
v,
project.getDependencyFactory()));
var mcv = getMinecraftVersion().orElse(almostGradle.getMinecraftVersion()).get();
return getVersion().map(v -> mod.createDependency(mcv, v, project.getDependencyFactory()));
}

public Provider<ModuleDependency> getApiDependency() {
var almostGradle = project.getExtensions().getByType(AlmostGradleExtension.class);
return getVersion().map(v -> mod.createApiDependency(almostGradle.getMinecraftVersion(),
v,
project.getDependencyFactory()));
var mcv = getMinecraftVersion().orElse(almostGradle.getMinecraftVersion()).get();
return getVersion().map(v -> mod.createApiDependency(mcv, v, project.getDependencyFactory()));
}
}

0 comments on commit 0072bf4

Please sign in to comment.