From 522d40d7b27ef398d2d9c379cbf35db7aa5cd17b Mon Sep 17 00:00:00 2001 From: unimatrixgit <95320811+unimatrixgit@users.noreply.github.com> Date: Sat, 5 Dec 2026 17:09:18 +0100 Subject: [PATCH 1/2] Add network Ender Chest and double Shulker Shell loot pack --- .../minecraft/loot_table/blocks/ender_chest.json | 11 +++++++++++ .../minecraft/loot_table/entities/shulker.json | 16 ++++++++++++++++ DuneTerrain/network-loot-datapack/pack.mcmeta | 7 +++++++ 3 files changed, 34 insertions(+) create mode 100644 DuneTerrain/network-loot-datapack/data/minecraft/loot_table/blocks/ender_chest.json create mode 100644 DuneTerrain/network-loot-datapack/data/minecraft/loot_table/entities/shulker.json create mode 100644 DuneTerrain/network-loot-datapack/pack.mcmeta diff --git a/DuneTerrain/network-loot-datapack/data/minecraft/loot_table/blocks/ender_chest.json b/DuneTerrain/network-loot-datapack/data/minecraft/loot_table/blocks/ender_chest.json new file mode 100644 index 00000000..1d1894f8 --- /dev/null +++ b/DuneTerrain/network-loot-datapack/data/minecraft/loot_table/blocks/ender_chest.json @@ -0,0 +1,11 @@ +{ + "type": "minecraft:block", + "pools": [ + { + "rolls": 1, + "conditions": [{"condition": "minecraft:survives_explosion"}], + "entries": [{"type": "minecraft:item", "name": "minecraft:ender_chest"}] + } + ], + "random_sequence": "minecraft:blocks/ender_chest" +} diff --git a/DuneTerrain/network-loot-datapack/data/minecraft/loot_table/entities/shulker.json b/DuneTerrain/network-loot-datapack/data/minecraft/loot_table/entities/shulker.json new file mode 100644 index 00000000..950e08de --- /dev/null +++ b/DuneTerrain/network-loot-datapack/data/minecraft/loot_table/entities/shulker.json @@ -0,0 +1,16 @@ +{ + "type": "minecraft:entity", + "pools": [ + { + "rolls": 1, + "entries": [ + { + "type": "minecraft:item", + "name": "minecraft:shulker_shell", + "functions": [{"function": "minecraft:set_count", "count": 2}] + } + ] + } + ], + "random_sequence": "minecraft:entities/shulker" +} diff --git a/DuneTerrain/network-loot-datapack/pack.mcmeta b/DuneTerrain/network-loot-datapack/pack.mcmeta new file mode 100644 index 00000000..b8731fad --- /dev/null +++ b/DuneTerrain/network-loot-datapack/pack.mcmeta @@ -0,0 +1,7 @@ +{ + "pack": { + "description": "DuneRealms Ender Chest and Shulker Shell drops", + "min_format": [107, 1], + "max_format": [107, 1] + } +} -- 2.53.0 From 2f6b076b3040ebe4999e7b6852d213496d725b62 Mon Sep 17 00:00:00 2001 From: unimatrixgit <95320811+unimatrixgit@users.noreply.github.com> Date: Sat, 5 Dec 2026 17:34:31 +0100 Subject: [PATCH 2/2] Package reviewed native loot rules through the canonical build pipeline --- .forgejo/workflows/network-loot.yml | 45 +++++++++++++++++++++++ DuneTerrain/docs/network-loot-datapack.md | 26 +++++++++++++ tools/plugin_network_loot.py | 17 +++++++++ 3 files changed, 88 insertions(+) create mode 100644 .forgejo/workflows/network-loot.yml create mode 100644 DuneTerrain/docs/network-loot-datapack.md create mode 100644 tools/plugin_network_loot.py diff --git a/.forgejo/workflows/network-loot.yml b/.forgejo/workflows/network-loot.yml new file mode 100644 index 00000000..0e234b68 --- /dev/null +++ b/.forgejo/workflows/network-loot.yml @@ -0,0 +1,45 @@ +name: Network Native Loot Datapack +on: + workflow_dispatch: + push: + branches: ['fix/network-loot-release-*'] +jobs: + network-loot: + runs-on: dune-ci + steps: + - name: Check out exact revision + shell: bash + env: + REPO_TOKEN: ${{ secrets.GITHUB_TOKEN }} + run: | + set -euo pipefail + git init . + git -c http.extraheader="AUTHORIZATION: basic $(printf 'x-access-token:%s' "$REPO_TOKEN" | base64 -w0)" fetch --depth=1 https://www.dunerealms.com/git/unimatrix/plugins.git "$GITHUB_SHA" + git checkout --detach FETCH_HEAD + - name: Package exact reviewed loot files + shell: bash + run: | + set -euo pipefail + mkdir network-loot + python3 tools/plugin_network_loot.py DuneTerrain/network-loot-datapack network-loot/dunerealms-network-loot.zip + python3 - <<'PY' + import json, zipfile + from pathlib import Path + with zipfile.ZipFile('network-loot/dunerealms-network-loot.zip') as archive: + for name in archive.namelist(): + assert archive.read(name)==Path('DuneTerrain/network-loot-datapack',name).read_bytes() + chest=json.loads(archive.read('data/minecraft/loot_table/blocks/ender_chest.json')) + shell=json.loads(archive.read('data/minecraft/loot_table/entities/shulker.json')) + assert chest['pools'][0]['entries']==[{'type':'minecraft:item','name':'minecraft:ender_chest'}] + assert chest['pools'][0]['conditions']==[{'condition':'minecraft:survives_explosion'}] + assert shell['pools'][0]['entries'][0]['functions']==[{'function':'minecraft:set_count','count':2}] + PY + cp tools/{plugin_network_loot.py,plugin_wild_update.py} network-loot/ + cp DuneTerrain/docs/network-loot-datapack.md network-loot/ACTIVATION.md + printf '%s\n' "$GITHUB_SHA" > network-loot/SOURCE_COMMIT + (cd network-loot && sha256sum -- *.zip *.py ACTIVATION.md SOURCE_COMMIT > SHA256SUMS) + - uses: actions/upload-artifact@v3 + with: + name: DuneRealms-Network-Native-Loot + path: network-loot + if-no-files-found: error diff --git a/DuneTerrain/docs/network-loot-datapack.md b/DuneTerrain/docs/network-loot-datapack.md new file mode 100644 index 00000000..458ea61b --- /dev/null +++ b/DuneTerrain/docs/network-loot-datapack.md @@ -0,0 +1,26 @@ +# Native Ender Chest and Shulker Shell loot + +The pack changes only the two named vanilla loot tables. Normal survival mining +with the required tool returns one Ender Chest without requiring Silk Touch; +native creative/protection checks still own block breaking. Registered custom +DuneChest storage retains its separate existing handler and original item data. +Each shulker drops two shells. No quest, account, XP or money state is changed. + +Target: the retained Paper 26.2.135 data format 107.1. The source definitions were +exercised on that exact native runtime in a disposable world. Future Paper +upgrades require their own pack compatibility and native loot checks. + +Install one copy in each backend's actual primary `level-name` world datapacks +directory. It governs that server's dimensions through the shared loot manager. +Before installation, inspect every enabled pack and any plugin handlers for +conflicting overrides. Preserve existing packs and their priorities. + +Activate only at an approved clean server restart. Do **not** use Bukkit reload +or `minecraft:reload` on the current production stack: the latter replaces the +native RecipeManager, while retained JARVIS recipe/origin registrations listen +to ServerLoadEvent. A successful vanilla-only loot reload is insufficient proof +that the network's custom recipes survive. + +Verify exact canonical source/checksums, pack discovery/enabled state, clean +startup, and preservation of the retained recipes and unrelated files. Do not +spawn live test items or perform real banking/quest transactions as a check. diff --git a/tools/plugin_network_loot.py b/tools/plugin_network_loot.py new file mode 100644 index 00000000..d225d0da --- /dev/null +++ b/tools/plugin_network_loot.py @@ -0,0 +1,17 @@ +"""Package only the reviewed native loot definitions; never edits a game world.""" +import argparse +import json +from pathlib import Path +from plugin_wild_update import write_archive + +FILES={'pack.mcmeta','data/minecraft/loot_table/blocks/ender_chest.json','data/minecraft/loot_table/entities/shulker.json'} + +def build(root,output): + actual={p.relative_to(root).as_posix() for p in root.rglob('*') if p.is_file()} + if actual!=FILES or any(p.is_symlink() for p in root.rglob('*')):raise ValueError('Unexpected loot pack files') + entries={name:(root/name).read_bytes() for name in sorted(FILES)} + for data in entries.values():json.loads(data) + with output.open('xb') as stream:stream.write(write_archive(entries)) + +if __name__=='__main__': + p=argparse.ArgumentParser(description=__doc__);p.add_argument('root',type=Path);p.add_argument('output',type=Path);build(**vars(p.parse_args())) -- 2.53.0