Skip to content

Commit

Permalink
Add implementations of IModFileInfo#showAsDataPack for data pack grou…
Browse files Browse the repository at this point in the history
…ping (#21)
  • Loading branch information
lukebemish authored Dec 14, 2023
1 parent 19d6326 commit d7d607e
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 1 deletion.
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
spi_version=8.0.0
spi_version=9.0.1
mergetool_version=2.0.0
accesstransformers_version=10.0.1
coremods_version=6.0.0
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,7 @@ public List<? extends IConfigurable> getConfigList(final String... strings)
@Override public List<IModInfo> getMods() { return Collections.emptyList(); }
@Override public List<LanguageSpec> requiredLanguageLoaders() { return Collections.emptyList(); }
@Override public boolean showAsResourcePack() { return false; }
@Override public boolean showAsDataPack() { return false; }
@Override public Map<String, Object> getFileProperties() { return Collections.emptyMap(); }
@Override
public String getLicense() { return license; }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ public class ModFileInfo implements IModFileInfo, IConfigurable
private final URL issueURL;
private final List<LanguageSpec> languageSpecs;
private final boolean showAsResourcePack;
private final boolean showAsDataPack;
private final List<IModInfo> mods;
private final Map<String,Object> properties;
private final String license;
Expand All @@ -68,6 +69,8 @@ public class ModFileInfo implements IModFileInfo, IConfigurable
.orElse("");
this.showAsResourcePack = config.<Boolean>getConfigElement("showAsResourcePack")
.orElse(false);
this.showAsDataPack = config.<Boolean>getConfigElement("showAsDataPack")
.orElse(false);
this.usesServices = config.<List<String>>getConfigElement("services")
.orElse(List.of());
this.properties = config.<Map<String, Object>>getConfigElement("properties")
Expand Down Expand Up @@ -126,6 +129,12 @@ public boolean showAsResourcePack()
return this.showAsResourcePack;
}

@Override
public boolean showAsDataPack()
{
return this.showAsDataPack;
}

@Override
public <T> Optional<T> getConfigElement(final String... key)
{
Expand Down

0 comments on commit d7d607e

Please sign in to comment.