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
+32
View File
@@ -0,0 +1,32 @@
name: Build and release Bedrock pack
on:
push:
tags:
- 'v*'
workflow_dispatch:
permissions:
contents: write
jobs:
release:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Validate and build
run: |
python3 scripts/validate_pack.py
python3 scripts/build_pack.py
- name: Create GitHub release
uses: softprops/action-gh-release@v2
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
generate_release_notes: true
files: |
build/Friends-CMP-Bedrock.mcpack
geyser/mappings.json
+2
View File
@@ -0,0 +1,2 @@
build/
.DS_Store
+46
View File
@@ -0,0 +1,46 @@
# Friends CMP Bedrock Resource Pack
Bedrock resource pack assets for Friends CMP when Java players and Bedrock players meet through Geyser.
## Scope
This repository converts the **client-side Java resource pack assets** from `Friends-CMP-2.0` only. The Java repository's `data/` datapack is intentionally not copied or recreated; it remains installed on the Java server and is outside the scope of a Bedrock resource pack.
Included:
- Seven custom music-disc icons and their streamed OGG audio.
- Geyser custom-item mappings for the Java `music_disc_13` stacks whose `custom_model_data.strings` values identify those discs.
- The Java cloud texture, preserved at Bedrock's environment texture path.
- Bedrock manifest, pack icon, validation, packaging, and tagged-release automation.
## Build and validate
Requires Python 3.9+ and no third-party packages:
```sh
python3 scripts/validate_pack.py
python3 scripts/build_pack.py
```
The build output is `build/Friends-CMP-Bedrock.mcpack`. The generated `build/` directory is ignored and should not be committed.
## Geyser installation
1. Copy `build/Friends-CMP-Bedrock.mcpack` to Geyser's `packs/` directory (or install it through the server's Bedrock resource-pack mechanism).
2. Copy `geyser/mappings.json` to Geyser's `custom_mappings/` directory.
3. Enable Geyser custom content/items in the server configuration, then restart Geyser.
4. Test each Java datapack disc in a Bedrock client: its icon should match its title and its jukebox sound should stream.
The mappings use the current Geyser custom-item mapping format (`format_version: 2`) and match the Java datapack's string values at `custom_model_data.strings[0]`.
## Limitations
- Bedrock does not understand Java `assets/` model JSON or Java item-model dispatch files. Those files are translated into Bedrock icon entries and Geyser mappings rather than copied.
- Resource packs cannot implement Java datapack logic. Giving items, jukebox components, predicates, functions, recipes, and other server behavior remain Java-side responsibilities.
- The Bedrock pack alone cannot distinguish multiple custom icons that all use `music_disc_13`; the Geyser mapping file is required for that per-stack visual mapping. If the server uses an older Geyser build that does not support v2 mappings or string predicates, the custom icons cannot be selected reliably without changing the server-side item data/mapping approach.
- Bedrock's resource-pack sound catalog exposes the converted sound events, but custom Java jukebox behavior is still dependent on Geyser/server support for the mapped item. This repository does not modify the Java datapack.
- No Java-only `assets/minecraft/items/*.json`, models, `pack.mcmeta`, language files, or datapack files are included in the `.mcpack`.
## Releases
Tag pushes matching `v*` run `.github/workflows/release.yml`, validate the pack, build `Friends-CMP-Bedrock.mcpack`, and attach both the pack and `geyser/mappings.json` to the GitHub Release. The mapping file is released alongside the pack because Geyser needs it to select the per-disc icons.
+111
View File
@@ -0,0 +1,111 @@
{
"format_version": 2,
"items": {
"minecraft:music_disc_13": [
{
"type": "group",
"model": "minecraft:item/music_disc_13",
"definitions": [
{
"bedrock_identifier": "friends_cmp:interior_shop0",
"display_name": "Interior Shop",
"bedrock_options": {
"icon": "friends_cmp:interior_shop0",
"creative_category": "items"
},
"predicate": {
"type": "match",
"property": "custom_model_data",
"value": "interior_shop0",
"index": 0
}
},
{
"bedrock_identifier": "friends_cmp:pawn_shop1",
"display_name": "Pawn Shop",
"bedrock_options": {
"icon": "friends_cmp:pawn_shop1",
"creative_category": "items"
},
"predicate": {
"type": "match",
"property": "custom_model_data",
"value": "pawn_shop1",
"index": 0
}
},
{
"bedrock_identifier": "friends_cmp:food_mart2",
"display_name": "Food Mart",
"bedrock_options": {
"icon": "friends_cmp:food_mart2",
"creative_category": "items"
},
"predicate": {
"type": "match",
"property": "custom_model_data",
"value": "food_mart2",
"index": 0
}
},
{
"bedrock_identifier": "friends_cmp:hat_shop3",
"display_name": "Hat Shop",
"bedrock_options": {
"icon": "friends_cmp:hat_shop3",
"creative_category": "items"
},
"predicate": {
"type": "match",
"property": "custom_model_data",
"value": "hat_shop3",
"index": 0
}
},
{
"bedrock_identifier": "friends_cmp:clothing_shop4",
"display_name": "Clothing Shop",
"bedrock_options": {
"icon": "friends_cmp:clothing_shop4",
"creative_category": "items"
},
"predicate": {
"type": "match",
"property": "custom_model_data",
"value": "clothing_shop4",
"index": 0
}
},
{
"bedrock_identifier": "friends_cmp:jump_up5",
"display_name": "Jump Up",
"bedrock_options": {
"icon": "friends_cmp:jump_up5",
"creative_category": "items"
},
"predicate": {
"type": "match",
"property": "custom_model_data",
"value": "jump_up5",
"index": 0
}
},
{
"bedrock_identifier": "friends_cmp:city_under_siege6",
"display_name": "City under siege",
"bedrock_options": {
"icon": "friends_cmp:city_under_siege6",
"creative_category": "items"
},
"predicate": {
"type": "match",
"property": "custom_model_data",
"value": "city_under_siege6",
"index": 0
}
}
]
}
]
}
}
+22
View File
@@ -0,0 +1,22 @@
{
"format_version": 2,
"header": {
"name": "Friends CMP",
"description": "Friends CMP client assets for Bedrock/Geyser",
"uuid": "7db1c3b5-d7f3-4ff0-b1bc-12d51f90c08d",
"version": [1, 0, 0],
"min_engine_version": [1, 21, 0]
},
"modules": [
{
"description": "Friends CMP resource pack",
"type": "resources",
"uuid": "fa2dbac4-7c8a-4d70-a67c-0fbf6c8f24da",
"version": [1, 0, 0]
}
],
"metadata": {
"authors": ["FriendsMC"],
"url": "https://github.com/FriendsMC/Friends-CMP-2.0-Bedrock"
}
}
BIN
View File
Binary file not shown.

After

Width:  |  Height:  |  Size: 10 KiB

+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")
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
+75
View File
@@ -0,0 +1,75 @@
{
"format_version": "1.20.20",
"sound_definitions": {
"music_disc.interior_shop0": {
"category": "record",
"max_distance": 64,
"sounds": [
{
"name": "sounds/records/music_disc_interior_shop0",
"stream": true
}
]
},
"music_disc.pawn_shop1": {
"category": "record",
"max_distance": 64,
"sounds": [
{
"name": "sounds/records/music_disc_pawn_shop1",
"stream": true
}
]
},
"music_disc.food_mart2": {
"category": "record",
"max_distance": 64,
"sounds": [
{
"name": "sounds/records/music_disc_food_mart2",
"stream": true
}
]
},
"music_disc.hat_shop3": {
"category": "record",
"max_distance": 64,
"sounds": [
{
"name": "sounds/records/music_disc_hat_shop3",
"stream": true
}
]
},
"music_disc.clothing_shop4": {
"category": "record",
"max_distance": 64,
"sounds": [
{
"name": "sounds/records/music_disc_clothing_shop4",
"stream": true
}
]
},
"music_disc.jump_up5": {
"category": "record",
"max_distance": 64,
"sounds": [
{
"name": "sounds/records/music_disc_jump_up5",
"stream": true
}
]
},
"music_disc.city_under_siege6": {
"category": "record",
"max_distance": 64,
"sounds": [
{
"name": "sounds/records/music_disc_city_under_siege6",
"stream": true
}
]
}
}
}
Binary file not shown.

After

Width:  |  Height:  |  Size: 4.6 KiB

+13
View File
@@ -0,0 +1,13 @@
{
"resource_pack_name": "friends_cmp",
"texture_name": "atlas.items",
"texture_data": {
"friends_cmp:interior_shop0": {"textures": "textures/items/interior_shop0"},
"friends_cmp:pawn_shop1": {"textures": "textures/items/pawn_shop1"},
"friends_cmp:food_mart2": {"textures": "textures/items/food_mart2"},
"friends_cmp:hat_shop3": {"textures": "textures/items/hat_shop3"},
"friends_cmp:clothing_shop4": {"textures": "textures/items/clothing_shop4"},
"friends_cmp:jump_up5": {"textures": "textures/items/jump_up5"},
"friends_cmp:city_under_siege6": {"textures": "textures/items/city_under_siege6"}
}
}
Binary file not shown.

After

Width:  |  Height:  |  Size: 265 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 268 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 268 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 268 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 268 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 265 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 268 B