rename more things: nonsense->frog

This commit is contained in:
moehreag 2024-06-03 13:31:00 +02:00
parent 3e21b4d8d5
commit 333d5889b7
7 changed files with 13 additions and 13 deletions

View file

@ -36,8 +36,8 @@ class PhytotelmaPlugin : Plugin<Project> {
override fun apply(project: Project) {
println("> Applying FrogMC Gradle Plugin")
nonsenseCacheDir = project.gradle.gradleUserHomeDir.resolve("caches/phytotelma/").toPath()
nonsenseCacheDir.createDirectories()
globalCacheDir = project.gradle.gradleUserHomeDir.resolve("caches/phytotelma/").toPath()
globalCacheDir.createDirectories()
project.plugins.let {
it.apply("java-library")
@ -183,7 +183,7 @@ class PhytotelmaPlugin : Plugin<Project> {
}
companion object {
lateinit var nonsenseCacheDir: Path
lateinit var globalCacheDir: Path
lateinit var minecraftVersion: String
lateinit var remappedGameJarPath: Path
lateinit var parchmentVersion: String

View file

@ -17,7 +17,7 @@ object VersionChecker {
fetchVersionData(version)
val clientData = fetchClientDownload(version)
// download client data
val downloadDirectory = PhytotelmaPlugin.nonsenseCacheDir.resolve("net/minecraft/client/$version/")
val downloadDirectory = PhytotelmaPlugin.globalCacheDir.resolve("net/minecraft/client/$version/")
val downloadFile = downloadDirectory.resolve("client-$version.jar")
if (downloadFile.exists()) {
println("Client already downloaded! Assuming it's valid. FIXME: Add checksum validation.")

View file

@ -39,7 +39,7 @@ object CachingHttpClient {
}
private fun getCacheFile(uri: URI): Path {
val path = PhytotelmaPlugin.nonsenseCacheDir.resolve("httpCache")
val path = PhytotelmaPlugin.globalCacheDir.resolve("httpCache")
.resolve(uri.host+uri.rawPath) // Use rawPath to ensure ASCII compat (since this will be a filesystem dir)
path.createParentDirectories()
return path

View file

@ -41,7 +41,7 @@ fun Project.minecraft(
val paramMappings = if (parchment.isNotEmpty()) kotlin.runCatching {
ParchmentProvider.getParchment(
version, parchment,
PhytotelmaPlugin.nonsenseCacheDir.resolve("org/parchmentmc/parchment/$version/$parchment")
PhytotelmaPlugin.globalCacheDir.resolve("org/parchmentmc/parchment/$version/$parchment")
)
}.getOrNull() else {
println("Parameter mappings will not be present as no parchment version was found. It may be possible to declare it manually.")

View file

@ -16,7 +16,7 @@ object AssetDownloader {
fun download() {
val version = PhytotelmaPlugin.minecraftVersion
val path = PhytotelmaPlugin.nonsenseCacheDir.resolve("assets")
val path = PhytotelmaPlugin.globalCacheDir.resolve("assets")
val id = VersionChecker.downloadAssetIndex(version, path.resolve("indexes"))
val index = Gson().fromJson(

View file

@ -27,7 +27,7 @@ object RunConfigGenerator {
}
}
val assetPath = PhytotelmaPlugin.nonsenseCacheDir.resolve(ASSET_DIR).absolute()
val assetPath = PhytotelmaPlugin.globalCacheDir.resolve(ASSET_DIR).absolute()
val assetIndexPath = assetPath.resolve("indexes")
if (assetIndexPath.notExists()) {
assetIndexPath.createDirectories()
@ -42,7 +42,7 @@ object RunConfigGenerator {
adapter.generate(
project,
"Minecraft ${env.pascalName}",
"dev.frogmc.frogloader.impl.launch.${env.id}.Nonsense${env.pascalName}",
"dev.frogmc.frogloader.impl.launch.${env.id}.Frog${env.pascalName}",
mutableListOf(
"-Xmx${project.properties.getOrDefault("frogmc.gameHeap", "2048M")}",
"-Dfrogmc.development=true",
@ -56,7 +56,7 @@ object RunConfigGenerator {
}.toTypedArray(), if (env == Env.CLIENT) {
arrayOf(
"--assetsDir", assetPath.toString(),
"--version", "Nonsense",
"--version", "FrogMC",
"--assetIndex", indexId,
"--accessToken", "0"
)

View file

@ -22,7 +22,7 @@ abstract class RunGameTask @Inject constructor(env: Env) : JavaExec() {
init {
group = "frogmc"
val assetPath = PhytotelmaPlugin.nonsenseCacheDir.resolve("assets").absolute()
val assetPath = PhytotelmaPlugin.globalCacheDir.resolve("assets").absolute()
val assetIndexPath = assetPath.resolve("indexes")
if (assetIndexPath.notExists()) {
assetIndexPath.createDirectories()
@ -40,7 +40,7 @@ abstract class RunGameTask @Inject constructor(env: Env) : JavaExec() {
if (env == Env.CLIENT) {
listOf(
"--assetsDir", assetPath.toString(),
"--version", "Nonsense",
"--version", "FrogMC",
"--assetIndex", indexId,
"--accessToken", "0"
)
@ -65,7 +65,7 @@ abstract class RunGameTask @Inject constructor(env: Env) : JavaExec() {
jvmArguments.add("-Dfrogmc.log.disableAnsi=false")
}
mainClass.set("dev.frogmc.frogloader.impl.launch.${env.id}.Nonsense${env.pascalName}")
mainClass.set("dev.frogmc.frogloader.impl.launch.${env.id}.Frog${env.pascalName}")
}
private fun writeArgFile(): String {