Skip to content

Commit

Permalink
Fix dependency overrides not applying.
Browse files Browse the repository at this point in the history
  • Loading branch information
modmuss50 committed Nov 30, 2021
1 parent fc76668 commit 8ccda57
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 8 deletions.
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,5 @@ group = net.fabricmc
description = The mod loading component of Fabric
url = https://github.com/FabricMC/fabric-loader

version = 0.12.6
version = 0.12.7
asm_version = 9.2
Original file line number Diff line number Diff line change
Expand Up @@ -38,13 +38,11 @@
class BuiltinMetadataWrapper extends AbstractModMetadata implements LoaderModMetadata {
private final ModMetadata parent;
private Version version;
private final Collection<ModDependency> dependencies;

BuiltinMetadataWrapper(ModMetadata parent) {
this.parent = parent;

version = parent.getVersion();
dependencies = parent.getDependencies();
}

@Override
Expand Down Expand Up @@ -84,7 +82,7 @@ public Collection<ModDependency> getDependencies() {

@Override
public void setDependencies(Collection<ModDependency> dependencies) {
dependencies = Collections.unmodifiableCollection(dependencies);
((LoaderModMetadata) parent).setDependencies(dependencies);
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ final class V0ModMetadata extends AbstractModMetadata implements LoaderModMetada
private Version version;

// Optional (Environment)
private final Collection<ModDependency> dependencies;
private Collection<ModDependency> dependencies;
private final String languageAdapter = "net.fabricmc.loader.language.JavaLanguageAdapter"; // TODO: Constants class?
private final Mixins mixins;
private final ModEnvironment environment; // REMOVEME: Replacing Side in old metadata with this
Expand Down Expand Up @@ -129,7 +129,7 @@ public Collection<ModDependency> getDependencies() {

@Override
public void setDependencies(Collection<ModDependency> dependencies) {
dependencies = Collections.unmodifiableCollection(dependencies);
this.dependencies = Collections.unmodifiableCollection(dependencies);
}

// General metadata
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ final class V1ModMetadata extends AbstractModMetadata implements LoaderModMetada
private final String accessWidener;

// Optional (dependency resolution)
private final Collection<ModDependency> dependencies;
private Collection<ModDependency> dependencies;
// Happy little accidents
private final boolean hasRequires;

Expand Down Expand Up @@ -168,7 +168,7 @@ public Collection<ModDependency> getDependencies() {

@Override
public void setDependencies(Collection<ModDependency> dependencies) {
dependencies = Collections.unmodifiableCollection(dependencies);
this.dependencies = Collections.unmodifiableCollection(dependencies);
}

// General metadata
Expand Down

0 comments on commit 8ccda57

Please sign in to comment.