diff --git a/.gitignore b/.gitignore index bd63fe5..99585bb 100644 --- a/.gitignore +++ b/.gitignore @@ -9,9 +9,9 @@ .minecraft/realms_persistence.json ## Ignore Modpack Updater Script loose files -update-pack.data/.* -update-pack.data/*/ -update-pack.data/update.sh -update-pack.data/busybox.exe +.technic ## Add your modded folders/files to ignore here +.minecraft/mods/ +.minecraft/packwiz-installer.jar +.minecraft/packwiz.json diff --git a/.minecraft/.gitkeep b/.minecraft/.gitkeep deleted file mode 100644 index e69de29..0000000 diff --git a/.minecraft/bin/version.json b/.minecraft/bin/version.json new file mode 100644 index 0000000..bd620d1 --- /dev/null +++ b/.minecraft/bin/version.json @@ -0,0 +1,55 @@ +{ + "id": "1.18.1", + "inheritsFrom": "1.18.1", + "releaseTime": "2022-02-25T18:25:26+0000", + "time": "2022-02-25T18:25:26+0000", + "type": "release", + "minecraftArguments": "--username ${auth_player_name} --version ${version_name} --gameDir ${game_directory} --assetsDir ${assets_root} --assetIndex ${assets_index_name} --uuid ${auth_uuid} --accessToken ${auth_access_token} --userType ${user_type} --versionType ${version_type}", + "libraries": [ + { + "name": "net.fabricmc:tiny-mappings-parser:0.3.0+build.17", + "url": "https://maven.fabricmc.net/" + }, + { + "name": "net.fabricmc:sponge-mixin:0.11.2+mixin.0.8.5", + "url": "https://maven.fabricmc.net/" + }, + { + "name": "net.fabricmc:tiny-remapper:0.8.1", + "url": "https://maven.fabricmc.net/" + }, + { + "name": "net.fabricmc:access-widener:2.1.0", + "url": "https://maven.fabricmc.net/" + }, + { + "name": "org.ow2.asm:asm:9.2", + "url": "https://maven.fabricmc.net/" + }, + { + "name": "org.ow2.asm:asm-analysis:9.2", + "url": "https://maven.fabricmc.net/" + }, + { + "name": "org.ow2.asm:asm-commons:9.2", + "url": "https://maven.fabricmc.net/" + }, + { + "name": "org.ow2.asm:asm-tree:9.2", + "url": "https://maven.fabricmc.net/" + }, + { + "name": "org.ow2.asm:asm-util:9.2", + "url": "https://maven.fabricmc.net/" + }, + { + "name": "net.fabricmc:intermediary:1.18.1", + "url": "https://maven.fabricmc.net/" + }, + { + "name": "net.fabricmc:fabric-loader:0.13.3", + "url": "https://maven.fabricmc.net/" + } + ], + "mainClass": "net.fabricmc.loader.impl.launch.knot.KnotClient" +} \ No newline at end of file diff --git a/modpack.icon.png b/.minecraft/modpack.icon.png similarity index 100% rename from modpack.icon.png rename to .minecraft/modpack.icon.png diff --git a/.minecraft/packwiz-installer-bootstrap.jar b/.minecraft/packwiz-installer-bootstrap.jar new file mode 100644 index 0000000..84b934c Binary files /dev/null and b/.minecraft/packwiz-installer-bootstrap.jar differ diff --git a/Makefile b/Makefile index fa50669..f2444fc 100644 --- a/Makefile +++ b/Makefile @@ -11,22 +11,23 @@ default: @echo "Techic will make a pack that can be used for technic" @echo "" @echo "All will make both technic and MultiMC packs" - + @echo "" + multimc: - -rm -rf update-pack.data/temp - -rm -rf update-pack.data/bin - -rm -rf update-pack.data/busybox.exe + @echo "Making MultiMC pack" 7z d ../modpack.zip ./* -r 7z d ../modpack.zip ./.* -r 7z a ../modpack.zip ./* -r - 7z a ../modpack.zip ./.git -r 7z a ../modpack.zip ./.minecraft -r technic: + @echo "Making Technic pack" + -rm -rf .technic + -cp -r .minecraft .technic + mv .technic/modpack.icon.png .technic/icon.png + cd .technic && java -jar packwiz-installer-bootstrap.jar https://gitlab.com/Merith-TK/modpack-template/-/raw/packwiz/packwiz-data/pack.toml && cd .. + -rm -rf .technic/packwiz* 7z d ../modpack-technic.zip ./* -r - 7z a ../modpack-technic.zip ./.minecraft/* -r - cp modpack.icon.png icon.png - 7z a ../modpack-technic.zip ./icon.png - rm icon.png + 7z a ../modpack-technic.zip ./.technic/* -r all: multimc technic \ No newline at end of file diff --git a/README.md b/README.md index 3344ffc..38a560d 100644 --- a/README.md +++ b/README.md @@ -5,20 +5,18 @@ currently this template only supports - Technic - MultiMC -## About the EXE -The exe is a tool made by me -https://github.com/Merith-TK/busybox64.portable - -it downloads and runs a prebuild busybox.exe to perform tasks, this updating modpack template is an example of what my tool is capable of - ### How to use this? - Modpack Makers - - Well first your going to need to install `busybox`, `git`, `7zip`, and `make` on your computer, I personally reccomend getting all of these through [Scoop](https://scoop.sh/) + - Well first your going to need to install `busybox`, `git`, `go` `7zip`, and `make` on your computer, I personally reccomend getting all of these through [Scoop](https://scoop.sh/) - After installing scoop, just run - - `scoop install busybox git make 7zip` + - `scoop install busybox git go make 7zip` + - after you run the previous command, run + - `go install github.com/packwiz/packwiz@latest` - and everything should be there, - I reccomend using VSCode to manage your modpack as you have a full visual editor and git manager built in. - - TO build a release, you simply need to open a terminal, (git-bash, cmd, or even powershell) inside the modpack folder, and run `make `, for example, `make technic` will make a technic release zip, and running it again will modify it so it doesnt have issues with having to make a new file share link, same with `multimc` + - to add mods, run `packwiz install ` + - for sodium from modrinth, `packwiz modrinth install sodium` + - to make a release, run `make multimc` or `make technic` - Dont forget to make a git repo for your modpack, I reccomend using [GitLab](https://gitlab.com) due to its free Large File Support. diff --git a/instance.cfg b/instance.cfg index 8b5a9b3..fb800b1 100644 --- a/instance.cfg +++ b/instance.cfg @@ -1,43 +1,5 @@ -AutoCloseConsole=false -ForgeVersion= InstanceType=OneSix -IntendedVersion= -JavaPath= -JoinServerOnLaunch=false -JoinServerOnLaunchAddress= -JvmArgs= -LWJGLVersion= -LaunchMaximized=false -LiteloaderVersion= -LogPrePostOutput=true -MCLaunchMethod=LauncherPart -MaxMemAlloc=2048 -MinMemAlloc=204 -MinecraftWinHeight=480 -MinecraftWinWidth=854 -OverrideCommands=false -OverrideConsole=false -OverrideGameTime=false -OverrideJava=false -OverrideJavaArgs=false -OverrideJavaLocation=false -OverrideMCLaunchMethod=false -OverrideMemory=false -OverrideNativeWorkarounds=false -OverrideWindow=false -PermGen=128 -PostExitCommand= -PreLaunchCommand=$INST_DIR/update-pack.exe -RecordGameTime=true -ShowConsole=false -ShowConsoleOnError=true -ShowGameTime=true -UseNativeGLFW=false -UseNativeOpenAL=false -WrapperCommand= iconKey=modpack.icon -lastLaunchTime= -lastTimePlayed= -name=Example Modpack -notes= -totalTimePlayed= +name=Modpack Template +OverrideCommands=true +PreLaunchCommand=$INST_JAVA -jar packwiz-installer-bootstrap.jar https://gitlab.com/Merith-TK/modpack-template/-/raw/packwiz/packwiz-data/pack.toml \ No newline at end of file diff --git a/mmc-pack.json b/mmc-pack.json index 7443c7b..63a762b 100644 --- a/mmc-pack.json +++ b/mmc-pack.json @@ -17,10 +17,35 @@ "uid": "org.lwjgl3" } ], - "cachedVersion": "1.17.1", + "cachedVersion": "1.18.1", "important": true, "uid": "net.minecraft", - "version": "1.17.1" + "version": "1.18.1" + }, + { + "cachedName": "Intermediary Mappings", + "cachedRequires": [ + { + "equals": "1.18.1", + "uid": "net.minecraft" + } + ], + "cachedVersion": "1.18.1", + "cachedVolatile": true, + "dependencyOnly": true, + "uid": "net.fabricmc.intermediary", + "version": "1.18.1" + }, + { + "cachedName": "Fabric Loader", + "cachedRequires": [ + { + "uid": "net.fabricmc.intermediary" + } + ], + "cachedVersion": "0.13.3", + "uid": "net.fabricmc.fabric-loader", + "version": "0.13.3" } ], "formatVersion": 1 diff --git a/packwiz-data/index.toml b/packwiz-data/index.toml new file mode 100644 index 0000000..9fa5d21 --- /dev/null +++ b/packwiz-data/index.toml @@ -0,0 +1,16 @@ +hash-format = "sha256" + +[[files]] +file = "mods/lithium.toml" +hash = "4e0d26b8af24dbc7220b2708ab13ad9cf6646442e3ebccc6ceebdef152345656" +metafile = true + +[[files]] +file = "mods/phosphor.toml" +hash = "f257c1d69a789d7ddcb0578d5987a7fc2eaf1681f1718600c51bd2ce6bce5f19" +metafile = true + +[[files]] +file = "mods/sodium.toml" +hash = "f291cfa3dc4468318494015a4d695f66a22356355aa0122b2fbb7c1407ffdde0" +metafile = true diff --git a/packwiz-data/mods/lithium.toml b/packwiz-data/mods/lithium.toml new file mode 100644 index 0000000..8dc8875 --- /dev/null +++ b/packwiz-data/mods/lithium.toml @@ -0,0 +1,13 @@ +name = "Lithium" +filename = "lithium-fabric-mc1.18.1-0.7.8.jar" +side = "both" + +[download] +url = "https://cdn.modrinth.com/data/gvQqBUqZ/versions/mc1.18.1-0.7.8/lithium-fabric-mc1.18.1-0.7.8.jar" +hash-format = "sha1" +hash = "8b7cd216fee54b9acc261005cae5acbc856b1933" + +[update] +[update.modrinth] +mod-id = "gvQqBUqZ" +version = "Ehsd7YUl" diff --git a/packwiz-data/mods/phosphor.toml b/packwiz-data/mods/phosphor.toml new file mode 100644 index 0000000..07d1440 --- /dev/null +++ b/packwiz-data/mods/phosphor.toml @@ -0,0 +1,13 @@ +name = "Phosphor" +filename = "phosphor-fabric-mc1.18.x-0.8.1.jar" +side = "both" + +[download] +url = "https://cdn.modrinth.com/data/hEOCdOgW/versions/mc1.18.x-0.8.1/phosphor-fabric-mc1.18.x-0.8.1.jar" +hash-format = "sha1" +hash = "9b826d21b9cd999853a57c76b0c47ee4d9161dc9" + +[update] +[update.modrinth] +mod-id = "hEOCdOgW" +version = "HG1UaV1y" diff --git a/packwiz-data/mods/sodium.toml b/packwiz-data/mods/sodium.toml new file mode 100644 index 0000000..dfa5327 --- /dev/null +++ b/packwiz-data/mods/sodium.toml @@ -0,0 +1,13 @@ +name = "Sodium" +filename = "sodium-fabric-mc1.18.1-0.4.0-alpha6+build.14.jar" +side = "client" + +[download] +url = "https://cdn.modrinth.com/data/AANobbMI/versions/mc1.18.1-0.4.0-alpha6/sodium-fabric-mc1.18.1-0.4.0-alpha6+build.14.jar" +hash-format = "sha1" +hash = "795d4c12bffdb1b21eed5ff87c07ce5ca3c0dcbf" + +[update] +[update.modrinth] +mod-id = "AANobbMI" +version = "5JyduDNN" diff --git a/packwiz-data/pack.toml b/packwiz-data/pack.toml new file mode 100644 index 0000000..a96f90b --- /dev/null +++ b/packwiz-data/pack.toml @@ -0,0 +1,13 @@ +name = "Modpack Template" +author = "Merith.TK" +version = "1.0.0" +pack-format = "packwiz:1.0.0" + +[index] +file = "index.toml" +hash-format = "sha256" +hash = "308bc1ee70848f4d17d082c4c01c8fe2f13c57e18cf385450c2794c540c3ae02" + +[versions] +fabric = "0.13.3" +minecraft = "1.18.1" diff --git a/update-pack.data/config.toml b/update-pack.data/config.toml deleted file mode 100644 index b2be67b..0000000 --- a/update-pack.data/config.toml +++ /dev/null @@ -1,23 +0,0 @@ -# The program to run, can be defined as a direct -# file path, or as an EXE in the $PATH variable -program = "busybox.exe" -programArgs = "bash -c '{data}/start.sh'" - -# Working Directory -workingDirectory = "{data}/" - -# Do not include windows path -# If True, only the data directory will be -# treated as $PATH -isolatedPath = true - -# Global Environment variables to be set -# to aid with portability, -[environment] - # Please do not edit these values unless you - # know what you are doing - APPDATA = "{data}/APPDATA" - LOCALAPPDATA = "{data}/APPDATA" - HOME = "{data}/" - USERPROFILE = "{data}/" - # Put your custom environment variables here \ No newline at end of file diff --git a/update-pack.data/start.sh b/update-pack.data/start.sh deleted file mode 100644 index 8706d5b..0000000 --- a/update-pack.data/start.sh +++ /dev/null @@ -1,6 +0,0 @@ -## DO NOT EDIT THIS FILE, ## -## DOING SO WILL BREAK ## -## THE UPDATER -cp updater.sh update.sh -bash update.sh -rm update.sh \ No newline at end of file diff --git a/update-pack.data/updater.sh b/update-pack.data/updater.sh deleted file mode 100644 index 74188ab..0000000 --- a/update-pack.data/updater.sh +++ /dev/null @@ -1,18 +0,0 @@ -GITURL="https://github.com/git-for-windows/git/releases/download/v2.33.0.windows.1/PortableGit-2.33.0-64-bit.7z.exe" - -#install git if not found -if [ ! -f "bin/git/bin/git.exe" ]; then - if [ ! -d "temp" ]; then - mkdir temp - fi - if [ ! -f "temp/git.install.exe" ]; then - wget $GITURL -O temp/git.install.exe - fi - temp/git.install.exe -o bin/git -y -fi - -cd ../ -update-pack.data/bin/git/bin/git.exe config --global pull.rebase false -update-pack.data/bin/git/bin/git.exe pull origin main - -echo "[$0] If there were any errors, please inform the Modpack Author" \ No newline at end of file diff --git a/update-pack.exe b/update-pack.exe deleted file mode 100644 index 9cf0da8..0000000 Binary files a/update-pack.exe and /dev/null differ