Switch mc_rebalance from datapack to mod

* Delete mc_rebalace submodule
* Update export-pack.sh to clone the mod fork
* Update README instructions
This commit is contained in:
Sergeant Acoustic 2025-08-27 17:59:50 +01:00
parent a486d3d336
commit c11e166360
5 changed files with 30 additions and 19 deletions

2
.gitignore vendored
View file

@ -1 +1,3 @@
release
deps
overrides/mods/0.0.1.jar

4
.gitmodules vendored
View file

@ -1,4 +0,0 @@
[submodule "overrides/global_packs/required_data/mc_rebalance"]
path = overrides/global_packs/required_data/mc_rebalance
url = https://patience.nearmisses.xyz/patience/mc_rebalance
branch = main

View file

@ -9,20 +9,16 @@ Packed in modrith format, for hosting make sure to add [for-host-put-these-in-wo
2. Drag into your mod loader of choice
# Development
This repository imports mc_rebalance as a submodule
This repository no longer imports mc_rebalance as a submodule
Clone this repo with `git clone --recurse-submodules https://patience.nearmisses.xyz/SergeantAcoustic/tinkers_tinkering.git`
When pulling, include the submodule with `git pull --recurse-submodules`
## Updating submodule upstream
To update the embedded submodule to the latest available version:
1. If you cloned without `--recurse-submodules` run `git submodule update --init`
2. Run `git submodule update --remote` to update it
3. Stage the submodule's new pointer (e.g. `git add overrides/global_packs/required_data/mc_rebalance`)
4. Commit as usual (e.g. `git commit -m "Updated submodule"`)
5. `git push`
You can now pull/push as expected
## Exporting
To create a release, run [export-pack.sh](export-pack.sh). It will be generated in [release/Tinker's tinkering.mrpack](Tinker's%20tinkering.mrpack)
To create a release, run [./export-pack.sh](export-pack.sh)
* It will be generated in [release/Tinker's tinkering.mrpack](Tinker's%20tinkering.mrpack)
* This script clones the [mc_rebalace](https://patience.nearmisses.xyz/patience/mc_rebalance) repo, so you will need to provide login credentials to git
* Running `git config --global credential.helper store` will save these credentials to your global git config directory, saving having to input them again for nearmisses.xyz
* **Beware that this is stored in plaintext, so only do it on a private device**

View file

@ -1,9 +1,27 @@
#!/bin/bash
# Main modpack project directory
cd "$(dirname "$0")"
basedir="$PWD"
# Location for downloading/updating the mc_rebalance mod
if [ ! -d deps ]; then
mkdir deps
fi;
# Clone repo if it exists, otherwise, update it
# You may need to input login credentials due to the repo being private
# If you do, consider running `git config --global credential.helper store`
# Warning: saves as plaintext on your disk in your global git directory
git clone https://patience.nearmisses.xyz/patience/mc_rebalance -b mod $basedir/deps/mc_rebalance || (cd $basedir/deps/mc_rebalance; git pull) || exit 1
(cd "$basedir"/deps/mc_rebalance/ && ./gradlew build)
cp "$basedir/deps/mc_rebalance/build/libs/mc_rebalance-1.20.1/0.0.1.jar" "$basedir/overrides/mods"
# Final path for the modpack
if [ ! -d release ]; then
mkdir release
fi;
zip -FSr "release/Tinker's tinkering.mrpack" overrides modrinth.index.json
zip -FSr "$basedir/release/Tinker's tinkering.mrpack" overrides modrinth.index.json

@ -1 +0,0 @@
Subproject commit 8019df46e0498adf683a914e7181d69cb01104aa