Skip to content
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

Add implementations of IModFileInfo#showAsDataPack for data pack grouping #21

Merged
merged 4 commits into from
Dec 14, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading