From c03b42c08f2e669ccee4253d8dd0e33863d58ae9 Mon Sep 17 00:00:00 2001 From: BluePsychoRanger Date: Thu, 21 Nov 2024 23:35:49 -0800 Subject: [PATCH] feat: generate datapack overlays --- TODO.md | 5 + beet_observer/data_pack.py | 167 ++++++++++++++++++ beet_observer/plugin.py | 43 ++++- beet_observer/resource_pack.py | 5 + examples/nested_overlay1/beet.yaml | 12 ++ .../proc/data/demo/function/demo.mcfunction | 1 + .../proc/data/demo/function/foo.mcfunction | 1 + .../nested_overlay1/nested/proc/pack.mcmeta | 6 + .../src/data/demo/function/demo.mcfunction | 1 + .../src/data/demo/function/foo.mcfunction | 1 + examples/nested_overlay2/beet.yaml | 12 ++ .../proc/data/demo/function/demo.mcfunction | 1 + .../proc/data/demo/function/foo.mcfunction | 1 + .../nested/nested/proc/pack.mcmeta | 6 + .../src/data/demo/function/demo.mcfunction | 1 + .../src/data/demo/function/foo.mcfunction | 1 + examples/overlay_adds_function1/beet.yaml | 12 ++ .../proc/data/demo/function/demo.mcfunction | 1 + .../proc/data/demo/function/foo.mcfunction | 1 + .../overlay_adds_function1/proc/pack.mcmeta | 6 + .../src/data/demo/function/foo.mcfunction | 1 + examples/overlay_adds_function2/beet.yaml | 12 ++ .../proc/data/demo/function/demo.mcfunction | 1 + .../proc/data/demo/function/demo2.mcfunction | 1 + .../proc/data/demo/function/demo3.mcfunction | 1 + .../proc/data/demo/function/demo4.mcfunction | 1 + .../proc/data/demo/function/demo5.mcfunction | 1 + .../proc/data/demo/function/demo6.mcfunction | 1 + .../proc/data/demo/function/foo.mcfunction | 1 + .../proc/data/demo/function/foo2.mcfunction | 1 + .../proc/data/demo/function/foo3.mcfunction | 1 + .../proc/data/demo/function/foo4.mcfunction | 1 + .../overlay_adds_function2/proc/pack.mcmeta | 6 + .../src/data/demo/function/foo.mcfunction | 1 + .../src/data/demo/function/foo2.mcfunction | 1 + .../src/data/demo/function/foo3.mcfunction | 1 + .../src/data/demo/function/foo4.mcfunction | 1 + examples/overlay_adds_function3/beet.yaml | 12 ++ .../proc/data/demo/function/demo.mcfunction | 1 + .../proc/data/demo/function/demo2.mcfunction | 1 + .../proc/data/demo/function/demo3.mcfunction | 1 + .../proc/data/demo/function/foo.mcfunction | 1 + .../proc/data/demo/function/foo2.mcfunction | 1 + .../demo/function/nested/demo4.mcfunction | 1 + .../demo/function/nested/demo5.mcfunction | 1 + .../demo/function/nested/demo6.mcfunction | 1 + .../data/demo/function/nested/foo3.mcfunction | 1 + .../data/demo/function/nested/foo4.mcfunction | 1 + .../overlay_adds_function3/proc/pack.mcmeta | 6 + .../src/data/demo/function/foo.mcfunction | 1 + .../src/data/demo/function/foo2.mcfunction | 1 + .../data/demo/function/nested/foo3.mcfunction | 1 + .../data/demo/function/nested/foo4.mcfunction | 1 + examples/overlay_adds_loot_table1/beet.yaml | 12 ++ .../proc/data/demo/loot_table/demo.json | 19 ++ .../proc/data/demo/loot_table/foo.json | 19 ++ .../overlay_adds_loot_table1/proc/pack.mcmeta | 6 + .../src/data/demo/loot_table/foo.json | 19 ++ examples/overlay_deletes_function1/beet.yaml | 13 ++ .../proc/data/demo/function/foo.mcfunction | 1 + .../proc/pack.mcmeta | 6 + .../src/data/demo/function/demo.mcfunction | 1 + .../src/data/demo/function/foo.mcfunction | 1 + examples/overlay_deletes_function2/beet.yaml | 13 ++ .../proc/data/demo/function/foo.mcfunction | 1 + .../proc/data/demo/function/foo2.mcfunction | 1 + .../proc/data/demo/function/foo3.mcfunction | 1 + .../proc/data/demo/function/foo4.mcfunction | 1 + .../proc/pack.mcmeta | 6 + .../src/data/demo/function/demo.mcfunction | 1 + .../src/data/demo/function/demo2.mcfunction | 1 + .../src/data/demo/function/demo3.mcfunction | 1 + .../src/data/demo/function/demo4.mcfunction | 1 + .../src/data/demo/function/demo5.mcfunction | 1 + .../src/data/demo/function/demo6.mcfunction | 1 + .../src/data/demo/function/foo.mcfunction | 1 + .../src/data/demo/function/foo2.mcfunction | 1 + .../src/data/demo/function/foo3.mcfunction | 1 + .../src/data/demo/function/foo4.mcfunction | 1 + examples/overlay_deletes_function3/beet.yaml | 13 ++ .../proc/data/demo/function/foo.mcfunction | 1 + .../proc/data/demo/function/foo2.mcfunction | 1 + .../data/demo/function/nested/foo3.mcfunction | 1 + .../data/demo/function/nested/foo4.mcfunction | 1 + .../proc/pack.mcmeta | 6 + .../src/data/demo/function/demo.mcfunction | 1 + .../src/data/demo/function/demo2.mcfunction | 1 + .../src/data/demo/function/demo3.mcfunction | 1 + .../src/data/demo/function/foo.mcfunction | 1 + .../src/data/demo/function/foo2.mcfunction | 1 + .../demo/function/nested/demo4.mcfunction | 1 + .../demo/function/nested/demo5.mcfunction | 1 + .../demo/function/nested/demo6.mcfunction | 1 + .../data/demo/function/nested/foo3.mcfunction | 1 + .../data/demo/function/nested/foo4.mcfunction | 1 + .../overlay_deletes_loot_table1/beet.yaml | 13 ++ .../proc/data/demo/loot_table/foo.json | 19 ++ .../proc/pack.mcmeta | 6 + .../src/data/demo/loot_table/demo.json | 19 ++ .../src/data/demo/loot_table/foo.json | 19 ++ examples/overlay_mixed_function1/beet.yaml | 13 ++ .../data/demo/function/demo_add.mcfunction | 1 + .../demo/function/demo_replace.mcfunction | 1 + .../proc/data/demo/function/foo.mcfunction | 1 + .../overlay_mixed_function1/proc/pack.mcmeta | 6 + .../data/demo/function/demo_delete.mcfunction | 1 + .../demo/function/demo_replace.mcfunction | 1 + .../src/data/demo/function/foo.mcfunction | 1 + examples/overlay_replaces_function1/beet.yaml | 12 ++ .../proc/data/demo/function/demo.mcfunction | 1 + .../proc/data/demo/function/foo.mcfunction | 1 + .../proc/pack.mcmeta | 6 + .../src/data/demo/function/demo.mcfunction | 1 + .../src/data/demo/function/foo.mcfunction | 1 + examples/overlay_replaces_function2/beet.yaml | 12 ++ .../proc/data/demo/function/demo.mcfunction | 1 + .../proc/data/demo/function/demo2.mcfunction | 1 + .../proc/data/demo/function/demo3.mcfunction | 1 + .../proc/data/demo/function/demo4.mcfunction | 1 + .../proc/data/demo/function/demo5.mcfunction | 1 + .../proc/data/demo/function/demo6.mcfunction | 1 + .../proc/data/demo/function/foo.mcfunction | 1 + .../proc/data/demo/function/foo2.mcfunction | 1 + .../proc/data/demo/function/foo3.mcfunction | 1 + .../proc/data/demo/function/foo4.mcfunction | 1 + .../proc/pack.mcmeta | 6 + .../src/data/demo/function/demo.mcfunction | 1 + .../src/data/demo/function/demo2.mcfunction | 1 + .../src/data/demo/function/demo3.mcfunction | 1 + .../src/data/demo/function/demo4.mcfunction | 1 + .../src/data/demo/function/demo5.mcfunction | 1 + .../src/data/demo/function/demo6.mcfunction | 1 + .../src/data/demo/function/foo.mcfunction | 1 + .../src/data/demo/function/foo2.mcfunction | 1 + .../src/data/demo/function/foo3.mcfunction | 1 + .../src/data/demo/function/foo4.mcfunction | 1 + examples/overlay_replaces_function3/beet.yaml | 12 ++ .../proc/data/demo/function/demo.mcfunction | 1 + .../proc/data/demo/function/demo2.mcfunction | 1 + .../proc/data/demo/function/demo3.mcfunction | 1 + .../proc/data/demo/function/foo.mcfunction | 1 + .../proc/data/demo/function/foo2.mcfunction | 1 + .../demo/function/nested/demo4.mcfunction | 1 + .../demo/function/nested/demo5.mcfunction | 1 + .../demo/function/nested/demo6.mcfunction | 1 + .../data/demo/function/nested/foo3.mcfunction | 1 + .../data/demo/function/nested/foo4.mcfunction | 1 + .../proc/pack.mcmeta | 6 + .../src/data/demo/function/demo.mcfunction | 1 + .../src/data/demo/function/demo2.mcfunction | 1 + .../src/data/demo/function/demo3.mcfunction | 1 + .../src/data/demo/function/foo.mcfunction | 1 + .../src/data/demo/function/foo2.mcfunction | 1 + .../demo/function/nested/demo4.mcfunction | 1 + .../demo/function/nested/demo5.mcfunction | 1 + .../demo/function/nested/demo6.mcfunction | 1 + .../data/demo/function/nested/foo3.mcfunction | 1 + .../data/demo/function/nested/foo4.mcfunction | 1 + .../overlay_replaces_loot_table1/beet.yaml | 12 ++ .../proc/data/demo/loot_table/demo.json | 19 ++ .../proc/data/demo/loot_table/foo.json | 19 ++ .../proc/pack.mcmeta | 6 + .../src/data/demo/loot_table/demo.json | 19 ++ .../src/data/demo/loot_table/foo.json | 19 ++ examples/zipped_overlay1/beet.yaml | 12 ++ examples/zipped_overlay1/proc.zip | Bin 0 -> 1251 bytes .../src/data/demo/function/demo.mcfunction | 1 + .../src/data/demo/function/foo.mcfunction | 1 + examples/zipped_overlay2/beet.yaml | 12 ++ examples/zipped_overlay2/nested/proc.zip | Bin 0 -> 1251 bytes .../src/data/demo/function/demo.mcfunction | 1 + .../src/data/demo/function/foo.mcfunction | 1 + examples/zipped_overlay3/beet.yaml | 12 ++ .../zipped_overlay3/nested/nested/proc.zip | Bin 0 -> 1251 bytes .../src/data/demo/function/demo.mcfunction | 1 + .../src/data/demo/function/foo.mcfunction | 1 + ...examples__build_nested_overlay1__0.pack.md | 54 ++++++ ...examples__build_nested_overlay2__0.pack.md | 54 ++++++ ...s__build_overlay_adds_function1__0.pack.md | 48 +++++ ...s__build_overlay_adds_function2__0.pack.md | 96 ++++++++++ ...s__build_overlay_adds_function3__0.pack.md | 96 ++++++++++ ..._build_overlay_adds_loot_table1__0.pack.md | 84 +++++++++ ...build_overlay_deletes_function1__0.pack.md | 48 +++++ ...build_overlay_deletes_function2__0.pack.md | 96 ++++++++++ ...build_overlay_deletes_function3__0.pack.md | 96 ++++++++++ ...ild_overlay_deletes_loot_table1__0.pack.md | 84 +++++++++ ...__build_overlay_mixed_function1__0.pack.md | 76 ++++++++ ...uild_overlay_replaces_function1__0.pack.md | 54 ++++++ ...uild_overlay_replaces_function2__0.pack.md | 132 ++++++++++++++ ...uild_overlay_replaces_function3__0.pack.md | 132 ++++++++++++++ ...ld_overlay_replaces_loot_table1__0.pack.md | 108 +++++++++++ ...examples__build_zipped_overlay1__0.pack.md | 54 ++++++ ...examples__build_zipped_overlay2__0.pack.md | 54 ++++++ ...examples__build_zipped_overlay3__0.pack.md | 54 ++++++ tests/test_examples.py | 3 +- 195 files changed, 2267 insertions(+), 3 deletions(-) create mode 100644 TODO.md create mode 100644 beet_observer/data_pack.py create mode 100644 beet_observer/resource_pack.py create mode 100644 examples/nested_overlay1/beet.yaml create mode 100644 examples/nested_overlay1/nested/proc/data/demo/function/demo.mcfunction create mode 100644 examples/nested_overlay1/nested/proc/data/demo/function/foo.mcfunction create mode 100644 examples/nested_overlay1/nested/proc/pack.mcmeta create mode 100644 examples/nested_overlay1/src/data/demo/function/demo.mcfunction create mode 100644 examples/nested_overlay1/src/data/demo/function/foo.mcfunction create mode 100644 examples/nested_overlay2/beet.yaml create mode 100644 examples/nested_overlay2/nested/nested/proc/data/demo/function/demo.mcfunction create mode 100644 examples/nested_overlay2/nested/nested/proc/data/demo/function/foo.mcfunction create mode 100644 examples/nested_overlay2/nested/nested/proc/pack.mcmeta create mode 100644 examples/nested_overlay2/src/data/demo/function/demo.mcfunction create mode 100644 examples/nested_overlay2/src/data/demo/function/foo.mcfunction create mode 100644 examples/overlay_adds_function1/beet.yaml create mode 100644 examples/overlay_adds_function1/proc/data/demo/function/demo.mcfunction create mode 100644 examples/overlay_adds_function1/proc/data/demo/function/foo.mcfunction create mode 100644 examples/overlay_adds_function1/proc/pack.mcmeta create mode 100644 examples/overlay_adds_function1/src/data/demo/function/foo.mcfunction create mode 100644 examples/overlay_adds_function2/beet.yaml create mode 100644 examples/overlay_adds_function2/proc/data/demo/function/demo.mcfunction create mode 100644 examples/overlay_adds_function2/proc/data/demo/function/demo2.mcfunction create mode 100644 examples/overlay_adds_function2/proc/data/demo/function/demo3.mcfunction create mode 100644 examples/overlay_adds_function2/proc/data/demo/function/demo4.mcfunction create mode 100644 examples/overlay_adds_function2/proc/data/demo/function/demo5.mcfunction create mode 100644 examples/overlay_adds_function2/proc/data/demo/function/demo6.mcfunction create mode 100644 examples/overlay_adds_function2/proc/data/demo/function/foo.mcfunction create mode 100644 examples/overlay_adds_function2/proc/data/demo/function/foo2.mcfunction create mode 100644 examples/overlay_adds_function2/proc/data/demo/function/foo3.mcfunction create mode 100644 examples/overlay_adds_function2/proc/data/demo/function/foo4.mcfunction create mode 100644 examples/overlay_adds_function2/proc/pack.mcmeta create mode 100644 examples/overlay_adds_function2/src/data/demo/function/foo.mcfunction create mode 100644 examples/overlay_adds_function2/src/data/demo/function/foo2.mcfunction create mode 100644 examples/overlay_adds_function2/src/data/demo/function/foo3.mcfunction create mode 100644 examples/overlay_adds_function2/src/data/demo/function/foo4.mcfunction create mode 100644 examples/overlay_adds_function3/beet.yaml create mode 100644 examples/overlay_adds_function3/proc/data/demo/function/demo.mcfunction create mode 100644 examples/overlay_adds_function3/proc/data/demo/function/demo2.mcfunction create mode 100644 examples/overlay_adds_function3/proc/data/demo/function/demo3.mcfunction create mode 100644 examples/overlay_adds_function3/proc/data/demo/function/foo.mcfunction create mode 100644 examples/overlay_adds_function3/proc/data/demo/function/foo2.mcfunction create mode 100644 examples/overlay_adds_function3/proc/data/demo/function/nested/demo4.mcfunction create mode 100644 examples/overlay_adds_function3/proc/data/demo/function/nested/demo5.mcfunction create mode 100644 examples/overlay_adds_function3/proc/data/demo/function/nested/demo6.mcfunction create mode 100644 examples/overlay_adds_function3/proc/data/demo/function/nested/foo3.mcfunction create mode 100644 examples/overlay_adds_function3/proc/data/demo/function/nested/foo4.mcfunction create mode 100644 examples/overlay_adds_function3/proc/pack.mcmeta create mode 100644 examples/overlay_adds_function3/src/data/demo/function/foo.mcfunction create mode 100644 examples/overlay_adds_function3/src/data/demo/function/foo2.mcfunction create mode 100644 examples/overlay_adds_function3/src/data/demo/function/nested/foo3.mcfunction create mode 100644 examples/overlay_adds_function3/src/data/demo/function/nested/foo4.mcfunction create mode 100644 examples/overlay_adds_loot_table1/beet.yaml create mode 100644 examples/overlay_adds_loot_table1/proc/data/demo/loot_table/demo.json create mode 100644 examples/overlay_adds_loot_table1/proc/data/demo/loot_table/foo.json create mode 100644 examples/overlay_adds_loot_table1/proc/pack.mcmeta create mode 100644 examples/overlay_adds_loot_table1/src/data/demo/loot_table/foo.json create mode 100644 examples/overlay_deletes_function1/beet.yaml create mode 100644 examples/overlay_deletes_function1/proc/data/demo/function/foo.mcfunction create mode 100644 examples/overlay_deletes_function1/proc/pack.mcmeta create mode 100644 examples/overlay_deletes_function1/src/data/demo/function/demo.mcfunction create mode 100644 examples/overlay_deletes_function1/src/data/demo/function/foo.mcfunction create mode 100644 examples/overlay_deletes_function2/beet.yaml create mode 100644 examples/overlay_deletes_function2/proc/data/demo/function/foo.mcfunction create mode 100644 examples/overlay_deletes_function2/proc/data/demo/function/foo2.mcfunction create mode 100644 examples/overlay_deletes_function2/proc/data/demo/function/foo3.mcfunction create mode 100644 examples/overlay_deletes_function2/proc/data/demo/function/foo4.mcfunction create mode 100644 examples/overlay_deletes_function2/proc/pack.mcmeta create mode 100644 examples/overlay_deletes_function2/src/data/demo/function/demo.mcfunction create mode 100644 examples/overlay_deletes_function2/src/data/demo/function/demo2.mcfunction create mode 100644 examples/overlay_deletes_function2/src/data/demo/function/demo3.mcfunction create mode 100644 examples/overlay_deletes_function2/src/data/demo/function/demo4.mcfunction create mode 100644 examples/overlay_deletes_function2/src/data/demo/function/demo5.mcfunction create mode 100644 examples/overlay_deletes_function2/src/data/demo/function/demo6.mcfunction create mode 100644 examples/overlay_deletes_function2/src/data/demo/function/foo.mcfunction create mode 100644 examples/overlay_deletes_function2/src/data/demo/function/foo2.mcfunction create mode 100644 examples/overlay_deletes_function2/src/data/demo/function/foo3.mcfunction create mode 100644 examples/overlay_deletes_function2/src/data/demo/function/foo4.mcfunction create mode 100644 examples/overlay_deletes_function3/beet.yaml create mode 100644 examples/overlay_deletes_function3/proc/data/demo/function/foo.mcfunction create mode 100644 examples/overlay_deletes_function3/proc/data/demo/function/foo2.mcfunction create mode 100644 examples/overlay_deletes_function3/proc/data/demo/function/nested/foo3.mcfunction create mode 100644 examples/overlay_deletes_function3/proc/data/demo/function/nested/foo4.mcfunction create mode 100644 examples/overlay_deletes_function3/proc/pack.mcmeta create mode 100644 examples/overlay_deletes_function3/src/data/demo/function/demo.mcfunction create mode 100644 examples/overlay_deletes_function3/src/data/demo/function/demo2.mcfunction create mode 100644 examples/overlay_deletes_function3/src/data/demo/function/demo3.mcfunction create mode 100644 examples/overlay_deletes_function3/src/data/demo/function/foo.mcfunction create mode 100644 examples/overlay_deletes_function3/src/data/demo/function/foo2.mcfunction create mode 100644 examples/overlay_deletes_function3/src/data/demo/function/nested/demo4.mcfunction create mode 100644 examples/overlay_deletes_function3/src/data/demo/function/nested/demo5.mcfunction create mode 100644 examples/overlay_deletes_function3/src/data/demo/function/nested/demo6.mcfunction create mode 100644 examples/overlay_deletes_function3/src/data/demo/function/nested/foo3.mcfunction create mode 100644 examples/overlay_deletes_function3/src/data/demo/function/nested/foo4.mcfunction create mode 100644 examples/overlay_deletes_loot_table1/beet.yaml create mode 100644 examples/overlay_deletes_loot_table1/proc/data/demo/loot_table/foo.json create mode 100644 examples/overlay_deletes_loot_table1/proc/pack.mcmeta create mode 100644 examples/overlay_deletes_loot_table1/src/data/demo/loot_table/demo.json create mode 100644 examples/overlay_deletes_loot_table1/src/data/demo/loot_table/foo.json create mode 100644 examples/overlay_mixed_function1/beet.yaml create mode 100644 examples/overlay_mixed_function1/proc/data/demo/function/demo_add.mcfunction create mode 100644 examples/overlay_mixed_function1/proc/data/demo/function/demo_replace.mcfunction create mode 100644 examples/overlay_mixed_function1/proc/data/demo/function/foo.mcfunction create mode 100644 examples/overlay_mixed_function1/proc/pack.mcmeta create mode 100644 examples/overlay_mixed_function1/src/data/demo/function/demo_delete.mcfunction create mode 100644 examples/overlay_mixed_function1/src/data/demo/function/demo_replace.mcfunction create mode 100644 examples/overlay_mixed_function1/src/data/demo/function/foo.mcfunction create mode 100644 examples/overlay_replaces_function1/beet.yaml create mode 100644 examples/overlay_replaces_function1/proc/data/demo/function/demo.mcfunction create mode 100644 examples/overlay_replaces_function1/proc/data/demo/function/foo.mcfunction create mode 100644 examples/overlay_replaces_function1/proc/pack.mcmeta create mode 100644 examples/overlay_replaces_function1/src/data/demo/function/demo.mcfunction create mode 100644 examples/overlay_replaces_function1/src/data/demo/function/foo.mcfunction create mode 100644 examples/overlay_replaces_function2/beet.yaml create mode 100644 examples/overlay_replaces_function2/proc/data/demo/function/demo.mcfunction create mode 100644 examples/overlay_replaces_function2/proc/data/demo/function/demo2.mcfunction create mode 100644 examples/overlay_replaces_function2/proc/data/demo/function/demo3.mcfunction create mode 100644 examples/overlay_replaces_function2/proc/data/demo/function/demo4.mcfunction create mode 100644 examples/overlay_replaces_function2/proc/data/demo/function/demo5.mcfunction create mode 100644 examples/overlay_replaces_function2/proc/data/demo/function/demo6.mcfunction create mode 100644 examples/overlay_replaces_function2/proc/data/demo/function/foo.mcfunction create mode 100644 examples/overlay_replaces_function2/proc/data/demo/function/foo2.mcfunction create mode 100644 examples/overlay_replaces_function2/proc/data/demo/function/foo3.mcfunction create mode 100644 examples/overlay_replaces_function2/proc/data/demo/function/foo4.mcfunction create mode 100644 examples/overlay_replaces_function2/proc/pack.mcmeta create mode 100644 examples/overlay_replaces_function2/src/data/demo/function/demo.mcfunction create mode 100644 examples/overlay_replaces_function2/src/data/demo/function/demo2.mcfunction create mode 100644 examples/overlay_replaces_function2/src/data/demo/function/demo3.mcfunction create mode 100644 examples/overlay_replaces_function2/src/data/demo/function/demo4.mcfunction create mode 100644 examples/overlay_replaces_function2/src/data/demo/function/demo5.mcfunction create mode 100644 examples/overlay_replaces_function2/src/data/demo/function/demo6.mcfunction create mode 100644 examples/overlay_replaces_function2/src/data/demo/function/foo.mcfunction create mode 100644 examples/overlay_replaces_function2/src/data/demo/function/foo2.mcfunction create mode 100644 examples/overlay_replaces_function2/src/data/demo/function/foo3.mcfunction create mode 100644 examples/overlay_replaces_function2/src/data/demo/function/foo4.mcfunction create mode 100644 examples/overlay_replaces_function3/beet.yaml create mode 100644 examples/overlay_replaces_function3/proc/data/demo/function/demo.mcfunction create mode 100644 examples/overlay_replaces_function3/proc/data/demo/function/demo2.mcfunction create mode 100644 examples/overlay_replaces_function3/proc/data/demo/function/demo3.mcfunction create mode 100644 examples/overlay_replaces_function3/proc/data/demo/function/foo.mcfunction create mode 100644 examples/overlay_replaces_function3/proc/data/demo/function/foo2.mcfunction create mode 100644 examples/overlay_replaces_function3/proc/data/demo/function/nested/demo4.mcfunction create mode 100644 examples/overlay_replaces_function3/proc/data/demo/function/nested/demo5.mcfunction create mode 100644 examples/overlay_replaces_function3/proc/data/demo/function/nested/demo6.mcfunction create mode 100644 examples/overlay_replaces_function3/proc/data/demo/function/nested/foo3.mcfunction create mode 100644 examples/overlay_replaces_function3/proc/data/demo/function/nested/foo4.mcfunction create mode 100644 examples/overlay_replaces_function3/proc/pack.mcmeta create mode 100644 examples/overlay_replaces_function3/src/data/demo/function/demo.mcfunction create mode 100644 examples/overlay_replaces_function3/src/data/demo/function/demo2.mcfunction create mode 100644 examples/overlay_replaces_function3/src/data/demo/function/demo3.mcfunction create mode 100644 examples/overlay_replaces_function3/src/data/demo/function/foo.mcfunction create mode 100644 examples/overlay_replaces_function3/src/data/demo/function/foo2.mcfunction create mode 100644 examples/overlay_replaces_function3/src/data/demo/function/nested/demo4.mcfunction create mode 100644 examples/overlay_replaces_function3/src/data/demo/function/nested/demo5.mcfunction create mode 100644 examples/overlay_replaces_function3/src/data/demo/function/nested/demo6.mcfunction create mode 100644 examples/overlay_replaces_function3/src/data/demo/function/nested/foo3.mcfunction create mode 100644 examples/overlay_replaces_function3/src/data/demo/function/nested/foo4.mcfunction create mode 100644 examples/overlay_replaces_loot_table1/beet.yaml create mode 100644 examples/overlay_replaces_loot_table1/proc/data/demo/loot_table/demo.json create mode 100644 examples/overlay_replaces_loot_table1/proc/data/demo/loot_table/foo.json create mode 100644 examples/overlay_replaces_loot_table1/proc/pack.mcmeta create mode 100644 examples/overlay_replaces_loot_table1/src/data/demo/loot_table/demo.json create mode 100644 examples/overlay_replaces_loot_table1/src/data/demo/loot_table/foo.json create mode 100644 examples/zipped_overlay1/beet.yaml create mode 100644 examples/zipped_overlay1/proc.zip create mode 100644 examples/zipped_overlay1/src/data/demo/function/demo.mcfunction create mode 100644 examples/zipped_overlay1/src/data/demo/function/foo.mcfunction create mode 100644 examples/zipped_overlay2/beet.yaml create mode 100644 examples/zipped_overlay2/nested/proc.zip create mode 100644 examples/zipped_overlay2/src/data/demo/function/demo.mcfunction create mode 100644 examples/zipped_overlay2/src/data/demo/function/foo.mcfunction create mode 100644 examples/zipped_overlay3/beet.yaml create mode 100644 examples/zipped_overlay3/nested/nested/proc.zip create mode 100644 examples/zipped_overlay3/src/data/demo/function/demo.mcfunction create mode 100644 examples/zipped_overlay3/src/data/demo/function/foo.mcfunction create mode 100644 tests/snapshots/examples__build_nested_overlay1__0.pack.md create mode 100644 tests/snapshots/examples__build_nested_overlay2__0.pack.md create mode 100644 tests/snapshots/examples__build_overlay_adds_function1__0.pack.md create mode 100644 tests/snapshots/examples__build_overlay_adds_function2__0.pack.md create mode 100644 tests/snapshots/examples__build_overlay_adds_function3__0.pack.md create mode 100644 tests/snapshots/examples__build_overlay_adds_loot_table1__0.pack.md create mode 100644 tests/snapshots/examples__build_overlay_deletes_function1__0.pack.md create mode 100644 tests/snapshots/examples__build_overlay_deletes_function2__0.pack.md create mode 100644 tests/snapshots/examples__build_overlay_deletes_function3__0.pack.md create mode 100644 tests/snapshots/examples__build_overlay_deletes_loot_table1__0.pack.md create mode 100644 tests/snapshots/examples__build_overlay_mixed_function1__0.pack.md create mode 100644 tests/snapshots/examples__build_overlay_replaces_function1__0.pack.md create mode 100644 tests/snapshots/examples__build_overlay_replaces_function2__0.pack.md create mode 100644 tests/snapshots/examples__build_overlay_replaces_function3__0.pack.md create mode 100644 tests/snapshots/examples__build_overlay_replaces_loot_table1__0.pack.md create mode 100644 tests/snapshots/examples__build_zipped_overlay1__0.pack.md create mode 100644 tests/snapshots/examples__build_zipped_overlay2__0.pack.md create mode 100644 tests/snapshots/examples__build_zipped_overlay3__0.pack.md diff --git a/TODO.md b/TODO.md new file mode 100644 index 0000000..7a024bf --- /dev/null +++ b/TODO.md @@ -0,0 +1,5 @@ +## TODO: +- generate resource pack overlays +- add worldgen support +- merge nested overlays (overlays in the target pack) +- create more tests diff --git a/beet_observer/data_pack.py b/beet_observer/data_pack.py new file mode 100644 index 0000000..7c07822 --- /dev/null +++ b/beet_observer/data_pack.py @@ -0,0 +1,167 @@ +from typing import Any + +from beet import Context, NamespaceProxy + + +def gen_dp_overlays(ctx: Context, ctx_overlay: Context, overlay_dir: str) -> None: + """ + Generates overlays between two datapacks. + + Keyword arguments:
+ `ctx` -- the build context
+ `ctx_overlay` -- the overlay context
+ `overlay_dir` -- the directory of the overlay
+ """ + # create list of all datapack file types + file_types: list[tuple[NamespaceProxy[Any], NamespaceProxy[Any]]] = [ + (ctx.data.advancements, ctx_overlay.data.advancements), + (ctx.data.functions, ctx_overlay.data.functions), + (ctx.data.item_modifiers, ctx_overlay.data.item_modifiers), + (ctx.data.loot_tables, ctx_overlay.data.loot_tables), + (ctx.data.predicates, ctx_overlay.data.predicates), + (ctx.data.recipes, ctx_overlay.data.recipes), + (ctx.data.trim_pattern, ctx_overlay.data.trim_pattern), + (ctx.data.trim_material, ctx_overlay.data.trim_material), + (ctx.data.structures, ctx_overlay.data.structures), + (ctx.data.chat_type, ctx_overlay.data.chat_type), + (ctx.data.damage_type, ctx_overlay.data.damage_type), + (ctx.data.banner_patterns, ctx_overlay.data.banner_patterns), + (ctx.data.wolf_variants, ctx_overlay.data.wolf_variants), + (ctx.data.enchantments, ctx_overlay.data.enchantments), + (ctx.data.enchantment_providers, ctx_overlay.data.enchantment_providers), + (ctx.data.jukebox_songs, ctx_overlay.data.jukebox_songs), + (ctx.data.painting_variants, ctx_overlay.data.painting_variants), + (ctx.data.block_tags, ctx_overlay.data.block_tags), + (ctx.data.entity_type_tags, ctx_overlay.data.entity_type_tags), + (ctx.data.fluid_tags, ctx_overlay.data.fluid_tags), + (ctx.data.function_tags, ctx_overlay.data.function_tags), + (ctx.data.game_event_tags, ctx_overlay.data.game_event_tags), + (ctx.data.item_tags, ctx_overlay.data.item_tags), + (ctx.data.chat_type_tags, ctx_overlay.data.chat_type_tags), + (ctx.data.damage_type_tags, ctx_overlay.data.damage_type_tags), + (ctx.data.banner_pattern_tags, ctx_overlay.data.banner_pattern_tags), + (ctx.data.cat_variant_tags, ctx_overlay.data.cat_variant_tags), + (ctx.data.enchantment_tags, ctx_overlay.data.enchantment_tags), + (ctx.data.instrument_tags, ctx_overlay.data.instrument_tags), + (ctx.data.painting_variant_tags, ctx_overlay.data.painting_variant_tags), + ( + ctx.data.point_of_interest_type_tags, + ctx_overlay.data.point_of_interest_type_tags, + ), + ] + # for each file type, check for required overlays + for registry, registry_overlay in file_types: + check_registry(ctx, ctx_overlay, overlay_dir, registry, registry_overlay) + + # get pack.mcmeta overlay entries + mcmeta: dict[str, dict[str, list[dict[str, Any]]]] = ctx.data.mcmeta.data.copy() + if "overlays" not in mcmeta: + mcmeta["overlays"] = {} + if "entries" not in mcmeta["overlays"]: + mcmeta["overlays"]["entries"] = [] + entries = mcmeta["overlays"]["entries"] + + # add overlays to pack.mcmeta + for overlay in ctx.data.overlays: + # check if it's the top-level overlay + if overlay == ctx.meta["observer"]["default_dir_dp"]: + # delete pack.mcmeta from overlay (requuired for tests) + default_dir = ctx.meta["observer"]["default_dir_dp"] + if ctx.data.overlays[default_dir].mcmeta: + del ctx.data.overlays[default_dir].mcmeta + + # get pack format from build context + if "default_format" in ctx.meta["observer"]: + formats = ctx.meta["observer"]["default_format"] + else: + formats = ctx.data.mcmeta.data["pack"]["pack_format"] + else: + # get formats from overlay pack + if "supported_formats" in ctx_overlay.data.mcmeta.data["pack"]: + formats = ctx_overlay.data.mcmeta.data["pack"]["supported_formats"] + else: + formats = ctx_overlay.data.mcmeta.data["pack"]["pack_format"] + + # update pack.mcmeta overlay entries + entries.append( + { + "formats": formats, + "directory": overlay, + } + ) + + # save overlay entries in pack.mcmeta + ctx.data.mcmeta.data.update({"overlays": {"entries": entries}}) + + +def check_registry( + ctx: Context, + ctx_overlay: Context, + overlay_dir: str, + registry: NamespaceProxy[Any], + registry_overlay: NamespaceProxy[Any], +) -> None: + """ + Generates overlays for each namespace proxy. + + Keyword arguments:
+ `ctx` -- the build context
+ `ctx_overlay` -- the overlay context
+ `overlay_dir` -- the directory of the overlay
+ `registry` -- the namespace proxy from the build context
+ `registry_overlay` -- the namespace proxy from the overlay context
+ """ + # check each file in the build pack + for name in list(registry): + if name in registry_overlay: + # exists in both, so check if an overlay is needed + gen_registry_overlay(ctx, overlay_dir, name, registry, registry_overlay) + else: + # exists only in overlay, so create a deletion overlay + gen_registry_overlay( + ctx, overlay_dir, name, registry, registry_overlay, "deletion" + ) + + # for all remaining files (of this type) in the overlay pack, add to build pack as an overlay + for name in list(registry_overlay): + gen_registry_overlay( + ctx, overlay_dir, name, registry, registry_overlay, "addition" + ) + + +def gen_registry_overlay( + ctx: Context, + overlay_dir: str, + name: str, + registry: NamespaceProxy[Any], + registry_overlay: NamespaceProxy[Any], + type: str = "", +) -> None: + """ + Checks if two functions have the same contents and generate an overlay if they don't. + + Keyword arguments:
+ `ctx` -- the build context
+ `overlay_dir` -- the directory of the generated overlay
+ `name` -- the name of the file
+ `registry` -- the namespace proxy from the build context
+ `registry_overlay` -- the namespace proxy from the overlay context
+ `type` -- either "deletion" or "addition" (default: `""`)
+ """ + if type == "deletion": + # move file from build pack to overlay in build pack + default_dir = ctx.meta["observer"]["default_dir_dp"] + ctx.data.overlays[default_dir][name] = registry[name] + del registry[name] + elif type == "addition": + # move function from overlay pack to overlay in build pack + ctx.data.overlays[overlay_dir][name] = registry_overlay[name] + else: + # check if files are exactly the same + if registry[name] != registry_overlay[name]: + # move function from overlay pack to overlay in build pack + ctx.data.overlays[overlay_dir][name] = registry_overlay[name] + + # remove file from overlay pack + if name in registry_overlay: + del registry_overlay[name] diff --git a/beet_observer/plugin.py b/beet_observer/plugin.py index b5a5929..7fadd17 100644 --- a/beet_observer/plugin.py +++ b/beet_observer/plugin.py @@ -1,5 +1,44 @@ -from beet import Context +from beet import Context, run_beet + +from .data_pack import * +from .resource_pack import * def beet_default(ctx: Context): - return + if "observer" not in ctx.meta: + return + # get default directories + if "default_dir" not in ctx.meta["observer"]: + # default dir not defined + ctx.meta["observer"]["default_dir_dp"] = "default_overlay" + ctx.meta["observer"]["default_dir_rp"] = "default_overlay" + elif isinstance(ctx.meta["observer"]["default_dir"], str): + # default dir is the same for dp and rp + ctx.meta["observer"]["default_dir_dp"] = ctx.meta["observer"]["default_dir"] + ctx.meta["observer"]["default_dir_rp"] = ctx.meta["observer"]["default_dir"] + else: + # default dir is different for dp and rp + ctx.meta["observer"]["default_dir_dp"] = ctx.meta["observer"]["default_dir"][ + "dp" + ] + ctx.meta["observer"]["default_dir_rp"] = ctx.meta["observer"]["default_dir"][ + "rp" + ] + # loop through all overlays + for overlay in ctx.meta["observer"]["overlays"]: + # create relative path + path = f"{ctx.directory}/{overlay['process']}" + # generate context for overlay pack + with run_beet( + config={"data_pack": {"load": "."}, "resource_pack": {"load": "."}}, + directory=path, + ) as ctx_overlay: + if "directory" not in overlay: + dp_dir = f"overlay_{ctx_overlay.data.pack_format}" + rp_dir = f"overlay_{ctx_overlay.assets.pack_format}" + else: + dp_dir = overlay["directory"] + rp_dir = overlay["directory"] + # compare build pack and overlay pack + gen_dp_overlays(ctx, ctx_overlay, dp_dir) + gen_rp_overlays(ctx, ctx_overlay, rp_dir) diff --git a/beet_observer/resource_pack.py b/beet_observer/resource_pack.py new file mode 100644 index 0000000..50a3e6b --- /dev/null +++ b/beet_observer/resource_pack.py @@ -0,0 +1,5 @@ +from beet import Context + + +def gen_rp_overlays(ctx: Context, ctx_overlay: Context, directory: str): + return diff --git a/examples/nested_overlay1/beet.yaml b/examples/nested_overlay1/beet.yaml new file mode 100644 index 0000000..f21b855 --- /dev/null +++ b/examples/nested_overlay1/beet.yaml @@ -0,0 +1,12 @@ +data_pack: + load: src + pack_format: 57 + supported_formats: [48,57] + +pipeline: + - beet_observer + +meta: + observer: + overlays: + - process: nested/proc diff --git a/examples/nested_overlay1/nested/proc/data/demo/function/demo.mcfunction b/examples/nested_overlay1/nested/proc/data/demo/function/demo.mcfunction new file mode 100644 index 0000000..8d10803 --- /dev/null +++ b/examples/nested_overlay1/nested/proc/data/demo/function/demo.mcfunction @@ -0,0 +1 @@ +say an overlay is created for this diff --git a/examples/nested_overlay1/nested/proc/data/demo/function/foo.mcfunction b/examples/nested_overlay1/nested/proc/data/demo/function/foo.mcfunction new file mode 100644 index 0000000..8dc9fba --- /dev/null +++ b/examples/nested_overlay1/nested/proc/data/demo/function/foo.mcfunction @@ -0,0 +1 @@ +say this is the same in both diff --git a/examples/nested_overlay1/nested/proc/pack.mcmeta b/examples/nested_overlay1/nested/proc/pack.mcmeta new file mode 100644 index 0000000..8b4f4d2 --- /dev/null +++ b/examples/nested_overlay1/nested/proc/pack.mcmeta @@ -0,0 +1,6 @@ +{ + "pack": { + "pack_format": 48, + "description": "" + } +} diff --git a/examples/nested_overlay1/src/data/demo/function/demo.mcfunction b/examples/nested_overlay1/src/data/demo/function/demo.mcfunction new file mode 100644 index 0000000..92635b5 --- /dev/null +++ b/examples/nested_overlay1/src/data/demo/function/demo.mcfunction @@ -0,0 +1 @@ +say this remains in the normal data folder diff --git a/examples/nested_overlay1/src/data/demo/function/foo.mcfunction b/examples/nested_overlay1/src/data/demo/function/foo.mcfunction new file mode 100644 index 0000000..8dc9fba --- /dev/null +++ b/examples/nested_overlay1/src/data/demo/function/foo.mcfunction @@ -0,0 +1 @@ +say this is the same in both diff --git a/examples/nested_overlay2/beet.yaml b/examples/nested_overlay2/beet.yaml new file mode 100644 index 0000000..1ab2280 --- /dev/null +++ b/examples/nested_overlay2/beet.yaml @@ -0,0 +1,12 @@ +data_pack: + load: src + pack_format: 57 + supported_formats: [48,57] + +pipeline: + - beet_observer + +meta: + observer: + overlays: + - process: nested/nested/proc diff --git a/examples/nested_overlay2/nested/nested/proc/data/demo/function/demo.mcfunction b/examples/nested_overlay2/nested/nested/proc/data/demo/function/demo.mcfunction new file mode 100644 index 0000000..8d10803 --- /dev/null +++ b/examples/nested_overlay2/nested/nested/proc/data/demo/function/demo.mcfunction @@ -0,0 +1 @@ +say an overlay is created for this diff --git a/examples/nested_overlay2/nested/nested/proc/data/demo/function/foo.mcfunction b/examples/nested_overlay2/nested/nested/proc/data/demo/function/foo.mcfunction new file mode 100644 index 0000000..8dc9fba --- /dev/null +++ b/examples/nested_overlay2/nested/nested/proc/data/demo/function/foo.mcfunction @@ -0,0 +1 @@ +say this is the same in both diff --git a/examples/nested_overlay2/nested/nested/proc/pack.mcmeta b/examples/nested_overlay2/nested/nested/proc/pack.mcmeta new file mode 100644 index 0000000..8b4f4d2 --- /dev/null +++ b/examples/nested_overlay2/nested/nested/proc/pack.mcmeta @@ -0,0 +1,6 @@ +{ + "pack": { + "pack_format": 48, + "description": "" + } +} diff --git a/examples/nested_overlay2/src/data/demo/function/demo.mcfunction b/examples/nested_overlay2/src/data/demo/function/demo.mcfunction new file mode 100644 index 0000000..92635b5 --- /dev/null +++ b/examples/nested_overlay2/src/data/demo/function/demo.mcfunction @@ -0,0 +1 @@ +say this remains in the normal data folder diff --git a/examples/nested_overlay2/src/data/demo/function/foo.mcfunction b/examples/nested_overlay2/src/data/demo/function/foo.mcfunction new file mode 100644 index 0000000..8dc9fba --- /dev/null +++ b/examples/nested_overlay2/src/data/demo/function/foo.mcfunction @@ -0,0 +1 @@ +say this is the same in both diff --git a/examples/overlay_adds_function1/beet.yaml b/examples/overlay_adds_function1/beet.yaml new file mode 100644 index 0000000..41b69cb --- /dev/null +++ b/examples/overlay_adds_function1/beet.yaml @@ -0,0 +1,12 @@ +data_pack: + load: src + pack_format: 57 + supported_formats: [48,57] + +pipeline: + - beet_observer + +meta: + observer: + overlays: + - process: proc diff --git a/examples/overlay_adds_function1/proc/data/demo/function/demo.mcfunction b/examples/overlay_adds_function1/proc/data/demo/function/demo.mcfunction new file mode 100644 index 0000000..c15707e --- /dev/null +++ b/examples/overlay_adds_function1/proc/data/demo/function/demo.mcfunction @@ -0,0 +1 @@ +say this only exists in the overlay diff --git a/examples/overlay_adds_function1/proc/data/demo/function/foo.mcfunction b/examples/overlay_adds_function1/proc/data/demo/function/foo.mcfunction new file mode 100644 index 0000000..8dc9fba --- /dev/null +++ b/examples/overlay_adds_function1/proc/data/demo/function/foo.mcfunction @@ -0,0 +1 @@ +say this is the same in both diff --git a/examples/overlay_adds_function1/proc/pack.mcmeta b/examples/overlay_adds_function1/proc/pack.mcmeta new file mode 100644 index 0000000..8b4f4d2 --- /dev/null +++ b/examples/overlay_adds_function1/proc/pack.mcmeta @@ -0,0 +1,6 @@ +{ + "pack": { + "pack_format": 48, + "description": "" + } +} diff --git a/examples/overlay_adds_function1/src/data/demo/function/foo.mcfunction b/examples/overlay_adds_function1/src/data/demo/function/foo.mcfunction new file mode 100644 index 0000000..8dc9fba --- /dev/null +++ b/examples/overlay_adds_function1/src/data/demo/function/foo.mcfunction @@ -0,0 +1 @@ +say this is the same in both diff --git a/examples/overlay_adds_function2/beet.yaml b/examples/overlay_adds_function2/beet.yaml new file mode 100644 index 0000000..41b69cb --- /dev/null +++ b/examples/overlay_adds_function2/beet.yaml @@ -0,0 +1,12 @@ +data_pack: + load: src + pack_format: 57 + supported_formats: [48,57] + +pipeline: + - beet_observer + +meta: + observer: + overlays: + - process: proc diff --git a/examples/overlay_adds_function2/proc/data/demo/function/demo.mcfunction b/examples/overlay_adds_function2/proc/data/demo/function/demo.mcfunction new file mode 100644 index 0000000..c15707e --- /dev/null +++ b/examples/overlay_adds_function2/proc/data/demo/function/demo.mcfunction @@ -0,0 +1 @@ +say this only exists in the overlay diff --git a/examples/overlay_adds_function2/proc/data/demo/function/demo2.mcfunction b/examples/overlay_adds_function2/proc/data/demo/function/demo2.mcfunction new file mode 100644 index 0000000..dfaa0d3 --- /dev/null +++ b/examples/overlay_adds_function2/proc/data/demo/function/demo2.mcfunction @@ -0,0 +1 @@ +say this only exists in the overlay (2) diff --git a/examples/overlay_adds_function2/proc/data/demo/function/demo3.mcfunction b/examples/overlay_adds_function2/proc/data/demo/function/demo3.mcfunction new file mode 100644 index 0000000..1c22ae5 --- /dev/null +++ b/examples/overlay_adds_function2/proc/data/demo/function/demo3.mcfunction @@ -0,0 +1 @@ +say this only exists in the overlay (3) diff --git a/examples/overlay_adds_function2/proc/data/demo/function/demo4.mcfunction b/examples/overlay_adds_function2/proc/data/demo/function/demo4.mcfunction new file mode 100644 index 0000000..4e25423 --- /dev/null +++ b/examples/overlay_adds_function2/proc/data/demo/function/demo4.mcfunction @@ -0,0 +1 @@ +say this only exists in the overlay (4) diff --git a/examples/overlay_adds_function2/proc/data/demo/function/demo5.mcfunction b/examples/overlay_adds_function2/proc/data/demo/function/demo5.mcfunction new file mode 100644 index 0000000..d8f9ed3 --- /dev/null +++ b/examples/overlay_adds_function2/proc/data/demo/function/demo5.mcfunction @@ -0,0 +1 @@ +say this only exists in the overlay (5) diff --git a/examples/overlay_adds_function2/proc/data/demo/function/demo6.mcfunction b/examples/overlay_adds_function2/proc/data/demo/function/demo6.mcfunction new file mode 100644 index 0000000..f413bda --- /dev/null +++ b/examples/overlay_adds_function2/proc/data/demo/function/demo6.mcfunction @@ -0,0 +1 @@ +say this only exists in the overlay (6) diff --git a/examples/overlay_adds_function2/proc/data/demo/function/foo.mcfunction b/examples/overlay_adds_function2/proc/data/demo/function/foo.mcfunction new file mode 100644 index 0000000..8dc9fba --- /dev/null +++ b/examples/overlay_adds_function2/proc/data/demo/function/foo.mcfunction @@ -0,0 +1 @@ +say this is the same in both diff --git a/examples/overlay_adds_function2/proc/data/demo/function/foo2.mcfunction b/examples/overlay_adds_function2/proc/data/demo/function/foo2.mcfunction new file mode 100644 index 0000000..25387d1 --- /dev/null +++ b/examples/overlay_adds_function2/proc/data/demo/function/foo2.mcfunction @@ -0,0 +1 @@ +say this is the same in both (2) diff --git a/examples/overlay_adds_function2/proc/data/demo/function/foo3.mcfunction b/examples/overlay_adds_function2/proc/data/demo/function/foo3.mcfunction new file mode 100644 index 0000000..597f9ba --- /dev/null +++ b/examples/overlay_adds_function2/proc/data/demo/function/foo3.mcfunction @@ -0,0 +1 @@ +say this is the same in both (3) diff --git a/examples/overlay_adds_function2/proc/data/demo/function/foo4.mcfunction b/examples/overlay_adds_function2/proc/data/demo/function/foo4.mcfunction new file mode 100644 index 0000000..b158d8b --- /dev/null +++ b/examples/overlay_adds_function2/proc/data/demo/function/foo4.mcfunction @@ -0,0 +1 @@ +say this is the same in both (4) diff --git a/examples/overlay_adds_function2/proc/pack.mcmeta b/examples/overlay_adds_function2/proc/pack.mcmeta new file mode 100644 index 0000000..8b4f4d2 --- /dev/null +++ b/examples/overlay_adds_function2/proc/pack.mcmeta @@ -0,0 +1,6 @@ +{ + "pack": { + "pack_format": 48, + "description": "" + } +} diff --git a/examples/overlay_adds_function2/src/data/demo/function/foo.mcfunction b/examples/overlay_adds_function2/src/data/demo/function/foo.mcfunction new file mode 100644 index 0000000..8dc9fba --- /dev/null +++ b/examples/overlay_adds_function2/src/data/demo/function/foo.mcfunction @@ -0,0 +1 @@ +say this is the same in both diff --git a/examples/overlay_adds_function2/src/data/demo/function/foo2.mcfunction b/examples/overlay_adds_function2/src/data/demo/function/foo2.mcfunction new file mode 100644 index 0000000..25387d1 --- /dev/null +++ b/examples/overlay_adds_function2/src/data/demo/function/foo2.mcfunction @@ -0,0 +1 @@ +say this is the same in both (2) diff --git a/examples/overlay_adds_function2/src/data/demo/function/foo3.mcfunction b/examples/overlay_adds_function2/src/data/demo/function/foo3.mcfunction new file mode 100644 index 0000000..597f9ba --- /dev/null +++ b/examples/overlay_adds_function2/src/data/demo/function/foo3.mcfunction @@ -0,0 +1 @@ +say this is the same in both (3) diff --git a/examples/overlay_adds_function2/src/data/demo/function/foo4.mcfunction b/examples/overlay_adds_function2/src/data/demo/function/foo4.mcfunction new file mode 100644 index 0000000..b158d8b --- /dev/null +++ b/examples/overlay_adds_function2/src/data/demo/function/foo4.mcfunction @@ -0,0 +1 @@ +say this is the same in both (4) diff --git a/examples/overlay_adds_function3/beet.yaml b/examples/overlay_adds_function3/beet.yaml new file mode 100644 index 0000000..41b69cb --- /dev/null +++ b/examples/overlay_adds_function3/beet.yaml @@ -0,0 +1,12 @@ +data_pack: + load: src + pack_format: 57 + supported_formats: [48,57] + +pipeline: + - beet_observer + +meta: + observer: + overlays: + - process: proc diff --git a/examples/overlay_adds_function3/proc/data/demo/function/demo.mcfunction b/examples/overlay_adds_function3/proc/data/demo/function/demo.mcfunction new file mode 100644 index 0000000..c15707e --- /dev/null +++ b/examples/overlay_adds_function3/proc/data/demo/function/demo.mcfunction @@ -0,0 +1 @@ +say this only exists in the overlay diff --git a/examples/overlay_adds_function3/proc/data/demo/function/demo2.mcfunction b/examples/overlay_adds_function3/proc/data/demo/function/demo2.mcfunction new file mode 100644 index 0000000..dfaa0d3 --- /dev/null +++ b/examples/overlay_adds_function3/proc/data/demo/function/demo2.mcfunction @@ -0,0 +1 @@ +say this only exists in the overlay (2) diff --git a/examples/overlay_adds_function3/proc/data/demo/function/demo3.mcfunction b/examples/overlay_adds_function3/proc/data/demo/function/demo3.mcfunction new file mode 100644 index 0000000..1c22ae5 --- /dev/null +++ b/examples/overlay_adds_function3/proc/data/demo/function/demo3.mcfunction @@ -0,0 +1 @@ +say this only exists in the overlay (3) diff --git a/examples/overlay_adds_function3/proc/data/demo/function/foo.mcfunction b/examples/overlay_adds_function3/proc/data/demo/function/foo.mcfunction new file mode 100644 index 0000000..8dc9fba --- /dev/null +++ b/examples/overlay_adds_function3/proc/data/demo/function/foo.mcfunction @@ -0,0 +1 @@ +say this is the same in both diff --git a/examples/overlay_adds_function3/proc/data/demo/function/foo2.mcfunction b/examples/overlay_adds_function3/proc/data/demo/function/foo2.mcfunction new file mode 100644 index 0000000..25387d1 --- /dev/null +++ b/examples/overlay_adds_function3/proc/data/demo/function/foo2.mcfunction @@ -0,0 +1 @@ +say this is the same in both (2) diff --git a/examples/overlay_adds_function3/proc/data/demo/function/nested/demo4.mcfunction b/examples/overlay_adds_function3/proc/data/demo/function/nested/demo4.mcfunction new file mode 100644 index 0000000..4e25423 --- /dev/null +++ b/examples/overlay_adds_function3/proc/data/demo/function/nested/demo4.mcfunction @@ -0,0 +1 @@ +say this only exists in the overlay (4) diff --git a/examples/overlay_adds_function3/proc/data/demo/function/nested/demo5.mcfunction b/examples/overlay_adds_function3/proc/data/demo/function/nested/demo5.mcfunction new file mode 100644 index 0000000..d8f9ed3 --- /dev/null +++ b/examples/overlay_adds_function3/proc/data/demo/function/nested/demo5.mcfunction @@ -0,0 +1 @@ +say this only exists in the overlay (5) diff --git a/examples/overlay_adds_function3/proc/data/demo/function/nested/demo6.mcfunction b/examples/overlay_adds_function3/proc/data/demo/function/nested/demo6.mcfunction new file mode 100644 index 0000000..f413bda --- /dev/null +++ b/examples/overlay_adds_function3/proc/data/demo/function/nested/demo6.mcfunction @@ -0,0 +1 @@ +say this only exists in the overlay (6) diff --git a/examples/overlay_adds_function3/proc/data/demo/function/nested/foo3.mcfunction b/examples/overlay_adds_function3/proc/data/demo/function/nested/foo3.mcfunction new file mode 100644 index 0000000..597f9ba --- /dev/null +++ b/examples/overlay_adds_function3/proc/data/demo/function/nested/foo3.mcfunction @@ -0,0 +1 @@ +say this is the same in both (3) diff --git a/examples/overlay_adds_function3/proc/data/demo/function/nested/foo4.mcfunction b/examples/overlay_adds_function3/proc/data/demo/function/nested/foo4.mcfunction new file mode 100644 index 0000000..b158d8b --- /dev/null +++ b/examples/overlay_adds_function3/proc/data/demo/function/nested/foo4.mcfunction @@ -0,0 +1 @@ +say this is the same in both (4) diff --git a/examples/overlay_adds_function3/proc/pack.mcmeta b/examples/overlay_adds_function3/proc/pack.mcmeta new file mode 100644 index 0000000..8b4f4d2 --- /dev/null +++ b/examples/overlay_adds_function3/proc/pack.mcmeta @@ -0,0 +1,6 @@ +{ + "pack": { + "pack_format": 48, + "description": "" + } +} diff --git a/examples/overlay_adds_function3/src/data/demo/function/foo.mcfunction b/examples/overlay_adds_function3/src/data/demo/function/foo.mcfunction new file mode 100644 index 0000000..8dc9fba --- /dev/null +++ b/examples/overlay_adds_function3/src/data/demo/function/foo.mcfunction @@ -0,0 +1 @@ +say this is the same in both diff --git a/examples/overlay_adds_function3/src/data/demo/function/foo2.mcfunction b/examples/overlay_adds_function3/src/data/demo/function/foo2.mcfunction new file mode 100644 index 0000000..25387d1 --- /dev/null +++ b/examples/overlay_adds_function3/src/data/demo/function/foo2.mcfunction @@ -0,0 +1 @@ +say this is the same in both (2) diff --git a/examples/overlay_adds_function3/src/data/demo/function/nested/foo3.mcfunction b/examples/overlay_adds_function3/src/data/demo/function/nested/foo3.mcfunction new file mode 100644 index 0000000..597f9ba --- /dev/null +++ b/examples/overlay_adds_function3/src/data/demo/function/nested/foo3.mcfunction @@ -0,0 +1 @@ +say this is the same in both (3) diff --git a/examples/overlay_adds_function3/src/data/demo/function/nested/foo4.mcfunction b/examples/overlay_adds_function3/src/data/demo/function/nested/foo4.mcfunction new file mode 100644 index 0000000..b158d8b --- /dev/null +++ b/examples/overlay_adds_function3/src/data/demo/function/nested/foo4.mcfunction @@ -0,0 +1 @@ +say this is the same in both (4) diff --git a/examples/overlay_adds_loot_table1/beet.yaml b/examples/overlay_adds_loot_table1/beet.yaml new file mode 100644 index 0000000..41b69cb --- /dev/null +++ b/examples/overlay_adds_loot_table1/beet.yaml @@ -0,0 +1,12 @@ +data_pack: + load: src + pack_format: 57 + supported_formats: [48,57] + +pipeline: + - beet_observer + +meta: + observer: + overlays: + - process: proc diff --git a/examples/overlay_adds_loot_table1/proc/data/demo/loot_table/demo.json b/examples/overlay_adds_loot_table1/proc/data/demo/loot_table/demo.json new file mode 100644 index 0000000..8b822f0 --- /dev/null +++ b/examples/overlay_adds_loot_table1/proc/data/demo/loot_table/demo.json @@ -0,0 +1,19 @@ +{ + "pools": [ + { + "rolls": 1, + "entries": [ + { + "type": "minecraft:item", + "name": "minecraft:stick", + "functions": [ + { + "function": "minecraft:set_custom_data", + "tag": "{msg:'this only exists in the overlay'}" + } + ] + } + ] + } + ] +} diff --git a/examples/overlay_adds_loot_table1/proc/data/demo/loot_table/foo.json b/examples/overlay_adds_loot_table1/proc/data/demo/loot_table/foo.json new file mode 100644 index 0000000..53ff4ff --- /dev/null +++ b/examples/overlay_adds_loot_table1/proc/data/demo/loot_table/foo.json @@ -0,0 +1,19 @@ +{ + "pools": [ + { + "rolls": 1, + "entries": [ + { + "type": "minecraft:item", + "name": "minecraft:stick", + "functions": [ + { + "function": "minecraft:set_custom_data", + "tag": "{msg:'this is the same in both'}" + } + ] + } + ] + } + ] +} diff --git a/examples/overlay_adds_loot_table1/proc/pack.mcmeta b/examples/overlay_adds_loot_table1/proc/pack.mcmeta new file mode 100644 index 0000000..8b4f4d2 --- /dev/null +++ b/examples/overlay_adds_loot_table1/proc/pack.mcmeta @@ -0,0 +1,6 @@ +{ + "pack": { + "pack_format": 48, + "description": "" + } +} diff --git a/examples/overlay_adds_loot_table1/src/data/demo/loot_table/foo.json b/examples/overlay_adds_loot_table1/src/data/demo/loot_table/foo.json new file mode 100644 index 0000000..53ff4ff --- /dev/null +++ b/examples/overlay_adds_loot_table1/src/data/demo/loot_table/foo.json @@ -0,0 +1,19 @@ +{ + "pools": [ + { + "rolls": 1, + "entries": [ + { + "type": "minecraft:item", + "name": "minecraft:stick", + "functions": [ + { + "function": "minecraft:set_custom_data", + "tag": "{msg:'this is the same in both'}" + } + ] + } + ] + } + ] +} diff --git a/examples/overlay_deletes_function1/beet.yaml b/examples/overlay_deletes_function1/beet.yaml new file mode 100644 index 0000000..dbd4727 --- /dev/null +++ b/examples/overlay_deletes_function1/beet.yaml @@ -0,0 +1,13 @@ +data_pack: + load: src + pack_format: 57 + supported_formats: [48,57] + +pipeline: + - beet_observer + +meta: + observer: + default_format: 57 + overlays: + - process: proc diff --git a/examples/overlay_deletes_function1/proc/data/demo/function/foo.mcfunction b/examples/overlay_deletes_function1/proc/data/demo/function/foo.mcfunction new file mode 100644 index 0000000..8dc9fba --- /dev/null +++ b/examples/overlay_deletes_function1/proc/data/demo/function/foo.mcfunction @@ -0,0 +1 @@ +say this is the same in both diff --git a/examples/overlay_deletes_function1/proc/pack.mcmeta b/examples/overlay_deletes_function1/proc/pack.mcmeta new file mode 100644 index 0000000..8b4f4d2 --- /dev/null +++ b/examples/overlay_deletes_function1/proc/pack.mcmeta @@ -0,0 +1,6 @@ +{ + "pack": { + "pack_format": 48, + "description": "" + } +} diff --git a/examples/overlay_deletes_function1/src/data/demo/function/demo.mcfunction b/examples/overlay_deletes_function1/src/data/demo/function/demo.mcfunction new file mode 100644 index 0000000..ef66f0d --- /dev/null +++ b/examples/overlay_deletes_function1/src/data/demo/function/demo.mcfunction @@ -0,0 +1 @@ +say this only exists in the normal data folder diff --git a/examples/overlay_deletes_function1/src/data/demo/function/foo.mcfunction b/examples/overlay_deletes_function1/src/data/demo/function/foo.mcfunction new file mode 100644 index 0000000..8dc9fba --- /dev/null +++ b/examples/overlay_deletes_function1/src/data/demo/function/foo.mcfunction @@ -0,0 +1 @@ +say this is the same in both diff --git a/examples/overlay_deletes_function2/beet.yaml b/examples/overlay_deletes_function2/beet.yaml new file mode 100644 index 0000000..dbd4727 --- /dev/null +++ b/examples/overlay_deletes_function2/beet.yaml @@ -0,0 +1,13 @@ +data_pack: + load: src + pack_format: 57 + supported_formats: [48,57] + +pipeline: + - beet_observer + +meta: + observer: + default_format: 57 + overlays: + - process: proc diff --git a/examples/overlay_deletes_function2/proc/data/demo/function/foo.mcfunction b/examples/overlay_deletes_function2/proc/data/demo/function/foo.mcfunction new file mode 100644 index 0000000..8dc9fba --- /dev/null +++ b/examples/overlay_deletes_function2/proc/data/demo/function/foo.mcfunction @@ -0,0 +1 @@ +say this is the same in both diff --git a/examples/overlay_deletes_function2/proc/data/demo/function/foo2.mcfunction b/examples/overlay_deletes_function2/proc/data/demo/function/foo2.mcfunction new file mode 100644 index 0000000..25387d1 --- /dev/null +++ b/examples/overlay_deletes_function2/proc/data/demo/function/foo2.mcfunction @@ -0,0 +1 @@ +say this is the same in both (2) diff --git a/examples/overlay_deletes_function2/proc/data/demo/function/foo3.mcfunction b/examples/overlay_deletes_function2/proc/data/demo/function/foo3.mcfunction new file mode 100644 index 0000000..597f9ba --- /dev/null +++ b/examples/overlay_deletes_function2/proc/data/demo/function/foo3.mcfunction @@ -0,0 +1 @@ +say this is the same in both (3) diff --git a/examples/overlay_deletes_function2/proc/data/demo/function/foo4.mcfunction b/examples/overlay_deletes_function2/proc/data/demo/function/foo4.mcfunction new file mode 100644 index 0000000..b158d8b --- /dev/null +++ b/examples/overlay_deletes_function2/proc/data/demo/function/foo4.mcfunction @@ -0,0 +1 @@ +say this is the same in both (4) diff --git a/examples/overlay_deletes_function2/proc/pack.mcmeta b/examples/overlay_deletes_function2/proc/pack.mcmeta new file mode 100644 index 0000000..8b4f4d2 --- /dev/null +++ b/examples/overlay_deletes_function2/proc/pack.mcmeta @@ -0,0 +1,6 @@ +{ + "pack": { + "pack_format": 48, + "description": "" + } +} diff --git a/examples/overlay_deletes_function2/src/data/demo/function/demo.mcfunction b/examples/overlay_deletes_function2/src/data/demo/function/demo.mcfunction new file mode 100644 index 0000000..ef66f0d --- /dev/null +++ b/examples/overlay_deletes_function2/src/data/demo/function/demo.mcfunction @@ -0,0 +1 @@ +say this only exists in the normal data folder diff --git a/examples/overlay_deletes_function2/src/data/demo/function/demo2.mcfunction b/examples/overlay_deletes_function2/src/data/demo/function/demo2.mcfunction new file mode 100644 index 0000000..ca4b1c9 --- /dev/null +++ b/examples/overlay_deletes_function2/src/data/demo/function/demo2.mcfunction @@ -0,0 +1 @@ +say this only exists in the normal data folder (2) diff --git a/examples/overlay_deletes_function2/src/data/demo/function/demo3.mcfunction b/examples/overlay_deletes_function2/src/data/demo/function/demo3.mcfunction new file mode 100644 index 0000000..9261261 --- /dev/null +++ b/examples/overlay_deletes_function2/src/data/demo/function/demo3.mcfunction @@ -0,0 +1 @@ +say this only exists in the normal data folder (3) diff --git a/examples/overlay_deletes_function2/src/data/demo/function/demo4.mcfunction b/examples/overlay_deletes_function2/src/data/demo/function/demo4.mcfunction new file mode 100644 index 0000000..366309e --- /dev/null +++ b/examples/overlay_deletes_function2/src/data/demo/function/demo4.mcfunction @@ -0,0 +1 @@ +say this only exists in the normal data folder (4) diff --git a/examples/overlay_deletes_function2/src/data/demo/function/demo5.mcfunction b/examples/overlay_deletes_function2/src/data/demo/function/demo5.mcfunction new file mode 100644 index 0000000..0bc4c59 --- /dev/null +++ b/examples/overlay_deletes_function2/src/data/demo/function/demo5.mcfunction @@ -0,0 +1 @@ +say this only exists in the normal data folder (5) diff --git a/examples/overlay_deletes_function2/src/data/demo/function/demo6.mcfunction b/examples/overlay_deletes_function2/src/data/demo/function/demo6.mcfunction new file mode 100644 index 0000000..2e16907 --- /dev/null +++ b/examples/overlay_deletes_function2/src/data/demo/function/demo6.mcfunction @@ -0,0 +1 @@ +say this only exists in the normal data folder (6) diff --git a/examples/overlay_deletes_function2/src/data/demo/function/foo.mcfunction b/examples/overlay_deletes_function2/src/data/demo/function/foo.mcfunction new file mode 100644 index 0000000..8dc9fba --- /dev/null +++ b/examples/overlay_deletes_function2/src/data/demo/function/foo.mcfunction @@ -0,0 +1 @@ +say this is the same in both diff --git a/examples/overlay_deletes_function2/src/data/demo/function/foo2.mcfunction b/examples/overlay_deletes_function2/src/data/demo/function/foo2.mcfunction new file mode 100644 index 0000000..25387d1 --- /dev/null +++ b/examples/overlay_deletes_function2/src/data/demo/function/foo2.mcfunction @@ -0,0 +1 @@ +say this is the same in both (2) diff --git a/examples/overlay_deletes_function2/src/data/demo/function/foo3.mcfunction b/examples/overlay_deletes_function2/src/data/demo/function/foo3.mcfunction new file mode 100644 index 0000000..597f9ba --- /dev/null +++ b/examples/overlay_deletes_function2/src/data/demo/function/foo3.mcfunction @@ -0,0 +1 @@ +say this is the same in both (3) diff --git a/examples/overlay_deletes_function2/src/data/demo/function/foo4.mcfunction b/examples/overlay_deletes_function2/src/data/demo/function/foo4.mcfunction new file mode 100644 index 0000000..b158d8b --- /dev/null +++ b/examples/overlay_deletes_function2/src/data/demo/function/foo4.mcfunction @@ -0,0 +1 @@ +say this is the same in both (4) diff --git a/examples/overlay_deletes_function3/beet.yaml b/examples/overlay_deletes_function3/beet.yaml new file mode 100644 index 0000000..dbd4727 --- /dev/null +++ b/examples/overlay_deletes_function3/beet.yaml @@ -0,0 +1,13 @@ +data_pack: + load: src + pack_format: 57 + supported_formats: [48,57] + +pipeline: + - beet_observer + +meta: + observer: + default_format: 57 + overlays: + - process: proc diff --git a/examples/overlay_deletes_function3/proc/data/demo/function/foo.mcfunction b/examples/overlay_deletes_function3/proc/data/demo/function/foo.mcfunction new file mode 100644 index 0000000..8dc9fba --- /dev/null +++ b/examples/overlay_deletes_function3/proc/data/demo/function/foo.mcfunction @@ -0,0 +1 @@ +say this is the same in both diff --git a/examples/overlay_deletes_function3/proc/data/demo/function/foo2.mcfunction b/examples/overlay_deletes_function3/proc/data/demo/function/foo2.mcfunction new file mode 100644 index 0000000..25387d1 --- /dev/null +++ b/examples/overlay_deletes_function3/proc/data/demo/function/foo2.mcfunction @@ -0,0 +1 @@ +say this is the same in both (2) diff --git a/examples/overlay_deletes_function3/proc/data/demo/function/nested/foo3.mcfunction b/examples/overlay_deletes_function3/proc/data/demo/function/nested/foo3.mcfunction new file mode 100644 index 0000000..597f9ba --- /dev/null +++ b/examples/overlay_deletes_function3/proc/data/demo/function/nested/foo3.mcfunction @@ -0,0 +1 @@ +say this is the same in both (3) diff --git a/examples/overlay_deletes_function3/proc/data/demo/function/nested/foo4.mcfunction b/examples/overlay_deletes_function3/proc/data/demo/function/nested/foo4.mcfunction new file mode 100644 index 0000000..b158d8b --- /dev/null +++ b/examples/overlay_deletes_function3/proc/data/demo/function/nested/foo4.mcfunction @@ -0,0 +1 @@ +say this is the same in both (4) diff --git a/examples/overlay_deletes_function3/proc/pack.mcmeta b/examples/overlay_deletes_function3/proc/pack.mcmeta new file mode 100644 index 0000000..8b4f4d2 --- /dev/null +++ b/examples/overlay_deletes_function3/proc/pack.mcmeta @@ -0,0 +1,6 @@ +{ + "pack": { + "pack_format": 48, + "description": "" + } +} diff --git a/examples/overlay_deletes_function3/src/data/demo/function/demo.mcfunction b/examples/overlay_deletes_function3/src/data/demo/function/demo.mcfunction new file mode 100644 index 0000000..ef66f0d --- /dev/null +++ b/examples/overlay_deletes_function3/src/data/demo/function/demo.mcfunction @@ -0,0 +1 @@ +say this only exists in the normal data folder diff --git a/examples/overlay_deletes_function3/src/data/demo/function/demo2.mcfunction b/examples/overlay_deletes_function3/src/data/demo/function/demo2.mcfunction new file mode 100644 index 0000000..ca4b1c9 --- /dev/null +++ b/examples/overlay_deletes_function3/src/data/demo/function/demo2.mcfunction @@ -0,0 +1 @@ +say this only exists in the normal data folder (2) diff --git a/examples/overlay_deletes_function3/src/data/demo/function/demo3.mcfunction b/examples/overlay_deletes_function3/src/data/demo/function/demo3.mcfunction new file mode 100644 index 0000000..9261261 --- /dev/null +++ b/examples/overlay_deletes_function3/src/data/demo/function/demo3.mcfunction @@ -0,0 +1 @@ +say this only exists in the normal data folder (3) diff --git a/examples/overlay_deletes_function3/src/data/demo/function/foo.mcfunction b/examples/overlay_deletes_function3/src/data/demo/function/foo.mcfunction new file mode 100644 index 0000000..8dc9fba --- /dev/null +++ b/examples/overlay_deletes_function3/src/data/demo/function/foo.mcfunction @@ -0,0 +1 @@ +say this is the same in both diff --git a/examples/overlay_deletes_function3/src/data/demo/function/foo2.mcfunction b/examples/overlay_deletes_function3/src/data/demo/function/foo2.mcfunction new file mode 100644 index 0000000..25387d1 --- /dev/null +++ b/examples/overlay_deletes_function3/src/data/demo/function/foo2.mcfunction @@ -0,0 +1 @@ +say this is the same in both (2) diff --git a/examples/overlay_deletes_function3/src/data/demo/function/nested/demo4.mcfunction b/examples/overlay_deletes_function3/src/data/demo/function/nested/demo4.mcfunction new file mode 100644 index 0000000..366309e --- /dev/null +++ b/examples/overlay_deletes_function3/src/data/demo/function/nested/demo4.mcfunction @@ -0,0 +1 @@ +say this only exists in the normal data folder (4) diff --git a/examples/overlay_deletes_function3/src/data/demo/function/nested/demo5.mcfunction b/examples/overlay_deletes_function3/src/data/demo/function/nested/demo5.mcfunction new file mode 100644 index 0000000..0bc4c59 --- /dev/null +++ b/examples/overlay_deletes_function3/src/data/demo/function/nested/demo5.mcfunction @@ -0,0 +1 @@ +say this only exists in the normal data folder (5) diff --git a/examples/overlay_deletes_function3/src/data/demo/function/nested/demo6.mcfunction b/examples/overlay_deletes_function3/src/data/demo/function/nested/demo6.mcfunction new file mode 100644 index 0000000..2e16907 --- /dev/null +++ b/examples/overlay_deletes_function3/src/data/demo/function/nested/demo6.mcfunction @@ -0,0 +1 @@ +say this only exists in the normal data folder (6) diff --git a/examples/overlay_deletes_function3/src/data/demo/function/nested/foo3.mcfunction b/examples/overlay_deletes_function3/src/data/demo/function/nested/foo3.mcfunction new file mode 100644 index 0000000..597f9ba --- /dev/null +++ b/examples/overlay_deletes_function3/src/data/demo/function/nested/foo3.mcfunction @@ -0,0 +1 @@ +say this is the same in both (3) diff --git a/examples/overlay_deletes_function3/src/data/demo/function/nested/foo4.mcfunction b/examples/overlay_deletes_function3/src/data/demo/function/nested/foo4.mcfunction new file mode 100644 index 0000000..b158d8b --- /dev/null +++ b/examples/overlay_deletes_function3/src/data/demo/function/nested/foo4.mcfunction @@ -0,0 +1 @@ +say this is the same in both (4) diff --git a/examples/overlay_deletes_loot_table1/beet.yaml b/examples/overlay_deletes_loot_table1/beet.yaml new file mode 100644 index 0000000..dbd4727 --- /dev/null +++ b/examples/overlay_deletes_loot_table1/beet.yaml @@ -0,0 +1,13 @@ +data_pack: + load: src + pack_format: 57 + supported_formats: [48,57] + +pipeline: + - beet_observer + +meta: + observer: + default_format: 57 + overlays: + - process: proc diff --git a/examples/overlay_deletes_loot_table1/proc/data/demo/loot_table/foo.json b/examples/overlay_deletes_loot_table1/proc/data/demo/loot_table/foo.json new file mode 100644 index 0000000..53ff4ff --- /dev/null +++ b/examples/overlay_deletes_loot_table1/proc/data/demo/loot_table/foo.json @@ -0,0 +1,19 @@ +{ + "pools": [ + { + "rolls": 1, + "entries": [ + { + "type": "minecraft:item", + "name": "minecraft:stick", + "functions": [ + { + "function": "minecraft:set_custom_data", + "tag": "{msg:'this is the same in both'}" + } + ] + } + ] + } + ] +} diff --git a/examples/overlay_deletes_loot_table1/proc/pack.mcmeta b/examples/overlay_deletes_loot_table1/proc/pack.mcmeta new file mode 100644 index 0000000..8b4f4d2 --- /dev/null +++ b/examples/overlay_deletes_loot_table1/proc/pack.mcmeta @@ -0,0 +1,6 @@ +{ + "pack": { + "pack_format": 48, + "description": "" + } +} diff --git a/examples/overlay_deletes_loot_table1/src/data/demo/loot_table/demo.json b/examples/overlay_deletes_loot_table1/src/data/demo/loot_table/demo.json new file mode 100644 index 0000000..553fad9 --- /dev/null +++ b/examples/overlay_deletes_loot_table1/src/data/demo/loot_table/demo.json @@ -0,0 +1,19 @@ +{ + "pools": [ + { + "rolls": 1, + "entries": [ + { + "type": "minecraft:item", + "name": "minecraft:stick", + "functions": [ + { + "function": "minecraft:set_custom_data", + "tag": "{msg:'this only exists in the normal data folder'}" + } + ] + } + ] + } + ] +} diff --git a/examples/overlay_deletes_loot_table1/src/data/demo/loot_table/foo.json b/examples/overlay_deletes_loot_table1/src/data/demo/loot_table/foo.json new file mode 100644 index 0000000..53ff4ff --- /dev/null +++ b/examples/overlay_deletes_loot_table1/src/data/demo/loot_table/foo.json @@ -0,0 +1,19 @@ +{ + "pools": [ + { + "rolls": 1, + "entries": [ + { + "type": "minecraft:item", + "name": "minecraft:stick", + "functions": [ + { + "function": "minecraft:set_custom_data", + "tag": "{msg:'this is the same in both'}" + } + ] + } + ] + } + ] +} diff --git a/examples/overlay_mixed_function1/beet.yaml b/examples/overlay_mixed_function1/beet.yaml new file mode 100644 index 0000000..dbd4727 --- /dev/null +++ b/examples/overlay_mixed_function1/beet.yaml @@ -0,0 +1,13 @@ +data_pack: + load: src + pack_format: 57 + supported_formats: [48,57] + +pipeline: + - beet_observer + +meta: + observer: + default_format: 57 + overlays: + - process: proc diff --git a/examples/overlay_mixed_function1/proc/data/demo/function/demo_add.mcfunction b/examples/overlay_mixed_function1/proc/data/demo/function/demo_add.mcfunction new file mode 100644 index 0000000..c15707e --- /dev/null +++ b/examples/overlay_mixed_function1/proc/data/demo/function/demo_add.mcfunction @@ -0,0 +1 @@ +say this only exists in the overlay diff --git a/examples/overlay_mixed_function1/proc/data/demo/function/demo_replace.mcfunction b/examples/overlay_mixed_function1/proc/data/demo/function/demo_replace.mcfunction new file mode 100644 index 0000000..8d10803 --- /dev/null +++ b/examples/overlay_mixed_function1/proc/data/demo/function/demo_replace.mcfunction @@ -0,0 +1 @@ +say an overlay is created for this diff --git a/examples/overlay_mixed_function1/proc/data/demo/function/foo.mcfunction b/examples/overlay_mixed_function1/proc/data/demo/function/foo.mcfunction new file mode 100644 index 0000000..8dc9fba --- /dev/null +++ b/examples/overlay_mixed_function1/proc/data/demo/function/foo.mcfunction @@ -0,0 +1 @@ +say this is the same in both diff --git a/examples/overlay_mixed_function1/proc/pack.mcmeta b/examples/overlay_mixed_function1/proc/pack.mcmeta new file mode 100644 index 0000000..8b4f4d2 --- /dev/null +++ b/examples/overlay_mixed_function1/proc/pack.mcmeta @@ -0,0 +1,6 @@ +{ + "pack": { + "pack_format": 48, + "description": "" + } +} diff --git a/examples/overlay_mixed_function1/src/data/demo/function/demo_delete.mcfunction b/examples/overlay_mixed_function1/src/data/demo/function/demo_delete.mcfunction new file mode 100644 index 0000000..ef66f0d --- /dev/null +++ b/examples/overlay_mixed_function1/src/data/demo/function/demo_delete.mcfunction @@ -0,0 +1 @@ +say this only exists in the normal data folder diff --git a/examples/overlay_mixed_function1/src/data/demo/function/demo_replace.mcfunction b/examples/overlay_mixed_function1/src/data/demo/function/demo_replace.mcfunction new file mode 100644 index 0000000..92635b5 --- /dev/null +++ b/examples/overlay_mixed_function1/src/data/demo/function/demo_replace.mcfunction @@ -0,0 +1 @@ +say this remains in the normal data folder diff --git a/examples/overlay_mixed_function1/src/data/demo/function/foo.mcfunction b/examples/overlay_mixed_function1/src/data/demo/function/foo.mcfunction new file mode 100644 index 0000000..8dc9fba --- /dev/null +++ b/examples/overlay_mixed_function1/src/data/demo/function/foo.mcfunction @@ -0,0 +1 @@ +say this is the same in both diff --git a/examples/overlay_replaces_function1/beet.yaml b/examples/overlay_replaces_function1/beet.yaml new file mode 100644 index 0000000..41b69cb --- /dev/null +++ b/examples/overlay_replaces_function1/beet.yaml @@ -0,0 +1,12 @@ +data_pack: + load: src + pack_format: 57 + supported_formats: [48,57] + +pipeline: + - beet_observer + +meta: + observer: + overlays: + - process: proc diff --git a/examples/overlay_replaces_function1/proc/data/demo/function/demo.mcfunction b/examples/overlay_replaces_function1/proc/data/demo/function/demo.mcfunction new file mode 100644 index 0000000..8d10803 --- /dev/null +++ b/examples/overlay_replaces_function1/proc/data/demo/function/demo.mcfunction @@ -0,0 +1 @@ +say an overlay is created for this diff --git a/examples/overlay_replaces_function1/proc/data/demo/function/foo.mcfunction b/examples/overlay_replaces_function1/proc/data/demo/function/foo.mcfunction new file mode 100644 index 0000000..8dc9fba --- /dev/null +++ b/examples/overlay_replaces_function1/proc/data/demo/function/foo.mcfunction @@ -0,0 +1 @@ +say this is the same in both diff --git a/examples/overlay_replaces_function1/proc/pack.mcmeta b/examples/overlay_replaces_function1/proc/pack.mcmeta new file mode 100644 index 0000000..8b4f4d2 --- /dev/null +++ b/examples/overlay_replaces_function1/proc/pack.mcmeta @@ -0,0 +1,6 @@ +{ + "pack": { + "pack_format": 48, + "description": "" + } +} diff --git a/examples/overlay_replaces_function1/src/data/demo/function/demo.mcfunction b/examples/overlay_replaces_function1/src/data/demo/function/demo.mcfunction new file mode 100644 index 0000000..92635b5 --- /dev/null +++ b/examples/overlay_replaces_function1/src/data/demo/function/demo.mcfunction @@ -0,0 +1 @@ +say this remains in the normal data folder diff --git a/examples/overlay_replaces_function1/src/data/demo/function/foo.mcfunction b/examples/overlay_replaces_function1/src/data/demo/function/foo.mcfunction new file mode 100644 index 0000000..8dc9fba --- /dev/null +++ b/examples/overlay_replaces_function1/src/data/demo/function/foo.mcfunction @@ -0,0 +1 @@ +say this is the same in both diff --git a/examples/overlay_replaces_function2/beet.yaml b/examples/overlay_replaces_function2/beet.yaml new file mode 100644 index 0000000..41b69cb --- /dev/null +++ b/examples/overlay_replaces_function2/beet.yaml @@ -0,0 +1,12 @@ +data_pack: + load: src + pack_format: 57 + supported_formats: [48,57] + +pipeline: + - beet_observer + +meta: + observer: + overlays: + - process: proc diff --git a/examples/overlay_replaces_function2/proc/data/demo/function/demo.mcfunction b/examples/overlay_replaces_function2/proc/data/demo/function/demo.mcfunction new file mode 100644 index 0000000..8d10803 --- /dev/null +++ b/examples/overlay_replaces_function2/proc/data/demo/function/demo.mcfunction @@ -0,0 +1 @@ +say an overlay is created for this diff --git a/examples/overlay_replaces_function2/proc/data/demo/function/demo2.mcfunction b/examples/overlay_replaces_function2/proc/data/demo/function/demo2.mcfunction new file mode 100644 index 0000000..0cee74a --- /dev/null +++ b/examples/overlay_replaces_function2/proc/data/demo/function/demo2.mcfunction @@ -0,0 +1 @@ +say an overlay is created for this (2) diff --git a/examples/overlay_replaces_function2/proc/data/demo/function/demo3.mcfunction b/examples/overlay_replaces_function2/proc/data/demo/function/demo3.mcfunction new file mode 100644 index 0000000..06e9a6e --- /dev/null +++ b/examples/overlay_replaces_function2/proc/data/demo/function/demo3.mcfunction @@ -0,0 +1 @@ +say an overlay is created for this (3) diff --git a/examples/overlay_replaces_function2/proc/data/demo/function/demo4.mcfunction b/examples/overlay_replaces_function2/proc/data/demo/function/demo4.mcfunction new file mode 100644 index 0000000..917642e --- /dev/null +++ b/examples/overlay_replaces_function2/proc/data/demo/function/demo4.mcfunction @@ -0,0 +1 @@ +say an overlay is created for this (4) diff --git a/examples/overlay_replaces_function2/proc/data/demo/function/demo5.mcfunction b/examples/overlay_replaces_function2/proc/data/demo/function/demo5.mcfunction new file mode 100644 index 0000000..ab7a0a9 --- /dev/null +++ b/examples/overlay_replaces_function2/proc/data/demo/function/demo5.mcfunction @@ -0,0 +1 @@ +say an overlay is created for this (5) diff --git a/examples/overlay_replaces_function2/proc/data/demo/function/demo6.mcfunction b/examples/overlay_replaces_function2/proc/data/demo/function/demo6.mcfunction new file mode 100644 index 0000000..ac0335f --- /dev/null +++ b/examples/overlay_replaces_function2/proc/data/demo/function/demo6.mcfunction @@ -0,0 +1 @@ +say an overlay is created for this (6) diff --git a/examples/overlay_replaces_function2/proc/data/demo/function/foo.mcfunction b/examples/overlay_replaces_function2/proc/data/demo/function/foo.mcfunction new file mode 100644 index 0000000..8dc9fba --- /dev/null +++ b/examples/overlay_replaces_function2/proc/data/demo/function/foo.mcfunction @@ -0,0 +1 @@ +say this is the same in both diff --git a/examples/overlay_replaces_function2/proc/data/demo/function/foo2.mcfunction b/examples/overlay_replaces_function2/proc/data/demo/function/foo2.mcfunction new file mode 100644 index 0000000..25387d1 --- /dev/null +++ b/examples/overlay_replaces_function2/proc/data/demo/function/foo2.mcfunction @@ -0,0 +1 @@ +say this is the same in both (2) diff --git a/examples/overlay_replaces_function2/proc/data/demo/function/foo3.mcfunction b/examples/overlay_replaces_function2/proc/data/demo/function/foo3.mcfunction new file mode 100644 index 0000000..597f9ba --- /dev/null +++ b/examples/overlay_replaces_function2/proc/data/demo/function/foo3.mcfunction @@ -0,0 +1 @@ +say this is the same in both (3) diff --git a/examples/overlay_replaces_function2/proc/data/demo/function/foo4.mcfunction b/examples/overlay_replaces_function2/proc/data/demo/function/foo4.mcfunction new file mode 100644 index 0000000..b158d8b --- /dev/null +++ b/examples/overlay_replaces_function2/proc/data/demo/function/foo4.mcfunction @@ -0,0 +1 @@ +say this is the same in both (4) diff --git a/examples/overlay_replaces_function2/proc/pack.mcmeta b/examples/overlay_replaces_function2/proc/pack.mcmeta new file mode 100644 index 0000000..8b4f4d2 --- /dev/null +++ b/examples/overlay_replaces_function2/proc/pack.mcmeta @@ -0,0 +1,6 @@ +{ + "pack": { + "pack_format": 48, + "description": "" + } +} diff --git a/examples/overlay_replaces_function2/src/data/demo/function/demo.mcfunction b/examples/overlay_replaces_function2/src/data/demo/function/demo.mcfunction new file mode 100644 index 0000000..92635b5 --- /dev/null +++ b/examples/overlay_replaces_function2/src/data/demo/function/demo.mcfunction @@ -0,0 +1 @@ +say this remains in the normal data folder diff --git a/examples/overlay_replaces_function2/src/data/demo/function/demo2.mcfunction b/examples/overlay_replaces_function2/src/data/demo/function/demo2.mcfunction new file mode 100644 index 0000000..5bed6ab --- /dev/null +++ b/examples/overlay_replaces_function2/src/data/demo/function/demo2.mcfunction @@ -0,0 +1 @@ +say this remains in the normal data folder (2) diff --git a/examples/overlay_replaces_function2/src/data/demo/function/demo3.mcfunction b/examples/overlay_replaces_function2/src/data/demo/function/demo3.mcfunction new file mode 100644 index 0000000..53663ba --- /dev/null +++ b/examples/overlay_replaces_function2/src/data/demo/function/demo3.mcfunction @@ -0,0 +1 @@ +say this remains in the normal data folder (3) diff --git a/examples/overlay_replaces_function2/src/data/demo/function/demo4.mcfunction b/examples/overlay_replaces_function2/src/data/demo/function/demo4.mcfunction new file mode 100644 index 0000000..15224ce --- /dev/null +++ b/examples/overlay_replaces_function2/src/data/demo/function/demo4.mcfunction @@ -0,0 +1 @@ +say this remains in the normal data folder (4) diff --git a/examples/overlay_replaces_function2/src/data/demo/function/demo5.mcfunction b/examples/overlay_replaces_function2/src/data/demo/function/demo5.mcfunction new file mode 100644 index 0000000..da40e9b --- /dev/null +++ b/examples/overlay_replaces_function2/src/data/demo/function/demo5.mcfunction @@ -0,0 +1 @@ +say this remains in the normal data folder (5) diff --git a/examples/overlay_replaces_function2/src/data/demo/function/demo6.mcfunction b/examples/overlay_replaces_function2/src/data/demo/function/demo6.mcfunction new file mode 100644 index 0000000..c25258a --- /dev/null +++ b/examples/overlay_replaces_function2/src/data/demo/function/demo6.mcfunction @@ -0,0 +1 @@ +say this remains in the normal data folder (6) diff --git a/examples/overlay_replaces_function2/src/data/demo/function/foo.mcfunction b/examples/overlay_replaces_function2/src/data/demo/function/foo.mcfunction new file mode 100644 index 0000000..8dc9fba --- /dev/null +++ b/examples/overlay_replaces_function2/src/data/demo/function/foo.mcfunction @@ -0,0 +1 @@ +say this is the same in both diff --git a/examples/overlay_replaces_function2/src/data/demo/function/foo2.mcfunction b/examples/overlay_replaces_function2/src/data/demo/function/foo2.mcfunction new file mode 100644 index 0000000..25387d1 --- /dev/null +++ b/examples/overlay_replaces_function2/src/data/demo/function/foo2.mcfunction @@ -0,0 +1 @@ +say this is the same in both (2) diff --git a/examples/overlay_replaces_function2/src/data/demo/function/foo3.mcfunction b/examples/overlay_replaces_function2/src/data/demo/function/foo3.mcfunction new file mode 100644 index 0000000..597f9ba --- /dev/null +++ b/examples/overlay_replaces_function2/src/data/demo/function/foo3.mcfunction @@ -0,0 +1 @@ +say this is the same in both (3) diff --git a/examples/overlay_replaces_function2/src/data/demo/function/foo4.mcfunction b/examples/overlay_replaces_function2/src/data/demo/function/foo4.mcfunction new file mode 100644 index 0000000..b158d8b --- /dev/null +++ b/examples/overlay_replaces_function2/src/data/demo/function/foo4.mcfunction @@ -0,0 +1 @@ +say this is the same in both (4) diff --git a/examples/overlay_replaces_function3/beet.yaml b/examples/overlay_replaces_function3/beet.yaml new file mode 100644 index 0000000..41b69cb --- /dev/null +++ b/examples/overlay_replaces_function3/beet.yaml @@ -0,0 +1,12 @@ +data_pack: + load: src + pack_format: 57 + supported_formats: [48,57] + +pipeline: + - beet_observer + +meta: + observer: + overlays: + - process: proc diff --git a/examples/overlay_replaces_function3/proc/data/demo/function/demo.mcfunction b/examples/overlay_replaces_function3/proc/data/demo/function/demo.mcfunction new file mode 100644 index 0000000..8d10803 --- /dev/null +++ b/examples/overlay_replaces_function3/proc/data/demo/function/demo.mcfunction @@ -0,0 +1 @@ +say an overlay is created for this diff --git a/examples/overlay_replaces_function3/proc/data/demo/function/demo2.mcfunction b/examples/overlay_replaces_function3/proc/data/demo/function/demo2.mcfunction new file mode 100644 index 0000000..0cee74a --- /dev/null +++ b/examples/overlay_replaces_function3/proc/data/demo/function/demo2.mcfunction @@ -0,0 +1 @@ +say an overlay is created for this (2) diff --git a/examples/overlay_replaces_function3/proc/data/demo/function/demo3.mcfunction b/examples/overlay_replaces_function3/proc/data/demo/function/demo3.mcfunction new file mode 100644 index 0000000..06e9a6e --- /dev/null +++ b/examples/overlay_replaces_function3/proc/data/demo/function/demo3.mcfunction @@ -0,0 +1 @@ +say an overlay is created for this (3) diff --git a/examples/overlay_replaces_function3/proc/data/demo/function/foo.mcfunction b/examples/overlay_replaces_function3/proc/data/demo/function/foo.mcfunction new file mode 100644 index 0000000..8dc9fba --- /dev/null +++ b/examples/overlay_replaces_function3/proc/data/demo/function/foo.mcfunction @@ -0,0 +1 @@ +say this is the same in both diff --git a/examples/overlay_replaces_function3/proc/data/demo/function/foo2.mcfunction b/examples/overlay_replaces_function3/proc/data/demo/function/foo2.mcfunction new file mode 100644 index 0000000..25387d1 --- /dev/null +++ b/examples/overlay_replaces_function3/proc/data/demo/function/foo2.mcfunction @@ -0,0 +1 @@ +say this is the same in both (2) diff --git a/examples/overlay_replaces_function3/proc/data/demo/function/nested/demo4.mcfunction b/examples/overlay_replaces_function3/proc/data/demo/function/nested/demo4.mcfunction new file mode 100644 index 0000000..917642e --- /dev/null +++ b/examples/overlay_replaces_function3/proc/data/demo/function/nested/demo4.mcfunction @@ -0,0 +1 @@ +say an overlay is created for this (4) diff --git a/examples/overlay_replaces_function3/proc/data/demo/function/nested/demo5.mcfunction b/examples/overlay_replaces_function3/proc/data/demo/function/nested/demo5.mcfunction new file mode 100644 index 0000000..ab7a0a9 --- /dev/null +++ b/examples/overlay_replaces_function3/proc/data/demo/function/nested/demo5.mcfunction @@ -0,0 +1 @@ +say an overlay is created for this (5) diff --git a/examples/overlay_replaces_function3/proc/data/demo/function/nested/demo6.mcfunction b/examples/overlay_replaces_function3/proc/data/demo/function/nested/demo6.mcfunction new file mode 100644 index 0000000..ac0335f --- /dev/null +++ b/examples/overlay_replaces_function3/proc/data/demo/function/nested/demo6.mcfunction @@ -0,0 +1 @@ +say an overlay is created for this (6) diff --git a/examples/overlay_replaces_function3/proc/data/demo/function/nested/foo3.mcfunction b/examples/overlay_replaces_function3/proc/data/demo/function/nested/foo3.mcfunction new file mode 100644 index 0000000..597f9ba --- /dev/null +++ b/examples/overlay_replaces_function3/proc/data/demo/function/nested/foo3.mcfunction @@ -0,0 +1 @@ +say this is the same in both (3) diff --git a/examples/overlay_replaces_function3/proc/data/demo/function/nested/foo4.mcfunction b/examples/overlay_replaces_function3/proc/data/demo/function/nested/foo4.mcfunction new file mode 100644 index 0000000..b158d8b --- /dev/null +++ b/examples/overlay_replaces_function3/proc/data/demo/function/nested/foo4.mcfunction @@ -0,0 +1 @@ +say this is the same in both (4) diff --git a/examples/overlay_replaces_function3/proc/pack.mcmeta b/examples/overlay_replaces_function3/proc/pack.mcmeta new file mode 100644 index 0000000..8b4f4d2 --- /dev/null +++ b/examples/overlay_replaces_function3/proc/pack.mcmeta @@ -0,0 +1,6 @@ +{ + "pack": { + "pack_format": 48, + "description": "" + } +} diff --git a/examples/overlay_replaces_function3/src/data/demo/function/demo.mcfunction b/examples/overlay_replaces_function3/src/data/demo/function/demo.mcfunction new file mode 100644 index 0000000..92635b5 --- /dev/null +++ b/examples/overlay_replaces_function3/src/data/demo/function/demo.mcfunction @@ -0,0 +1 @@ +say this remains in the normal data folder diff --git a/examples/overlay_replaces_function3/src/data/demo/function/demo2.mcfunction b/examples/overlay_replaces_function3/src/data/demo/function/demo2.mcfunction new file mode 100644 index 0000000..5bed6ab --- /dev/null +++ b/examples/overlay_replaces_function3/src/data/demo/function/demo2.mcfunction @@ -0,0 +1 @@ +say this remains in the normal data folder (2) diff --git a/examples/overlay_replaces_function3/src/data/demo/function/demo3.mcfunction b/examples/overlay_replaces_function3/src/data/demo/function/demo3.mcfunction new file mode 100644 index 0000000..53663ba --- /dev/null +++ b/examples/overlay_replaces_function3/src/data/demo/function/demo3.mcfunction @@ -0,0 +1 @@ +say this remains in the normal data folder (3) diff --git a/examples/overlay_replaces_function3/src/data/demo/function/foo.mcfunction b/examples/overlay_replaces_function3/src/data/demo/function/foo.mcfunction new file mode 100644 index 0000000..8dc9fba --- /dev/null +++ b/examples/overlay_replaces_function3/src/data/demo/function/foo.mcfunction @@ -0,0 +1 @@ +say this is the same in both diff --git a/examples/overlay_replaces_function3/src/data/demo/function/foo2.mcfunction b/examples/overlay_replaces_function3/src/data/demo/function/foo2.mcfunction new file mode 100644 index 0000000..25387d1 --- /dev/null +++ b/examples/overlay_replaces_function3/src/data/demo/function/foo2.mcfunction @@ -0,0 +1 @@ +say this is the same in both (2) diff --git a/examples/overlay_replaces_function3/src/data/demo/function/nested/demo4.mcfunction b/examples/overlay_replaces_function3/src/data/demo/function/nested/demo4.mcfunction new file mode 100644 index 0000000..15224ce --- /dev/null +++ b/examples/overlay_replaces_function3/src/data/demo/function/nested/demo4.mcfunction @@ -0,0 +1 @@ +say this remains in the normal data folder (4) diff --git a/examples/overlay_replaces_function3/src/data/demo/function/nested/demo5.mcfunction b/examples/overlay_replaces_function3/src/data/demo/function/nested/demo5.mcfunction new file mode 100644 index 0000000..da40e9b --- /dev/null +++ b/examples/overlay_replaces_function3/src/data/demo/function/nested/demo5.mcfunction @@ -0,0 +1 @@ +say this remains in the normal data folder (5) diff --git a/examples/overlay_replaces_function3/src/data/demo/function/nested/demo6.mcfunction b/examples/overlay_replaces_function3/src/data/demo/function/nested/demo6.mcfunction new file mode 100644 index 0000000..c25258a --- /dev/null +++ b/examples/overlay_replaces_function3/src/data/demo/function/nested/demo6.mcfunction @@ -0,0 +1 @@ +say this remains in the normal data folder (6) diff --git a/examples/overlay_replaces_function3/src/data/demo/function/nested/foo3.mcfunction b/examples/overlay_replaces_function3/src/data/demo/function/nested/foo3.mcfunction new file mode 100644 index 0000000..597f9ba --- /dev/null +++ b/examples/overlay_replaces_function3/src/data/demo/function/nested/foo3.mcfunction @@ -0,0 +1 @@ +say this is the same in both (3) diff --git a/examples/overlay_replaces_function3/src/data/demo/function/nested/foo4.mcfunction b/examples/overlay_replaces_function3/src/data/demo/function/nested/foo4.mcfunction new file mode 100644 index 0000000..b158d8b --- /dev/null +++ b/examples/overlay_replaces_function3/src/data/demo/function/nested/foo4.mcfunction @@ -0,0 +1 @@ +say this is the same in both (4) diff --git a/examples/overlay_replaces_loot_table1/beet.yaml b/examples/overlay_replaces_loot_table1/beet.yaml new file mode 100644 index 0000000..41b69cb --- /dev/null +++ b/examples/overlay_replaces_loot_table1/beet.yaml @@ -0,0 +1,12 @@ +data_pack: + load: src + pack_format: 57 + supported_formats: [48,57] + +pipeline: + - beet_observer + +meta: + observer: + overlays: + - process: proc diff --git a/examples/overlay_replaces_loot_table1/proc/data/demo/loot_table/demo.json b/examples/overlay_replaces_loot_table1/proc/data/demo/loot_table/demo.json new file mode 100644 index 0000000..26bdc3b --- /dev/null +++ b/examples/overlay_replaces_loot_table1/proc/data/demo/loot_table/demo.json @@ -0,0 +1,19 @@ +{ + "pools": [ + { + "rolls": 1, + "entries": [ + { + "type": "minecraft:item", + "name": "minecraft:stick", + "functions": [ + { + "function": "minecraft:set_custom_data", + "tag": "{msg:'an overlay is created for this'}" + } + ] + } + ] + } + ] +} diff --git a/examples/overlay_replaces_loot_table1/proc/data/demo/loot_table/foo.json b/examples/overlay_replaces_loot_table1/proc/data/demo/loot_table/foo.json new file mode 100644 index 0000000..53ff4ff --- /dev/null +++ b/examples/overlay_replaces_loot_table1/proc/data/demo/loot_table/foo.json @@ -0,0 +1,19 @@ +{ + "pools": [ + { + "rolls": 1, + "entries": [ + { + "type": "minecraft:item", + "name": "minecraft:stick", + "functions": [ + { + "function": "minecraft:set_custom_data", + "tag": "{msg:'this is the same in both'}" + } + ] + } + ] + } + ] +} diff --git a/examples/overlay_replaces_loot_table1/proc/pack.mcmeta b/examples/overlay_replaces_loot_table1/proc/pack.mcmeta new file mode 100644 index 0000000..8b4f4d2 --- /dev/null +++ b/examples/overlay_replaces_loot_table1/proc/pack.mcmeta @@ -0,0 +1,6 @@ +{ + "pack": { + "pack_format": 48, + "description": "" + } +} diff --git a/examples/overlay_replaces_loot_table1/src/data/demo/loot_table/demo.json b/examples/overlay_replaces_loot_table1/src/data/demo/loot_table/demo.json new file mode 100644 index 0000000..615d358 --- /dev/null +++ b/examples/overlay_replaces_loot_table1/src/data/demo/loot_table/demo.json @@ -0,0 +1,19 @@ +{ + "pools": [ + { + "rolls": 1, + "entries": [ + { + "type": "minecraft:item", + "name": "minecraft:stick", + "functions": [ + { + "function": "minecraft:set_custom_data", + "tag": "{msg:'this remains in the normal data folder'}" + } + ] + } + ] + } + ] +} diff --git a/examples/overlay_replaces_loot_table1/src/data/demo/loot_table/foo.json b/examples/overlay_replaces_loot_table1/src/data/demo/loot_table/foo.json new file mode 100644 index 0000000..53ff4ff --- /dev/null +++ b/examples/overlay_replaces_loot_table1/src/data/demo/loot_table/foo.json @@ -0,0 +1,19 @@ +{ + "pools": [ + { + "rolls": 1, + "entries": [ + { + "type": "minecraft:item", + "name": "minecraft:stick", + "functions": [ + { + "function": "minecraft:set_custom_data", + "tag": "{msg:'this is the same in both'}" + } + ] + } + ] + } + ] +} diff --git a/examples/zipped_overlay1/beet.yaml b/examples/zipped_overlay1/beet.yaml new file mode 100644 index 0000000..ba01eec --- /dev/null +++ b/examples/zipped_overlay1/beet.yaml @@ -0,0 +1,12 @@ +data_pack: + load: src + pack_format: 57 + supported_formats: [48,57] + +pipeline: + - beet_observer + +meta: + observer: + overlays: + - process: proc.zip diff --git a/examples/zipped_overlay1/proc.zip b/examples/zipped_overlay1/proc.zip new file mode 100644 index 0000000000000000000000000000000000000000..f45b1c33d87715daa2dc3d5552ece082a74bcaca GIT binary patch literal 1251 zcmWIWW@Zs#00Ec9rIBC;lwf60U`R%t*faDP97`W?;R z+J0+7G)|t-31e6^sVAiM(UChLt!Hdnm;9N;qsI{7&Cao8QAjSxHV}pc61rQIfigxh-a)}4mp*lico`XW?*u!^*5JJv$Wjo-?j%Q` z3^&k81&PVoK>Kr3OA_G$fg=H|eijrEpylCnE^JfK3bsuP_x#xMXVIM_LJJmjw(_}H zsBX2`sj+#1im^Sv#+oH8B5R+ndddWLjo(j$SW}>VAUgxR8JR?waVJHf5-@lRQcP^Z z#BC%fX~Mu;M`xIkL?%?+=7N$c47_#hMllzbu!u;w5DQ?*1vw#sk}eD^X}p8o0@4yP zEa+j@Atw@0>V$zMjTwy4pa+K&+&?6yRdoB1lL08{!N8Kn-$46FNQeR6tZX37Y(VJ3 L#K6!A#0(4oeSsZ| literal 0 HcmV?d00001 diff --git a/examples/zipped_overlay1/src/data/demo/function/demo.mcfunction b/examples/zipped_overlay1/src/data/demo/function/demo.mcfunction new file mode 100644 index 0000000..92635b5 --- /dev/null +++ b/examples/zipped_overlay1/src/data/demo/function/demo.mcfunction @@ -0,0 +1 @@ +say this remains in the normal data folder diff --git a/examples/zipped_overlay1/src/data/demo/function/foo.mcfunction b/examples/zipped_overlay1/src/data/demo/function/foo.mcfunction new file mode 100644 index 0000000..8dc9fba --- /dev/null +++ b/examples/zipped_overlay1/src/data/demo/function/foo.mcfunction @@ -0,0 +1 @@ +say this is the same in both diff --git a/examples/zipped_overlay2/beet.yaml b/examples/zipped_overlay2/beet.yaml new file mode 100644 index 0000000..199519e --- /dev/null +++ b/examples/zipped_overlay2/beet.yaml @@ -0,0 +1,12 @@ +data_pack: + load: src + pack_format: 57 + supported_formats: [48,57] + +pipeline: + - beet_observer + +meta: + observer: + overlays: + - process: nested/proc.zip diff --git a/examples/zipped_overlay2/nested/proc.zip b/examples/zipped_overlay2/nested/proc.zip new file mode 100644 index 0000000000000000000000000000000000000000..f45b1c33d87715daa2dc3d5552ece082a74bcaca GIT binary patch literal 1251 zcmWIWW@Zs#00Ec9rIBC;lwf60U`R%t*faDP97`W?;R z+J0+7G)|t-31e6^sVAiM(UChLt!Hdnm;9N;qsI{7&Cao8QAjSxHV}pc61rQIfigxh-a)}4mp*lico`XW?*u!^*5JJv$Wjo-?j%Q` z3^&k81&PVoK>Kr3OA_G$fg=H|eijrEpylCnE^JfK3bsuP_x#xMXVIM_LJJmjw(_}H zsBX2`sj+#1im^Sv#+oH8B5R+ndddWLjo(j$SW}>VAUgxR8JR?waVJHf5-@lRQcP^Z z#BC%fX~Mu;M`xIkL?%?+=7N$c47_#hMllzbu!u;w5DQ?*1vw#sk}eD^X}p8o0@4yP zEa+j@Atw@0>V$zMjTwy4pa+K&+&?6yRdoB1lL08{!N8Kn-$46FNQeR6tZX37Y(VJ3 L#K6!A#0(4oeSsZ| literal 0 HcmV?d00001 diff --git a/examples/zipped_overlay2/src/data/demo/function/demo.mcfunction b/examples/zipped_overlay2/src/data/demo/function/demo.mcfunction new file mode 100644 index 0000000..92635b5 --- /dev/null +++ b/examples/zipped_overlay2/src/data/demo/function/demo.mcfunction @@ -0,0 +1 @@ +say this remains in the normal data folder diff --git a/examples/zipped_overlay2/src/data/demo/function/foo.mcfunction b/examples/zipped_overlay2/src/data/demo/function/foo.mcfunction new file mode 100644 index 0000000..8dc9fba --- /dev/null +++ b/examples/zipped_overlay2/src/data/demo/function/foo.mcfunction @@ -0,0 +1 @@ +say this is the same in both diff --git a/examples/zipped_overlay3/beet.yaml b/examples/zipped_overlay3/beet.yaml new file mode 100644 index 0000000..4f65bf0 --- /dev/null +++ b/examples/zipped_overlay3/beet.yaml @@ -0,0 +1,12 @@ +data_pack: + load: src + pack_format: 57 + supported_formats: [48,57] + +pipeline: + - beet_observer + +meta: + observer: + overlays: + - process: nested/nested/proc.zip diff --git a/examples/zipped_overlay3/nested/nested/proc.zip b/examples/zipped_overlay3/nested/nested/proc.zip new file mode 100644 index 0000000000000000000000000000000000000000..f45b1c33d87715daa2dc3d5552ece082a74bcaca GIT binary patch literal 1251 zcmWIWW@Zs#00Ec9rIBC;lwf60U`R%t*faDP97`W?;R z+J0+7G)|t-31e6^sVAiM(UChLt!Hdnm;9N;qsI{7&Cao8QAjSxHV}pc61rQIfigxh-a)}4mp*lico`XW?*u!^*5JJv$Wjo-?j%Q` z3^&k81&PVoK>Kr3OA_G$fg=H|eijrEpylCnE^JfK3bsuP_x#xMXVIM_LJJmjw(_}H zsBX2`sj+#1im^Sv#+oH8B5R+ndddWLjo(j$SW}>VAUgxR8JR?waVJHf5-@lRQcP^Z z#BC%fX~Mu;M`xIkL?%?+=7N$c47_#hMllzbu!u;w5DQ?*1vw#sk}eD^X}p8o0@4yP zEa+j@Atw@0>V$zMjTwy4pa+K&+&?6yRdoB1lL08{!N8Kn-$46FNQeR6tZX37Y(VJ3 L#K6!A#0(4oeSsZ| literal 0 HcmV?d00001 diff --git a/examples/zipped_overlay3/src/data/demo/function/demo.mcfunction b/examples/zipped_overlay3/src/data/demo/function/demo.mcfunction new file mode 100644 index 0000000..92635b5 --- /dev/null +++ b/examples/zipped_overlay3/src/data/demo/function/demo.mcfunction @@ -0,0 +1 @@ +say this remains in the normal data folder diff --git a/examples/zipped_overlay3/src/data/demo/function/foo.mcfunction b/examples/zipped_overlay3/src/data/demo/function/foo.mcfunction new file mode 100644 index 0000000..8dc9fba --- /dev/null +++ b/examples/zipped_overlay3/src/data/demo/function/foo.mcfunction @@ -0,0 +1 @@ +say this is the same in both diff --git a/tests/snapshots/examples__build_nested_overlay1__0.pack.md b/tests/snapshots/examples__build_nested_overlay1__0.pack.md new file mode 100644 index 0000000..aaa0ad6 --- /dev/null +++ b/tests/snapshots/examples__build_nested_overlay1__0.pack.md @@ -0,0 +1,54 @@ +# Lectern snapshot + +## Data pack + +`@data_pack pack.mcmeta` + +```json +{ + "pack": { + "pack_format": 57, + "description": "", + "supported_formats": [ + 48, + 57 + ] + }, + "overlays": { + "entries": [ + { + "formats": 48, + "directory": "overlay_48" + } + ] + } +} +``` + +### demo + +`@function demo:demo` + +```mcfunction +say this remains in the normal data folder +``` + +`@function demo:foo` + +```mcfunction +say this is the same in both +``` + +## Overlay `overlay_48` + +`@overlay overlay_48` + +### demo + +`@function demo:demo` + +```mcfunction +say an overlay is created for this +``` + +`@endoverlay` diff --git a/tests/snapshots/examples__build_nested_overlay2__0.pack.md b/tests/snapshots/examples__build_nested_overlay2__0.pack.md new file mode 100644 index 0000000..aaa0ad6 --- /dev/null +++ b/tests/snapshots/examples__build_nested_overlay2__0.pack.md @@ -0,0 +1,54 @@ +# Lectern snapshot + +## Data pack + +`@data_pack pack.mcmeta` + +```json +{ + "pack": { + "pack_format": 57, + "description": "", + "supported_formats": [ + 48, + 57 + ] + }, + "overlays": { + "entries": [ + { + "formats": 48, + "directory": "overlay_48" + } + ] + } +} +``` + +### demo + +`@function demo:demo` + +```mcfunction +say this remains in the normal data folder +``` + +`@function demo:foo` + +```mcfunction +say this is the same in both +``` + +## Overlay `overlay_48` + +`@overlay overlay_48` + +### demo + +`@function demo:demo` + +```mcfunction +say an overlay is created for this +``` + +`@endoverlay` diff --git a/tests/snapshots/examples__build_overlay_adds_function1__0.pack.md b/tests/snapshots/examples__build_overlay_adds_function1__0.pack.md new file mode 100644 index 0000000..96cbc90 --- /dev/null +++ b/tests/snapshots/examples__build_overlay_adds_function1__0.pack.md @@ -0,0 +1,48 @@ +# Lectern snapshot + +## Data pack + +`@data_pack pack.mcmeta` + +```json +{ + "pack": { + "pack_format": 57, + "description": "", + "supported_formats": [ + 48, + 57 + ] + }, + "overlays": { + "entries": [ + { + "formats": 48, + "directory": "overlay_48" + } + ] + } +} +``` + +### demo + +`@function demo:foo` + +```mcfunction +say this is the same in both +``` + +## Overlay `overlay_48` + +`@overlay overlay_48` + +### demo + +`@function demo:demo` + +```mcfunction +say this only exists in the overlay +``` + +`@endoverlay` diff --git a/tests/snapshots/examples__build_overlay_adds_function2__0.pack.md b/tests/snapshots/examples__build_overlay_adds_function2__0.pack.md new file mode 100644 index 0000000..d0cf555 --- /dev/null +++ b/tests/snapshots/examples__build_overlay_adds_function2__0.pack.md @@ -0,0 +1,96 @@ +# Lectern snapshot + +## Data pack + +`@data_pack pack.mcmeta` + +```json +{ + "pack": { + "pack_format": 57, + "description": "", + "supported_formats": [ + 48, + 57 + ] + }, + "overlays": { + "entries": [ + { + "formats": 48, + "directory": "overlay_48" + } + ] + } +} +``` + +### demo + +`@function demo:foo` + +```mcfunction +say this is the same in both +``` + +`@function demo:foo2` + +```mcfunction +say this is the same in both (2) +``` + +`@function demo:foo3` + +```mcfunction +say this is the same in both (3) +``` + +`@function demo:foo4` + +```mcfunction +say this is the same in both (4) +``` + +## Overlay `overlay_48` + +`@overlay overlay_48` + +### demo + +`@function demo:demo` + +```mcfunction +say this only exists in the overlay +``` + +`@function demo:demo2` + +```mcfunction +say this only exists in the overlay (2) +``` + +`@function demo:demo3` + +```mcfunction +say this only exists in the overlay (3) +``` + +`@function demo:demo4` + +```mcfunction +say this only exists in the overlay (4) +``` + +`@function demo:demo5` + +```mcfunction +say this only exists in the overlay (5) +``` + +`@function demo:demo6` + +```mcfunction +say this only exists in the overlay (6) +``` + +`@endoverlay` diff --git a/tests/snapshots/examples__build_overlay_adds_function3__0.pack.md b/tests/snapshots/examples__build_overlay_adds_function3__0.pack.md new file mode 100644 index 0000000..237bc77 --- /dev/null +++ b/tests/snapshots/examples__build_overlay_adds_function3__0.pack.md @@ -0,0 +1,96 @@ +# Lectern snapshot + +## Data pack + +`@data_pack pack.mcmeta` + +```json +{ + "pack": { + "pack_format": 57, + "description": "", + "supported_formats": [ + 48, + 57 + ] + }, + "overlays": { + "entries": [ + { + "formats": 48, + "directory": "overlay_48" + } + ] + } +} +``` + +### demo + +`@function demo:foo` + +```mcfunction +say this is the same in both +``` + +`@function demo:foo2` + +```mcfunction +say this is the same in both (2) +``` + +`@function demo:nested/foo3` + +```mcfunction +say this is the same in both (3) +``` + +`@function demo:nested/foo4` + +```mcfunction +say this is the same in both (4) +``` + +## Overlay `overlay_48` + +`@overlay overlay_48` + +### demo + +`@function demo:demo` + +```mcfunction +say this only exists in the overlay +``` + +`@function demo:demo2` + +```mcfunction +say this only exists in the overlay (2) +``` + +`@function demo:demo3` + +```mcfunction +say this only exists in the overlay (3) +``` + +`@function demo:nested/demo4` + +```mcfunction +say this only exists in the overlay (4) +``` + +`@function demo:nested/demo5` + +```mcfunction +say this only exists in the overlay (5) +``` + +`@function demo:nested/demo6` + +```mcfunction +say this only exists in the overlay (6) +``` + +`@endoverlay` diff --git a/tests/snapshots/examples__build_overlay_adds_loot_table1__0.pack.md b/tests/snapshots/examples__build_overlay_adds_loot_table1__0.pack.md new file mode 100644 index 0000000..05c78ab --- /dev/null +++ b/tests/snapshots/examples__build_overlay_adds_loot_table1__0.pack.md @@ -0,0 +1,84 @@ +# Lectern snapshot + +## Data pack + +`@data_pack pack.mcmeta` + +```json +{ + "pack": { + "pack_format": 57, + "description": "", + "supported_formats": [ + 48, + 57 + ] + }, + "overlays": { + "entries": [ + { + "formats": 48, + "directory": "overlay_48" + } + ] + } +} +``` + +### demo + +`@loot_table demo:foo` + +```json +{ + "pools": [ + { + "rolls": 1, + "entries": [ + { + "type": "minecraft:item", + "name": "minecraft:stick", + "functions": [ + { + "function": "minecraft:set_custom_data", + "tag": "{msg:'this is the same in both'}" + } + ] + } + ] + } + ] +} +``` + +## Overlay `overlay_48` + +`@overlay overlay_48` + +### demo + +`@loot_table demo:demo` + +```json +{ + "pools": [ + { + "rolls": 1, + "entries": [ + { + "type": "minecraft:item", + "name": "minecraft:stick", + "functions": [ + { + "function": "minecraft:set_custom_data", + "tag": "{msg:'this only exists in the overlay'}" + } + ] + } + ] + } + ] +} +``` + +`@endoverlay` diff --git a/tests/snapshots/examples__build_overlay_deletes_function1__0.pack.md b/tests/snapshots/examples__build_overlay_deletes_function1__0.pack.md new file mode 100644 index 0000000..395d54f --- /dev/null +++ b/tests/snapshots/examples__build_overlay_deletes_function1__0.pack.md @@ -0,0 +1,48 @@ +# Lectern snapshot + +## Data pack + +`@data_pack pack.mcmeta` + +```json +{ + "pack": { + "pack_format": 57, + "description": "", + "supported_formats": [ + 48, + 57 + ] + }, + "overlays": { + "entries": [ + { + "formats": 57, + "directory": "default_overlay" + } + ] + } +} +``` + +### demo + +`@function demo:foo` + +```mcfunction +say this is the same in both +``` + +## Overlay `default_overlay` + +`@overlay default_overlay` + +### demo + +`@function demo:demo` + +```mcfunction +say this only exists in the normal data folder +``` + +`@endoverlay` diff --git a/tests/snapshots/examples__build_overlay_deletes_function2__0.pack.md b/tests/snapshots/examples__build_overlay_deletes_function2__0.pack.md new file mode 100644 index 0000000..88fc2c6 --- /dev/null +++ b/tests/snapshots/examples__build_overlay_deletes_function2__0.pack.md @@ -0,0 +1,96 @@ +# Lectern snapshot + +## Data pack + +`@data_pack pack.mcmeta` + +```json +{ + "pack": { + "pack_format": 57, + "description": "", + "supported_formats": [ + 48, + 57 + ] + }, + "overlays": { + "entries": [ + { + "formats": 57, + "directory": "default_overlay" + } + ] + } +} +``` + +### demo + +`@function demo:foo` + +```mcfunction +say this is the same in both +``` + +`@function demo:foo2` + +```mcfunction +say this is the same in both (2) +``` + +`@function demo:foo3` + +```mcfunction +say this is the same in both (3) +``` + +`@function demo:foo4` + +```mcfunction +say this is the same in both (4) +``` + +## Overlay `default_overlay` + +`@overlay default_overlay` + +### demo + +`@function demo:demo` + +```mcfunction +say this only exists in the normal data folder +``` + +`@function demo:demo2` + +```mcfunction +say this only exists in the normal data folder (2) +``` + +`@function demo:demo3` + +```mcfunction +say this only exists in the normal data folder (3) +``` + +`@function demo:demo4` + +```mcfunction +say this only exists in the normal data folder (4) +``` + +`@function demo:demo5` + +```mcfunction +say this only exists in the normal data folder (5) +``` + +`@function demo:demo6` + +```mcfunction +say this only exists in the normal data folder (6) +``` + +`@endoverlay` diff --git a/tests/snapshots/examples__build_overlay_deletes_function3__0.pack.md b/tests/snapshots/examples__build_overlay_deletes_function3__0.pack.md new file mode 100644 index 0000000..31c4bff --- /dev/null +++ b/tests/snapshots/examples__build_overlay_deletes_function3__0.pack.md @@ -0,0 +1,96 @@ +# Lectern snapshot + +## Data pack + +`@data_pack pack.mcmeta` + +```json +{ + "pack": { + "pack_format": 57, + "description": "", + "supported_formats": [ + 48, + 57 + ] + }, + "overlays": { + "entries": [ + { + "formats": 57, + "directory": "default_overlay" + } + ] + } +} +``` + +### demo + +`@function demo:foo` + +```mcfunction +say this is the same in both +``` + +`@function demo:foo2` + +```mcfunction +say this is the same in both (2) +``` + +`@function demo:nested/foo3` + +```mcfunction +say this is the same in both (3) +``` + +`@function demo:nested/foo4` + +```mcfunction +say this is the same in both (4) +``` + +## Overlay `default_overlay` + +`@overlay default_overlay` + +### demo + +`@function demo:demo` + +```mcfunction +say this only exists in the normal data folder +``` + +`@function demo:demo2` + +```mcfunction +say this only exists in the normal data folder (2) +``` + +`@function demo:demo3` + +```mcfunction +say this only exists in the normal data folder (3) +``` + +`@function demo:nested/demo4` + +```mcfunction +say this only exists in the normal data folder (4) +``` + +`@function demo:nested/demo5` + +```mcfunction +say this only exists in the normal data folder (5) +``` + +`@function demo:nested/demo6` + +```mcfunction +say this only exists in the normal data folder (6) +``` + +`@endoverlay` diff --git a/tests/snapshots/examples__build_overlay_deletes_loot_table1__0.pack.md b/tests/snapshots/examples__build_overlay_deletes_loot_table1__0.pack.md new file mode 100644 index 0000000..d642106 --- /dev/null +++ b/tests/snapshots/examples__build_overlay_deletes_loot_table1__0.pack.md @@ -0,0 +1,84 @@ +# Lectern snapshot + +## Data pack + +`@data_pack pack.mcmeta` + +```json +{ + "pack": { + "pack_format": 57, + "description": "", + "supported_formats": [ + 48, + 57 + ] + }, + "overlays": { + "entries": [ + { + "formats": 57, + "directory": "default_overlay" + } + ] + } +} +``` + +### demo + +`@loot_table demo:foo` + +```json +{ + "pools": [ + { + "rolls": 1, + "entries": [ + { + "type": "minecraft:item", + "name": "minecraft:stick", + "functions": [ + { + "function": "minecraft:set_custom_data", + "tag": "{msg:'this is the same in both'}" + } + ] + } + ] + } + ] +} +``` + +## Overlay `default_overlay` + +`@overlay default_overlay` + +### demo + +`@loot_table demo:demo` + +```json +{ + "pools": [ + { + "rolls": 1, + "entries": [ + { + "type": "minecraft:item", + "name": "minecraft:stick", + "functions": [ + { + "function": "minecraft:set_custom_data", + "tag": "{msg:'this only exists in the normal data folder'}" + } + ] + } + ] + } + ] +} +``` + +`@endoverlay` diff --git a/tests/snapshots/examples__build_overlay_mixed_function1__0.pack.md b/tests/snapshots/examples__build_overlay_mixed_function1__0.pack.md new file mode 100644 index 0000000..f315289 --- /dev/null +++ b/tests/snapshots/examples__build_overlay_mixed_function1__0.pack.md @@ -0,0 +1,76 @@ +# Lectern snapshot + +## Data pack + +`@data_pack pack.mcmeta` + +```json +{ + "pack": { + "pack_format": 57, + "description": "", + "supported_formats": [ + 48, + 57 + ] + }, + "overlays": { + "entries": [ + { + "formats": 57, + "directory": "default_overlay" + }, + { + "formats": 48, + "directory": "overlay_48" + } + ] + } +} +``` + +### demo + +`@function demo:demo_replace` + +```mcfunction +say this remains in the normal data folder +``` + +`@function demo:foo` + +```mcfunction +say this is the same in both +``` + +## Overlay `default_overlay` + +`@overlay default_overlay` + +### demo + +`@function demo:demo_delete` + +```mcfunction +say this only exists in the normal data folder +``` + +## Overlay `overlay_48` + +`@overlay overlay_48` + +### demo + +`@function demo:demo_replace` + +```mcfunction +say an overlay is created for this +``` + +`@function demo:demo_add` + +```mcfunction +say this only exists in the overlay +``` + +`@endoverlay` diff --git a/tests/snapshots/examples__build_overlay_replaces_function1__0.pack.md b/tests/snapshots/examples__build_overlay_replaces_function1__0.pack.md new file mode 100644 index 0000000..aaa0ad6 --- /dev/null +++ b/tests/snapshots/examples__build_overlay_replaces_function1__0.pack.md @@ -0,0 +1,54 @@ +# Lectern snapshot + +## Data pack + +`@data_pack pack.mcmeta` + +```json +{ + "pack": { + "pack_format": 57, + "description": "", + "supported_formats": [ + 48, + 57 + ] + }, + "overlays": { + "entries": [ + { + "formats": 48, + "directory": "overlay_48" + } + ] + } +} +``` + +### demo + +`@function demo:demo` + +```mcfunction +say this remains in the normal data folder +``` + +`@function demo:foo` + +```mcfunction +say this is the same in both +``` + +## Overlay `overlay_48` + +`@overlay overlay_48` + +### demo + +`@function demo:demo` + +```mcfunction +say an overlay is created for this +``` + +`@endoverlay` diff --git a/tests/snapshots/examples__build_overlay_replaces_function2__0.pack.md b/tests/snapshots/examples__build_overlay_replaces_function2__0.pack.md new file mode 100644 index 0000000..83ce017 --- /dev/null +++ b/tests/snapshots/examples__build_overlay_replaces_function2__0.pack.md @@ -0,0 +1,132 @@ +# Lectern snapshot + +## Data pack + +`@data_pack pack.mcmeta` + +```json +{ + "pack": { + "pack_format": 57, + "description": "", + "supported_formats": [ + 48, + 57 + ] + }, + "overlays": { + "entries": [ + { + "formats": 48, + "directory": "overlay_48" + } + ] + } +} +``` + +### demo + +`@function demo:demo` + +```mcfunction +say this remains in the normal data folder +``` + +`@function demo:demo2` + +```mcfunction +say this remains in the normal data folder (2) +``` + +`@function demo:demo3` + +```mcfunction +say this remains in the normal data folder (3) +``` + +`@function demo:demo4` + +```mcfunction +say this remains in the normal data folder (4) +``` + +`@function demo:demo5` + +```mcfunction +say this remains in the normal data folder (5) +``` + +`@function demo:demo6` + +```mcfunction +say this remains in the normal data folder (6) +``` + +`@function demo:foo` + +```mcfunction +say this is the same in both +``` + +`@function demo:foo2` + +```mcfunction +say this is the same in both (2) +``` + +`@function demo:foo3` + +```mcfunction +say this is the same in both (3) +``` + +`@function demo:foo4` + +```mcfunction +say this is the same in both (4) +``` + +## Overlay `overlay_48` + +`@overlay overlay_48` + +### demo + +`@function demo:demo` + +```mcfunction +say an overlay is created for this +``` + +`@function demo:demo2` + +```mcfunction +say an overlay is created for this (2) +``` + +`@function demo:demo3` + +```mcfunction +say an overlay is created for this (3) +``` + +`@function demo:demo4` + +```mcfunction +say an overlay is created for this (4) +``` + +`@function demo:demo5` + +```mcfunction +say an overlay is created for this (5) +``` + +`@function demo:demo6` + +```mcfunction +say an overlay is created for this (6) +``` + +`@endoverlay` diff --git a/tests/snapshots/examples__build_overlay_replaces_function3__0.pack.md b/tests/snapshots/examples__build_overlay_replaces_function3__0.pack.md new file mode 100644 index 0000000..d85625c --- /dev/null +++ b/tests/snapshots/examples__build_overlay_replaces_function3__0.pack.md @@ -0,0 +1,132 @@ +# Lectern snapshot + +## Data pack + +`@data_pack pack.mcmeta` + +```json +{ + "pack": { + "pack_format": 57, + "description": "", + "supported_formats": [ + 48, + 57 + ] + }, + "overlays": { + "entries": [ + { + "formats": 48, + "directory": "overlay_48" + } + ] + } +} +``` + +### demo + +`@function demo:demo` + +```mcfunction +say this remains in the normal data folder +``` + +`@function demo:demo2` + +```mcfunction +say this remains in the normal data folder (2) +``` + +`@function demo:demo3` + +```mcfunction +say this remains in the normal data folder (3) +``` + +`@function demo:foo` + +```mcfunction +say this is the same in both +``` + +`@function demo:foo2` + +```mcfunction +say this is the same in both (2) +``` + +`@function demo:nested/demo4` + +```mcfunction +say this remains in the normal data folder (4) +``` + +`@function demo:nested/demo5` + +```mcfunction +say this remains in the normal data folder (5) +``` + +`@function demo:nested/demo6` + +```mcfunction +say this remains in the normal data folder (6) +``` + +`@function demo:nested/foo3` + +```mcfunction +say this is the same in both (3) +``` + +`@function demo:nested/foo4` + +```mcfunction +say this is the same in both (4) +``` + +## Overlay `overlay_48` + +`@overlay overlay_48` + +### demo + +`@function demo:demo` + +```mcfunction +say an overlay is created for this +``` + +`@function demo:demo2` + +```mcfunction +say an overlay is created for this (2) +``` + +`@function demo:demo3` + +```mcfunction +say an overlay is created for this (3) +``` + +`@function demo:nested/demo4` + +```mcfunction +say an overlay is created for this (4) +``` + +`@function demo:nested/demo5` + +```mcfunction +say an overlay is created for this (5) +``` + +`@function demo:nested/demo6` + +```mcfunction +say an overlay is created for this (6) +``` + +`@endoverlay` diff --git a/tests/snapshots/examples__build_overlay_replaces_loot_table1__0.pack.md b/tests/snapshots/examples__build_overlay_replaces_loot_table1__0.pack.md new file mode 100644 index 0000000..4a0f469 --- /dev/null +++ b/tests/snapshots/examples__build_overlay_replaces_loot_table1__0.pack.md @@ -0,0 +1,108 @@ +# Lectern snapshot + +## Data pack + +`@data_pack pack.mcmeta` + +```json +{ + "pack": { + "pack_format": 57, + "description": "", + "supported_formats": [ + 48, + 57 + ] + }, + "overlays": { + "entries": [ + { + "formats": 48, + "directory": "overlay_48" + } + ] + } +} +``` + +### demo + +`@loot_table demo:demo` + +```json +{ + "pools": [ + { + "rolls": 1, + "entries": [ + { + "type": "minecraft:item", + "name": "minecraft:stick", + "functions": [ + { + "function": "minecraft:set_custom_data", + "tag": "{msg:'this remains in the normal data folder'}" + } + ] + } + ] + } + ] +} +``` + +`@loot_table demo:foo` + +```json +{ + "pools": [ + { + "rolls": 1, + "entries": [ + { + "type": "minecraft:item", + "name": "minecraft:stick", + "functions": [ + { + "function": "minecraft:set_custom_data", + "tag": "{msg:'this is the same in both'}" + } + ] + } + ] + } + ] +} +``` + +## Overlay `overlay_48` + +`@overlay overlay_48` + +### demo + +`@loot_table demo:demo` + +```json +{ + "pools": [ + { + "rolls": 1, + "entries": [ + { + "type": "minecraft:item", + "name": "minecraft:stick", + "functions": [ + { + "function": "minecraft:set_custom_data", + "tag": "{msg:'an overlay is created for this'}" + } + ] + } + ] + } + ] +} +``` + +`@endoverlay` diff --git a/tests/snapshots/examples__build_zipped_overlay1__0.pack.md b/tests/snapshots/examples__build_zipped_overlay1__0.pack.md new file mode 100644 index 0000000..aaa0ad6 --- /dev/null +++ b/tests/snapshots/examples__build_zipped_overlay1__0.pack.md @@ -0,0 +1,54 @@ +# Lectern snapshot + +## Data pack + +`@data_pack pack.mcmeta` + +```json +{ + "pack": { + "pack_format": 57, + "description": "", + "supported_formats": [ + 48, + 57 + ] + }, + "overlays": { + "entries": [ + { + "formats": 48, + "directory": "overlay_48" + } + ] + } +} +``` + +### demo + +`@function demo:demo` + +```mcfunction +say this remains in the normal data folder +``` + +`@function demo:foo` + +```mcfunction +say this is the same in both +``` + +## Overlay `overlay_48` + +`@overlay overlay_48` + +### demo + +`@function demo:demo` + +```mcfunction +say an overlay is created for this +``` + +`@endoverlay` diff --git a/tests/snapshots/examples__build_zipped_overlay2__0.pack.md b/tests/snapshots/examples__build_zipped_overlay2__0.pack.md new file mode 100644 index 0000000..aaa0ad6 --- /dev/null +++ b/tests/snapshots/examples__build_zipped_overlay2__0.pack.md @@ -0,0 +1,54 @@ +# Lectern snapshot + +## Data pack + +`@data_pack pack.mcmeta` + +```json +{ + "pack": { + "pack_format": 57, + "description": "", + "supported_formats": [ + 48, + 57 + ] + }, + "overlays": { + "entries": [ + { + "formats": 48, + "directory": "overlay_48" + } + ] + } +} +``` + +### demo + +`@function demo:demo` + +```mcfunction +say this remains in the normal data folder +``` + +`@function demo:foo` + +```mcfunction +say this is the same in both +``` + +## Overlay `overlay_48` + +`@overlay overlay_48` + +### demo + +`@function demo:demo` + +```mcfunction +say an overlay is created for this +``` + +`@endoverlay` diff --git a/tests/snapshots/examples__build_zipped_overlay3__0.pack.md b/tests/snapshots/examples__build_zipped_overlay3__0.pack.md new file mode 100644 index 0000000..aaa0ad6 --- /dev/null +++ b/tests/snapshots/examples__build_zipped_overlay3__0.pack.md @@ -0,0 +1,54 @@ +# Lectern snapshot + +## Data pack + +`@data_pack pack.mcmeta` + +```json +{ + "pack": { + "pack_format": 57, + "description": "", + "supported_formats": [ + 48, + 57 + ] + }, + "overlays": { + "entries": [ + { + "formats": 48, + "directory": "overlay_48" + } + ] + } +} +``` + +### demo + +`@function demo:demo` + +```mcfunction +say this remains in the normal data folder +``` + +`@function demo:foo` + +```mcfunction +say this is the same in both +``` + +## Overlay `overlay_48` + +`@overlay overlay_48` + +### demo + +`@function demo:demo` + +```mcfunction +say an overlay is created for this +``` + +`@endoverlay` diff --git a/tests/test_examples.py b/tests/test_examples.py index c87cf17..f8227e3 100644 --- a/tests/test_examples.py +++ b/tests/test_examples.py @@ -6,8 +6,9 @@ from lectern import Document from pytest_insta import SnapshotFixture +EXAMPLES = [f for f in os.listdir("examples") if not (f.startswith("nosnap_") or f.startswith("."))] -@pytest.mark.parametrize("directory", os.listdir("examples")) +@pytest.mark.parametrize("directory", EXAMPLES) def test_build(snapshot: SnapshotFixture, directory: str, tmp_path: Path): with run_beet( directory=f"examples/{directory}",