Skip to content

Commit b1fdbf6

Browse files
edayotrx-dev
andauthored
fix: 1.20.4 and beet v100+ (#38)
* chore: update deps * fix: select to query * fix: select to query * fix(crafter): version as meta argument * fix: void query * fix: lock file --------- Co-authored-by: RitikShah <ritik10.shah@gmail.com>
1 parent db8b2be commit b1fdbf6

File tree

6 files changed

+502
-436
lines changed

6 files changed

+502
-436
lines changed

poetry.lock

Lines changed: 486 additions & 428 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

pyproject.toml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,11 +8,11 @@ readme = "README.md"
88

99
[tool.poetry.dependencies]
1010
python = "^3.10"
11-
mecha = "^0.73.0"
12-
bolt = "^0.36.0"
11+
mecha = "^0.86.0"
12+
bolt = "^0.44.0"
1313
bolt-expressions = "^0.12.2"
14-
beet = "^0.100.0"
15-
pydantic = "^2.5.3"
14+
beet = ">=0.100.0"
15+
pydantic = "^2.5.2"
1616

1717
[tool.poetry.group.dev.dependencies]
1818
black = "^22.8.0"

smithed_libraries/packs/crafter/beet.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,3 +31,4 @@ pipeline:
3131
meta:
3232
depends_on: # used for metadata
3333
custom-block: "0.1.0"
34+
minecraft_version: "1.20.4"

smithed_libraries/plugins/crafter.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,10 @@
22

33

44
def beet_default(ctx: Context):
5+
minecraft_version = ctx.meta["minecraft_version"]
56
cache = ctx.cache["smithed_crafter"]
67

7-
all_items_url = f"https://raw.githubusercontent.com/misode/mcmeta/{ctx.minecraft_version}-registries/item/data.json"
8+
all_items_url = f"https://raw.githubusercontent.com/misode/mcmeta/{minecraft_version}-registries/item/data.json"
89
all_items = ItemTag(source_path=cache.download(all_items_url))
910
all_items.data = {"values": all_items.data}
1011

smithed_libraries/plugins/versioning/api.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,9 @@ def generate_api(ctx: Context):
3838

3939
opts = ctx.inject(Versioning).opts
4040

41-
for func, (_, path) in ctx.select(match=opts.api.match, extend=Function).items():
41+
query = ctx.query(match=opts.api.match, extend=Function)
42+
if not Function in query:
43+
return
44+
for (path, func) in query[Function].keys():
4245
if func.lines and path is not None and PUBLIC_PAT.match(func.lines[0]):
4346
generate_call(ctx, opts, path)

smithed_libraries/plugins/versioning/load.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -77,8 +77,11 @@ def set_version(generate: Generator, opts: VersioningOptions):
7777

7878
def resolve_advancements(ctx: Context, opts: VersioningOptions):
7979
"""Select packs that match refactor statement"""
80-
81-
for advancement in ctx.select(match=opts.refactor.match, extend=Advancement):
80+
81+
query = ctx.query(match=opts.refactor.match, extend=Advancement)
82+
if not Advancement in query:
83+
return
84+
for (path, advancement) in query[Advancement].keys():
8285
resolve_advancement(advancement, opts)
8386

8487

0 commit comments

Comments
 (0)