Add Friends CMP Bedrock resource pack conversion
Build and release Bedrock pack / release (push) Failing after 6s

This commit is contained in:
root
2026-07-31 21:04:30 +02:00
commit f955d4321f
25 changed files with 340 additions and 0 deletions
+13
View File
@@ -0,0 +1,13 @@
#!/usr/bin/env python3
"""Build tracked Bedrock resource-pack files into a .mcpack archive."""
from pathlib import Path
from zipfile import ZIP_DEFLATED, ZipFile
ROOT = Path(__file__).resolve().parents[1]
OUT = ROOT / "build" / "Friends-CMP-Bedrock.mcpack"
EXCLUDED = {".git", "build", ".github", "scripts", "geyser", "README.md", ".gitignore"}
OUT.parent.mkdir(exist_ok=True)
with ZipFile(OUT, "w", ZIP_DEFLATED) as archive:
for path in sorted(ROOT.rglob("*")):
if path.is_file() and path.relative_to(ROOT).parts[0] not in EXCLUDED:
archive.write(path, path.relative_to(ROOT).as_posix())
print(OUT)
+26
View File
@@ -0,0 +1,26 @@
#!/usr/bin/env python3
"""Validate pack metadata, required assets, mappings, and archive contents."""
import json
from pathlib import Path
ROOT = Path(__file__).resolve().parents[1]
def load(path):
with path.open(encoding="utf-8") as stream:
return json.load(stream)
manifest = load(ROOT / "manifest.json")
assert manifest["format_version"] == 2
assert manifest["header"]["uuid"] != manifest["modules"][0]["uuid"]
assert manifest["modules"][0]["type"] == "resources"
assert len(manifest["header"]["version"]) == 3
textures = load(ROOT / "textures/item_texture.json")["texture_data"]
sound_defs = load(ROOT / "sounds/sound_definitions.json")["sound_definitions"]
mappings = load(ROOT / "geyser/mappings.json")
names = ("interior_shop0", "pawn_shop1", "food_mart2", "hat_shop3", "clothing_shop4", "jump_up5", "city_under_siege6")
assert set(textures) == {f"friends_cmp:{name}" for name in names}
assert len(sound_defs) == len(names)
for entry in textures.values():
assert (ROOT / (entry["textures"] + ".png")).is_file()
for entry in sound_defs.values():
assert (ROOT / (entry["sounds"][0]["name"] + ".ogg")).is_file()
assert mappings["format_version"] == 2
assert len(mappings["items"]["minecraft:music_disc_13"][0]["definitions"]) == len(names)
print("Bedrock pack validation passed")