-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Feat: Check file checksums if provided
Feat: Download mods to separate file and symlink them, allowing a separate user mods directory Fix: Handle mod updates correctly Fix: Replace provider for avatars
- Loading branch information
Showing
39 changed files
with
546 additions
and
324 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
group=com.mineinabyss | ||
version=2.0.0-alpha.8 | ||
version=2.0.0-alpha.9 | ||
idofrontVersion=0.22.3 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
44 changes: 39 additions & 5 deletions
44
src/main/kotlin/com/mineinabyss/launchy/data/config/ModpackUserConfig.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
19 changes: 11 additions & 8 deletions
19
src/main/kotlin/com/mineinabyss/launchy/data/modpacks/Mod.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
32 changes: 32 additions & 0 deletions
32
src/main/kotlin/com/mineinabyss/launchy/data/modpacks/formats/ModDownloadPath.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
package com.mineinabyss.launchy.data.modpacks.formats | ||
|
||
import kotlinx.serialization.KSerializer | ||
import kotlinx.serialization.Serializable | ||
import kotlinx.serialization.descriptors.PrimitiveKind | ||
import kotlinx.serialization.descriptors.PrimitiveSerialDescriptor | ||
import kotlinx.serialization.descriptors.SerialDescriptor | ||
import kotlinx.serialization.encoding.Decoder | ||
import kotlinx.serialization.encoding.Encoder | ||
import java.nio.file.Path | ||
import kotlin.io.path.Path | ||
|
||
@Serializable(with = ValidModPathSerializer::class) | ||
class ModDownloadPath( | ||
val validated: Path | ||
) | ||
|
||
object ValidModPathSerializer : KSerializer<ModDownloadPath> { | ||
override val descriptor: SerialDescriptor = PrimitiveSerialDescriptor("modPath", PrimitiveKind.STRING) | ||
override fun deserialize(decoder: Decoder): ModDownloadPath { | ||
val pathString = decoder.decodeString() | ||
if (pathString.contains("..")) error("Mod path cannot contain ..") | ||
val path = Path(pathString) | ||
if (path.isAbsolute) error("Path cannot be absolute") | ||
return ModDownloadPath(path) | ||
} | ||
|
||
override fun serialize(encoder: Encoder, value: ModDownloadPath) { | ||
encoder.encodeString(value.validated.toString()) | ||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
6 changes: 3 additions & 3 deletions
6
src/main/kotlin/com/mineinabyss/launchy/data/modpacks/formats/PackFormat.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,13 @@ | ||
package com.mineinabyss.launchy.data.modpacks.formats | ||
|
||
import com.mineinabyss.launchy.data.modpacks.InstanceModLoaders | ||
import com.mineinabyss.launchy.data.modpacks.Mods | ||
import com.mineinabyss.launchy.data.modpacks.PackDependencies | ||
import java.nio.file.Path | ||
|
||
sealed interface PackFormat { | ||
fun toGenericMods(minecraftDir: Path): Mods | ||
fun toGenericMods(downloadsDir: Path): Mods | ||
|
||
fun getDependencies(minecraftDir: Path): PackDependencies | ||
fun getModLoaders(): InstanceModLoaders | ||
|
||
fun getOverridesPaths(configDir: Path): List<Path> | ||
} |
Oops, something went wrong.