From 77715cb1ba50bf829e796c8ae43332f2afbc066b Mon Sep 17 00:00:00 2001 From: Luke Bemish Date: Thu, 14 Sep 2023 17:57:25 +0100 Subject: [PATCH 1/2] Add implementations of new showAsDataPack in neoforgespi for data pack grouping --- .../fml/loading/moddiscovery/AbstractModProvider.java | 1 + .../fml/loading/moddiscovery/ModFileInfo.java | 9 +++++++++ 2 files changed, 10 insertions(+) diff --git a/loader/src/main/java/net/minecraftforge/fml/loading/moddiscovery/AbstractModProvider.java b/loader/src/main/java/net/minecraftforge/fml/loading/moddiscovery/AbstractModProvider.java index 76093964..7ab187fa 100644 --- a/loader/src/main/java/net/minecraftforge/fml/loading/moddiscovery/AbstractModProvider.java +++ b/loader/src/main/java/net/minecraftforge/fml/loading/moddiscovery/AbstractModProvider.java @@ -103,6 +103,7 @@ public List getConfigList(final String... strings) @Override public List getMods() { return Collections.emptyList(); } @Override public List requiredLanguageLoaders() { return Collections.emptyList(); } @Override public boolean showAsResourcePack() { return false; } + @Override public boolean showAsDataPack() { return false; } @Override public Map getFileProperties() { return Collections.emptyMap(); } @Override public String getLicense() { return license; } diff --git a/loader/src/main/java/net/minecraftforge/fml/loading/moddiscovery/ModFileInfo.java b/loader/src/main/java/net/minecraftforge/fml/loading/moddiscovery/ModFileInfo.java index 31f3b6c5..6bfae725 100644 --- a/loader/src/main/java/net/minecraftforge/fml/loading/moddiscovery/ModFileInfo.java +++ b/loader/src/main/java/net/minecraftforge/fml/loading/moddiscovery/ModFileInfo.java @@ -45,6 +45,7 @@ public class ModFileInfo implements IModFileInfo, IConfigurable private final URL issueURL; private final List languageSpecs; private final boolean showAsResourcePack; + private final boolean showAsDataPack; private final List mods; private final Map properties; private final String license; @@ -68,6 +69,8 @@ public class ModFileInfo implements IModFileInfo, IConfigurable .orElse(""); this.showAsResourcePack = config.getConfigElement("showAsResourcePack") .orElse(false); + this.showAsDataPack = config.getConfigElement("showAsDataPack") + .orElse(false); this.usesServices = config.>getConfigElement("services") .orElse(List.of()); this.properties = config.>getConfigElement("properties") @@ -126,6 +129,12 @@ public boolean showAsResourcePack() return this.showAsResourcePack; } + @Override + public boolean showAsDataPack() + { + return this.showAsDataPack; + } + @Override public Optional getConfigElement(final String... key) { From 2103c80d647848f7fd3b008263afcc0ad59a7704 Mon Sep 17 00:00:00 2001 From: Luke Bemish Date: Thu, 14 Dec 2023 13:57:10 +0000 Subject: [PATCH 2/2] Bump SPI --- gradle.properties | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gradle.properties b/gradle.properties index 28f6f294..ac531cfc 100644 --- a/gradle.properties +++ b/gradle.properties @@ -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