Mcpack Converter -

try: with zipfile.ZipFile(output_path, 'w', zipfile.ZIP_DEFLATED) as zipf: for root, dirs, files in os.walk(folder_path): for file in files: file_path = Path(root) / file arcname = file_path.relative_to(folder_path) zipf.write(file_path, arcname) print(f"✅ Packed to: {output_path}") return True except Exception as e: print(f"❌ Packing failed: {e}") return False def convert_to_zip(mcpack_path): """Rename .mcpack to .zip""" mcpack_path = Path(mcpack_path) if not mcpack_path.exists(): print(f"❌ File not found: {mcpack_path}") return False

import os import zipfile import shutil import json import argparse from pathlib import Path def extract_mcpack(mcpack_path, output_dir=None): """Extract .mcpack file to a folder""" mcpack_path = Path(mcpack_path) if not mcpack_path.exists(): print(f"❌ File not found: {mcpack_path}") return False mcpack converter

args = parser.parse_args()