fix setting a different game version for parchment
All checks were successful
Publish to snapshot maven / build (push) Successful in 2m0s

This commit is contained in:
moehreag 2024-09-17 14:59:07 +02:00
parent 18143913b8
commit 64adbe82a5
2 changed files with 4 additions and 4 deletions

View file

@ -7,7 +7,7 @@ plugins {
} }
group = "dev.frogmc" group = "dev.frogmc"
version = "0.0.1-alpha.24" version = "0.0.1-alpha.25" + ("+local".takeUnless { project.hasProperty("FrogMCSnapshotsMavenPassword") } ?: "")
repositories { repositories {
maven { maven {

View file

@ -55,7 +55,7 @@ abstract class MinecraftConfiguration @Inject constructor(
cacheDir.resolve("net/minecraft/client/${version.get()}/client-${version.get()}.txt") cacheDir.resolve("net/minecraft/client/${version.get()}/client-${version.get()}.txt")
).reverse(), ).reverse(),
ParchmentProvider.getParchment( ParchmentProvider.getParchment(
version.get(), conf.gameVersion.get(),
cacheDir.resolve("org/parchmentmc/parchment/${conf.gameVersion.get()}/${conf.version.get()}") cacheDir.resolve("org/parchmentmc/parchment/${conf.gameVersion.get()}/${conf.version.get()}")
) )
).renameDstNamespace(targetNamespace) ).renameDstNamespace(targetNamespace)
@ -74,7 +74,7 @@ abstract class MinecraftConfiguration @Inject constructor(
targetNamespace = "parchment" targetNamespace = "parchment"
return@provider ParchmentProvider.getParchment( return@provider ParchmentProvider.getParchment(
version.get(), conf.gameVersion.get(),
cacheDir.resolve("org/parchmentmc/parchment/${conf.gameVersion.get()}/${conf.version.get()}") cacheDir.resolve("org/parchmentmc/parchment/${conf.gameVersion.get()}/${conf.version.get()}")
).renameNamespaces(Constants.MOJMAP_NAMESPACE, "parchment") ).renameNamespaces(Constants.MOJMAP_NAMESPACE, "parchment")
} }
@ -96,7 +96,7 @@ abstract class MinecraftConfiguration @Inject constructor(
return project.provider { return project.provider {
val conf = objects.newInstance(VersionConfiguration::class.java) val conf = objects.newInstance(VersionConfiguration::class.java)
action.execute(conf) action.execute(conf)
if (!conf.version.isPresent) { if (!conf.version.isPresent()) {
error("No version provided for quilt mappings!") error("No version provided for quilt mappings!")
} }
mappingsName = "quilt-mappings(${conf.version.get()})" mappingsName = "quilt-mappings(${conf.version.get()})"