Skip to content

Commit

Permalink
fix: update beet.contrib.installation_advancement to work in 1.20.5+ (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
Tracktark authored Jul 24, 2024
1 parent d077a64 commit afa3f46
Show file tree
Hide file tree
Showing 5 changed files with 21 additions and 11 deletions.
8 changes: 4 additions & 4 deletions beet/contrib/installation_advancement.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@


class InstallationAdvancementOptions(PluginOptions):
icon: JsonDict = {"item": "minecraft:apple"}
icon: JsonDict = {"id": "minecraft:apple"}
author_namespace: Optional[str] = None
author_description: str = ""
author_skull_owner: Optional[str] = None
Expand Down Expand Up @@ -66,7 +66,7 @@ def create_root_advancement():
"display": {
"title": "Installed Datapacks",
"description": "",
"icon": {"item": "minecraft:knowledge_book"},
"icon": {"id": "minecraft:knowledge_book"},
"background": "minecraft:textures/block/gray_concrete.png",
"show_toast": False,
"announce_to_chat": False,
Expand All @@ -87,8 +87,8 @@ def create_author_advancement(
"title": author,
"description": author_description,
"icon": {
"item": "minecraft:player_head",
"nbt": f"{{'SkullOwner': '{skull_owner}'}}",
"id": "minecraft:player_head",
"components": {"minecraft:profile": {"name": skull_owner}},
},
"show_toast": False,
"announce_to_chat": False,
Expand Down
6 changes: 4 additions & 2 deletions examples/installation_advancement/beet.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,10 @@
"meta": {
"installation_advancement": {
"icon": {
"item": "minecraft:red_mushroom",
"nbt": "{Enchantments:[{}]}"
"id": "minecraft:red_mushroom",
"components": {
"enchantments": {"protection": 1}
}
},
"author_description": "Organization behind the beet project"
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,12 @@
"title": "mcbeet",
"description": "Organization behind the beet project",
"icon": {
"item": "minecraft:player_head",
"nbt": "{'SkullOwner': 'mcbeet'}"
"id": "minecraft:player_head",
"components": {
"minecraft:profile": {
"name": "mcbeet"
}
}
},
"show_toast": false,
"announce_to_chat": false
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"title": "Installed Datapacks",
"description": "",
"icon": {
"item": "minecraft:knowledge_book"
"id": "minecraft:knowledge_book"
},
"background": "minecraft:textures/block/gray_concrete.png",
"show_toast": false,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,12 @@
"title": "Example",
"description": "An example project",
"icon": {
"item": "minecraft:red_mushroom",
"nbt": "{Enchantments:[{}]}"
"id": "minecraft:red_mushroom",
"components": {
"enchantments": {
"protection": 1
}
}
},
"announce_to_chat": false,
"show_toast": false
Expand Down

0 comments on commit afa3f46

Please sign in to comment.