Last active
January 23, 2025 22:18
-
-
Save Phoenix616/c46a28abd0ecf4942afd1582cc3b697c to your computer and use it in GitHub Desktop.
Generate an anti xray pack for a specific version (https://modrinth.com/resourcepack/anti-xray-pack)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
read -p "Enter the Minecraft version: " version | |
read -p "Enter the pack format: " pack_format | |
if [ ! -f ~/.minecraft/versions/$version/$version.jar ]; then | |
echo "$version not found!" | |
exit 1 | |
fi | |
echo "Unzipping version $version" | |
rm -r Anti_Xray_Build | |
mkdir -p Anti_Xray_Build | |
unzip ~/.minecraft/versions/$version/$version.jar "assets/minecraft/blockstates/*" -d Anti_Xray_Build/ | |
unzip ~/.minecraft/versions/$version/$version.jar "assets/minecraft/models/block/*" -d Anti_Xray_Build/ | |
echo "Updating Full pack with $version / $pack_format" | |
mkdir -p Anti_Xray_Full | |
rsync -avz --update --delete Anti_Xray_Build/assets Anti_Xray_Full | |
cd Anti_Xray_Full | |
echo "{ | |
\"pack\": { | |
\"pack_format\": $pack_format, | |
\"description\": \"Anti-Xray Pack Full $version\" | |
} | |
}" > pack.mcmeta | |
zip -r -Z bzip2 ../Anti_Xray_Full_$version.zip * | |
cd .. | |
echo "Updating Lite pack with $version / $pack_format" | |
mkdir -p Anti_Xray_Lite | |
rsync -avz --update --existing --delete Anti_Xray_Build/assets Anti_Xray_Lite | |
cd Anti_Xray_Lite | |
echo "{ | |
\"pack\": { | |
\"pack_format\": $pack_format, | |
\"description\": \"Anti-Xray Pack Lite $version\" | |
} | |
}" > pack.mcmeta | |
zip -r -Z bzip2 ../Anti_Xray_Lite_$version.zip * |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment