aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorisXander <xandersmith2008@gmail.com>2023-12-07 18:34:17 +0000
committerisXander <xandersmith2008@gmail.com>2023-12-07 18:34:17 +0000
commita694321b8952a64d43134961d58fb60e1adc0cf5 (patch)
tree5c870d853cc796771c5a1bda0c3ebdd2885a585f
parent7c8661265e7116be46467b4f37f1bbcb31569ecc (diff)
downloadYetAnotherConfigLib-a694321b8952a64d43134961d58fb60e1adc0cf5.tar.gz
YetAnotherConfigLib-a694321b8952a64d43134961d58fb60e1adc0cf5.tar.bz2
YetAnotherConfigLib-a694321b8952a64d43134961d58fb60e1adc0cf5.zip
1.20.4 + Migrate from Forge platform to NeoForge platform
-rw-r--r--build.gradle.kts7
-rw-r--r--common/build.gradle.kts4
-rw-r--r--fabric/build.gradle.kts4
-rw-r--r--forge/gradle.properties1
-rw-r--r--gradle.properties2
-rw-r--r--gradle/libs.versions.toml17
-rw-r--r--neoforge/.gitignore (renamed from forge/.gitignore)0
-rw-r--r--neoforge/build.gradle.kts (renamed from forge/build.gradle.kts)27
-rw-r--r--neoforge/gradle.properties1
-rw-r--r--neoforge/src/main/java/dev/isxander/yacl3/platform/neoforge/YACLForgeEntrypoint.java (renamed from forge/src/main/java/dev/isxander/yacl3/platform/forge/YACLForgeEntrypoint.java)4
-rw-r--r--neoforge/src/main/java/dev/isxander/yacl3/platform/neoforge/YACLPlatformImpl.java (renamed from forge/src/main/java/dev/isxander/yacl3/platform/forge/YACLPlatformImpl.java)6
-rw-r--r--neoforge/src/main/resources/META-INF/mods.toml (renamed from forge/src/main/resources/META-INF/mods.toml)9
-rw-r--r--neoforge/src/main/resources/pack.mcmeta (renamed from forge/src/main/resources/pack.mcmeta)0
-rw-r--r--settings.gradle.kts8
-rw-r--r--test-common/build.gradle.kts4
-rw-r--r--test-fabric/build.gradle.kts4
-rw-r--r--test-forge/gradle.properties1
-rw-r--r--test-neoforge/.gitignore (renamed from test-forge/.gitignore)0
-rw-r--r--test-neoforge/build.gradle.kts (renamed from test-forge/build.gradle.kts)25
-rw-r--r--test-neoforge/gradle.properties1
-rw-r--r--test-neoforge/src/main/java/dev/isxander/yacl3/test/forge/ForgeTest.java (renamed from test-forge/src/main/java/dev/isxander/yacl3/test/forge/ForgeTest.java)2
-rw-r--r--test-neoforge/src/main/resources/META-INF/mods.toml (renamed from test-forge/src/main/resources/META-INF/mods.toml)11
-rw-r--r--test-neoforge/src/main/resources/pack.mcmeta (renamed from test-forge/src/main/resources/pack.mcmeta)0
23 files changed, 63 insertions, 75 deletions
diff --git a/build.gradle.kts b/build.gradle.kts
index a614627..ba6553a 100644
--- a/build.gradle.kts
+++ b/build.gradle.kts
@@ -1,7 +1,6 @@
plugins {
alias(libs.plugins.architectury.plugin)
alias(libs.plugins.architectury.loom) apply false
- alias(libs.plugins.loom.vineflower) apply false
alias(libs.plugins.minotaur) apply false
alias(libs.plugins.cursegradle) apply false
@@ -45,6 +44,8 @@ allprojects {
maven("https://maven.isxander.dev/releases")
maven("https://maven.isxander.dev/snapshots")
maven("https://maven.quiltmc.org/repository/release")
+ maven("https://maven.neoforged.net/releases")
+ maven("https://maven.parchmentmc.org")
maven("https://api.modrinth.com/maven") {
name = "Modrinth"
content {
@@ -81,10 +82,6 @@ allprojects {
}
}
-subprojects {
- apply(plugin = rootProject.libs.plugins.loom.vineflower.get().pluginId)
-}
-
githubRelease {
token(findProperty("GITHUB_TOKEN")?.toString())
diff --git a/common/build.gradle.kts b/common/build.gradle.kts
index ba6dd04..c56f517 100644
--- a/common/build.gradle.kts
+++ b/common/build.gradle.kts
@@ -20,10 +20,8 @@ loom {
dependencies {
minecraft(libs.minecraft)
mappings(loom.layered {
- val qm = libs.versions.quilt.mappings.get()
- if (qm != "0")
- mappings("org.quiltmc:quilt-mappings:${libs.versions.minecraft.get()}+build.${libs.versions.quilt.mappings.get()}:intermediary-v2")
officialMojangMappings()
+ parchment(libs.parchment)
})
modImplementation(libs.fabric.loader)
diff --git a/fabric/build.gradle.kts b/fabric/build.gradle.kts
index 36c6976..914e3ae 100644
--- a/fabric/build.gradle.kts
+++ b/fabric/build.gradle.kts
@@ -28,10 +28,8 @@ val minecraftVersion = libs.versions.minecraft.get()
dependencies {
minecraft(libs.minecraft)
mappings(loom.layered {
- val qm = libs.versions.quilt.mappings.get()
- if (qm != "0")
- mappings("org.quiltmc:quilt-mappings:${libs.versions.minecraft.get()}+build.${libs.versions.quilt.mappings.get()}:intermediary-v2")
officialMojangMappings()
+ parchment(libs.parchment)
})
modImplementation(libs.fabric.loader)
diff --git a/forge/gradle.properties b/forge/gradle.properties
deleted file mode 100644
index 32f842a..0000000
--- a/forge/gradle.properties
+++ /dev/null
@@ -1 +0,0 @@
-loom.platform=forge \ No newline at end of file
diff --git a/gradle.properties b/gradle.properties
index 30a4ee4..f2a36fd 100644
--- a/gradle.properties
+++ b/gradle.properties
@@ -8,4 +8,4 @@ modrinthId=yacl
curseforgeId=667299
githubProject=isXander/YetAnotherConfigLib
-loaders=fabric
+loaders=fabric,neoforge
diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml
index 917f871..eaf7d03 100644
--- a/gradle/libs.versions.toml
+++ b/gradle/libs.versions.toml
@@ -1,18 +1,17 @@
[versions]
# Plugins
-architectury_loom = "1.3.+"
+architectury_loom = "1.4.+"
architectury_plugin = "3.4.+"
shadow = "7.1.+"
-loom_vineflower = "1.11.+"
minotaur = "2.7.+"
cursegradle = "2.+"
github_release = "2.4.+"
machete = "2.+"
grgit = "5.0.+"
-minecraft = "1.20.3"
-quilt_mappings = "0"
-fabric_loader = "0.14.23"
+minecraft = "1.20.4"
+parchment = "2023.10.22"
+fabric_loader = "0.14.25"
# Common Dependencies
mixin_extras = "0.2.0"
@@ -20,14 +19,15 @@ twelvemonkeys_imageio = "3.10.0"
quilt_parsers = "0.2.1"
# Fabric-like Dependencies
-fabric_api = "0.90.11+1.20.3"
+fabric_api = "0.91.1+1.20.3"
# Forge Dependencies
-forge = "1.20.2-48.0.33"
+neoforge = "20.4.0-beta"
[libraries]
minecraft = { module = "com.mojang:minecraft", version.ref = "minecraft" }
fabric_loader = { module = "net.fabricmc:fabric-loader", version.ref = "fabric_loader" }
+parchment = { module = "org.parchmentmc.data:parchment-1.20.2", version.ref = "parchment" }
# Common Dependencies
mixin_extras_common = { module = "com.github.llamalad7.mixinextras:mixinextras-common", version.ref = "mixin_extras" }
@@ -44,7 +44,7 @@ quilt_parsers_gson = { module = "org.quiltmc.parsers:gson", version.ref = "quilt
fabric_api = { module = "net.fabricmc.fabric-api:fabric-api", version.ref = "fabric_api" }
# Forge Dependencies
-forge = { module = "net.minecraftforge:forge", version.ref = "forge" }
+neoforge = { module = "net.neoforged:neoforge", version.ref = "neoforge" }
[bundles]
twelvemonkeys_imageio = [
@@ -63,7 +63,6 @@ quilt_parsers = [
[plugins]
architectury_loom = { id = "dev.architectury.loom", version.ref = "architectury_loom" }
architectury_plugin = { id = "architectury-plugin", version.ref = "architectury_plugin" }
-loom_vineflower = { id = "io.github.juuxel.loom-vineflower", version.ref = "loom_vineflower" }
shadow = { id = "com.github.johnrengelman.shadow", version.ref = "shadow" }
minotaur = { id = "com.modrinth.minotaur", version.ref = "minotaur" }
diff --git a/forge/.gitignore b/neoforge/.gitignore
index b63da45..b63da45 100644
--- a/forge/.gitignore
+++ b/neoforge/.gitignore
diff --git a/forge/build.gradle.kts b/neoforge/build.gradle.kts
index d4f4c0e..7b09032 100644
--- a/forge/build.gradle.kts
+++ b/neoforge/build.gradle.kts
@@ -12,7 +12,7 @@ plugins {
architectury {
platformSetupLoomIde()
- forge()
+ neoForge()
}
loom {
@@ -20,30 +20,25 @@ loom {
accessWidenerPath.set(project(":common").loom.accessWidenerPath)
- forge {
- mixinConfig("yacl.mixins.json")
+ neoForge {
- convertAccessWideners.set(true)
- extraAccessWideners.add(loom.accessWidenerPath.get().asFile.name)
}
}
val common by configurations.registering
val shadowCommon by configurations.registering
configurations.compileClasspath.get().extendsFrom(common.get())
-configurations["developmentForge"].extendsFrom(common.get())
+configurations["developmentNeoForge"].extendsFrom(common.get())
val minecraftVersion: String = libs.versions.minecraft.get()
dependencies {
minecraft(libs.minecraft)
mappings(loom.layered {
- val qm = libs.versions.quilt.mappings.get()
- if (qm != "0")
- mappings("org.quiltmc:quilt-mappings:${libs.versions.minecraft.get()}+build.${libs.versions.quilt.mappings.get()}:intermediary-v2")
officialMojangMappings()
+ parchment(libs.parchment)
})
- forge(libs.forge)
+ neoForge(libs.neoforge)
libs.bundles.twelvemonkeys.imageio.let {
implementation(it)
@@ -70,7 +65,6 @@ tasks {
val modName: String by rootProject
val modDescription: String by rootProject
val githubProject: String by rootProject
- val majorForge = libs.versions.forge.get().substringAfter('-').split('.').first()
inputs.property("id", modId)
inputs.property("group", project.group)
@@ -78,7 +72,6 @@ tasks {
inputs.property("description", modDescription)
inputs.property("version", project.version)
inputs.property("github", githubProject)
- inputs.property("major_forge", majorForge)
filesMatching(listOf("META-INF/mods.toml", "pack.mcmeta")) {
expand(
@@ -88,7 +81,6 @@ tasks {
"description" to modDescription,
"version" to project.version,
"github" to githubProject,
- "major_forge" to majorForge,
)
}
}
@@ -143,11 +135,11 @@ if (modrinthId.isNotEmpty()) {
token.set(findProperty("modrinth.token")?.toString())
projectId.set(modrinthId)
versionName.set("${project.version} (Forge)")
- versionNumber.set("${project.version}-forge")
+ versionNumber.set("${project.version}-neoforge")
versionType.set(if (isBeta) "beta" else "release")
uploadFile.set(tasks["remapJar"])
- gameVersions.set(listOf("1.20.2"))
- loaders.set(listOf("forge", "neoforge"))
+ gameVersions.set(listOf("1.20.4"))
+ loaders.set(listOf("neoforge"))
changelog.set(changelogText)
syncBodyFrom.set(rootProject.file("README.md").readText())
}
@@ -165,8 +157,7 @@ if (hasProperty("curseforge.token") && curseforgeId.isNotEmpty()) {
id = curseforgeId
releaseType = if (isBeta) "beta" else "release"
- addGameVersion("1.20.2")
- addGameVersion("Forge")
+ addGameVersion("1.20.4")
addGameVersion("NeoForge")
addGameVersion("Java 17")
diff --git a/neoforge/gradle.properties b/neoforge/gradle.properties
new file mode 100644
index 0000000..7da18ea
--- /dev/null
+++ b/neoforge/gradle.properties
@@ -0,0 +1 @@
+loom.platform=neoforge
diff --git a/forge/src/main/java/dev/isxander/yacl3/platform/forge/YACLForgeEntrypoint.java b/neoforge/src/main/java/dev/isxander/yacl3/platform/neoforge/YACLForgeEntrypoint.java
index 0301add..343635e 100644
--- a/forge/src/main/java/dev/isxander/yacl3/platform/forge/YACLForgeEntrypoint.java
+++ b/neoforge/src/main/java/dev/isxander/yacl3/platform/neoforge/YACLForgeEntrypoint.java
@@ -1,6 +1,6 @@
-package dev.isxander.yacl3.platform.forge;
+package dev.isxander.yacl3.platform.neoforge;
-import net.minecraftforge.fml.common.Mod;
+import net.neoforged.fml.common.Mod;
@Mod("yet_another_config_lib_v3")
public class YACLForgeEntrypoint {
diff --git a/forge/src/main/java/dev/isxander/yacl3/platform/forge/YACLPlatformImpl.java b/neoforge/src/main/java/dev/isxander/yacl3/platform/neoforge/YACLPlatformImpl.java
index 6b10cb6..42a51d6 100644
--- a/forge/src/main/java/dev/isxander/yacl3/platform/forge/YACLPlatformImpl.java
+++ b/neoforge/src/main/java/dev/isxander/yacl3/platform/neoforge/YACLPlatformImpl.java
@@ -1,8 +1,8 @@
-package dev.isxander.yacl3.platform.forge;
+package dev.isxander.yacl3.platform.neoforge;
import dev.isxander.yacl3.platform.Env;
-import net.minecraftforge.fml.loading.FMLEnvironment;
-import net.minecraftforge.fml.loading.FMLPaths;
+import net.neoforged.fml.loading.FMLEnvironment;
+import net.neoforged.fml.loading.FMLPaths;
import java.nio.file.Path;
diff --git a/forge/src/main/resources/META-INF/mods.toml b/neoforge/src/main/resources/META-INF/mods.toml
index dbd8461..4a68c54 100644
--- a/forge/src/main/resources/META-INF/mods.toml
+++ b/neoforge/src/main/resources/META-INF/mods.toml
@@ -1,5 +1,5 @@
modLoader = "javafml"
-loaderVersion = "[${major_forge},)"
+loaderVersion = "[1,)"
#issueTrackerURL = ""
license = "LGPL-3.0-or-later"
@@ -13,10 +13,13 @@ ${description}
'''
logoFile = "yacl-128x.png"
+[[mixins]]
+config = "yacl.mixins.json"
+
[["dependencies.${id}"]]
-modId = "forge"
+modId = "neoforge"
mandatory = true
-versionRange = "[${major_forge},)"
+versionRange = "[1,)"
ordering = "NONE"
side = "BOTH"
diff --git a/forge/src/main/resources/pack.mcmeta b/neoforge/src/main/resources/pack.mcmeta
index a9c6340..a9c6340 100644
--- a/forge/src/main/resources/pack.mcmeta
+++ b/neoforge/src/main/resources/pack.mcmeta
diff --git a/settings.gradle.kts b/settings.gradle.kts
index bdda698..ed41045 100644
--- a/settings.gradle.kts
+++ b/settings.gradle.kts
@@ -4,7 +4,7 @@ pluginManagement {
gradlePluginPortal()
maven("https://maven.fabricmc.net")
maven("https://maven.architectury.dev/")
- maven("https://maven.minecraftforge.net/")
+ maven("https://maven.neoforged.net/releases")
maven("https://maven.quiltmc.org/repository/release")
}
}
@@ -27,7 +27,7 @@ if ("fabric" in enabledLoaders) {
include("test-fabric")
}
-if ("forge" in enabledLoaders) {
- include("forge")
- include("test-forge")
+if ("neoforge" in enabledLoaders) {
+ include("neoforge")
+ include("test-neoforge")
}
diff --git a/test-common/build.gradle.kts b/test-common/build.gradle.kts
index 6bdfb0a..bd95f1e 100644
--- a/test-common/build.gradle.kts
+++ b/test-common/build.gradle.kts
@@ -16,10 +16,8 @@ loom {
dependencies {
minecraft(libs.minecraft)
mappings(loom.layered {
- val qm = libs.versions.quilt.mappings.get()
- if (qm != "0")
- mappings("org.quiltmc:quilt-mappings:${libs.versions.minecraft.get()}+build.${libs.versions.quilt.mappings.get()}:intermediary-v2")
officialMojangMappings()
+ parchment(libs.parchment)
})
modImplementation(libs.fabric.loader)
diff --git a/test-fabric/build.gradle.kts b/test-fabric/build.gradle.kts
index f2145d9..17658cd 100644
--- a/test-fabric/build.gradle.kts
+++ b/test-fabric/build.gradle.kts
@@ -24,10 +24,8 @@ val minecraftVersion = libs.versions.minecraft.get()
dependencies {
minecraft(libs.minecraft)
mappings(loom.layered {
- val qm = libs.versions.quilt.mappings.get()
- if (qm != "0")
- mappings("org.quiltmc:quilt-mappings:${libs.versions.minecraft.get()}+build.${libs.versions.quilt.mappings.get()}:intermediary-v2")
officialMojangMappings()
+ parchment(libs.parchment)
})
modImplementation(libs.fabric.loader)
diff --git a/test-forge/gradle.properties b/test-forge/gradle.properties
deleted file mode 100644
index 32f842a..0000000
--- a/test-forge/gradle.properties
+++ /dev/null
@@ -1 +0,0 @@
-loom.platform=forge \ No newline at end of file
diff --git a/test-forge/.gitignore b/test-neoforge/.gitignore
index b63da45..b63da45 100644
--- a/test-forge/.gitignore
+++ b/test-neoforge/.gitignore
diff --git a/test-forge/build.gradle.kts b/test-neoforge/build.gradle.kts
index 30a02e9..32622d9 100644
--- a/test-forge/build.gradle.kts
+++ b/test-neoforge/build.gradle.kts
@@ -7,7 +7,7 @@ plugins {
architectury {
platformSetupLoomIde()
- forge()
+ neoForge()
}
loom {
@@ -15,28 +15,31 @@ loom {
accessWidenerPath.set(project(":common").loom.accessWidenerPath)
- forge {
- convertAccessWideners.set(true)
- extraAccessWideners.add(loom.accessWidenerPath.get().asFile.name)
+ neoForge {
+
+ }
+
+ mods {
+ maybeCreate("forge").apply {
+ sourceSet(project(":neoforge").sourceSets.main.get())
+ }
}
}
val common by configurations.registering
val shadowCommon by configurations.registering
configurations.compileClasspath.get().extendsFrom(common.get())
-configurations["developmentForge"].extendsFrom(common.get())
+configurations["developmentNeoForge"].extendsFrom(common.get())
val minecraftVersion: String = libs.versions.minecraft.get()
dependencies {
minecraft(libs.minecraft)
mappings(loom.layered {
- val qm = libs.versions.quilt.mappings.get()
- if (qm != "0")
- mappings("org.quiltmc:quilt-mappings:${libs.versions.minecraft.get()}+build.${libs.versions.quilt.mappings.get()}:intermediary-v2")
officialMojangMappings()
+ parchment(libs.parchment)
})
- forge(libs.forge)
+ neoForge(libs.neoforge)
implementation(libs.twelvemonkeys.imageio.core)
forgeRuntimeLibrary(libs.twelvemonkeys.imageio.core)
@@ -46,7 +49,7 @@ dependencies {
forgeRuntimeLibrary(libs.bundles.quilt.parsers)
"common"(project(path = ":test-common", configuration = "namedElements")) { isTransitive = false }
- "common"(project(path = ":forge", configuration = "namedElements")) { isTransitive = false }
+ implementation(project(path = ":neoforge", configuration = "namedElements")) { isTransitive = false }
"common"(project(path = ":common", configuration = "namedElements")) { isTransitive = false }
}
@@ -65,7 +68,7 @@ tasks {
inputFile.set(shadowJar.get().archiveFile)
dependsOn(shadowJar)
- archiveClassifier.set("forge-$minecraftVersion")
+ archiveClassifier.set("neoforge-$minecraftVersion")
}
jar {
diff --git a/test-neoforge/gradle.properties b/test-neoforge/gradle.properties
new file mode 100644
index 0000000..7da18ea
--- /dev/null
+++ b/test-neoforge/gradle.properties
@@ -0,0 +1 @@
+loom.platform=neoforge
diff --git a/test-forge/src/main/java/dev/isxander/yacl3/test/forge/ForgeTest.java b/test-neoforge/src/main/java/dev/isxander/yacl3/test/forge/ForgeTest.java
index f9a95b6..c27cdd8 100644
--- a/test-forge/src/main/java/dev/isxander/yacl3/test/forge/ForgeTest.java
+++ b/test-neoforge/src/main/java/dev/isxander/yacl3/test/forge/ForgeTest.java
@@ -1,6 +1,6 @@
package dev.isxander.yacl3.test.forge;
-import net.minecraftforge.fml.common.Mod;
+import net.neoforged.fml.common.Mod;
@Mod("yacl_test")
public class ForgeTest {
diff --git a/test-forge/src/main/resources/META-INF/mods.toml b/test-neoforge/src/main/resources/META-INF/mods.toml
index cbccdaf..6cb1824 100644
--- a/test-forge/src/main/resources/META-INF/mods.toml
+++ b/test-neoforge/src/main/resources/META-INF/mods.toml
@@ -1,5 +1,5 @@
modLoader = "javafml"
-loaderVersion = "[48,)"
+loaderVersion = "[1,)"
#issueTrackerURL = ""
license = "LGPL-3.0-or-later"
@@ -13,16 +13,19 @@ Test mod for YACL
'''
#logoFile = ""
+[[mixins]]
+config = "yacl-test.mixins.json"
+
[[dependencies.yacl_test]]
-modId = "forge"
+modId = "neoforge"
mandatory = true
-versionRange = "[48,)"
+versionRange = "[20,)"
ordering = "NONE"
side = "BOTH"
[[dependencies.yacl_test]]
modId = "minecraft"
mandatory = true
-versionRange = "[1.20.2,)"
+versionRange = "1.20.4"
ordering = "NONE"
side = "BOTH"
diff --git a/test-forge/src/main/resources/pack.mcmeta b/test-neoforge/src/main/resources/pack.mcmeta
index 8fbe236..8fbe236 100644
--- a/test-forge/src/main/resources/pack.mcmeta
+++ b/test-neoforge/src/main/resources/pack.mcmeta