diff --git a/TODO.md b/TODO.md index 721cda9..4b90fe9 100644 --- a/TODO.md +++ b/TODO.md @@ -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 diff --git a/beet_observer/plugin.py b/beet_observer/plugin.py index 257a37c..f1e2b08 100644 --- a/beet_observer/plugin.py +++ b/beet_observer/plugin.py @@ -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}"