Skip to content

Commit

Permalink
feat: accept links for process location
Browse files Browse the repository at this point in the history
  • Loading branch information
BPR02 committed Dec 11, 2024
1 parent fdcf7e3 commit 0306a21
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
1 change: 0 additions & 1 deletion TODO.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,3 @@
- create more tests
- allow separate dp and rp default formats
- restore worldgen tests once [lectern #361](https://github.com/mcbeet/lectern/issues/361) is fixed
- allow URLs for datapack/resource pack loading
10 changes: 6 additions & 4 deletions beet_observer/plugin.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,12 +30,14 @@ def beet_default(ctx: Context):
save.append(overlay)
# loop through all overlays
for overlay in ctx.meta["observer"]["overlays"]:
# create relative path
path = f"{ctx.directory}/{overlay['process']}"
# get pack
if overlay["process"].startswith("https://"):
load = overlay["process"]
else:
load = f"{ctx.directory}/{overlay['process']}"
# generate context for overlay pack
with run_beet(
config={"data_pack": {"load": "."}, "resource_pack": {"load": "."}},
directory=path,
config={"data_pack": {"load": load}, "resource_pack": {"load": load}}
) as ctx_overlay:
if "directory" not in overlay:
dp_dir = f"overlay_{ctx_overlay.data.pack_format}"
Expand Down

0 comments on commit 0306a21

Please sign in to comment.