beet-observer 0.4.0__py3-none-any.whl → 0.5.0__py3-none-any.whl
Sign up to get free protection for your applications and to get access to all the features.
- beet_observer/__init__.py +1 -1
- beet_observer/data_pack.py +5 -1
- beet_observer/plugin.py +6 -2
- beet_observer/resource_pack.py +5 -1
- {beet_observer-0.4.0.dist-info → beet_observer-0.5.0.dist-info}/METADATA +1 -1
- beet_observer-0.5.0.dist-info/RECORD +8 -0
- beet_observer-0.4.0.dist-info/RECORD +0 -8
- {beet_observer-0.4.0.dist-info → beet_observer-0.5.0.dist-info}/LICENSE +0 -0
- {beet_observer-0.4.0.dist-info → beet_observer-0.5.0.dist-info}/WHEEL +0 -0
beet_observer/__init__.py
CHANGED
beet_observer/data_pack.py
CHANGED
@@ -4,7 +4,9 @@ import beet.contrib.worldgen as wg
|
|
4
4
|
from beet import Context, NamespaceProxy
|
5
5
|
|
6
6
|
|
7
|
-
def gen_dp_overlays(
|
7
|
+
def gen_dp_overlays(
|
8
|
+
ctx: Context, ctx_overlay: Context, overlay_dir: str, ignore: list[str]
|
9
|
+
) -> None:
|
8
10
|
"""
|
9
11
|
Generates overlays between two datapacks.
|
10
12
|
|
@@ -118,6 +120,8 @@ def gen_dp_overlays(ctx: Context, ctx_overlay: Context, overlay_dir: str) -> Non
|
|
118
120
|
|
119
121
|
# add overlays to pack.mcmeta
|
120
122
|
for overlay in ctx.data.overlays:
|
123
|
+
if overlay in ignore:
|
124
|
+
continue
|
121
125
|
# check if it's the top-level overlay
|
122
126
|
if overlay == ctx.meta["observer"]["default_dir_dp"]:
|
123
127
|
# delete pack.mcmeta from overlay (required for tests)
|
beet_observer/plugin.py
CHANGED
@@ -24,6 +24,10 @@ def beet_default(ctx: Context):
|
|
24
24
|
ctx.meta["observer"]["default_dir_rp"] = ctx.meta["observer"]["default_dir"][
|
25
25
|
"rp"
|
26
26
|
]
|
27
|
+
# save current overlays
|
28
|
+
save: list[str] = []
|
29
|
+
for overlay in ctx.data.overlays:
|
30
|
+
save.append(overlay)
|
27
31
|
# loop through all overlays
|
28
32
|
for overlay in ctx.meta["observer"]["overlays"]:
|
29
33
|
# create relative path
|
@@ -40,5 +44,5 @@ def beet_default(ctx: Context):
|
|
40
44
|
dp_dir = overlay["directory"]
|
41
45
|
rp_dir = overlay["directory"]
|
42
46
|
# compare build pack and overlay pack
|
43
|
-
gen_dp_overlays(ctx, ctx_overlay, dp_dir)
|
44
|
-
gen_rp_overlays(ctx, ctx_overlay, rp_dir)
|
47
|
+
gen_dp_overlays(ctx, ctx_overlay, dp_dir, save)
|
48
|
+
gen_rp_overlays(ctx, ctx_overlay, rp_dir, save)
|
beet_observer/resource_pack.py
CHANGED
@@ -3,7 +3,9 @@ from typing import Any
|
|
3
3
|
from beet import Context, NamespaceProxy
|
4
4
|
|
5
5
|
|
6
|
-
def gen_rp_overlays(
|
6
|
+
def gen_rp_overlays(
|
7
|
+
ctx: Context, ctx_overlay: Context, overlay_dir: str, ignore: list[str]
|
8
|
+
) -> None:
|
7
9
|
"""
|
8
10
|
Generates overlays between two resource packs.
|
9
11
|
|
@@ -46,6 +48,8 @@ def gen_rp_overlays(ctx: Context, ctx_overlay: Context, overlay_dir: str) -> Non
|
|
46
48
|
|
47
49
|
# add overlays to pack.mcmeta
|
48
50
|
for overlay in ctx.assets.overlays:
|
51
|
+
if overlay in ignore:
|
52
|
+
continue
|
49
53
|
# check if it's the top-level overlay
|
50
54
|
if overlay == ctx.meta["observer"]["default_dir_rp"]:
|
51
55
|
# delete pack.mcmeta from overlay (required for tests)
|
@@ -0,0 +1,8 @@
|
|
1
|
+
beet_observer/__init__.py,sha256=cZtzkQEWddSPeBHx0VxE9-DFeVnqU_DR6nXcko6ejNE,45
|
2
|
+
beet_observer/data_pack.py,sha256=QqoyQYiCBpqioaKYSUKANgd3dxJJFLGka92G3Tyz_Js,9800
|
3
|
+
beet_observer/plugin.py,sha256=tEMhLtvMPXOsKDNIjZi775QRvBuL5jiOCAzh-xVEkew,1940
|
4
|
+
beet_observer/resource_pack.py,sha256=_a4Ubx8fO7HMnIbfQlsnYEIM_Vjo3o_QjarirqbWdkc,6233
|
5
|
+
beet_observer-0.5.0.dist-info/LICENSE,sha256=oBbP6j7sgG9darFSRZxV7iO8yPR1aZiDspSK3mcLpXI,1062
|
6
|
+
beet_observer-0.5.0.dist-info/METADATA,sha256=jz1dEhPTK9A6e8riYTDn8i1z8csFCmwB0KMci2xR-IM,674
|
7
|
+
beet_observer-0.5.0.dist-info/WHEEL,sha256=FMvqSimYX_P7y0a7UY-_Mc83r5zkBZsCYPm7Lr0Bsq4,88
|
8
|
+
beet_observer-0.5.0.dist-info/RECORD,,
|
@@ -1,8 +0,0 @@
|
|
1
|
-
beet_observer/__init__.py,sha256=N7xZKu7fP_rwtJSXJ8tHQgq_qJDbu7yWOKOXnldjr04,45
|
2
|
-
beet_observer/data_pack.py,sha256=CMTZ2DdBEIj15wC_prAQv3I-0Eptk0usTP237KuxfLk,9724
|
3
|
-
beet_observer/plugin.py,sha256=DGpWvV2q6yeJ_EyBLShigZl4dutN2yCFDKzzcCGiu8o,1808
|
4
|
-
beet_observer/resource_pack.py,sha256=9dAeZXlJrcaEiIJcPYnJhU7e0qMUqYNcxhIEhLDHUF4,6157
|
5
|
-
beet_observer-0.4.0.dist-info/LICENSE,sha256=oBbP6j7sgG9darFSRZxV7iO8yPR1aZiDspSK3mcLpXI,1062
|
6
|
-
beet_observer-0.4.0.dist-info/METADATA,sha256=B2ehMsXlmntYVO4SwaAjjJChjPumJUFMUT2a5fzSJ2k,674
|
7
|
-
beet_observer-0.4.0.dist-info/WHEEL,sha256=FMvqSimYX_P7y0a7UY-_Mc83r5zkBZsCYPm7Lr0Bsq4,88
|
8
|
-
beet_observer-0.4.0.dist-info/RECORD,,
|
File without changes
|
File without changes
|