Skip to content

Commit 0306a21

Browse files
committed
feat: accept links for process location
1 parent fdcf7e3 commit 0306a21

File tree

2 files changed

+6
-5
lines changed

2 files changed

+6
-5
lines changed

TODO.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,3 @@
44
- create more tests
55
- allow separate dp and rp default formats
66
- restore worldgen tests once [lectern #361](https://github.com/mcbeet/lectern/issues/361) is fixed
7-
- allow URLs for datapack/resource pack loading

beet_observer/plugin.py

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -30,12 +30,14 @@ def beet_default(ctx: Context):
3030
save.append(overlay)
3131
# loop through all overlays
3232
for overlay in ctx.meta["observer"]["overlays"]:
33-
# create relative path
34-
path = f"{ctx.directory}/{overlay['process']}"
33+
# get pack
34+
if overlay["process"].startswith("https://"):
35+
load = overlay["process"]
36+
else:
37+
load = f"{ctx.directory}/{overlay['process']}"
3538
# generate context for overlay pack
3639
with run_beet(
37-
config={"data_pack": {"load": "."}, "resource_pack": {"load": "."}},
38-
directory=path,
40+
config={"data_pack": {"load": load}, "resource_pack": {"load": load}}
3941
) as ctx_overlay:
4042
if "directory" not in overlay:
4143
dp_dir = f"overlay_{ctx_overlay.data.pack_format}"

0 commit comments

Comments
 (0)