From 4d1075757c796986ab97936a45f98f20b043721c Mon Sep 17 00:00:00 2001 From: Timo Ley Date: Mon, 1 Mar 2021 20:34:00 +0100 Subject: [PATCH] Init --- .gitignore | 3 +++ modpacktoolsconfig.toml | 14 ++++++++++ mpt | 43 +++++++++++++++++++++++++++++++ src/modpack.json | 57 +++++++++++++++++++++++++++++++++++++++++ 4 files changed, 117 insertions(+) create mode 100644 .gitignore create mode 100644 modpacktoolsconfig.toml create mode 100644 mpt create mode 100644 src/modpack.json diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..eeda5f6 --- /dev/null +++ b/.gitignore @@ -0,0 +1,3 @@ +.mpt +build +.idea \ No newline at end of file diff --git a/modpacktoolsconfig.toml b/modpacktoolsconfig.toml new file mode 100644 index 0000000..65ff88e --- /dev/null +++ b/modpacktoolsconfig.toml @@ -0,0 +1,14 @@ +[Locations] + #The location of the twitch manifest file (will be replaced with addonscript in later versions) + manifestFile = "src/twitch/manifest.json" + #The location of the source + src = "src" + #The location used to store temporary files + tempDir = ".mpt" +[Local] + selectedVersion = -1 +[Downloads] + #The maximum number of threads that will be used for downloads + maxThreads = 5 + #The timeout of http requests in ms + httpTimeout = 2147483647 \ No newline at end of file diff --git a/mpt b/mpt new file mode 100644 index 0000000..329213c --- /dev/null +++ b/mpt @@ -0,0 +1,43 @@ +#!/bin/sh +cd "$(dirname "$0")" || exit +case $1 in +install) + if ! [ -d "$HOME/.mpt" ]; + then mkdir $HOME/.mpt + fi + if ! [ -f "$HOME/.mpt/mpt.jar" ]; + then + dl=$(curl https://data.tilera.xyz/api/mpt.php/latest) + echo Downloading $dl ... + curl $dl --output $HOME/.mpt/mpt.jar + fi + ;; +update) + dl=$(curl https://data.tilera.xyz/api/mpt.php/latest) + echo Downloading $dl ... + if [ -f ".mpt/mpt.jar" ] + then + curl $dl --output .mpt/mpt.jar + else + curl $dl --output $HOME/.mpt/mpt.jar + fi + echo Updating Script + curl https://data.tilera.xyz/api/mpt.php/script > mpt + ;; +*) + if ! [ -d ".mpt" ]; + then mkdir .mpt + fi + if [ -f ".mpt/mpt.jar" ]; + then jar=.mpt/mpt.jar + elif [ -f "$HOME.mpt/mpt.jar" ]; + then jar=$HOME.mpt/mpt.jar + else + dl=$(curl https://data.tilera.xyz/api/mpt.php/latest) + echo Downloading $dl ... + curl $dl --output .mpt/mpt.jar + jar=.mpt/mpt.jar + fi + java -jar $jar $* + ;; +esac \ No newline at end of file diff --git a/src/modpack.json b/src/modpack.json new file mode 100644 index 0000000..57f8f75 --- /dev/null +++ b/src/modpack.json @@ -0,0 +1,57 @@ +{ + "id": "testcraftp2", + "type": "modpack", + "versions": [ + { + "version": "1.0" + "versionid": -1, + "mcversion": [ + "1.6.4" + ], + "files": [ + { + "id": "overrides", + "installer": "internal.overrides", + "link": "file://overrides", + "options": [ + "client", + "server", + "required", + "included" + ] + } + ], + "relations": [ + { + "id": "forge", + "versions": "[1.6.4-9.11.1.1345]", + "type": "modloader", + "options": [ + "required", + "client", + "server", + "included" + ] + } + ] + } + ], + "meta": { + "name": "Testcraft Phase 2", + "contributors": [ + { + "name": "tilera", + "roles": [ + "owner" + ] + }, + { + "name": "LordMZTE", + "roles": [ + "author" + ] + } + ] + }, + "asversion": 1 +}