summaryrefslogtreecommitdiff
path: root/plugin/src/main/kotlin/moe/nea/archenemy/mojang/MinecraftProvider.kt
diff options
context:
space:
mode:
authorLinnea Gräf <nea@nea.moe>2023-12-10 16:54:57 +0100
committerLinnea Gräf <nea@nea.moe>2023-12-10 16:54:57 +0100
commit0936f6272c7d1e41b7e9550bb17fe84af5d976c3 (patch)
tree0c41488910659eefb31a6231dce0f72f29ca75e3 /plugin/src/main/kotlin/moe/nea/archenemy/mojang/MinecraftProvider.kt
parent17f0faaccb0db837a64b6ce7cecff7f8ab048410 (diff)
downloadarchenemy-0936f6272c7d1e41b7e9550bb17fe84af5d976c3.tar.gz
archenemy-0936f6272c7d1e41b7e9550bb17fe84af5d976c3.tar.bz2
archenemy-0936f6272c7d1e41b7e9550bb17fe84af5d976c3.zip
Move utilities around
Diffstat (limited to 'plugin/src/main/kotlin/moe/nea/archenemy/mojang/MinecraftProvider.kt')
-rw-r--r--plugin/src/main/kotlin/moe/nea/archenemy/mojang/MinecraftProvider.kt14
1 files changed, 1 insertions, 13 deletions
diff --git a/plugin/src/main/kotlin/moe/nea/archenemy/mojang/MinecraftProvider.kt b/plugin/src/main/kotlin/moe/nea/archenemy/mojang/MinecraftProvider.kt
index 64c1d04..605d485 100644
--- a/plugin/src/main/kotlin/moe/nea/archenemy/mojang/MinecraftProvider.kt
+++ b/plugin/src/main/kotlin/moe/nea/archenemy/mojang/MinecraftProvider.kt
@@ -2,7 +2,7 @@ package moe.nea.archenemy.mojang
import kotlinx.serialization.json.Json
import kotlinx.serialization.json.decodeFromStream
-import moe.nea.archenemy.DownloadUtils
+import moe.nea.archenemy.util.DownloadUtils
import moe.nea.archenemy.MCSide
import moe.nea.archenemy.util.getNullsafeIdentifier
import net.minecraftforge.artifactural.api.artifact.Artifact
@@ -14,20 +14,8 @@ import net.minecraftforge.artifactural.base.artifact.StreamableArtifact
import java.io.File
import java.io.IOException
import java.net.URL
-import java.security.MessageDigest
import java.util.concurrent.ConcurrentHashMap
-fun MessageDigest.updateField(text: String, value: String) {
- this.update(text)
- this.update(":")
- this.update(value)
- this.update(";")
-}
-
-fun MessageDigest.update(text: String) {
- this.update(text.encodeToByteArray())
-}
-
class MinecraftProvider(val sharedExtension: ArchenemySharedExtension) : Repository {
data class MinecraftCoordinate(