Skip to content

Commit 7ed050c

Browse files
committed
Reapply "Merge remote-tracking branch 'upstream/master' into update-1.21.9"
This reverts commit 93f767d.
1 parent 93f767d commit 7ed050c

File tree

63 files changed

+258
-8158
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

63 files changed

+258
-8158
lines changed

gm4/contributors.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@
44
"links": ["https://twitter.com/15Redstones"]
55
},
66
{
7-
"name": "Andante",
8-
"links": ["https://bsky.app/profile/andante.dev"]
7+
"name": "dvitski",
8+
"links": ["https://bsky.app/profile/dvitski.cc"]
99
},
1010
{
1111
"name": "Bloo",

gm4/plugins/manifest.py

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
from typing import Any, Optional
1111

1212
import yaml
13-
from beet import Context, InvalidProjectConfig, PluginOptions, TextFile, load_config
13+
from beet import Context, InvalidProjectConfig, PluginOptions, TextFile, load_config, Function
1414
from beet.library.base import _dump_files # type: ignore ; private method used to deterministicify pack dumping
1515
from nbtlib.contrib.minecraft import StructureFileData, StructureFile # type: ignore ; no stub
1616
from pydantic.v1 import BaseModel, Extra
@@ -268,8 +268,13 @@ def write_credits(ctx: Context):
268268

269269
def write_updates(ctx: Context):
270270
"""Writes the module update commands to this module's init function."""
271-
init = ctx.data.functions.get(f"{ctx.project_id}:init", None)
272-
if init is None:
271+
for overlay in ctx.data.overlays.values():
272+
write_update_function(overlay.functions.get(f"{ctx.project_id}:init"), ctx)
273+
write_update_function(ctx.data.functions.get(f"{ctx.project_id}:init"), ctx)
274+
275+
276+
def write_update_function(init: Optional[Function], ctx: Context):
277+
if not init:
273278
return
274279

275280
manifest = ManifestCacheModel.parse_obj(ctx.cache["gm4_manifest"].json)
@@ -286,7 +291,7 @@ def write_updates(ctx: Context):
286291
last_i = i
287292

288293
init.lines.insert(last_i+1, f"data modify storage gm4:log versions append value {{id:\"{ctx.project_id}\",module:\"{ctx.project_name}\",version:\"{version}\"}}")
289-
294+
290295
# Remove the marker if it exists
291296
if "#$moduleUpdateList" in init.lines:
292297
init.lines.remove("#$moduleUpdateList")
@@ -300,7 +305,8 @@ def write_updates(ctx: Context):
300305
version = Version(m.version).int_rep()
301306
website = f"https://gm4.co/modules/{m.id[4:].replace('_','-')}"
302307
init.lines.append(f"execute if score {m.id} load.status matches -1.. if score {m.id.removeprefix('gm4_')} gm4_modules matches ..{version - 1} run data modify storage gm4:log queue append value {{type:'outdated',module:'{m.name}',download:'{website}',render:{{'text':'{m.name}','click_event':{{'action':'open_url','url':'{website}'}},'hover_event':{{'action':'show_text','value':{{'text':'Click to visit {website}','color':'#4AA0C7'}}}}}}}}")
303-
308+
309+
304310
def repro_structure_to_bytes(content: StructureFileData) -> bytes:
305311
"""a modified Structure.to_bytes from beet, which ensures the GZip does not add
306312
the current time.time to the nbt file header.

gm4_blossoming_pots/beet.yaml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,12 @@ meta:
1717
schedule_loops: [main]
1818
website:
1919
description: Greatly expands the selection of potable plants. Use Decorated Pots as abnormally large flower pots. Decorate in Style!
20-
recommended: []
20+
recommended:
21+
- gm4_lively_lily_pads
2122
notes: []
23+
search_keywords:
24+
- flowering
25+
- plant
2226
modrinth:
2327
project_id: wOnn6VDU
2428
smithed:
348 KB
Loading

gm4_desire_lines/beet.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,6 @@ meta:
4747
- Bloo
4848
- SpecialBuilder32
4949
- Misode
50-
- Andante
50+
- dvitski
5151
Icon Design:
5252
- JonPot

gm4_end_fishing/beet.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,8 @@ meta:
5555
description: Catch rare loot by fishing in the end void! The void holds many riches, from End City loot and Elytra to weapons that once belonged to explorers time forgot, collect them all!
5656
recommended:
5757
- gm4_resource_pack
58+
- gm4_reeling_rods
59+
- gm4_live_catch
5860
notes: []
5961
modrinth:
6062
project_id: BbEwao9o

0 commit comments

Comments
 (0)