From eb9d47154deebccbbb5f6c03f1bb3f712d982173 Mon Sep 17 00:00:00 2001 From: The Judge <53906078+thejudge156@users.noreply.github.com> Date: Thu, 18 Apr 2024 11:50:47 -0700 Subject: [PATCH] Instance handling refactor (#39) * Add deletion, fix mod dir and default mods * Add javadocs (CAD get better at reading code) * Add supportedVersions.json * Fix Minecraft Version API * Handle xr errors * Fix race condition * Fix actions? * Slightly More Logging --------- Co-authored-by: The Judge Co-authored-by: Darien Johnson <84008186+CADIndie@users.noreply.github.com> --- .github/workflows/gradle.yml | 2 +- coremods.json | 94 --- devmods.json | 90 +- mods.json | 796 +++++++++--------- mods_new.json | 536 ++++++++++++ .../java/pojlib/account/MinecraftAccount.java | 9 +- src/main/java/pojlib/api/API_V1.java | 141 +++- src/main/java/pojlib/install/FabricMeta.java | 4 +- .../java/pojlib/install/MinecraftMeta.java | 9 +- src/main/java/pojlib/install/QuiltMeta.java | 4 +- .../java/pojlib/instance/InstanceHandler.java | 209 +++++ .../pojlib/instance/MinecraftInstance.java | 386 --------- .../pojlib/instance/MinecraftInstances.java | 166 ++++ src/main/java/pojlib/util/APIHandler.java | 47 +- src/main/java/pojlib/util/CoreMods.java | 16 - src/main/java/pojlib/util/CustomMods.java | 16 - src/main/java/pojlib/util/DownloadUtils.java | 28 +- src/main/java/pojlib/util/JREUtils.java | 4 +- src/main/java/pojlib/util/LoginHelper.java | 6 +- src/main/java/pojlib/util/ModInfo.java | 7 + src/main/java/pojlib/util/ModsJson.java | 11 + src/main/jni/vloader.cpp | 7 +- supportedVersions.json | 10 + 23 files changed, 1534 insertions(+), 1064 deletions(-) delete mode 100644 coremods.json create mode 100644 mods_new.json create mode 100644 src/main/java/pojlib/instance/InstanceHandler.java delete mode 100644 src/main/java/pojlib/instance/MinecraftInstance.java create mode 100644 src/main/java/pojlib/instance/MinecraftInstances.java delete mode 100644 src/main/java/pojlib/util/CoreMods.java delete mode 100644 src/main/java/pojlib/util/CustomMods.java create mode 100644 src/main/java/pojlib/util/ModInfo.java create mode 100644 src/main/java/pojlib/util/ModsJson.java create mode 100644 supportedVersions.json diff --git a/.github/workflows/gradle.yml b/.github/workflows/gradle.yml index 2638bcaa..b6b3aa97 100644 --- a/.github/workflows/gradle.yml +++ b/.github/workflows/gradle.yml @@ -29,7 +29,7 @@ jobs: java-version: '17' distribution: 'temurin' - name: Make Gradle wrapper executable - run: chmod +x ./gradlew + run: git lfs pull | chmod +x ./gradlew - name: Build with Gradle uses: gradle/gradle-build-action@v2 with: diff --git a/coremods.json b/coremods.json deleted file mode 100644 index 1a113a46..00000000 --- a/coremods.json +++ /dev/null @@ -1,94 +0,0 @@ -{ - "versions": [ - { - "name": "1.20.4", - "mods": [ - { - "slug": "Vivecraft", - "version": "1.0", - "download_link": "https://github.com/QuestCraftPlusPlus/VivecraftBuilder/releases/download/1.20.4/vivecraft.jar" - }, - { - "slug": "Fabric-API", - "version": "0.91.2", - "download_link": "https://cdn.modrinth.com/data/P7dR8mSH/versions/yGY1P8Yr/fabric-api-0.91.2%2B1.20.4.jar" - } - ] - }, - { - "name": "1.20.2", - "mods": [ - { - "slug": "Vivecraft", - "version": "1.1.1", - "download_link": "https://github.com/QuestCraftPlusPlus/VivecraftBuilder/releases/download/1.20.2/vivecraft.jar" - }, - { - "slug": "Fabric-API", - "version": "0.91.1", - "download_link": "https://cdn.modrinth.com/data/P7dR8mSH/versions/qg6wQgub/fabric-api-0.91.1%2B1.20.2.jar" - } - ] - }, - { - "name": "1.20.1", - "mods": [ - { - "slug": "Vivecraft", - "version": "1.1.1", - "download_link": "https://github.com/QuestCraftPlusPlus/VivecraftBuilder/releases/download/1.20.1/vivecraft.jar" - }, - { - "slug": "Fabric-API", - "version": "0.91.0", - "download_link": "https://cdn.modrinth.com/data/P7dR8mSH/versions/YblXfKtI/fabric-api-0.91.0%2B1.20.1.jar" - } - ] - }, - { - "name": "1.19.4", - "mods": [ - { - "slug": "Vivecraft", - "version": "1.1.1", - "download_link": "https://github.com/QuestCraftPlusPlus/VivecraftBuilder/releases/download/1.19.4/vivecraft.jar" - }, - { - "slug": "Fabric-API", - "version": "0.87.2", - "download_link": "https://cdn.modrinth.com/data/P7dR8mSH/versions/nyAmoHlr/fabric-api-0.87.2%2B1.19.4.jar" - } - ] - }, - { - "name": "1.19.2", - "mods": [ - { - "slug": "Vivecraft", - "version": "1.1.3", - "download_link": "https://github.com/QuestCraftPlusPlus/VivecraftBuilder/releases/download/1.19.2/vivecraft.jar" - }, - { - "slug": "Fabric-API", - "version": "0.77.0", - "download_link": "https://cdn.modrinth.com/data/P7dR8mSH/versions/6g95K303/fabric-api-0.77.0%2B1.19.2.jar" - } - ] - }, - { - "name": "1.18.2", - "mods": [ - { - "slug": "Vivecraft", - "version": "1.1.3", - "download_link": "https://github.com/QuestCraftPlusPlus/VivecraftBuilder/releases/download/1.18.2/vivecraft.jar" - }, - { - "slug": "Fabric-API", - "version": "0.77.0", - "download_link": "https://cdn.modrinth.com/data/P7dR8mSH/versions/qk28POfr/fabric-api-0.77.0%2B1.18.2.jar" - } - ] - } - ] -} diff --git a/devmods.json b/devmods.json index a5ff92a6..e3125099 100644 --- a/devmods.json +++ b/devmods.json @@ -2,7 +2,7 @@ "versions": [ { "name": "1.20.4", - "mods": [ + "coreMods": [ { "slug": "Vivecraft", "version": "1.0", @@ -10,9 +10,11 @@ }, { "slug": "Fabric-API", - "version": "0.96.11", - "download_link": "https://cdn.modrinth.com/data/P7dR8mSH/versions/htRy7kbI/fabric-api-0.96.11%2B1.20.4.jar" - }, + "version": "0.91.2", + "download_link": "https://cdn.modrinth.com/data/P7dR8mSH/versions/yGY1P8Yr/fabric-api-0.91.2%2B1.20.4.jar" + } + ], + "defaultMods": [ { "slug": "Sodium", "version": "0.5.8", @@ -45,8 +47,8 @@ }, { "slug": "Simple-Voice-Chat", - "version": "2.5.1", - "download_link": "https://cdn.modrinth.com/data/9eGKb6K1/versions/lobOF2Co/voicechat-fabric-1.20.4-2.5.1.jar" + "version": "2.4.30", + "download_link": "https://cdn.modrinth.com/data/9eGKb6K1/versions/kp8RtRlH/voicechat-fabric-1.20.4-2.4.30.jar" }, { "slug": "Modern-Fix", @@ -57,7 +59,7 @@ }, { "name": "1.20.2", - "mods": [ + "coreMods": [ { "slug": "Vivecraft", "version": "1.1.1", @@ -67,7 +69,9 @@ "slug": "Fabric-API", "version": "0.91.1", "download_link": "https://cdn.modrinth.com/data/P7dR8mSH/versions/qg6wQgub/fabric-api-0.91.1%2B1.20.2.jar" - }, + } + ], + "defaultMods": [ { "slug": "Lithium", "version": "0.12.0", @@ -85,7 +89,7 @@ }, { "slug": "Sodium", - "version": "0.5.5.1", + "version": "0.5.5", "download_link": "https://github.com/QuestCraftPlusPlus/sodium-fabric/releases/download/mc1.20.2-0.5.5/sodium-fabric-mc1.20.2-0.5.5.jar" }, { @@ -126,23 +130,18 @@ { "slug": "Simple-Voice-Chat", "version": "2.4.28", - "download_link": "https://cdn.modrinth.com/data/9eGKb6K1/versions/Pq4BryXi/voicechat-fabric-1.20.2-2.5.1.jar" + "download_link": "https://cdn.modrinth.com/data/9eGKb6K1/versions/5XcFdUYz/voicechat-fabric-1.20.2-2.4.28.jar" }, { "slug": "Modern-Fix", "version": "5.9.0", "download_link": "https://cdn.modrinth.com/data/nmDcB62a/versions/FDGaMHFj/modernfix-fabric-5.9.0%2Bmc1.20.1.jar" - }, - { - "slug": "EBE", - "version": "0.9.1", - "download_link": "https://cdn.modrinth.com/data/OVuFYfre/versions/eIFo7wvq/enhancedblockentities-0.9.1%2B1.20.2.jar" } ] }, { "name": "1.20.1", - "mods": [ + "coreMods": [ { "slug": "Vivecraft", "version": "1.1.1", @@ -152,7 +151,9 @@ "slug": "Fabric-API", "version": "0.91.0", "download_link": "https://cdn.modrinth.com/data/P7dR8mSH/versions/YblXfKtI/fabric-api-0.91.0%2B1.20.1.jar" - }, + } + ], + "defaultMods": [ { "slug": "Lithium", "version": "0.11.2", @@ -185,8 +186,8 @@ }, { "slug": "Fabric-Language-Kotlin", - "version": "1.10.19+kotlin.1.9.23", - "download_link": "https://cdn.modrinth.com/data/Ha28R6CL/versions/ZMokinzs/fabric-language-kotlin-1.10.19%2Bkotlin.1.9.23.jar" + "version": "1.9.5+kotlin.1.8.22", + "download_link": "https://cdn.modrinth.com/data/Ha28R6CL/versions/ADg3gvlr/fabric-language-kotlin-1.9.5%2Bkotlin.1.8.22.jar" }, { "slug": "Krypton", @@ -215,8 +216,8 @@ }, { "slug": "Simple-Voice-Chat", - "version": "2.5.1", - "download_link": "https://cdn.modrinth.com/data/9eGKb6K1/versions/ot113WbU/voicechat-fabric-1.20.1-2.5.1.jar" + "version": "2.4.12", + "download_link": "https://cdn.modrinth.com/data/9eGKb6K1/versions/NkZguN8n/voicechat-fabric-1.20.1-2.4.12.jar" }, { "slug": "Modern-Fix", @@ -227,7 +228,7 @@ }, { "name": "1.19.4", - "mods": [ + "coreMods": [ { "slug": "Vivecraft", "version": "1.1.1", @@ -237,11 +238,13 @@ "slug": "Fabric-API", "version": "0.87.2", "download_link": "https://cdn.modrinth.com/data/P7dR8mSH/versions/nyAmoHlr/fabric-api-0.87.2%2B1.19.4.jar" - }, + } + ], + "defaultMods": [ { "slug": "Simple-Voice-Chat", - "version": "2.5.1", - "download_link": "https://cdn.modrinth.com/data/9eGKb6K1/versions/u7rKquVn/voicechat-fabric-1.19.4-2.5.1.jar" + "version": "2.4.10", + "download_link": "https://cdn.modrinth.com/data/9eGKb6K1/versions/cgPK1BnP/voicechat-fabric-1.19.4-2.4.10.jar" }, { "slug": "Lithium", @@ -263,6 +266,11 @@ "version": "1.6.2", "download_link": "https://cdn.modrinth.com/data/NNAgCjsB/versions/UvJN5Cy4/entityculling-fabric-1.6.2-mc1.19.4.jar" }, + { + "slug": "Sodium", + "version": "0.4.10", + "download_link": "https://cdn.modrinth.com/data/AANobbMI/versions/b4hTi3mo/sodium-fabric-mc1.19.4-0.4.10%2Bbuild.24.jar" + }, { "slug": "Cloth-Config", "version": "9.0.94", @@ -327,7 +335,7 @@ }, { "name": "1.19.2", - "mods": [ + "coreMods": [ { "slug": "Vivecraft", "version": "1.1.3", @@ -337,7 +345,9 @@ "slug": "Fabric-API", "version": "0.77.0", "download_link": "https://cdn.modrinth.com/data/P7dR8mSH/versions/6g95K303/fabric-api-0.77.0%2B1.19.2.jar" - }, + } + ], + "defaultMods": [ { "slug": "LazyDFU", "version": "1.3", @@ -345,8 +355,8 @@ }, { "slug": "Simple-Voice-Chat", - "version": "2.5.1", - "download_link": "https://cdn.modrinth.com/data/9eGKb6K1/versions/KfPEtgDQ/voicechat-fabric-1.19.2-2.5.1.jar" + "version": "2.4.10", + "download_link": "https://cdn.modrinth.com/data/9eGKb6K1/versions/onVH7UO9/voicechat-fabric-1.19.2-2.4.10.jar" }, { "slug": "Lithium", @@ -368,6 +378,11 @@ "version": "1.6.1", "download_link": "https://cdn.modrinth.com/data/NNAgCjsB/versions/twdGLDHv/entityculling-fabric-1.6.1-mc1.19.2.jar" }, + { + "slug": "Sodium", + "version": "0.4.4", + "download_link": "https://cdn.modrinth.com/data/AANobbMI/versions/rAfhHfow/sodium-fabric-mc1.19.2-0.4.4%2Bbuild.18.jar" + }, { "slug": "Cloth-Config", "version": "8.2.88", @@ -417,7 +432,7 @@ }, { "name": "1.18.2", - "mods": [ + "coreMods": [ { "slug": "Vivecraft", "version": "1.1.3", @@ -427,7 +442,9 @@ "slug": "Fabric-API", "version": "0.77.0", "download_link": "https://cdn.modrinth.com/data/P7dR8mSH/versions/qk28POfr/fabric-api-0.77.0%2B1.18.2.jar" - }, + } + ], + "defaultMods": [ { "slug": "LazyDFU", "version": "1.2", @@ -435,8 +452,8 @@ }, { "slug": "Simple-Voice-Chat", - "version": "2.5.1", - "download_link": "https://cdn.modrinth.com/data/9eGKb6K1/versions/oz82VCKL/voicechat-fabric-1.18.2-2.5.1.jar" + "version": "2.4.10", + "download_link": "https://cdn.modrinth.com/data/9eGKb6K1/versions/QKFGOJUD/voicechat-fabric-1.18.2-2.4.10.jar" }, { "slug": "Lithium", @@ -458,6 +475,11 @@ "version": "1.5.1", "download_link": "https://cdn.modrinth.com/data/NNAgCjsB/versions/1.5.1-fabric-1.18/entityculling-fabric-mc1.18-1.5.1.jar" }, + { + "slug": "Sodium", + "version": "0.4.1", + "download_link": "https://cdn.modrinth.com/data/AANobbMI/versions/mc1.18.2-0.4.1/sodium-fabric-mc1.18.2-0.4.1%2Bbuild.15.jar" + }, { "slug": "Better-Biome-Blend", "version": "1.3.5", @@ -511,4 +533,4 @@ ] } ] -} +} \ No newline at end of file diff --git a/mods.json b/mods.json index df973231..71497c12 100644 --- a/mods.json +++ b/mods.json @@ -1,399 +1,399 @@ -{ - "versions": [ - { - "name": "1.20.1", - "mods": [ - { - "slug": "Vivecraft", - "version": "0.2", - "download_link": "https://github.com/QuestCraftPlusPlus/VivecraftMod/releases/download/v0.1-1.20-Zink/vivecraft.jar" - }, - { - "slug": "Fabric-API", - "version": "0.91.0", - "download_link": "https://cdn.modrinth.com/data/P7dR8mSH/versions/YblXfKtI/fabric-api-0.91.0%2B1.20.1.jar" - }, - { - "slug": "Lithium", - "version": "0.11.2", - "download_link": "https://cdn.modrinth.com/data/gvQqBUqZ/versions/ZSNsJrPI/lithium-fabric-mc1.20.1-0.11.2.jar" - }, - { - "slug": "Ferrite-Core", - "version": "6.0.0", - "download_link": "https://cdn.modrinth.com/data/uXXizFIs/versions/FCnCG6PS/ferritecore-6.0.0-fabric.jar" - }, - { - "slug": "Entity-Culling", - "version": "1.6.2", - "download_link": "https://cdn.modrinth.com/data/NNAgCjsB/versions/d20sUcYn/entityculling-fabric-1.6.2-mc1.20.jar" - }, - { - "slug": "Sodium", - "version": "0.5.3", - "download_link": "https://cdn.modrinth.com/data/AANobbMI/versions/4OZL6q9h/sodium-fabric-mc1.20.1-0.5.3.jar" - }, - { - "slug": "Cloth-Config", - "version": "11.0.99", - "download_link": "https://cdn.modrinth.com/data/9s6osm5g/versions/y0kQixP8/cloth-config-11.0.99-fabric.jar" - }, - { - "slug": "FastLoad", - "version": "3.4.0", - "download_link": "https://cdn.modrinth.com/data/kCpssoSb/versions/ys9T20o4/Fastload%2B1.18.2-1.20-3.4.0.jar" - }, - { - "slug": "Fabric-Language-Kotlin", - "version": "1.9.5+kotlin.1.8.22", - "download_link": "https://cdn.modrinth.com/data/Ha28R6CL/versions/ADg3gvlr/fabric-language-kotlin-1.9.5%2Bkotlin.1.8.22.jar" - }, - { - "slug": "Krypton", - "version": "0.2.3", - "download_link": "https://cdn.modrinth.com/data/fQEb0iXm/versions/jiDwS0W1/krypton-0.2.3.jar" - }, - { - "slug": "Server-Core", - "version": "1.3.7-1.20.1", - "download_link": "https://cdn.modrinth.com/data/4WWQxlQP/versions/exA4UxFq/servercore-fabric-1.3.7%2B1.20.1.jar" - }, - { - "slug": "Mod-Menu", - "version": "7.0.1", - "download_link": "https://cdn.modrinth.com/data/mOgUt4GM/versions/RTFDnTKf/modmenu-7.0.1.jar" - }, - { - "slug": "C2me", - "version": "0.2.0+alpha.10.91", - "download_link": "https://cdn.modrinth.com/data/VSNURh3q/versions/t4juSkze/c2me-fabric-mc1.20.1-0.2.0%2Balpha.10.91.jar" - }, - { - "slug": "ImmediatelyFast", - "version": "1.1.15", - "download_link": "https://cdn.modrinth.com/data/5ZwdcRci/versions/4IDo27OL/ImmediatelyFast-1.1.15%2B1.20.1.jar" - }, - { - "slug": "Simple-Voice-Chat", - "version": "2.5.1", - "download_link": "https://cdn.modrinth.com/data/9eGKb6K1/versions/ot113WbU/voicechat-fabric-1.20.1-2.5.1.jar" - }, - { - "slug": "Modern-Fix", - "version": "5.9.0", - "download_link": "https://cdn.modrinth.com/data/nmDcB62a/versions/FDGaMHFj/modernfix-fabric-5.9.0%2Bmc1.20.1.jar" - }, - { - "slug": "Fabric-Language-Kotlin", - "version": "1.9.5+kotlin.1.8.22", - "download_link": "https://cdn.modrinth.com/data/Ha28R6CL/versions/ADg3gvlr/fabric-language-kotlin-1.9.5%2Bkotlin.1.8.22.jar" - } - ] - }, - { - "name": "1.19.4", - "mods": [ - { - "slug": "Vivecraft", - "version": "0.1", - "download_link": "https://github.com/QuestCraftPlusPlus/VivecraftMod/releases/download/v0.1-1.19.4-Zink/vivecraft.jar" - }, - { - "slug": "Fabric-API", - "version": "0.87.2", - "download_link": "https://cdn.modrinth.com/data/P7dR8mSH/versions/nyAmoHlr/fabric-api-0.87.2%2B1.19.4.jar" - }, - { - "slug": "Simple-Voice-Chat", - "version": "2.5.1", - "download_link": "https://cdn.modrinth.com/data/9eGKb6K1/versions/u7rKquVn/voicechat-fabric-1.19.4-2.5.1.jar" - }, - { - "slug": "Lithium", - "version": "0.11.1", - "download_link": "https://cdn.modrinth.com/data/gvQqBUqZ/versions/14hWYkog/lithium-fabric-mc1.19.4-0.11.1.jar" - }, - { - "slug": "Ferrite-Core", - "version": "5.2.0", - "download_link": "https://cdn.modrinth.com/data/uXXizFIs/versions/RbR7EG8T/ferritecore-5.2.0-fabric.jar" - }, - { - "slug": "Smooth-Boot", - "version": "1.7.0", - "download_link": "https://cdn.modrinth.com/data/FWumhS4T/versions/I9TkHxLI/smoothboot-fabric-1.19.4-1.7.0.jar" - }, - { - "slug": "Entity-Culling", - "version": "1.6.2", - "download_link": "https://cdn.modrinth.com/data/NNAgCjsB/versions/UvJN5Cy4/entityculling-fabric-1.6.2-mc1.19.4.jar" - }, - { - "slug": "Sodium", - "version": "0.4.10", - "download_link": "https://cdn.modrinth.com/data/AANobbMI/versions/b4hTi3mo/sodium-fabric-mc1.19.4-0.4.10%2Bbuild.24.jar" - }, - { - "slug": "Cloth-Config", - "version": "9.0.94", - "download_link": "https://cdn.modrinth.com/data/9s6osm5g/versions/M3yxljrZ/cloth-config-9.0.94-fabric.jar" - }, - { - "slug": "Starlight", - "version": "1.1.1", - "download_link": "https://cdn.modrinth.com/data/H8CaAYZC/versions/1.1.1%2B1.19/starlight-1.1.1%2Bfabric.ae22326.jar" - }, - { - "slug": "Krypton", - "version": "0.2.2", - "download_link": "https://cdn.modrinth.com/data/fQEb0iXm/versions/Tncui9tU/krypton-0.2.2.jar" - }, - { - "slug": "Better-Biome-Blend", - "version": "1.19-1.3.6-fabric", - "download_link": "https://cdn.modrinth.com/data/Rs6c7WyL/versions/1.19.0-1.3.6/betterbiomeblend-1.19.0-1.3.6-fabric.jar" - }, - { - "slug": "FastLoad", - "version": "3.1.1", - "download_link": "https://cdn.modrinth.com/data/kCpssoSb/versions/tykaPrWr/Fastload%2B1.18.2-1.19.4-3.1.1.jar" - }, - { - "slug": "Fabric-Language-Kotlin", - "version": "1.9.3+kotlin.1.8.20", - "download_link": "https://cdn.modrinth.com/data/Ha28R6CL/versions/MkcO8aQ0/fabric-language-kotlin-1.9.3%2Bkotlin.1.8.20.jar" - }, - { - "slug": "Server-Core", - "version": "1.3.5-1.19.4", - "download_link": "https://cdn.modrinth.com/data/4WWQxlQP/versions/aq6o4qRe/servercore-1.3.5-1.19.4.jar" - }, - { - "slug": "Mod-Menu", - "version": "6.2.1", - "download_link": "https://cdn.modrinth.com/data/mOgUt4GM/versions/yjjsLqbS/modmenu-6.2.1.jar" - }, - { - "slug": "C2me", - "version": "0.2.0+alpha.10.51", - "download_link": "https://cdn.modrinth.com/data/VSNURh3q/versions/2LxKBERD/c2me-fabric-mc1.19.4-0.2.0%2Balpha.10.51.jar" - }, - { - "slug": "ImmediatelyFast", - "version": "1.1.12", - "download_link": "https://cdn.modrinth.com/data/5ZwdcRci/versions/8IFFeKYy/ImmediatelyFast-1.1.12%2B1.19.4.jar" - }, - { - "slug": "Noxesium", - "version": "0.1.8", - "download_link": "https://cdn.modrinth.com/data/Kw7Sm3Xf/versions/5QKzTtlI/noxesium-0.1.8.jar" - }, - { - "slug": "Modern-Fix", - "version": "5.7.2", - "download_link": "https://cdn.modrinth.com/data/nmDcB62a/versions/LXlsO4Vo/modernfix-fabric-5.7.2%2Bmc1.19.4.jar" - }, - { - "slug": "Fabric-Language-Kotlin", - "version": "1.9.3+kotlin.1.8.20", - "download_link": "https://cdn.modrinth.com/data/Ha28R6CL/versions/MkcO8aQ0/fabric-language-kotlin-1.9.3%2Bkotlin.1.8.20.jar" - } - ] - }, - { - "name": "1.19.2", - "mods": [ - { - "slug": "Vivecraft", - "version": "0.1", - "download_link": "https://github.com/QuestCraftPlusPlus/VivecraftMod/releases/download/v0.1-1.19.2-Zink/vivecraft.jar" - }, - { - "slug": "Fabric-API", - "version": "0.77.0", - "download_link": "https://cdn.modrinth.com/data/P7dR8mSH/versions/6g95K303/fabric-api-0.77.0%2B1.19.2.jar" - }, - { - "slug": "LazyDFU", - "version": "1.3", - "download_link": "https://cdn.modrinth.com/data/hvFnDODi/versions/0.1.3/lazydfu-0.1.3.jar" - }, - { - "slug": "Simple-Voice-Chat", - "version": "2.5.1", - "download_link": "https://cdn.modrinth.com/data/9eGKb6K1/versions/KfPEtgDQ/voicechat-fabric-1.19.2-2.5.1.jar" - }, - { - "slug": "Lithium", - "version": "0.11.1", - "download_link": "https://cdn.modrinth.com/data/gvQqBUqZ/versions/m6sVgAi6/lithium-fabric-mc1.19.2-0.11.1.jar" - }, - { - "slug": "Ferrite-Core", - "version": "5.0.3", - "download_link": "https://cdn.modrinth.com/data/uXXizFIs/versions/kwjHqfz7/ferritecore-5.0.3-fabric.jar" - }, - { - "slug": "Smooth-Boot", - "version": "1.7.1", - "download_link": "https://cdn.modrinth.com/data/FWumhS4T/versions/1.19-1.7.1/smoothboot-fabric-1.19-1.7.1.jar" - }, - { - "slug": "Entity-Culling", - "version": "1.6.1", - "download_link": "https://cdn.modrinth.com/data/NNAgCjsB/versions/twdGLDHv/entityculling-fabric-1.6.1-mc1.19.2.jar" - }, - { - "slug": "Sodium", - "version": "0.4.4", - "download_link": "https://cdn.modrinth.com/data/AANobbMI/versions/rAfhHfow/sodium-fabric-mc1.19.2-0.4.4%2Bbuild.18.jar" - }, - { - "slug": "Cloth-Config", - "version": "8.2.88", - "download_link": "https://cdn.modrinth.com/data/9s6osm5g/versions/EXrxCjl6/cloth-config-8.2.88-fabric.jar" - }, - { - "slug": "Starlight", - "version": "1.1.1", - "download_link": "https://cdn.modrinth.com/data/H8CaAYZC/versions/1.1.1%2B1.19/starlight-1.1.1%2Bfabric.ae22326.jar" - }, - { - "slug": "Krypton", - "version": "0.2.1", - "download_link": "https://cdn.modrinth.com/data/fQEb0iXm/versions/0.2.1/krypton-0.2.1.jar" - }, - { - "slug": "Mod_Menu", - "version": "4.2.0-beta.2", - "download_link": "https://cdn.modrinth.com/data/mOgUt4GM/versions/gSoPJyVn/modmenu-4.2.0-beta.2.jar" - }, - { - "slug": "C2me", - "version": "0.2.0+alpha.9.9", - "download_link": "https://cdn.modrinth.com/data/VSNURh3q/versions/8rUarScX/c2me-fabric-mc1.19.2-0.2.0%2Balpha.9.9.jar" - }, - { - "slug": "Better-Biome-Blend", - "version": "1.3.6", - "download_link": "https://cdn.modrinth.com/data/Rs6c7WyL/versions/1.19.0-1.3.6/betterbiomeblend-1.19.0-1.3.6-fabric.jar" - }, - { - "slug": "ImmediatelyFast", - "version": "1.1.12", - "download_link": "https://cdn.modrinth.com/data/5ZwdcRci/versions/4yVqQKQO/ImmediatelyFast-1.1.12%2B1.19.jar" - }, - { - "slug": "Noxesium", - "version": "0.1.4", - "download_link": "https://cdn.modrinth.com/data/Kw7Sm3Xf/versions/WhRq6Q4n/noxesium-0.1.4.jar" - }, - { - "slug": "Modern-Fix", - "version": "5.9.0", - "download_link": "https://cdn.modrinth.com/data/nmDcB62a/versions/b1FKKAz8/modernfix-fabric-5.9.0%2Bmc1.19.2.jar" - } - ] - }, - { - "name": "1.18.2", - "mods": [ - { - "slug": "Vivecraft", - "version": "0.1", - "download_link": "https://github.com/QuestCraftPlusPlus/VivecraftMod/releases/download/v0.1-1.18.2-Zink/vivecraft.jar" - }, - { - "slug": "Fabric-API", - "version": "0.77.0", - "download_link": "https://cdn.modrinth.com/data/P7dR8mSH/versions/qk28POfr/fabric-api-0.77.0%2B1.18.2.jar" - }, - { - "slug": "LazyDFU", - "version": "1.2", - "download_link": "https://cdn.modrinth.com/data/hvFnDODi/versions/0.1.2/lazydfu-0.1.2.jar" - }, - { - "slug": "Simple-Voice-Chat", - "version": "2.5.1", - "download_link": "https://cdn.modrinth.com/data/9eGKb6K1/versions/oz82VCKL/voicechat-fabric-1.18.2-2.5.1.jar" - }, - { - "slug": "Lithium", - "version": "0.10.3", - "download_link": "https://cdn.modrinth.com/data/gvQqBUqZ/versions/ALnv7Npy/lithium-fabric-mc1.18.2-0.10.3.jar" - }, - { - "slug": "Ferrite-Core", - "version": "4.2.1", - "download_link": "https://cdn.modrinth.com/data/uXXizFIs/versions/4.2.0/ferritecore-4.2.0-fabric.jar" - }, - { - "slug": "Smooth-Boot", - "version": "1.7.0", - "download_link": "https://cdn.modrinth.com/data/FWumhS4T/versions/iy4eaYy2/smoothboot-fabric-1.18.2-1.7.0.jar" - }, - { - "slug": "Entity-Culling", - "version": "1.5.1", - "download_link": "https://cdn.modrinth.com/data/NNAgCjsB/versions/1.5.1-fabric-1.18/entityculling-fabric-mc1.18-1.5.1.jar" - }, - { - "slug": "Sodium", - "version": "0.4.1", - "download_link": "https://cdn.modrinth.com/data/AANobbMI/versions/mc1.18.2-0.4.1/sodium-fabric-mc1.18.2-0.4.1%2Bbuild.15.jar" - }, - { - "slug": "Better-Biome-Blend", - "version": "1.3.5", - "download_link": "https://cdn.modrinth.com/data/Rs6c7WyL/versions/1.18.2-1.3.5-fabric/betterbiomeblend-1.18.2-1.3.5-fabric.jar" - }, - { - "slug": "C2me", - "version": "0.2.0", - "download_link": "https://cdn.modrinth.com/data/VSNURh3q/versions/U5BK0DTf/c2me-fabric-mc1.18.2-0.2.0%2Balpha.7.35.jar" - }, - { - "slug": "Cloth-Config", - "version": "6.3.81", - "download_link": "https://cdn.modrinth.com/data/9s6osm5g/versions/gPqHXnrg/cloth-config-6.3.81-fabric.jar" - }, - { - "slug": "Cull-Less-Leaves", - "version": "1.0.1", - "download_link": "https://cdn.modrinth.com/data/iG6ZHsUV/versions/1.0.1/CullLessLeaves-1.0.1.jar" - }, - { - "slug": "FastLoad", - "version": "1.5.9", - "download_link": "https://cdn.modrinth.com/data/kCpssoSb/versions/K9vr5fdy/Fastload%2B1.18.2-1.5.9.jar" - }, - { - "slug": "ImmediatelyFast", - "version": "1.1.6", - "download_link": "https://cdn.modrinth.com/data/5ZwdcRci/versions/zImGOGqD/ImmediatelyFast-1.1.6%2B1.18.2.jar" - }, - { - "slug": "Starlight", - "version": "1.0.2", - "download_link": "https://cdn.modrinth.com/data/H8CaAYZC/versions/1.0.2%2B1.18.2/starlight-1.0.2%2Bfabric.89b8d9f.jar" - }, - { - "slug": "Krypton", - "version": "0.1.9", - "download_link": "https://cdn.modrinth.com/data/fQEb0iXm/versions/0.1.9/krypton-0.1.9.jar" - }, - { - "slug": "Mod-Menu", - "version": "3.2.5", - "download_link": "https://cdn.modrinth.com/data/mOgUt4GM/versions/nVxObSbX/modmenu-3.2.5.jar" - }, - { - "slug": "Modern-Fix", - "version": "5.9.0", - "download_link": "https://cdn.modrinth.com/data/nmDcB62a/versions/qNrVNwfw/modernfix-fabric-5.9.0%2Bmc1.18.2.jar" - } - ] - } - ] +{ + "versions": [ + { + "name": "1.20.1", + "mods": [ + { + "slug": "Vivecraft", + "version": "0.2", + "download_link": "https://github.com/QuestCraftPlusPlus/VivecraftMod/releases/download/v0.1-1.20-Zink/vivecraft.jar" + }, + { + "slug": "Fabric-API", + "version": "0.91.0", + "download_link": "https://cdn.modrinth.com/data/P7dR8mSH/versions/YblXfKtI/fabric-api-0.91.0%2B1.20.1.jar" + }, + { + "slug": "Lithium", + "version": "0.11.2", + "download_link": "https://cdn.modrinth.com/data/gvQqBUqZ/versions/ZSNsJrPI/lithium-fabric-mc1.20.1-0.11.2.jar" + }, + { + "slug": "Ferrite-Core", + "version": "6.0.0", + "download_link": "https://cdn.modrinth.com/data/uXXizFIs/versions/FCnCG6PS/ferritecore-6.0.0-fabric.jar" + }, + { + "slug": "Entity-Culling", + "version": "1.6.2", + "download_link": "https://cdn.modrinth.com/data/NNAgCjsB/versions/d20sUcYn/entityculling-fabric-1.6.2-mc1.20.jar" + }, + { + "slug": "Sodium", + "version": "0.5.3", + "download_link": "https://cdn.modrinth.com/data/AANobbMI/versions/4OZL6q9h/sodium-fabric-mc1.20.1-0.5.3.jar" + }, + { + "slug": "Cloth-Config", + "version": "11.0.99", + "download_link": "https://cdn.modrinth.com/data/9s6osm5g/versions/y0kQixP8/cloth-config-11.0.99-fabric.jar" + }, + { + "slug": "FastLoad", + "version": "3.4.0", + "download_link": "https://cdn.modrinth.com/data/kCpssoSb/versions/ys9T20o4/Fastload%2B1.18.2-1.20-3.4.0.jar" + }, + { + "slug": "Fabric-Language-Kotlin", + "version": "1.9.5+kotlin.1.8.22", + "download_link": "https://cdn.modrinth.com/data/Ha28R6CL/versions/ADg3gvlr/fabric-language-kotlin-1.9.5%2Bkotlin.1.8.22.jar" + }, + { + "slug": "Krypton", + "version": "0.2.3", + "download_link": "https://cdn.modrinth.com/data/fQEb0iXm/versions/jiDwS0W1/krypton-0.2.3.jar" + }, + { + "slug": "Server-Core", + "version": "1.3.7-1.20.1", + "download_link": "https://cdn.modrinth.com/data/4WWQxlQP/versions/exA4UxFq/servercore-fabric-1.3.7%2B1.20.1.jar" + }, + { + "slug": "Mod-Menu", + "version": "7.0.1", + "download_link": "https://cdn.modrinth.com/data/mOgUt4GM/versions/RTFDnTKf/modmenu-7.0.1.jar" + }, + { + "slug": "C2me", + "version": "0.2.0+alpha.10.91", + "download_link": "https://cdn.modrinth.com/data/VSNURh3q/versions/t4juSkze/c2me-fabric-mc1.20.1-0.2.0%2Balpha.10.91.jar" + }, + { + "slug": "ImmediatelyFast", + "version": "1.1.15", + "download_link": "https://cdn.modrinth.com/data/5ZwdcRci/versions/4IDo27OL/ImmediatelyFast-1.1.15%2B1.20.1.jar" + }, + { + "slug": "Simple-Voice-Chat", + "version": "2.5.1", + "download_link": "https://cdn.modrinth.com/data/9eGKb6K1/versions/ot113WbU/voicechat-fabric-1.20.1-2.5.1.jar" + }, + { + "slug": "Modern-Fix", + "version": "5.9.0", + "download_link": "https://cdn.modrinth.com/data/nmDcB62a/versions/FDGaMHFj/modernfix-fabric-5.9.0%2Bmc1.20.1.jar" + }, + { + "slug": "Fabric-Language-Kotlin", + "version": "1.9.5+kotlin.1.8.22", + "download_link": "https://cdn.modrinth.com/data/Ha28R6CL/versions/ADg3gvlr/fabric-language-kotlin-1.9.5%2Bkotlin.1.8.22.jar" + } + ] + }, + { + "name": "1.19.4", + "mods": [ + { + "slug": "Vivecraft", + "version": "0.1", + "download_link": "https://github.com/QuestCraftPlusPlus/VivecraftMod/releases/download/v0.1-1.19.4-Zink/vivecraft.jar" + }, + { + "slug": "Fabric-API", + "version": "0.87.2", + "download_link": "https://cdn.modrinth.com/data/P7dR8mSH/versions/nyAmoHlr/fabric-api-0.87.2%2B1.19.4.jar" + }, + { + "slug": "Simple-Voice-Chat", + "version": "2.5.1", + "download_link": "https://cdn.modrinth.com/data/9eGKb6K1/versions/u7rKquVn/voicechat-fabric-1.19.4-2.5.1.jar" + }, + { + "slug": "Lithium", + "version": "0.11.1", + "download_link": "https://cdn.modrinth.com/data/gvQqBUqZ/versions/14hWYkog/lithium-fabric-mc1.19.4-0.11.1.jar" + }, + { + "slug": "Ferrite-Core", + "version": "5.2.0", + "download_link": "https://cdn.modrinth.com/data/uXXizFIs/versions/RbR7EG8T/ferritecore-5.2.0-fabric.jar" + }, + { + "slug": "Smooth-Boot", + "version": "1.7.0", + "download_link": "https://cdn.modrinth.com/data/FWumhS4T/versions/I9TkHxLI/smoothboot-fabric-1.19.4-1.7.0.jar" + }, + { + "slug": "Entity-Culling", + "version": "1.6.2", + "download_link": "https://cdn.modrinth.com/data/NNAgCjsB/versions/UvJN5Cy4/entityculling-fabric-1.6.2-mc1.19.4.jar" + }, + { + "slug": "Sodium", + "version": "0.4.10", + "download_link": "https://cdn.modrinth.com/data/AANobbMI/versions/b4hTi3mo/sodium-fabric-mc1.19.4-0.4.10%2Bbuild.24.jar" + }, + { + "slug": "Cloth-Config", + "version": "9.0.94", + "download_link": "https://cdn.modrinth.com/data/9s6osm5g/versions/M3yxljrZ/cloth-config-9.0.94-fabric.jar" + }, + { + "slug": "Starlight", + "version": "1.1.1", + "download_link": "https://cdn.modrinth.com/data/H8CaAYZC/versions/1.1.1%2B1.19/starlight-1.1.1%2Bfabric.ae22326.jar" + }, + { + "slug": "Krypton", + "version": "0.2.2", + "download_link": "https://cdn.modrinth.com/data/fQEb0iXm/versions/Tncui9tU/krypton-0.2.2.jar" + }, + { + "slug": "Better-Biome-Blend", + "version": "1.19-1.3.6-fabric", + "download_link": "https://cdn.modrinth.com/data/Rs6c7WyL/versions/1.19.0-1.3.6/betterbiomeblend-1.19.0-1.3.6-fabric.jar" + }, + { + "slug": "FastLoad", + "version": "3.1.1", + "download_link": "https://cdn.modrinth.com/data/kCpssoSb/versions/tykaPrWr/Fastload%2B1.18.2-1.19.4-3.1.1.jar" + }, + { + "slug": "Fabric-Language-Kotlin", + "version": "1.9.3+kotlin.1.8.20", + "download_link": "https://cdn.modrinth.com/data/Ha28R6CL/versions/MkcO8aQ0/fabric-language-kotlin-1.9.3%2Bkotlin.1.8.20.jar" + }, + { + "slug": "Server-Core", + "version": "1.3.5-1.19.4", + "download_link": "https://cdn.modrinth.com/data/4WWQxlQP/versions/aq6o4qRe/servercore-1.3.5-1.19.4.jar" + }, + { + "slug": "Mod-Menu", + "version": "6.2.1", + "download_link": "https://cdn.modrinth.com/data/mOgUt4GM/versions/yjjsLqbS/modmenu-6.2.1.jar" + }, + { + "slug": "C2me", + "version": "0.2.0+alpha.10.51", + "download_link": "https://cdn.modrinth.com/data/VSNURh3q/versions/2LxKBERD/c2me-fabric-mc1.19.4-0.2.0%2Balpha.10.51.jar" + }, + { + "slug": "ImmediatelyFast", + "version": "1.1.12", + "download_link": "https://cdn.modrinth.com/data/5ZwdcRci/versions/8IFFeKYy/ImmediatelyFast-1.1.12%2B1.19.4.jar" + }, + { + "slug": "Noxesium", + "version": "0.1.8", + "download_link": "https://cdn.modrinth.com/data/Kw7Sm3Xf/versions/5QKzTtlI/noxesium-0.1.8.jar" + }, + { + "slug": "Modern-Fix", + "version": "5.7.2", + "download_link": "https://cdn.modrinth.com/data/nmDcB62a/versions/LXlsO4Vo/modernfix-fabric-5.7.2%2Bmc1.19.4.jar" + }, + { + "slug": "Fabric-Language-Kotlin", + "version": "1.9.3+kotlin.1.8.20", + "download_link": "https://cdn.modrinth.com/data/Ha28R6CL/versions/MkcO8aQ0/fabric-language-kotlin-1.9.3%2Bkotlin.1.8.20.jar" + } + ] + }, + { + "name": "1.19.2", + "mods": [ + { + "slug": "Vivecraft", + "version": "0.1", + "download_link": "https://github.com/QuestCraftPlusPlus/VivecraftMod/releases/download/v0.1-1.19.2-Zink/vivecraft.jar" + }, + { + "slug": "Fabric-API", + "version": "0.77.0", + "download_link": "https://cdn.modrinth.com/data/P7dR8mSH/versions/6g95K303/fabric-api-0.77.0%2B1.19.2.jar" + }, + { + "slug": "LazyDFU", + "version": "1.3", + "download_link": "https://cdn.modrinth.com/data/hvFnDODi/versions/0.1.3/lazydfu-0.1.3.jar" + }, + { + "slug": "Simple-Voice-Chat", + "version": "2.5.1", + "download_link": "https://cdn.modrinth.com/data/9eGKb6K1/versions/KfPEtgDQ/voicechat-fabric-1.19.2-2.5.1.jar" + }, + { + "slug": "Lithium", + "version": "0.11.1", + "download_link": "https://cdn.modrinth.com/data/gvQqBUqZ/versions/m6sVgAi6/lithium-fabric-mc1.19.2-0.11.1.jar" + }, + { + "slug": "Ferrite-Core", + "version": "5.0.3", + "download_link": "https://cdn.modrinth.com/data/uXXizFIs/versions/kwjHqfz7/ferritecore-5.0.3-fabric.jar" + }, + { + "slug": "Smooth-Boot", + "version": "1.7.1", + "download_link": "https://cdn.modrinth.com/data/FWumhS4T/versions/1.19-1.7.1/smoothboot-fabric-1.19-1.7.1.jar" + }, + { + "slug": "Entity-Culling", + "version": "1.6.1", + "download_link": "https://cdn.modrinth.com/data/NNAgCjsB/versions/twdGLDHv/entityculling-fabric-1.6.1-mc1.19.2.jar" + }, + { + "slug": "Sodium", + "version": "0.4.4", + "download_link": "https://cdn.modrinth.com/data/AANobbMI/versions/rAfhHfow/sodium-fabric-mc1.19.2-0.4.4%2Bbuild.18.jar" + }, + { + "slug": "Cloth-Config", + "version": "8.2.88", + "download_link": "https://cdn.modrinth.com/data/9s6osm5g/versions/EXrxCjl6/cloth-config-8.2.88-fabric.jar" + }, + { + "slug": "Starlight", + "version": "1.1.1", + "download_link": "https://cdn.modrinth.com/data/H8CaAYZC/versions/1.1.1%2B1.19/starlight-1.1.1%2Bfabric.ae22326.jar" + }, + { + "slug": "Krypton", + "version": "0.2.1", + "download_link": "https://cdn.modrinth.com/data/fQEb0iXm/versions/0.2.1/krypton-0.2.1.jar" + }, + { + "slug": "Mod_Menu", + "version": "4.2.0-beta.2", + "download_link": "https://cdn.modrinth.com/data/mOgUt4GM/versions/gSoPJyVn/modmenu-4.2.0-beta.2.jar" + }, + { + "slug": "C2me", + "version": "0.2.0+alpha.9.9", + "download_link": "https://cdn.modrinth.com/data/VSNURh3q/versions/8rUarScX/c2me-fabric-mc1.19.2-0.2.0%2Balpha.9.9.jar" + }, + { + "slug": "Better-Biome-Blend", + "version": "1.3.6", + "download_link": "https://cdn.modrinth.com/data/Rs6c7WyL/versions/1.19.0-1.3.6/betterbiomeblend-1.19.0-1.3.6-fabric.jar" + }, + { + "slug": "ImmediatelyFast", + "version": "1.1.12", + "download_link": "https://cdn.modrinth.com/data/5ZwdcRci/versions/4yVqQKQO/ImmediatelyFast-1.1.12%2B1.19.jar" + }, + { + "slug": "Noxesium", + "version": "0.1.4", + "download_link": "https://cdn.modrinth.com/data/Kw7Sm3Xf/versions/WhRq6Q4n/noxesium-0.1.4.jar" + }, + { + "slug": "Modern-Fix", + "version": "5.9.0", + "download_link": "https://cdn.modrinth.com/data/nmDcB62a/versions/b1FKKAz8/modernfix-fabric-5.9.0%2Bmc1.19.2.jar" + } + ] + }, + { + "name": "1.18.2", + "mods": [ + { + "slug": "Vivecraft", + "version": "0.1", + "download_link": "https://github.com/QuestCraftPlusPlus/VivecraftMod/releases/download/v0.1-1.18.2-Zink/vivecraft.jar" + }, + { + "slug": "Fabric-API", + "version": "0.77.0", + "download_link": "https://cdn.modrinth.com/data/P7dR8mSH/versions/qk28POfr/fabric-api-0.77.0%2B1.18.2.jar" + }, + { + "slug": "LazyDFU", + "version": "1.2", + "download_link": "https://cdn.modrinth.com/data/hvFnDODi/versions/0.1.2/lazydfu-0.1.2.jar" + }, + { + "slug": "Simple-Voice-Chat", + "version": "2.5.1", + "download_link": "https://cdn.modrinth.com/data/9eGKb6K1/versions/oz82VCKL/voicechat-fabric-1.18.2-2.5.1.jar" + }, + { + "slug": "Lithium", + "version": "0.10.3", + "download_link": "https://cdn.modrinth.com/data/gvQqBUqZ/versions/ALnv7Npy/lithium-fabric-mc1.18.2-0.10.3.jar" + }, + { + "slug": "Ferrite-Core", + "version": "4.2.1", + "download_link": "https://cdn.modrinth.com/data/uXXizFIs/versions/4.2.0/ferritecore-4.2.0-fabric.jar" + }, + { + "slug": "Smooth-Boot", + "version": "1.7.0", + "download_link": "https://cdn.modrinth.com/data/FWumhS4T/versions/iy4eaYy2/smoothboot-fabric-1.18.2-1.7.0.jar" + }, + { + "slug": "Entity-Culling", + "version": "1.5.1", + "download_link": "https://cdn.modrinth.com/data/NNAgCjsB/versions/1.5.1-fabric-1.18/entityculling-fabric-mc1.18-1.5.1.jar" + }, + { + "slug": "Sodium", + "version": "0.4.1", + "download_link": "https://cdn.modrinth.com/data/AANobbMI/versions/mc1.18.2-0.4.1/sodium-fabric-mc1.18.2-0.4.1%2Bbuild.15.jar" + }, + { + "slug": "Better-Biome-Blend", + "version": "1.3.5", + "download_link": "https://cdn.modrinth.com/data/Rs6c7WyL/versions/1.18.2-1.3.5-fabric/betterbiomeblend-1.18.2-1.3.5-fabric.jar" + }, + { + "slug": "C2me", + "version": "0.2.0", + "download_link": "https://cdn.modrinth.com/data/VSNURh3q/versions/U5BK0DTf/c2me-fabric-mc1.18.2-0.2.0%2Balpha.7.35.jar" + }, + { + "slug": "Cloth-Config", + "version": "6.3.81", + "download_link": "https://cdn.modrinth.com/data/9s6osm5g/versions/gPqHXnrg/cloth-config-6.3.81-fabric.jar" + }, + { + "slug": "Cull-Less-Leaves", + "version": "1.0.1", + "download_link": "https://cdn.modrinth.com/data/iG6ZHsUV/versions/1.0.1/CullLessLeaves-1.0.1.jar" + }, + { + "slug": "FastLoad", + "version": "1.5.9", + "download_link": "https://cdn.modrinth.com/data/kCpssoSb/versions/K9vr5fdy/Fastload%2B1.18.2-1.5.9.jar" + }, + { + "slug": "ImmediatelyFast", + "version": "1.1.6", + "download_link": "https://cdn.modrinth.com/data/5ZwdcRci/versions/zImGOGqD/ImmediatelyFast-1.1.6%2B1.18.2.jar" + }, + { + "slug": "Starlight", + "version": "1.0.2", + "download_link": "https://cdn.modrinth.com/data/H8CaAYZC/versions/1.0.2%2B1.18.2/starlight-1.0.2%2Bfabric.89b8d9f.jar" + }, + { + "slug": "Krypton", + "version": "0.1.9", + "download_link": "https://cdn.modrinth.com/data/fQEb0iXm/versions/0.1.9/krypton-0.1.9.jar" + }, + { + "slug": "Mod-Menu", + "version": "3.2.5", + "download_link": "https://cdn.modrinth.com/data/mOgUt4GM/versions/nVxObSbX/modmenu-3.2.5.jar" + }, + { + "slug": "Modern-Fix", + "version": "5.9.0", + "download_link": "https://cdn.modrinth.com/data/nmDcB62a/versions/qNrVNwfw/modernfix-fabric-5.9.0%2Bmc1.18.2.jar" + } + ] + } + ] } \ No newline at end of file diff --git a/mods_new.json b/mods_new.json new file mode 100644 index 00000000..f7cf0d57 --- /dev/null +++ b/mods_new.json @@ -0,0 +1,536 @@ +{ + "versions": [ + { + "name": "1.20.4", + "coreMods": [ + { + "slug": "Vivecraft", + "version": "1.0", + "download_link": "https://github.com/QuestCraftPlusPlus/VivecraftBuilder/releases/download/1.20.4/vivecraft.jar" + }, + { + "slug": "Fabric-API", + "version": "0.91.2", + "download_link": "https://cdn.modrinth.com/data/P7dR8mSH/versions/yGY1P8Yr/fabric-api-0.91.2%2B1.20.4.jar" + } + ], + "defaultMods": [ + { + "slug": "Sodium", + "version": "0.5.5", + "download_link": "https://cdn.modrinth.com/data/AANobbMI/versions/InGKdfel/sodium-fabric-mc1.20.3-0.5.5.jar" + }, + { + "slug": "Cloth-Config", + "version": "13.0.114", + "download_link": "https://cdn.modrinth.com/data/9s6osm5g/versions/YFpDLLdu/cloth-config-13.0.114-fabric.jar" + }, + { + "slug": "Fabric-Language-Kotlin", + "version": "1.10.16+kotlin.1.9.21", + "download_link": "https://cdn.modrinth.com/data/Ha28R6CL/versions/VJUqKopR/fabric-language-kotlin-1.10.16%2Bkotlin.1.9.21.jar" + }, + { + "slug": "Server-Core", + "version": "1.4.0", + "download_link": "https://cdn.modrinth.com/data/4WWQxlQP/versions/H1fXXdNC/servercore-fabric-1.4.0%2B1.20.3.jar" + }, + { + "slug": "C2me", + "version": "0.2.0+alpha.11.38", + "download_link": "https://cdn.modrinth.com/data/VSNURh3q/versions/o0DcaA0L/c2me-fabric-mc1.20.4-0.2.0%2Balpha.11.38.jar" + }, + { + "slug": "ImmediatelyFast", + "version": "1.2.8", + "download_link": "https://cdn.modrinth.com/data/5ZwdcRci/versions/3EgIBnht/ImmediatelyFast-Fabric-1.2.8%2B1.20.4.jar" + }, + { + "slug": "Simple-Voice-Chat", + "version": "2.4.30", + "download_link": "https://cdn.modrinth.com/data/9eGKb6K1/versions/kp8RtRlH/voicechat-fabric-1.20.4-2.4.30.jar" + }, + { + "slug": "Modern-Fix", + "version": "5.10.0", + "download_link": "https://cdn.modrinth.com/data/nmDcB62a/versions/vxDb5tOq/modernfix-fabric-5.10.0%2Bmc1.20.3.jar" + } + ] + }, + { + "name": "1.20.2", + "coreMods": [ + { + "slug": "Vivecraft", + "version": "1.1.1", + "download_link": "https://github.com/QuestCraftPlusPlus/VivecraftBuilder/releases/download/1.20.2/vivecraft.jar" + }, + { + "slug": "Fabric-API", + "version": "0.91.1", + "download_link": "https://cdn.modrinth.com/data/P7dR8mSH/versions/qg6wQgub/fabric-api-0.91.1%2B1.20.2.jar" + } + ], + "defaultMods": [ + { + "slug": "Lithium", + "version": "0.12.0", + "download_link": "https://cdn.modrinth.com/data/gvQqBUqZ/versions/qdzL5Hkg/lithium-fabric-mc1.20.2-0.12.0.jar" + }, + { + "slug": "Ferrite-Core", + "version": "6.0.1", + "download_link": "https://cdn.modrinth.com/data/uXXizFIs/versions/unerR5MN/ferritecore-6.0.1-fabric.jar" + }, + { + "slug": "Entity-Culling", + "version": "1.6.2", + "download_link": "https://cdn.modrinth.com/data/NNAgCjsB/versions/BDwHAdWc/entityculling-fabric-1.6.2-mc1.20.1.jar" + }, + { + "slug": "Sodium", + "version": "0.5.5", + "download_link": "https://cdn.modrinth.com/data/AANobbMI/versions/pmgeU5yX/sodium-fabric-mc1.20.2-0.5.5.jar" + }, + { + "slug": "Cloth-Config", + "version": "12.0.109", + "download_link": "https://cdn.modrinth.com/data/9s6osm5g/versions/LnfolBYb/cloth-config-12.0.109-fabric.jar" + }, + { + "slug": "Fabric-Language-Kotlin", + "version": "1.10.13+kotlin.1.9.20", + "download_link": "https://cdn.modrinth.com/data/Ha28R6CL/versions/atZwzPrT/fabric-language-kotlin-1.10.13%2Bkotlin.1.9.20.jar" + }, + { + "slug": "Krypton", + "version": "0.2.4", + "download_link": "https://cdn.modrinth.com/data/fQEb0iXm/versions/cQ60Ouax/krypton-0.2.4.jar" + }, + { + "slug": "Server-Core", + "version": "1.3.9", + "download_link": "https://cdn.modrinth.com/data/4WWQxlQP/versions/sicenHyA/servercore-fabric-1.3.9%2B1.20.2.jar" + }, + { + "slug": "Mod-Menu", + "version": "8.0.0", + "download_link": "https://cdn.modrinth.com/data/mOgUt4GM/versions/TwfjidT5/modmenu-8.0.0.jar" + }, + { + "slug": "C2me", + "version": "0.2.0+alpha.10.126", + "download_link": "https://cdn.modrinth.com/data/VSNURh3q/versions/ilKwGRiJ/c2me-fabric-mc1.20.2-0.2.0%2Balpha.10.126.jar" + }, + { + "slug": "ImmediatelyFast", + "version": "1.2.6", + "download_link": "https://cdn.modrinth.com/data/5ZwdcRci/versions/mbeaDZtb/ImmediatelyFast-1.2.6%2B1.20.2.jar" + }, + { + "slug": "Simple-Voice-Chat", + "version": "2.4.28", + "download_link": "https://cdn.modrinth.com/data/9eGKb6K1/versions/5XcFdUYz/voicechat-fabric-1.20.2-2.4.28.jar" + }, + { + "slug": "Modern-Fix", + "version": "5.9.0", + "download_link": "https://cdn.modrinth.com/data/nmDcB62a/versions/FDGaMHFj/modernfix-fabric-5.9.0%2Bmc1.20.1.jar" + } + ] + }, + { + "name": "1.20.1", + "coreMods": [ + { + "slug": "Vivecraft", + "version": "1.1.1", + "download_link": "https://github.com/QuestCraftPlusPlus/VivecraftBuilder/releases/download/1.20.1/vivecraft.jar" + }, + { + "slug": "Fabric-API", + "version": "0.91.0", + "download_link": "https://cdn.modrinth.com/data/P7dR8mSH/versions/YblXfKtI/fabric-api-0.91.0%2B1.20.1.jar" + } + ], + "defaultMods": [ + { + "slug": "Lithium", + "version": "0.11.2", + "download_link": "https://cdn.modrinth.com/data/gvQqBUqZ/versions/ZSNsJrPI/lithium-fabric-mc1.20.1-0.11.2.jar" + }, + { + "slug": "Ferrite-Core", + "version": "6.0.0", + "download_link": "https://cdn.modrinth.com/data/uXXizFIs/versions/FCnCG6PS/ferritecore-6.0.0-fabric.jar" + }, + { + "slug": "Entity-Culling", + "version": "1.6.2", + "download_link": "https://cdn.modrinth.com/data/NNAgCjsB/versions/d20sUcYn/entityculling-fabric-1.6.2-mc1.20.jar" + }, + { + "slug": "Sodium", + "version": "0.5.2", + "download_link": "https://cdn.modrinth.com/data/AANobbMI/versions/6SSPmLc9/sodium-fabric-mc1.20.1-0.5.2.jar" + }, + { + "slug": "Cloth-Config", + "version": "11.0.99", + "download_link": "https://cdn.modrinth.com/data/9s6osm5g/versions/y0kQixP8/cloth-config-11.0.99-fabric.jar" + }, + { + "slug": "FastLoad", + "version": "3.4.0", + "download_link": "https://cdn.modrinth.com/data/kCpssoSb/versions/ys9T20o4/Fastload%2B1.18.2-1.20-3.4.0.jar" + }, + { + "slug": "Fabric-Language-Kotlin", + "version": "1.9.5+kotlin.1.8.22", + "download_link": "https://cdn.modrinth.com/data/Ha28R6CL/versions/ADg3gvlr/fabric-language-kotlin-1.9.5%2Bkotlin.1.8.22.jar" + }, + { + "slug": "Krypton", + "version": "0.2.3", + "download_link": "https://cdn.modrinth.com/data/fQEb0iXm/versions/jiDwS0W1/krypton-0.2.3.jar" + }, + { + "slug": "Server-Core", + "version": "1.3.7-1.20.1", + "download_link": "https://cdn.modrinth.com/data/4WWQxlQP/versions/exA4UxFq/servercore-fabric-1.3.7%2B1.20.1.jar" + }, + { + "slug": "Mod-Menu", + "version": "7.0.1", + "download_link": "https://cdn.modrinth.com/data/mOgUt4GM/versions/RTFDnTKf/modmenu-7.0.1.jar" + }, + { + "slug": "C2me", + "version": "0.2.0+alpha.10.91", + "download_link": "https://cdn.modrinth.com/data/VSNURh3q/versions/t4juSkze/c2me-fabric-mc1.20.1-0.2.0%2Balpha.10.91.jar" + }, + { + "slug": "ImmediatelyFast", + "version": "1.1.15", + "download_link": "https://cdn.modrinth.com/data/5ZwdcRci/versions/4IDo27OL/ImmediatelyFast-1.1.15%2B1.20.1.jar" + }, + { + "slug": "Simple-Voice-Chat", + "version": "2.4.12", + "download_link": "https://cdn.modrinth.com/data/9eGKb6K1/versions/NkZguN8n/voicechat-fabric-1.20.1-2.4.12.jar" + }, + { + "slug": "Modern-Fix", + "version": "5.9.0", + "download_link": "https://cdn.modrinth.com/data/nmDcB62a/versions/FDGaMHFj/modernfix-fabric-5.9.0%2Bmc1.20.1.jar" + } + ] + }, + { + "name": "1.19.4", + "coreMods": [ + { + "slug": "Vivecraft", + "version": "1.1.1", + "download_link": "https://github.com/QuestCraftPlusPlus/VivecraftBuilder/releases/download/1.19.4/vivecraft.jar" + }, + { + "slug": "Fabric-API", + "version": "0.87.2", + "download_link": "https://cdn.modrinth.com/data/P7dR8mSH/versions/nyAmoHlr/fabric-api-0.87.2%2B1.19.4.jar" + } + ], + "defaultMods": [ + { + "slug": "Simple-Voice-Chat", + "version": "2.4.10", + "download_link": "https://cdn.modrinth.com/data/9eGKb6K1/versions/cgPK1BnP/voicechat-fabric-1.19.4-2.4.10.jar" + }, + { + "slug": "Lithium", + "version": "0.11.1", + "download_link": "https://cdn.modrinth.com/data/gvQqBUqZ/versions/14hWYkog/lithium-fabric-mc1.19.4-0.11.1.jar" + }, + { + "slug": "Ferrite-Core", + "version": "5.2.0", + "download_link": "https://cdn.modrinth.com/data/uXXizFIs/versions/RbR7EG8T/ferritecore-5.2.0-fabric.jar" + }, + { + "slug": "Smooth-Boot", + "version": "1.7.0", + "download_link": "https://cdn.modrinth.com/data/FWumhS4T/versions/I9TkHxLI/smoothboot-fabric-1.19.4-1.7.0.jar" + }, + { + "slug": "Entity-Culling", + "version": "1.6.2", + "download_link": "https://cdn.modrinth.com/data/NNAgCjsB/versions/UvJN5Cy4/entityculling-fabric-1.6.2-mc1.19.4.jar" + }, + { + "slug": "Sodium", + "version": "0.4.10", + "download_link": "https://cdn.modrinth.com/data/AANobbMI/versions/b4hTi3mo/sodium-fabric-mc1.19.4-0.4.10%2Bbuild.24.jar" + }, + { + "slug": "Cloth-Config", + "version": "9.0.94", + "download_link": "https://cdn.modrinth.com/data/9s6osm5g/versions/M3yxljrZ/cloth-config-9.0.94-fabric.jar" + }, + { + "slug": "Starlight", + "version": "1.1.1", + "download_link": "https://cdn.modrinth.com/data/H8CaAYZC/versions/1.1.1%2B1.19/starlight-1.1.1%2Bfabric.ae22326.jar" + }, + { + "slug": "Krypton", + "version": "0.2.2", + "download_link": "https://cdn.modrinth.com/data/fQEb0iXm/versions/Tncui9tU/krypton-0.2.2.jar" + }, + { + "slug": "Better-Biome-Blend", + "version": "1.19-1.3.6-fabric", + "download_link": "https://cdn.modrinth.com/data/Rs6c7WyL/versions/1.19.0-1.3.6/betterbiomeblend-1.19.0-1.3.6-fabric.jar" + }, + { + "slug": "FastLoad", + "version": "3.1.1", + "download_link": "https://cdn.modrinth.com/data/kCpssoSb/versions/tykaPrWr/Fastload%2B1.18.2-1.19.4-3.1.1.jar" + }, + { + "slug": "Fabric-Language-Kotlin", + "version": "1.9.3+kotlin.1.8.20", + "download_link": "https://cdn.modrinth.com/data/Ha28R6CL/versions/MkcO8aQ0/fabric-language-kotlin-1.9.3%2Bkotlin.1.8.20.jar" + }, + { + "slug": "Server-Core", + "version": "1.3.5-1.19.4", + "download_link": "https://cdn.modrinth.com/data/4WWQxlQP/versions/aq6o4qRe/servercore-1.3.5-1.19.4.jar" + }, + { + "slug": "Mod-Menu", + "version": "6.2.1", + "download_link": "https://cdn.modrinth.com/data/mOgUt4GM/versions/yjjsLqbS/modmenu-6.2.1.jar" + }, + { + "slug": "C2me", + "version": "0.2.0+alpha.10.51", + "download_link": "https://cdn.modrinth.com/data/VSNURh3q/versions/2LxKBERD/c2me-fabric-mc1.19.4-0.2.0%2Balpha.10.51.jar" + }, + { + "slug": "ImmediatelyFast", + "version": "1.1.12", + "download_link": "https://cdn.modrinth.com/data/5ZwdcRci/versions/8IFFeKYy/ImmediatelyFast-1.1.12%2B1.19.4.jar" + }, + { + "slug": "Noxesium", + "version": "0.1.8", + "download_link": "https://cdn.modrinth.com/data/Kw7Sm3Xf/versions/5QKzTtlI/noxesium-0.1.8.jar" + }, + { + "slug": "Modern-Fix", + "version": "5.7.2", + "download_link": "https://cdn.modrinth.com/data/nmDcB62a/versions/LXlsO4Vo/modernfix-fabric-5.7.2%2Bmc1.19.4.jar" + } + ] + }, + { + "name": "1.19.2", + "coreMods": [ + { + "slug": "Vivecraft", + "version": "1.1.3", + "download_link": "https://github.com/QuestCraftPlusPlus/VivecraftBuilder/releases/download/1.19.2/vivecraft.jar" + }, + { + "slug": "Fabric-API", + "version": "0.77.0", + "download_link": "https://cdn.modrinth.com/data/P7dR8mSH/versions/6g95K303/fabric-api-0.77.0%2B1.19.2.jar" + } + ], + "defaultMods": [ + { + "slug": "LazyDFU", + "version": "1.3", + "download_link": "https://cdn.modrinth.com/data/hvFnDODi/versions/0.1.3/lazydfu-0.1.3.jar" + }, + { + "slug": "Simple-Voice-Chat", + "version": "2.4.10", + "download_link": "https://cdn.modrinth.com/data/9eGKb6K1/versions/onVH7UO9/voicechat-fabric-1.19.2-2.4.10.jar" + }, + { + "slug": "Lithium", + "version": "0.11.1", + "download_link": "https://cdn.modrinth.com/data/gvQqBUqZ/versions/m6sVgAi6/lithium-fabric-mc1.19.2-0.11.1.jar" + }, + { + "slug": "Ferrite-Core", + "version": "5.0.3", + "download_link": "https://cdn.modrinth.com/data/uXXizFIs/versions/kwjHqfz7/ferritecore-5.0.3-fabric.jar" + }, + { + "slug": "Smooth-Boot", + "version": "1.7.1", + "download_link": "https://cdn.modrinth.com/data/FWumhS4T/versions/1.19-1.7.1/smoothboot-fabric-1.19-1.7.1.jar" + }, + { + "slug": "Entity-Culling", + "version": "1.6.1", + "download_link": "https://cdn.modrinth.com/data/NNAgCjsB/versions/twdGLDHv/entityculling-fabric-1.6.1-mc1.19.2.jar" + }, + { + "slug": "Sodium", + "version": "0.4.4", + "download_link": "https://cdn.modrinth.com/data/AANobbMI/versions/rAfhHfow/sodium-fabric-mc1.19.2-0.4.4%2Bbuild.18.jar" + }, + { + "slug": "Cloth-Config", + "version": "8.2.88", + "download_link": "https://cdn.modrinth.com/data/9s6osm5g/versions/EXrxCjl6/cloth-config-8.2.88-fabric.jar" + }, + { + "slug": "Starlight", + "version": "1.1.1", + "download_link": "https://cdn.modrinth.com/data/H8CaAYZC/versions/1.1.1%2B1.19/starlight-1.1.1%2Bfabric.ae22326.jar" + }, + { + "slug": "Krypton", + "version": "0.2.1", + "download_link": "https://cdn.modrinth.com/data/fQEb0iXm/versions/0.2.1/krypton-0.2.1.jar" + }, + { + "slug": "Mod_Menu", + "version": "4.2.0-beta.2", + "download_link": "https://cdn.modrinth.com/data/mOgUt4GM/versions/gSoPJyVn/modmenu-4.2.0-beta.2.jar" + }, + { + "slug": "C2me", + "version": "0.2.0+alpha.9.9", + "download_link": "https://cdn.modrinth.com/data/VSNURh3q/versions/8rUarScX/c2me-fabric-mc1.19.2-0.2.0%2Balpha.9.9.jar" + }, + { + "slug": "Better-Biome-Blend", + "version": "1.3.6", + "download_link": "https://cdn.modrinth.com/data/Rs6c7WyL/versions/1.19.0-1.3.6/betterbiomeblend-1.19.0-1.3.6-fabric.jar" + }, + { + "slug": "ImmediatelyFast", + "version": "1.1.12", + "download_link": "https://cdn.modrinth.com/data/5ZwdcRci/versions/4yVqQKQO/ImmediatelyFast-1.1.12%2B1.19.jar" + }, + { + "slug": "Noxesium", + "version": "0.1.4", + "download_link": "https://cdn.modrinth.com/data/Kw7Sm3Xf/versions/WhRq6Q4n/noxesium-0.1.4.jar" + }, + { + "slug": "Modern-Fix", + "version": "5.9.0", + "download_link": "https://cdn.modrinth.com/data/nmDcB62a/versions/b1FKKAz8/modernfix-fabric-5.9.0%2Bmc1.19.2.jar" + } + ] + }, + { + "name": "1.18.2", + "coreMods": [ + { + "slug": "Vivecraft", + "version": "1.1.3", + "download_link": "https://github.com/QuestCraftPlusPlus/VivecraftBuilder/releases/download/1.18.2/vivecraft.jar" + }, + { + "slug": "Fabric-API", + "version": "0.77.0", + "download_link": "https://cdn.modrinth.com/data/P7dR8mSH/versions/qk28POfr/fabric-api-0.77.0%2B1.18.2.jar" + } + ], + "defaultMods": [ + { + "slug": "LazyDFU", + "version": "1.2", + "download_link": "https://cdn.modrinth.com/data/hvFnDODi/versions/0.1.2/lazydfu-0.1.2.jar" + }, + { + "slug": "Simple-Voice-Chat", + "version": "2.4.10", + "download_link": "https://cdn.modrinth.com/data/9eGKb6K1/versions/QKFGOJUD/voicechat-fabric-1.18.2-2.4.10.jar" + }, + { + "slug": "Lithium", + "version": "0.10.3", + "download_link": "https://cdn.modrinth.com/data/gvQqBUqZ/versions/ALnv7Npy/lithium-fabric-mc1.18.2-0.10.3.jar" + }, + { + "slug": "Ferrite-Core", + "version": "4.2.1", + "download_link": "https://cdn.modrinth.com/data/uXXizFIs/versions/4.2.0/ferritecore-4.2.0-fabric.jar" + }, + { + "slug": "Smooth-Boot", + "version": "1.7.0", + "download_link": "https://cdn.modrinth.com/data/FWumhS4T/versions/iy4eaYy2/smoothboot-fabric-1.18.2-1.7.0.jar" + }, + { + "slug": "Entity-Culling", + "version": "1.5.1", + "download_link": "https://cdn.modrinth.com/data/NNAgCjsB/versions/1.5.1-fabric-1.18/entityculling-fabric-mc1.18-1.5.1.jar" + }, + { + "slug": "Sodium", + "version": "0.4.1", + "download_link": "https://cdn.modrinth.com/data/AANobbMI/versions/mc1.18.2-0.4.1/sodium-fabric-mc1.18.2-0.4.1%2Bbuild.15.jar" + }, + { + "slug": "Better-Biome-Blend", + "version": "1.3.5", + "download_link": "https://cdn.modrinth.com/data/Rs6c7WyL/versions/1.18.2-1.3.5-fabric/betterbiomeblend-1.18.2-1.3.5-fabric.jar" + }, + { + "slug": "C2me", + "version": "0.2.0", + "download_link": "https://cdn.modrinth.com/data/VSNURh3q/versions/U5BK0DTf/c2me-fabric-mc1.18.2-0.2.0%2Balpha.7.35.jar" + }, + { + "slug": "Cloth-Config", + "version": "6.3.81", + "download_link": "https://cdn.modrinth.com/data/9s6osm5g/versions/gPqHXnrg/cloth-config-6.3.81-fabric.jar" + }, + { + "slug": "Cull-Less-Leaves", + "version": "1.0.1", + "download_link": "https://cdn.modrinth.com/data/iG6ZHsUV/versions/1.0.1/CullLessLeaves-1.0.1.jar" + }, + { + "slug": "FastLoad", + "version": "1.5.9", + "download_link": "https://cdn.modrinth.com/data/kCpssoSb/versions/K9vr5fdy/Fastload%2B1.18.2-1.5.9.jar" + }, + { + "slug": "ImmediatelyFast", + "version": "1.1.6", + "download_link": "https://cdn.modrinth.com/data/5ZwdcRci/versions/zImGOGqD/ImmediatelyFast-1.1.6%2B1.18.2.jar" + }, + { + "slug": "Starlight", + "version": "1.0.2", + "download_link": "https://cdn.modrinth.com/data/H8CaAYZC/versions/1.0.2%2B1.18.2/starlight-1.0.2%2Bfabric.89b8d9f.jar" + }, + { + "slug": "Krypton", + "version": "0.1.9", + "download_link": "https://cdn.modrinth.com/data/fQEb0iXm/versions/0.1.9/krypton-0.1.9.jar" + }, + { + "slug": "Mod-Menu", + "version": "3.2.5", + "download_link": "https://cdn.modrinth.com/data/mOgUt4GM/versions/nVxObSbX/modmenu-3.2.5.jar" + }, + { + "slug": "Modern-Fix", + "version": "5.9.0", + "download_link": "https://cdn.modrinth.com/data/nmDcB62a/versions/qNrVNwfw/modernfix-fabric-5.9.0%2Bmc1.18.2.jar" + } + ] + } + ] +} \ No newline at end of file diff --git a/src/main/java/pojlib/account/MinecraftAccount.java b/src/main/java/pojlib/account/MinecraftAccount.java index 14ecd45a..fabe9f44 100644 --- a/src/main/java/pojlib/account/MinecraftAccount.java +++ b/src/main/java/pojlib/account/MinecraftAccount.java @@ -16,6 +16,7 @@ import pojlib.util.Constants; import pojlib.util.GsonUtils; +import pojlib.util.Logger; public class MinecraftAccount { @@ -37,7 +38,9 @@ public static MinecraftAccount login(String gameDir, String[] response) throws I public static boolean logout(Activity activity) { File accountFile = new File(activity.getFilesDir() + "/accounts/account.json"); - return accountFile.delete(); + File accountCache = new File(Constants.USER_HOME + "/cache_data"); + + return accountFile.delete() && accountCache.delete(); } //Try this before using login - the account will have been saved to disk if previously logged in @@ -54,16 +57,16 @@ public static MinecraftAccount load(String path, @Nullable String newToken, @Nul GsonUtils.objectToJsonFile(path + "/account.json", acc); return acc; } catch (IOException | JSONException e) { + Logger.getInstance().appendToLog("Unable to load account! | " + e); return null; } } public static String getSkinFaceUrl(MinecraftAccount account) { - //TODO: Log this to latestlog.txt for Support staff try { return Constants.MINOTAR_URL + "/helm/" + account.uuid; } catch (NullPointerException e) { - System.out.println("Username not set! Please set your username at Minecraft.net and try again."); + Logger.getInstance().appendToLog("Username likely not set! Please set your username at Minecraft.net and try again. | " + e); return null; } } diff --git a/src/main/java/pojlib/api/API_V1.java b/src/main/java/pojlib/api/API_V1.java index 1a453c71..4fd97575 100644 --- a/src/main/java/pojlib/api/API_V1.java +++ b/src/main/java/pojlib/api/API_V1.java @@ -4,33 +4,18 @@ import android.content.Context; import android.net.ConnectivityManager; import android.net.NetworkCapabilities; -import android.net.NetworkInfo; -import android.util.Log; import com.google.gson.JsonObject; -import com.google.gson.JsonParser; -import org.json.JSONException; - -import pojlib.UnityPlayerActivity; import pojlib.account.MinecraftAccount; import pojlib.install.*; -import pojlib.instance.MinecraftInstance; +import pojlib.instance.InstanceHandler; +import pojlib.instance.MinecraftInstances; import pojlib.util.APIHandler; import pojlib.util.Constants; import pojlib.util.LoginHelper; -import java.io.BufferedWriter; -import java.io.File; -import java.io.FileWriter; import java.io.IOException; -import java.io.InputStream; -import java.io.InputStreamReader; -import java.io.OutputStream; -import java.net.URL; -import java.net.URLConnection; -import java.net.URLEncoder; -import java.nio.charset.StandardCharsets; import java.util.Date; /** @@ -59,43 +44,84 @@ public class API_V1 { /** - * @return A list of every minecraft version + * Add a mod to an instance + * + * @param instances Acquired from {@link pojlib.api.API_V1#loadAll(String)} + * @param instance Acquired from {@link pojlib.api.API_V1#createNewInstance(Activity, MinecraftInstances, String, String, boolean, String, String, String)} + * or {@link pojlib.api.API_V1#load(MinecraftInstances, String)} + * @param gameDir .minecraft directory + * @param name Mod name + * @param version Mod version + * @param url Mod download URL */ - public static MinecraftMeta.MinecraftVersion[] getMinecraftVersions() { - return MinecraftMeta.getVersions(); - } - - public static void addCustomMod(MinecraftInstance instance, String name, String version, String url) { - instance.addCustomMod(name, version, url); + public static void addMod(MinecraftInstances instances, MinecraftInstances.Instance instance, + String gameDir, String name, String version, String url) { + InstanceHandler.addMod(instances, instance, gameDir, name, version, url); } - public static boolean hasMod(MinecraftInstance instance, String name) throws IOException { - return instance.hasCustomMod(name); + /** + * Check if an instance has a mod + * + * @param instance Acquired from {@link pojlib.api.API_V1#createNewInstance(Activity, MinecraftInstances, String, String, boolean, String, String, String)} + * or {@link pojlib.api.API_V1#load(MinecraftInstances, String)} + * @param name Mod name + * @return True if the mod is already in the instance + */ + public static boolean hasMod(MinecraftInstances.Instance instance, String name) { + return InstanceHandler.hasMod(instance, name); } /** - * @return if the operation succeeds + * Remove a mod from an instance + * + * @param instances Acquired from {@link pojlib.api.API_V1#loadAll(String)} + * @param instance Acquired from {@link pojlib.api.API_V1#createNewInstance(Activity, MinecraftInstances, String, String, boolean, String, String, String)} + * or {@link pojlib.api.API_V1#load(MinecraftInstances, String)} + * @param gameDir .minecraft directory + * @param name Mod name + * @return True if the mod was deleted */ - public static boolean removeMod(MinecraftInstance instance, String name) { - return instance.removeMod(name); - } - public static MinecraftMeta.MinecraftVersion[] getQCSupportedVersions() throws IOException { - return APIHandler.getQCSupportedVersions(); + public static boolean removeMod(MinecraftInstances instances, MinecraftInstances.Instance instance, + String gameDir, String name) { + return InstanceHandler.removeMod(instances, instance, gameDir, name); } - public static String getQCSupportedVersionName(MinecraftMeta.MinecraftVersion version) { - return APIHandler.getQCSupportedVersionName(version); + public static String[] getQCSupportedVersions() { + return APIHandler.getQCSupportedVersions(); } /** - * Loads an instance from the filesystem. + * Loads all instances from the filesystem. * - * @param instanceName The instance being loaded * @param gameDir .minecraft directory. * @return A minecraft instance object */ - public static MinecraftInstance load(String instanceName, String gameDir) { - return MinecraftInstance.load(instanceName, gameDir); + public static MinecraftInstances loadAll(String gameDir) throws IOException { + return InstanceHandler.load(gameDir); + } + + /** + * Load a specific instance by name + * + * @param instances Acquired from {@link pojlib.api.API_V1#loadAll(String)} + * @param name Name of the instance + * @return The instance, or null if an instance with name does not exist + */ + public static MinecraftInstances.Instance load(MinecraftInstances instances, String name) { + return instances.load(name); + } + + /** + * Delete an instance + * NOTE: Only deletes the instance, not the correlated mods for said instance + * + * @param instances Acquired from {@link pojlib.api.API_V1#loadAll(String)} + * @param instance Instance object + * @param gameDir .minecraft directory. + * @return True if it deletes successfully, false otherwise. + */ + public static boolean deleteInstance(MinecraftInstances instances, MinecraftInstances.Instance instance, String gameDir) { + return InstanceHandler.delete(instances, instance, gameDir); } /** @@ -104,36 +130,59 @@ public static MinecraftInstance load(String instanceName, String gameDir) { * @param activity The active android activity * @param instanceName The name of the instance being created - can be anything, used for identification * @param home The base directory where minecraft should be setup + * @param useDefaultMods Use QC's default mods for the version (Core mods are automatically included) * @param minecraftVersion The version of minecraft to install - * @param modLoader The mod loader to install + * @param imageURL Modpack image url, nullable * @return A minecraft instance object * @throws IOException Throws if download of library or asset fails */ - public static MinecraftInstance createNewInstance(Activity activity, String instanceName, String home, MinecraftMeta.MinecraftVersion minecraftVersion, MinecraftInstance.ModLoader modLoader) throws IOException { + public static MinecraftInstances.Instance createNewInstance(Activity activity, MinecraftInstances instances, String instanceName, String home, boolean useDefaultMods, String minecraftVersion, String modsFolderName, String imageURL) throws IOException { if(ignoreInstanceName) { - return MinecraftInstance.create(activity, instanceName, home, minecraftVersion, modLoader); + return InstanceHandler.create(activity, instances, instanceName, home, useDefaultMods, minecraftVersion, InstanceHandler.ModLoader.Fabric, modsFolderName, imageURL); } else if (instanceName.contains("/") || instanceName.contains("!")) { throw new IOException("You cannot use special characters (!, /, ., etc) when creating instances."); } else { - return MinecraftInstance.create(activity, instanceName, home, minecraftVersion, modLoader); + return InstanceHandler.create(activity, instances, instanceName, home, useDefaultMods, minecraftVersion, InstanceHandler.ModLoader.Fabric, modsFolderName, imageURL); } } - public static void launchInstance(Activity activity, MinecraftAccount account, MinecraftInstance instance) { - instance.launchInstance(activity, account); + /** + * Update the mods for the selected instance + * + * @param instance The instance to update + */ + public static void updateMods(MinecraftInstances instances, MinecraftInstances.Instance instance) { + instance.updateMods(Constants.MC_DIR, instances); + } + + /** + * Launch an instance + * + * @param activity Android activity object + * @param account Account object + * @param instance Instance object from {@link pojlib.api.API_V1#createNewInstance(Activity, MinecraftInstances, String, String, boolean, String, String, String)} + * or {@link pojlib.api.API_V1#load(MinecraftInstances, String)} + */ + public static void launchInstance(Activity activity, MinecraftAccount account, MinecraftInstances.Instance instance) { + InstanceHandler.launchInstance(activity, account, instance); } /** * Logs the user out * - * @param activity The base directory where minecraft should be setup - * @return True if logout was successful + * @param activity The base directory where minecraft should be setup + * @return True if logout was successful */ public static boolean logout(Activity activity) { return MinecraftAccount.logout(activity); } + /** + * Start the login process + * + * @param activity Android activity object + */ public static void login(Activity activity) { ConnectivityManager connManager = (ConnectivityManager) activity.getSystemService(Context.CONNECTIVITY_SERVICE); diff --git a/src/main/java/pojlib/install/FabricMeta.java b/src/main/java/pojlib/install/FabricMeta.java index bbf08525..f2cb3642 100644 --- a/src/main/java/pojlib/install/FabricMeta.java +++ b/src/main/java/pojlib/install/FabricMeta.java @@ -26,7 +26,7 @@ public static FabricVersion getLatestStableVersion() { return null; } - public static VersionInfo getVersionInfo(FabricVersion fabricVersion, MinecraftMeta.MinecraftVersion minecraftVersion) { - return handler.get(String.format("versions/loader/%s/%s/profile/json", minecraftVersion.id, fabricVersion.version), VersionInfo.class); + public static VersionInfo getVersionInfo(FabricVersion fabricVersion, String minecraftVersion) { + return handler.get(String.format("versions/loader/%s/%s/profile/json", minecraftVersion, fabricVersion.version), VersionInfo.class); } } \ No newline at end of file diff --git a/src/main/java/pojlib/install/MinecraftMeta.java b/src/main/java/pojlib/install/MinecraftMeta.java index 615156e7..3215c318 100644 --- a/src/main/java/pojlib/install/MinecraftMeta.java +++ b/src/main/java/pojlib/install/MinecraftMeta.java @@ -24,7 +24,12 @@ public static MinecraftVersion[] getVersions() { return handler.get("mc/game/version_manifest_v2.json", MinecraftVersions.class).versions; } - public static VersionInfo getVersionInfo(MinecraftVersion minecraftVersion) { - return handler.get(String.format("v1/packages/%s/%s.json", minecraftVersion.sha1, minecraftVersion.id), VersionInfo.class); + public static VersionInfo getVersionInfo(String versionName) { + for (MinecraftVersion minecraftVersion : getVersions()) { + if (minecraftVersion.id.equals(versionName)) { + return handler.get(String.format("v1/packages/%s/%s.json", minecraftVersion.sha1, minecraftVersion.id), VersionInfo.class); + } + } + return null; } } \ No newline at end of file diff --git a/src/main/java/pojlib/install/QuiltMeta.java b/src/main/java/pojlib/install/QuiltMeta.java index c2fec366..6375a685 100644 --- a/src/main/java/pojlib/install/QuiltMeta.java +++ b/src/main/java/pojlib/install/QuiltMeta.java @@ -23,7 +23,7 @@ public static QuiltVersion getLatestVersion() { return null; } - public static VersionInfo getVersionInfo(QuiltVersion quiltVersion, MinecraftMeta.MinecraftVersion minecraftVersion) { - return handler.get(String.format("versions/loader/%s/%s/profile/json", minecraftVersion.id, quiltVersion.version), VersionInfo.class); + public static VersionInfo getVersionInfo(QuiltVersion quiltVersion, String minecraftVersion) { + return handler.get(String.format("versions/loader/%s/%s/profile/json", minecraftVersion, quiltVersion.version), VersionInfo.class); } } \ No newline at end of file diff --git a/src/main/java/pojlib/instance/InstanceHandler.java b/src/main/java/pojlib/instance/InstanceHandler.java new file mode 100644 index 00000000..4bd9542e --- /dev/null +++ b/src/main/java/pojlib/instance/InstanceHandler.java @@ -0,0 +1,209 @@ +package pojlib.instance; + +import android.app.Activity; + +import com.google.common.collect.Lists; + +import java.io.File; +import java.io.IOException; +import java.util.ArrayList; + +import pojlib.account.MinecraftAccount; +import pojlib.api.API_V1; +import pojlib.install.FabricMeta; +import pojlib.install.Installer; +import pojlib.install.MinecraftMeta; +import pojlib.install.QuiltMeta; +import pojlib.install.VersionInfo; +import pojlib.util.Constants; +import pojlib.util.ModInfo; +import pojlib.util.GsonUtils; +import pojlib.util.JREUtils; +import pojlib.util.Logger; +import pojlib.util.VLoader; + +public class InstanceHandler { + public static final String MODS = "https://raw.githubusercontent.com/QuestCraftPlusPlus/Pojlib/QuestCraft/mods.json"; + public static final String DEV_MODS = "https://raw.githubusercontent.com/QuestCraftPlusPlus/Pojlib/QuestCraft/devmods.json"; + + public enum ModLoader { + Fabric(0), + Quilt(1), + Forge(2), + NeoForge(3); + + public final int index; + + ModLoader(int i) { + this.index = i; + } + } + + //creates a new instance of a minecraft version, install game + mod loader, stores non login related launch info to json + public static MinecraftInstances.Instance create(Activity activity, MinecraftInstances instances, String instanceName, String gameDir, boolean useDefaultMods, String minecraftVersion, ModLoader modLoader, String modsFolderName, String imageURL) { + File instancesFile = new File(gameDir + "/instances.json"); + if (instancesFile.exists()) { + for (MinecraftInstances.Instance instance : instances.instances) { + if (instance.instanceName.equals(instanceName)) { + Logger.getInstance().appendToLog("Instance " + instanceName + " already exists! Using original instance."); + return instance; + } + } + } + + Logger.getInstance().appendToLog("Creating new instance: " + instanceName); + + MinecraftInstances.Instance instance = new MinecraftInstances.Instance(); + instance.instanceName = instanceName; + instance.instanceImageURL = imageURL; + instance.versionName = minecraftVersion; + instance.gameDir = new File(gameDir).getAbsolutePath(); + instance.defaultMods = useDefaultMods; + if(modsFolderName != null) { + instance.modsDirName = modsFolderName; + } else { + instance.modsDirName = instance.versionName; + } + + VersionInfo modLoaderVersionInfo = null; + switch (modLoader) { + case Fabric: { + FabricMeta.FabricVersion fabricVersion = FabricMeta.getLatestStableVersion(); + assert fabricVersion != null; + modLoaderVersionInfo = FabricMeta.getVersionInfo(fabricVersion, minecraftVersion); + break; + } + case Quilt: { + QuiltMeta.QuiltVersion quiltVersion = QuiltMeta.getLatestVersion(); + assert quiltVersion != null; + modLoaderVersionInfo = QuiltMeta.getVersionInfo(quiltVersion, minecraftVersion); + break; + } + } + + VersionInfo minecraftVersionInfo = MinecraftMeta.getVersionInfo(minecraftVersion); + instance.versionType = minecraftVersionInfo.type; + instance.mainClass = modLoaderVersionInfo.mainClass; + + // Install minecraft + VersionInfo finalModLoaderVersionInfo = modLoaderVersionInfo; + + if(instances.instances == null) { + instances.instances = new MinecraftInstances.Instance[0]; + } + + ArrayList instances1 = Lists.newArrayList(instances.instances); + instances1.add(instance); + instances.instances = instances1.toArray(new MinecraftInstances.Instance[0]); + + new Thread(() -> { + try { + String clientClasspath = Installer.installClient(minecraftVersionInfo, gameDir); + String minecraftClasspath = Installer.installLibraries(minecraftVersionInfo, gameDir); + String modLoaderClasspath = Installer.installLibraries(finalModLoaderVersionInfo, gameDir); + String lwjgl = Installer.installLwjgl(activity); + + instance.classpath = clientClasspath + File.pathSeparator + minecraftClasspath + File.pathSeparator + modLoaderClasspath + File.pathSeparator + lwjgl; + + instance.assetsDir = Installer.installAssets(minecraftVersionInfo, gameDir, activity); + } catch (IOException e) { + e.printStackTrace(); + } + instance.assetIndex = minecraftVersionInfo.assetIndex.id; + + // Write instance to json file + GsonUtils.objectToJsonFile(gameDir + "/instances.json", instances); + instance.updateMods(Constants.MC_DIR, instances); + + API_V1.finishedDownloading = true; + Logger.getInstance().appendToLog("Finished Downloading!"); + }).start(); + + return instance; + } + + // Load an instance from json + public static MinecraftInstances load(String gameDir) { + MinecraftInstances instances; + try { + instances = GsonUtils.jsonFileToObject(gameDir + "/instances.json", MinecraftInstances.class); + } catch (Exception e) { + instances = new MinecraftInstances(); + instances.instances = new MinecraftInstances.Instance[0]; + } + if(instances == null) { + instances = new MinecraftInstances(); + instances.instances = new MinecraftInstances.Instance[0]; + GsonUtils.objectToJsonFile(gameDir + "/instances.json", instances); + } + + return instances; + } + + public static void addMod(MinecraftInstances instances, MinecraftInstances.Instance instance, + String gameDir, String name, String version, String url) { + ModInfo info = new ModInfo(); + info.slug = name; + info.download_link = url; + info.version = version; + + ArrayList mods = Lists.newArrayList(instance.mods); + mods.add(info); + instance.mods = mods.toArray(mods.toArray(new ModInfo[0])); + + GsonUtils.objectToJsonFile(gameDir + "/instances.json", instances); + } + + public static boolean hasMod(MinecraftInstances.Instance instance, String name) { + for(ModInfo info : instance.mods) { + if(info.slug.equalsIgnoreCase(name)) { + return true; + } + } + + return false; + } + + public static boolean removeMod(MinecraftInstances instances, MinecraftInstances.Instance instance, String gameDir, String name) { + ModInfo oldInfo = null; + for(ModInfo info : instance.mods) { + if(info.slug.equalsIgnoreCase(name)) { + oldInfo = info; + break; + } + } + + if(oldInfo != null) { + // Delete the mod + File modFile = new File(gameDir + "/mods/" + instance.modsDirName + "/" + name + ".jar"); + modFile.delete(); + + ArrayList mods = Lists.newArrayList(instance.mods); + mods.remove(oldInfo); + instance.mods = mods.toArray(mods.toArray(new ModInfo[0])); + GsonUtils.objectToJsonFile(gameDir + "/instances.json", instances); + } + + return oldInfo != null; + } + + // Return true if instance was deleted + public static boolean delete(MinecraftInstances instances, MinecraftInstances.Instance instance, String gameDir) { + ArrayList instances1 = Lists.newArrayList(instances.instances); + instances1.remove(instance); + instances.instances = instances1.toArray(new MinecraftInstances.Instance[0]); + GsonUtils.objectToJsonFile(gameDir + "/instances.json", instances); + + return true; + } + + public static void launchInstance(Activity activity, MinecraftAccount account, MinecraftInstances.Instance instance) { + try { + JREUtils.redirectAndPrintJRELog(); + VLoader.setAndroidInitInfo(activity); + JREUtils.launchJavaVM(activity, instance.generateLaunchArgs(account), instance.modsDirName); + } catch (Throwable e) { + e.printStackTrace(); + } + } +} \ No newline at end of file diff --git a/src/main/java/pojlib/instance/MinecraftInstance.java b/src/main/java/pojlib/instance/MinecraftInstance.java deleted file mode 100644 index a4142056..00000000 --- a/src/main/java/pojlib/instance/MinecraftInstance.java +++ /dev/null @@ -1,386 +0,0 @@ -package pojlib.instance; - -import android.app.Activity; - -import com.google.gson.JsonArray; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; - -import org.apache.commons.io.FileUtils; - -import java.io.File; -import java.io.IOException; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.List; - -import pojlib.account.MinecraftAccount; -import pojlib.api.API_V1; -import pojlib.install.FabricMeta; -import pojlib.install.Installer; -import pojlib.install.MinecraftMeta; -import pojlib.install.QuiltMeta; -import pojlib.install.VersionInfo; -import pojlib.util.Constants; -import pojlib.util.CoreMods; -import pojlib.util.CustomMods; -import pojlib.util.DownloadUtils; -import pojlib.util.FileUtil; -import pojlib.util.GsonUtils; -import pojlib.util.JREUtils; -import pojlib.util.Logger; -import pojlib.util.VLoader; - -public class MinecraftInstance { - public static final String MODS = "https://raw.githubusercontent.com/QuestCraftPlusPlus/Pojlib/QuestCraft/mods.json"; - public static final String DEV_MODS = "https://raw.githubusercontent.com/QuestCraftPlusPlus/Pojlib/QuestCraft/devmods.json"; - public static final String CUSTOM_MODS = "custom_mods.json"; - public String versionName; - public String instanceName; - public String versionType; - public String classpath; - public String gameDir; - public String assetIndex; - public String assetsDir; - public String mainClass; - - public enum ModLoader { - Fabric(0), - Quilt(1), - Forge(2), - NeoForge(3); - - public final int index; - - ModLoader(int i) { - this.index = i; - } - } - - //creates a new instance of a minecraft version, install game + mod loader, stores non login related launch info to json - public static MinecraftInstance create(Activity activity, String instanceName, String gameDir, MinecraftMeta.MinecraftVersion minecraftVersion, ModLoader modLoader) { - Logger.getInstance().appendToLog("Creating new instance: " + instanceName); - - MinecraftInstance instance = new MinecraftInstance(); - instance.instanceName = instanceName; - instance.versionName = minecraftVersion.id; - instance.gameDir = new File(gameDir).getAbsolutePath(); - - VersionInfo modLoaderVersionInfo = null; - switch (modLoader) { - case Fabric: { - FabricMeta.FabricVersion fabricVersion = FabricMeta.getLatestStableVersion(); - assert fabricVersion != null; - modLoaderVersionInfo = FabricMeta.getVersionInfo(fabricVersion, minecraftVersion); - break; - } - case Quilt: { - QuiltMeta.QuiltVersion quiltVersion = QuiltMeta.getLatestVersion(); - assert quiltVersion != null; - modLoaderVersionInfo = QuiltMeta.getVersionInfo(quiltVersion, minecraftVersion); - break; - } - case Forge: - case NeoForge: - { - System.out.println("Error!: You cannot use Forge or NeoForge with QuestCraft!"); - break; - } - } - - VersionInfo minecraftVersionInfo = MinecraftMeta.getVersionInfo(minecraftVersion); - instance.versionType = minecraftVersionInfo.type; - instance.mainClass = modLoaderVersionInfo.mainClass; - - // Install minecraft - VersionInfo finalModLoaderVersionInfo = modLoaderVersionInfo; - new Thread(() -> { - try { - String clientClasspath = Installer.installClient(minecraftVersionInfo, gameDir); - String minecraftClasspath = Installer.installLibraries(minecraftVersionInfo, gameDir); - String modLoaderClasspath = Installer.installLibraries(finalModLoaderVersionInfo, gameDir); - String lwjgl = Installer.installLwjgl(activity); - - instance.classpath = clientClasspath + File.pathSeparator + minecraftClasspath + File.pathSeparator + modLoaderClasspath + File.pathSeparator + lwjgl; - - instance.assetsDir = Installer.installAssets(minecraftVersionInfo, gameDir, activity); - } catch (IOException e) { - e.printStackTrace(); - } - instance.assetIndex = minecraftVersionInfo.assetIndex.id; - - // Write instance to json file - GsonUtils.objectToJsonFile(gameDir + "/instances/" + instanceName + "/instance.json", instance); - API_V1.finishedDownloading = true; - }).start(); - - updateInstancesJson(gameDir, instance); - return instance; - } - - private static synchronized void updateInstancesJson(String gameDir, MinecraftInstance instance) { - String instancesFilePath = gameDir + "/instances.json"; - JsonArray instancesArray; - - try { - if (new File(instancesFilePath).exists()) { - String jsonContent = FileUtil.read(instancesFilePath); - instancesArray = GsonUtils.GLOBAL_GSON.fromJson(jsonContent, JsonArray.class); - } else { - instancesArray = new JsonArray(); - } - - JsonObject instancesJson = new JsonObject(); - instancesJson.addProperty("instanceName", instance.instanceName); - instancesJson.addProperty("instanceVersion", instance.versionName); - instancesJson.addProperty("gameDir", instance.gameDir); - - instancesArray.add(instancesJson); - - GsonUtils.objectToJsonFile(instancesFilePath, instancesArray); - } catch (IOException e) { - e.printStackTrace(); - } - } - - // Load an instance from json - public static MinecraftInstance load(String instanceName, String gameDir) { - String path = gameDir + "/instances/" + instanceName + "/instance.json"; - return GsonUtils.jsonFileToObject(path, MinecraftInstance.class); - } - - // Return true if instance was deleted - public static boolean delete(String instanceName, String gameDir) throws IOException { - if (API_V1.ignoreInstanceName) { - return new File(gameDir + "/instances/" + instanceName).delete(); - } else if (instanceName.contains("/") || instanceName.contains("!")) { - throw new IOException("You cannot use special characters (!, /, ., etc) when deleting instances."); - } else { - return new File(gameDir + "/instances/" + instanceName).delete(); - } - - } - - public List generateLaunchArgs(MinecraftAccount account) { - String[] mcArgs = {"--username", account.username, "--version", versionName, "--gameDir", gameDir, - "--assetsDir", assetsDir, "--assetIndex", assetIndex, "--uuid", account.uuid.replaceAll("-", ""), - "--accessToken", account.accessToken, "--userType", account.userType, "--versionType", versionType}; - - List allArgs = new ArrayList<>(Arrays.asList("-cp", classpath)); - allArgs.add(mainClass); - allArgs.addAll(Arrays.asList(mcArgs)); - return allArgs; - } - - public void updateOrDownloadMods() { - API_V1.finishedDownloading = false; - new Thread(() -> { - try { - File mods = new File(Constants.USER_HOME + "/mods-new.json"); - File modsOld = new File(Constants.USER_HOME + "/mods.json"); - File customMods = new File(Constants.USER_HOME + "/custom_mods.json"); - - if (API_V1.developerMods) { - DownloadUtils.downloadFile(DEV_MODS, mods); - } else { DownloadUtils.downloadFile(MODS, mods); } - - CustomMods customModsObj = GsonUtils.jsonFileToObject(customMods.getAbsolutePath(), CustomMods.class); - CoreMods obj = GsonUtils.jsonFileToObject(mods.getAbsolutePath(), CoreMods.class); - CoreMods objOld = GsonUtils.jsonFileToObject(modsOld.getAbsolutePath(), CoreMods.class); - - if(customMods.exists()) { - assert customModsObj != null; - for(CustomMods.InstanceMods instMods : customModsObj.instances) { - if(!instMods.name.equals(this.versionName)) { - continue; - } - for(CustomMods.ModInfo info : instMods.mods) { - API_V1.currentDownload = info.name; - DownloadUtils.downloadFile(info.url, new File(Constants.MC_DIR + "/mods/" + this.versionName + "/" + info.name + ".jar")); - } - } - } - boolean downloadAll = !(new File(Constants.MC_DIR + "/mods/" + this.versionName).exists()); - - if(modsOld.exists()) { - for(CoreMods.Version version : objOld.versions) { - if(!version.name.equals(this.versionName)) { - continue; - } - for(CoreMods.Mod mod : version.mods) { - for(CoreMods.Version newVer : obj.versions) { - if (!newVer.name.equals(this.versionName)) { - continue; - } - for(CoreMods.Mod newMod : newVer.mods) { - if((!newMod.version.equals(mod.version) || downloadAll) && newMod.slug.equals(mod.slug)) { - API_V1.currentDownload = newMod.slug; - DownloadUtils.downloadFile(newMod.download_link, new File(Constants.MC_DIR + "/mods/" + this.versionName + "/" + newMod.slug + ".jar")); - } - } - } - } - } - } else { - for(CoreMods.Version version : obj.versions) { - if (!version.name.equals(this.versionName)) { - continue; - } - for(CoreMods.Mod mod : version.mods) { - API_V1.currentDownload = mod.slug; - DownloadUtils.downloadFile(mod.download_link, new File(Constants.MC_DIR + "/mods/" + this.versionName + "/" + mod.slug + ".jar")); - } - } - } - - FileUtils.copyFile(mods, modsOld); - mods.delete(); - } catch (IOException e) { - e.printStackTrace(); - } - - API_V1.finishedDownloading = true; - }).start(); - } - - public void addCustomMod(String name, String version, String url) { - File customMods = new File(Constants.MC_DIR, CUSTOM_MODS); - if(!customMods.exists()) { - CustomMods mods = new CustomMods(); - mods.instances = new CustomMods.InstanceMods[1]; - mods.instances[0] = new CustomMods.InstanceMods(); - mods.instances[0].name = this.versionName; - mods.instances[0].mods = new CustomMods.ModInfo[1]; - mods.instances[0].mods[0] = new CustomMods.ModInfo(); - mods.instances[0].mods[0].name = name; - mods.instances[0].mods[0].version = version; - mods.instances[0].mods[0].url = url; - - GsonUtils.objectToJsonFile(customMods.getPath(), mods); - return; - } - - CustomMods mods = GsonUtils.jsonFileToObject(customMods.getPath(), CustomMods.class); - for(CustomMods.InstanceMods instance : mods.instances) { - if(instance.name.equals(this.versionName)) { - ArrayList modInfoArray = new ArrayList<>(Arrays.asList(instance.mods)); - CustomMods.ModInfo info = new CustomMods.ModInfo(); - info.name = name; - info.version = version; - info.url = url; - modInfoArray.add(info); - - CustomMods.ModInfo[] infos = new CustomMods.ModInfo[modInfoArray.size()]; - infos = modInfoArray.toArray(infos); - - instance.mods = infos; - GsonUtils.objectToJsonFile(customMods.getPath(), mods); - return; - } - } - - // If instance does not exist in file, create it - ArrayList instanceInfo = new ArrayList<>(Arrays.asList(mods.instances)); - CustomMods.InstanceMods instMods = new CustomMods.InstanceMods(); - instMods.name = this.versionName; - instMods.mods = new CustomMods.ModInfo[1]; - instMods.mods[0] = new CustomMods.ModInfo(); - instMods.mods[0].name = name; - instMods.mods[0].version = version; - instMods.mods[0].url = url; - instanceInfo.add(instanceInfo.size(), instMods); - - // Set the array - mods.instances = instanceInfo.toArray(new CustomMods.InstanceMods[0]); - GsonUtils.objectToJsonFile(customMods.getAbsolutePath(), mods); - } - - public boolean hasCustomMod(String name) throws IOException { - File customMods = new File(Constants.MC_DIR, CUSTOM_MODS); - if(!customMods.exists()) { - return false; - } - - CustomMods mods = GsonUtils.jsonFileToObject(customMods.getPath(), CustomMods.class); - assert mods != null; - for(CustomMods.InstanceMods instance : mods.instances) { - if(instance.name.equals(this.versionName)) { - for (CustomMods.ModInfo info : instance.mods) { - // Check if core mod is already included - File modsOld = new File(Constants.USER_HOME + "/mods.json"); - if(!modsOld.exists()) { - if (API_V1.developerMods) { - DownloadUtils.downloadFile(DEV_MODS, modsOld); - } else { DownloadUtils.downloadFile(MODS, modsOld); } - } - JsonObject objOld = GsonUtils.jsonFileToObject(modsOld.getAbsolutePath(), JsonObject.class); - assert objOld != null; - for (JsonElement verMod : objOld.getAsJsonArray(this.versionName)) { - JsonObject object = verMod.getAsJsonObject(); - String slug = object.get("slug").getAsString(); - if(name.equalsIgnoreCase(slug)) { - return true; - } - } - if(info.name.equalsIgnoreCase(name)) { - return true; - } - } - break; - } - } - return false; - } - - public boolean removeMod(String name) { - File customMods = new File(Constants.MC_DIR, CUSTOM_MODS); - if(!customMods.exists()) { - return false; - } - - // Check if core mod is already included, if so, don't delete - File modsOld = new File(Constants.USER_HOME + "/mods.json"); - if(modsOld.exists()) { - JsonObject objOld = GsonUtils.jsonFileToObject(modsOld.getAbsolutePath(), JsonObject.class); - assert objOld != null; - for (JsonElement verMod : objOld.getAsJsonArray(this.versionName)) { - JsonObject object = verMod.getAsJsonObject(); - String slug = object.get("slug").getAsString().replace("-", " "); - if(name.equals(slug)) { - return false; - } - } - } - - CustomMods mods = GsonUtils.jsonFileToObject(customMods.getAbsolutePath(), CustomMods.class); - assert mods != null; - for(CustomMods.InstanceMods instance : mods.instances) { - if(instance.name.equals(this.versionName)) { - for (CustomMods.ModInfo info : instance.mods) { - if(info.name.equals(name)) { - ArrayList modInfoArray = new ArrayList<>(Arrays.asList(instance.mods)); - File mod = new File(Constants.MC_DIR + "/mods/" + this.versionName + "/" + info.name + ".jar"); - mod.delete(); - modInfoArray.remove(info); - instance.mods = modInfoArray.toArray(new CustomMods.ModInfo[0]); - GsonUtils.objectToJsonFile(customMods.getAbsolutePath(), mods); - return true; - } - } - break; - } - } - return false; - } - - public void launchInstance(Activity activity, MinecraftAccount account) { - try { - JREUtils.redirectAndPrintJRELog(); - VLoader.setAndroidInitInfo(activity); - while(!API_V1.finishedDownloading); - JREUtils.launchJavaVM(activity, generateLaunchArgs(account), versionName); - } catch (Throwable e) { - e.printStackTrace(); - } - } -} \ No newline at end of file diff --git a/src/main/java/pojlib/instance/MinecraftInstances.java b/src/main/java/pojlib/instance/MinecraftInstances.java new file mode 100644 index 00000000..28185c24 --- /dev/null +++ b/src/main/java/pojlib/instance/MinecraftInstances.java @@ -0,0 +1,166 @@ +package pojlib.instance; + +import java.io.File; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; + +import pojlib.account.MinecraftAccount; +import pojlib.api.API_V1; +import pojlib.util.DownloadUtils; +import pojlib.util.GsonUtils; +import pojlib.util.Logger; +import pojlib.util.ModInfo; +import pojlib.util.ModsJson; + +public class MinecraftInstances { + public Instance[] instances; + + public Instance load(String name) { + for(Instance instance : instances) { + if(instance.instanceName.equals(name)) { + return instance; + } + } + + return null; + } + + public Instance[] toArray() { + if(instances == null) { + return new Instance[0]; + } + return instances; + } + + public static class Instance { + public String instanceName; + public String instanceImageURL; + public String versionName; + public String modsDirName; + public String versionType; + public String classpath; + public String gameDir; + public String assetIndex; + public String assetsDir; + public String mainClass; + public ModInfo[] mods; + public boolean defaultMods; + + public List generateLaunchArgs(MinecraftAccount account) { + String[] mcArgs = {"--username", account.username, "--version", versionName, "--gameDir", gameDir, + "--assetsDir", assetsDir, "--assetIndex", assetIndex, "--uuid", account.uuid.replaceAll("-", ""), + "--accessToken", account.accessToken, "--userType", account.userType, "--versionType", "release"}; + + List allArgs = new ArrayList<>(Arrays.asList("-cp", classpath)); + allArgs.add(mainClass); + allArgs.addAll(Arrays.asList(mcArgs)); + return allArgs; + } + + public ModInfo[] toArray() { + if(mods == null) { + return new ModInfo[0]; + } + return mods; + } + + private ModsJson parseModsJson(String gameDir) throws Exception { + File mods = new File(gameDir + "/mods.json"); + if(API_V1.developerMods) { + DownloadUtils.downloadFile(InstanceHandler.DEV_MODS, mods); + } else { + DownloadUtils.downloadFile(InstanceHandler.MODS, mods); + } + + return GsonUtils.jsonFileToObject(mods.getAbsolutePath(), ModsJson.class); + } + + public void updateMods(String gameDir, MinecraftInstances instances) { + API_V1.finishedDownloading = false; + if(mods == null) { + mods = new ModInfo[0]; + } + try { + ModsJson modsJson = parseModsJson(gameDir); + + ModsJson.Version version = null; + for(ModsJson.Version info : modsJson.versions) { + if(info.name.equals(versionName)) { + version = info; + break; + } + } + + assert version != null; + + File modsDir = new File(gameDir + "/mods/" + modsDirName); + if(!modsDir.exists()) { + ArrayList modInfos = new ArrayList<>(); + for(ModInfo info : version.coreMods) { + File mod = new File(gameDir + "/mods/" + modsDirName + "/" + info.slug + ".jar"); + DownloadUtils.downloadFile(info.download_link, mod); + modInfos.add(info); + } + if(defaultMods) { + for (ModInfo info : version.defaultMods) { + File mod = new File(gameDir + "/mods/" + modsDirName + "/" + info.slug + ".jar"); + DownloadUtils.downloadFile(info.download_link, mod); + modInfos.add(info); + } + } + mods = modInfos.toArray(modInfos.toArray(new ModInfo[0])); + GsonUtils.objectToJsonFile(gameDir + "/instances.json", instances); + API_V1.finishedDownloading = true; + return; + } + + for(ModInfo info : version.coreMods) { + for(ModInfo currInfo : mods) { + if(!currInfo.slug.equals(info.slug)) { + continue; + } + if(currInfo.version.equals(info.version)) { + continue; + } + + File mod = new File(gameDir + "/mods/" + modsDirName + "/" + info.slug + ".jar"); + DownloadUtils.downloadFile(info.download_link, mod); + info = currInfo; + } + } + + if(defaultMods) { + for (ModInfo info : version.defaultMods) { + for (ModInfo currInfo : mods) { + if (!currInfo.slug.equals(info.slug)) { + continue; + } + if (currInfo.version.equals(info.version)) { + continue; + } + + File mod = new File(gameDir + "/mods/" + modsDirName + "/" + info.slug + ".jar"); + DownloadUtils.downloadFile(info.download_link, mod); + info = currInfo; + } + } + } + + // Download custom mods + for(ModInfo currInfo : mods) { + File mod = new File(gameDir + "/mods/" + modsDirName + "/" + currInfo.slug + ".jar"); + if(!mod.exists()) { + DownloadUtils.downloadFile(currInfo.download_link, mod); + } + } + + GsonUtils.objectToJsonFile(gameDir + "/instances.json", instances); + API_V1.finishedDownloading = true; + } catch (Exception e) { + Logger.getInstance().appendToLog("Mods failed to download! Are you offline?\n" + e); + API_V1.finishedDownloading = true; + } + } + } +} diff --git a/src/main/java/pojlib/util/APIHandler.java b/src/main/java/pojlib/util/APIHandler.java index 4d5d590f..9106310a 100644 --- a/src/main/java/pojlib/util/APIHandler.java +++ b/src/main/java/pojlib/util/APIHandler.java @@ -1,23 +1,19 @@ package pojlib.util; -import static pojlib.instance.MinecraftInstance.DEV_MODS; -import static pojlib.instance.MinecraftInstance.MODS; - import com.google.gson.Gson; -import com.google.gson.JsonObject; -import java.io.*; +import java.io.BufferedReader; +import java.io.File; +import java.io.IOException; +import java.io.InputStream; +import java.io.InputStreamReader; +import java.io.OutputStream; import java.net.HttpURLConnection; import java.net.URL; import java.nio.charset.StandardCharsets; -import java.util.ArrayList; import java.util.HashMap; import java.util.stream.Collectors; -import pojlib.api.API_V1; -import pojlib.install.MinecraftMeta; -import pojlib.instance.MinecraftInstance; - public class APIHandler { public final String baseUrl; @@ -106,29 +102,20 @@ public static T postFullUrl(String url, HashMap query, T bod return new Gson().fromJson(postRaw(url + parseQueries(query), body.toString()), tClass); } - public static MinecraftMeta.MinecraftVersion[] getQCSupportedVersions() throws IOException { - ArrayList versionsList = new ArrayList<>(); - File mods = new File(Constants.USER_HOME + "/mods-new.json"); - if (API_V1.developerMods) { - DownloadUtils.downloadFile(DEV_MODS, mods); - } else { DownloadUtils.downloadFile(MODS, mods); } - - CoreMods modsJson = GsonUtils.jsonFileToObject(mods.getAbsolutePath(), CoreMods.class); - for(CoreMods.Version version : modsJson.versions) { - MinecraftMeta.MinecraftVersion[] versions = MinecraftMeta.getVersions(); - for(MinecraftMeta.MinecraftVersion mcVer : versions) { - if(mcVer.id.equals(version.name)) { - versionsList.add(mcVer); - } - } - } + public static final String SUPPORTED_VERSIONS = "https://raw.githubusercontent.com/QuestCraftPlusPlus/Pojlib/QuestCraft/supportedVersions.json"; - mods.delete(); + public static String[] getQCSupportedVersions() { + File versionsJson = new File(Constants.MC_DIR + "/supportedVersions.json"); + try { + DownloadUtils.downloadFile(SUPPORTED_VERSIONS, versionsJson); + } catch (IOException e) { + Logger.getInstance().appendToLog("Error while grabbing supported versions!\n" + e); + } - return versionsList.toArray(new MinecraftMeta.MinecraftVersion[0]); + return GsonUtils.jsonFileToObject(versionsJson.getAbsolutePath(), SupportedVersions.class).supportedVersions; } - public static String getQCSupportedVersionName(MinecraftMeta.MinecraftVersion version) { - return version.id; + public static class SupportedVersions { + public String[] supportedVersions; } } \ No newline at end of file diff --git a/src/main/java/pojlib/util/CoreMods.java b/src/main/java/pojlib/util/CoreMods.java deleted file mode 100644 index a4c6f2b4..00000000 --- a/src/main/java/pojlib/util/CoreMods.java +++ /dev/null @@ -1,16 +0,0 @@ -package pojlib.util; - -public class CoreMods { - public Version[] versions; - - public static class Version { - public String name; - public Mod[] mods; - } - - public static class Mod { - public String slug; - public String version; - public String download_link; - } -} diff --git a/src/main/java/pojlib/util/CustomMods.java b/src/main/java/pojlib/util/CustomMods.java deleted file mode 100644 index 6d35787a..00000000 --- a/src/main/java/pojlib/util/CustomMods.java +++ /dev/null @@ -1,16 +0,0 @@ -package pojlib.util; - -public class CustomMods { - public InstanceMods[] instances; - - public static class InstanceMods { - public String name; - public ModInfo[] mods; - } - - public static class ModInfo { - public String name; - public String version; - public String url; - } -} diff --git a/src/main/java/pojlib/util/DownloadUtils.java b/src/main/java/pojlib/util/DownloadUtils.java index 88a08609..ad561e02 100644 --- a/src/main/java/pojlib/util/DownloadUtils.java +++ b/src/main/java/pojlib/util/DownloadUtils.java @@ -1,9 +1,5 @@ package pojlib.util; -import android.content.res.AssetManager; - -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; import org.apache.commons.codec.binary.Hex; import org.apache.commons.codec.digest.DigestUtils; import org.apache.commons.io.IOUtils; @@ -14,17 +10,10 @@ import java.net.HttpURLConnection; import java.net.URL; import java.nio.file.Files; -import java.util.ArrayList; import java.util.Objects; -import static pojlib.util.FileUtil.read; -import static pojlib.util.GsonUtils.GLOBAL_GSON; - public class DownloadUtils { - public static AssetManager assetManager; - - private static void download(URL url, OutputStream os) throws IOException { final int MAX_RETRIES = 3; int attempts = 0; @@ -96,23 +85,8 @@ public static boolean compareSHA1(File f, String sourceSHA) { else return true; // fake match }catch (IOException e) { - System.out.println("Fake-matching a hash due to a read error: " + e); + Logger.getInstance().appendToLog("Fake-matching a hash due to a read error: " + e); return true; } } - - public static ArrayList getCompatibleVersions(String tag) { - ArrayList versions = new ArrayList<>(); - try { - InputStream stream = assetManager.open("jsons/modmanager.json"); - JsonObject versionsJson = GLOBAL_GSON.fromJson(read(stream), JsonObject.class); - - for (JsonElement version : versionsJson.get("compatible_versions").getAsJsonObject().getAsJsonArray(tag)) { - versions.add(version.getAsString()); - } - } catch (IOException e) { - e.printStackTrace(); - } - return versions; - } } diff --git a/src/main/java/pojlib/util/JREUtils.java b/src/main/java/pojlib/util/JREUtils.java index 37c292ed..58b8ecf4 100644 --- a/src/main/java/pojlib/util/JREUtils.java +++ b/src/main/java/pojlib/util/JREUtils.java @@ -171,7 +171,7 @@ public static void setJavaEnvironment(Activity activity) throws Throwable { setLdLibraryPath(jvmLibraryPath+":"+LD_LIBRARY_PATH); } - public static int launchJavaVM(final Activity activity, final List JVMArgs, String versionName) throws Throwable { + public static int launchJavaVM(final Activity activity, final List JVMArgs, String modsDirName) throws Throwable { JREUtils.relocateLibPath(activity); setJavaEnvironment(activity); @@ -199,7 +199,7 @@ public static int launchJavaVM(final Activity activity, final List JVMAr userArgs.add("-Dorg.lwjgl.opengl.libname=" + graphicsLib); userArgs.add("-Dorg.lwjgl.opengles.libname=" + "/system/lib64/libGLESv3.so"); userArgs.add("-Dorg.lwjgl.egl.libname=" + "/system/lib64/libEGL_dri.so"); - userArgs.add("-Dfabric.addMods=" + Constants.MC_DIR + "/mods/" + versionName); + userArgs.add("-Dfabric.addMods=" + Constants.MC_DIR + "/mods/" + modsDirName); userArgs.addAll(JVMArgs); System.out.println(JVMArgs); diff --git a/src/main/java/pojlib/util/LoginHelper.java b/src/main/java/pojlib/util/LoginHelper.java index 64a003eb..b544c66a 100644 --- a/src/main/java/pojlib/util/LoginHelper.java +++ b/src/main/java/pojlib/util/LoginHelper.java @@ -65,7 +65,7 @@ public static MinecraftAccount getNewToken(Activity activity) { IAccount account = accounts.iterator().next(); future = pca.acquireTokenSilently(SilentParameters.builder(Set.of("XboxLive.SignIn", "XboxLive.offline_access"), account).build()); } catch (MalformedURLException e) { - Logger.getInstance().appendToLog(e.getMessage()); + Logger.getInstance().appendToLog(e.toString()); throw new RuntimeException(e); } @@ -73,7 +73,7 @@ public static MinecraftAccount getNewToken(Activity activity) { IAuthenticationResult res = future.get(); return MinecraftAccount.load(activity.getFilesDir() + "/accounts", res.accessToken(), String.valueOf(res.expiresOnDate().getTime())); } catch (ExecutionException | InterruptedException e) { - Logger.getInstance().appendToLog(e.getMessage()); + Logger.getInstance().appendToLog(e.toString()); throw new RuntimeException(e); } } @@ -96,7 +96,7 @@ public static void beginLogin(Activity activity) { API_V1.profileName = API_V1.currentAcc.username; } catch (ExecutionException | InterruptedException e) { API_V1.msaMessage = "Something went wrong! Couldn't reach the Microsoft Auth servers.\n" - + e.getMessage(); + + e; } }); diff --git a/src/main/java/pojlib/util/ModInfo.java b/src/main/java/pojlib/util/ModInfo.java new file mode 100644 index 00000000..d52cee89 --- /dev/null +++ b/src/main/java/pojlib/util/ModInfo.java @@ -0,0 +1,7 @@ +package pojlib.util; + +public class ModInfo { + public String slug; + public String version; + public String download_link; +} \ No newline at end of file diff --git a/src/main/java/pojlib/util/ModsJson.java b/src/main/java/pojlib/util/ModsJson.java new file mode 100644 index 00000000..96e03334 --- /dev/null +++ b/src/main/java/pojlib/util/ModsJson.java @@ -0,0 +1,11 @@ +package pojlib.util; + +public class ModsJson { + public Version[] versions; + + public static class Version { + public String name; + public ModInfo[] coreMods; + public ModInfo[] defaultMods; + } +} diff --git a/src/main/jni/vloader.cpp b/src/main/jni/vloader.cpp index 01a28f29..b7e93165 100644 --- a/src/main/jni/vloader.cpp +++ b/src/main/jni/vloader.cpp @@ -76,7 +76,7 @@ Java_pojlib_util_VLoader_setAndroidInitInfo(JNIEnv *env, jclass clazz, jobject c (PFN_xrVoidFunction *) (&initializeLoader)); if(!XR_SUCCEEDED(res)) { - printf("Error!"); + printf("xrGetInstanceProcAddr returned %d.\n", res); } XrLoaderInitInfoAndroidKHR loaderInitInfoAndroidKhr = { @@ -86,7 +86,10 @@ Java_pojlib_util_VLoader_setAndroidInitInfo(JNIEnv *env, jclass clazz, jobject c ctx }; - initializeLoader((const XrLoaderInitInfoBaseHeaderKHR *) &loaderInitInfoAndroidKhr); + res = initializeLoader((const XrLoaderInitInfoBaseHeaderKHR *) &loaderInitInfoAndroidKhr); + if(!XR_SUCCEEDED(res)) { + printf("xrInitializeLoaderKHR returned %d.\n", res); + } } extern "C" diff --git a/supportedVersions.json b/supportedVersions.json new file mode 100644 index 00000000..a13b39fe --- /dev/null +++ b/supportedVersions.json @@ -0,0 +1,10 @@ +{ + "supportedVersions": [ + "1.20.4", + "1.20.2", + "1.20.1", + "1.19.4", + "1.19.2", + "1.18.2" + ] +} \ No newline at end of file