stewbeet 2.0.12__tar.gz → 2.0.14__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of stewbeet might be problematic. Click here for more details.
- {stewbeet-2.0.12 → stewbeet-2.0.14}/PKG-INFO +1 -1
- {stewbeet-2.0.12 → stewbeet-2.0.14}/pyproject.toml +1 -1
- {stewbeet-2.0.12 → stewbeet-2.0.14}/stewbeet/core/constants.py +1 -1
- {stewbeet-2.0.12 → stewbeet-2.0.14}/stewbeet/plugins/archive/__init__.py +4 -0
- {stewbeet-2.0.12 → stewbeet-2.0.14}/stewbeet/plugins/copy_to_destination/__init__.py +17 -5
- {stewbeet-2.0.12 → stewbeet-2.0.14}/stewbeet/plugins/finalyze/dependencies/__init__.py +11 -4
- {stewbeet-2.0.12 → stewbeet-2.0.14}/stewbeet/plugins/initialize/__init__.py +17 -7
- {stewbeet-2.0.12 → stewbeet-2.0.14}/stewbeet/plugins/initialize/source_lore_font.py +18 -14
- {stewbeet-2.0.12 → stewbeet-2.0.14}/.gitignore +0 -0
- {stewbeet-2.0.12 → stewbeet-2.0.14}/LICENSE +0 -0
- {stewbeet-2.0.12 → stewbeet-2.0.14}/README.md +0 -0
- {stewbeet-2.0.12 → stewbeet-2.0.14}/stewbeet/__init__.py +0 -0
- {stewbeet-2.0.12 → stewbeet-2.0.14}/stewbeet/__main__.py +0 -0
- {stewbeet-2.0.12 → stewbeet-2.0.14}/stewbeet/continuous_delivery/__init__.py +0 -0
- {stewbeet-2.0.12 → stewbeet-2.0.14}/stewbeet/continuous_delivery/cd_utils.py +0 -0
- {stewbeet-2.0.12 → stewbeet-2.0.14}/stewbeet/continuous_delivery/github.py +0 -0
- {stewbeet-2.0.12 → stewbeet-2.0.14}/stewbeet/continuous_delivery/modrinth.py +0 -0
- {stewbeet-2.0.12 → stewbeet-2.0.14}/stewbeet/continuous_delivery/pmc.py +0 -0
- {stewbeet-2.0.12 → stewbeet-2.0.14}/stewbeet/continuous_delivery/smithed.py +0 -0
- {stewbeet-2.0.12 → stewbeet-2.0.14}/stewbeet/core/__init__.py +0 -0
- {stewbeet-2.0.12 → stewbeet-2.0.14}/stewbeet/core/__memory__.py +0 -0
- {stewbeet-2.0.12 → stewbeet-2.0.14}/stewbeet/core/definitions_helper/__init__.py +0 -0
- {stewbeet-2.0.12 → stewbeet-2.0.14}/stewbeet/core/definitions_helper/completion.py +0 -0
- {stewbeet-2.0.12 → stewbeet-2.0.14}/stewbeet/core/definitions_helper/equipments.py +0 -0
- {stewbeet-2.0.12 → stewbeet-2.0.14}/stewbeet/core/definitions_helper/materials.py +0 -0
- {stewbeet-2.0.12 → stewbeet-2.0.14}/stewbeet/core/definitions_helper/records.py +0 -0
- {stewbeet-2.0.12 → stewbeet-2.0.14}/stewbeet/core/definitions_helper/smart_ore_generation.py +0 -0
- {stewbeet-2.0.12 → stewbeet-2.0.14}/stewbeet/core/definitions_helper/text.py +0 -0
- {stewbeet-2.0.12 → stewbeet-2.0.14}/stewbeet/core/ingredients.py +0 -0
- {stewbeet-2.0.12 → stewbeet-2.0.14}/stewbeet/core/utils/io.py +0 -0
- {stewbeet-2.0.12 → stewbeet-2.0.14}/stewbeet/core/utils/sounds.py +0 -0
- {stewbeet-2.0.12 → stewbeet-2.0.14}/stewbeet/dependencies/__init__.py +0 -0
- {stewbeet-2.0.12 → stewbeet-2.0.14}/stewbeet/dependencies/bookshelf.py +0 -0
- {stewbeet-2.0.12 → stewbeet-2.0.14}/stewbeet/dependencies/bookshelf_config.json +0 -0
- {stewbeet-2.0.12 → stewbeet-2.0.14}/stewbeet/dependencies/datapack/Bookshelf Bitwise.zip +0 -0
- {stewbeet-2.0.12 → stewbeet-2.0.14}/stewbeet/dependencies/datapack/Bookshelf Block.zip +0 -0
- {stewbeet-2.0.12 → stewbeet-2.0.14}/stewbeet/dependencies/datapack/Bookshelf Color.zip +0 -0
- {stewbeet-2.0.12 → stewbeet-2.0.14}/stewbeet/dependencies/datapack/Bookshelf Dump.zip +0 -0
- {stewbeet-2.0.12 → stewbeet-2.0.14}/stewbeet/dependencies/datapack/Bookshelf Environment.zip +0 -0
- {stewbeet-2.0.12 → stewbeet-2.0.14}/stewbeet/dependencies/datapack/Bookshelf Generation.zip +0 -0
- {stewbeet-2.0.12 → stewbeet-2.0.14}/stewbeet/dependencies/datapack/Bookshelf Health.zip +0 -0
- {stewbeet-2.0.12 → stewbeet-2.0.14}/stewbeet/dependencies/datapack/Bookshelf Hitbox.zip +0 -0
- {stewbeet-2.0.12 → stewbeet-2.0.14}/stewbeet/dependencies/datapack/Bookshelf Id.zip +0 -0
- {stewbeet-2.0.12 → stewbeet-2.0.14}/stewbeet/dependencies/datapack/Bookshelf Interaction.zip +0 -0
- {stewbeet-2.0.12 → stewbeet-2.0.14}/stewbeet/dependencies/datapack/Bookshelf Link.zip +0 -0
- {stewbeet-2.0.12 → stewbeet-2.0.14}/stewbeet/dependencies/datapack/Bookshelf Log.zip +0 -0
- {stewbeet-2.0.12 → stewbeet-2.0.14}/stewbeet/dependencies/datapack/Bookshelf Math.zip +0 -0
- {stewbeet-2.0.12 → stewbeet-2.0.14}/stewbeet/dependencies/datapack/Bookshelf Move.zip +0 -0
- {stewbeet-2.0.12 → stewbeet-2.0.14}/stewbeet/dependencies/datapack/Bookshelf Position.zip +0 -0
- {stewbeet-2.0.12 → stewbeet-2.0.14}/stewbeet/dependencies/datapack/Bookshelf Random.zip +0 -0
- {stewbeet-2.0.12 → stewbeet-2.0.14}/stewbeet/dependencies/datapack/Bookshelf Raycast.zip +0 -0
- {stewbeet-2.0.12 → stewbeet-2.0.14}/stewbeet/dependencies/datapack/Bookshelf Schedule.zip +0 -0
- {stewbeet-2.0.12 → stewbeet-2.0.14}/stewbeet/dependencies/datapack/Bookshelf Sidebar.zip +0 -0
- {stewbeet-2.0.12 → stewbeet-2.0.14}/stewbeet/dependencies/datapack/Bookshelf Spline.zip +0 -0
- {stewbeet-2.0.12 → stewbeet-2.0.14}/stewbeet/dependencies/datapack/Bookshelf String.zip +0 -0
- {stewbeet-2.0.12 → stewbeet-2.0.14}/stewbeet/dependencies/datapack/Bookshelf Time.zip +0 -0
- {stewbeet-2.0.12 → stewbeet-2.0.14}/stewbeet/dependencies/datapack/Bookshelf Tree.zip +0 -0
- {stewbeet-2.0.12 → stewbeet-2.0.14}/stewbeet/dependencies/datapack/Bookshelf Vector.zip +0 -0
- {stewbeet-2.0.12 → stewbeet-2.0.14}/stewbeet/dependencies/datapack/Bookshelf View.zip +0 -0
- {stewbeet-2.0.12 → stewbeet-2.0.14}/stewbeet/dependencies/datapack/Bookshelf Xp.zip +0 -0
- {stewbeet-2.0.12 → stewbeet-2.0.14}/stewbeet/dependencies/datapack/Common Signals.zip +0 -0
- {stewbeet-2.0.12 → stewbeet-2.0.14}/stewbeet/dependencies/datapack/Furnace NBT Recipes.zip +0 -0
- {stewbeet-2.0.12 → stewbeet-2.0.14}/stewbeet/dependencies/datapack/ItemIO.zip +0 -0
- {stewbeet-2.0.12 → stewbeet-2.0.14}/stewbeet/dependencies/datapack/SmartOreGeneration.zip +0 -0
- {stewbeet-2.0.12 → stewbeet-2.0.14}/stewbeet/dependencies/datapack/Smithed Crafter.zip +0 -0
- {stewbeet-2.0.12 → stewbeet-2.0.14}/stewbeet/dependencies/datapack/Smithed Custom Block.zip +0 -0
- {stewbeet-2.0.12 → stewbeet-2.0.14}/stewbeet/dependencies/resource_pack/Smithed Crafter.zip +0 -0
- {stewbeet-2.0.12 → stewbeet-2.0.14}/stewbeet/plugins/auto/headers/__init__.py +0 -0
- {stewbeet-2.0.12 → stewbeet-2.0.14}/stewbeet/plugins/auto/headers/object.py +0 -0
- {stewbeet-2.0.12 → stewbeet-2.0.14}/stewbeet/plugins/auto/lang_file/__init__.py +0 -0
- {stewbeet-2.0.12 → stewbeet-2.0.14}/stewbeet/plugins/auto/lang_file/utils.py +0 -0
- {stewbeet-2.0.12 → stewbeet-2.0.14}/stewbeet/plugins/compatibilities/neo_enchant/__init__.py +0 -0
- {stewbeet-2.0.12 → stewbeet-2.0.14}/stewbeet/plugins/compatibilities/simpledrawer/__init__.py +0 -0
- {stewbeet-2.0.12 → stewbeet-2.0.14}/stewbeet/plugins/compute_sha1/__init__.py +0 -0
- {stewbeet-2.0.12 → stewbeet-2.0.14}/stewbeet/plugins/custom_recipes/__init__.py +0 -0
- {stewbeet-2.0.12 → stewbeet-2.0.14}/stewbeet/plugins/custom_recipes/furnace.py +0 -0
- {stewbeet-2.0.12 → stewbeet-2.0.14}/stewbeet/plugins/custom_recipes/pulverizer.py +0 -0
- {stewbeet-2.0.12 → stewbeet-2.0.14}/stewbeet/plugins/custom_recipes/smithed.py +0 -0
- {stewbeet-2.0.12 → stewbeet-2.0.14}/stewbeet/plugins/custom_recipes/vanilla.py +0 -0
- {stewbeet-2.0.12 → stewbeet-2.0.14}/stewbeet/plugins/datapack/custom_blocks/__init__.py +0 -0
- {stewbeet-2.0.12 → stewbeet-2.0.14}/stewbeet/plugins/datapack/loading/__init__.py +0 -0
- {stewbeet-2.0.12 → stewbeet-2.0.14}/stewbeet/plugins/datapack/loot_tables/__init__.py +0 -0
- {stewbeet-2.0.12 → stewbeet-2.0.14}/stewbeet/plugins/finalyze/basic_datapack_structure/__init__.py +0 -0
- {stewbeet-2.0.12 → stewbeet-2.0.14}/stewbeet/plugins/finalyze/check_unused_textures/__init__.py +0 -0
- {stewbeet-2.0.12 → stewbeet-2.0.14}/stewbeet/plugins/finalyze/custom_blocks_ticking/__init__.py +0 -0
- {stewbeet-2.0.12 → stewbeet-2.0.14}/stewbeet/plugins/ingame_manual/__init__.py +0 -0
- {stewbeet-2.0.12 → stewbeet-2.0.14}/stewbeet/plugins/ingame_manual/assets/furnace.png +0 -0
- {stewbeet-2.0.12 → stewbeet-2.0.14}/stewbeet/plugins/ingame_manual/assets/heavy_workbench.png +0 -0
- {stewbeet-2.0.12 → stewbeet-2.0.14}/stewbeet/plugins/ingame_manual/assets/invisible_item.png +0 -0
- {stewbeet-2.0.12 → stewbeet-2.0.14}/stewbeet/plugins/ingame_manual/assets/invisible_item_release.png +0 -0
- {stewbeet-2.0.12 → stewbeet-2.0.14}/stewbeet/plugins/ingame_manual/assets/minecraft_font.ttf +0 -0
- {stewbeet-2.0.12 → stewbeet-2.0.14}/stewbeet/plugins/ingame_manual/assets/none.png +0 -0
- {stewbeet-2.0.12 → stewbeet-2.0.14}/stewbeet/plugins/ingame_manual/assets/none_release.png +0 -0
- {stewbeet-2.0.12 → stewbeet-2.0.14}/stewbeet/plugins/ingame_manual/assets/pulverizing.png +0 -0
- {stewbeet-2.0.12 → stewbeet-2.0.14}/stewbeet/plugins/ingame_manual/assets/shaped_2x2.png +0 -0
- {stewbeet-2.0.12 → stewbeet-2.0.14}/stewbeet/plugins/ingame_manual/assets/shaped_3x3.png +0 -0
- {stewbeet-2.0.12 → stewbeet-2.0.14}/stewbeet/plugins/ingame_manual/assets/simple_case_no_border.png +0 -0
- {stewbeet-2.0.12 → stewbeet-2.0.14}/stewbeet/plugins/ingame_manual/assets/wiki_information.png +0 -0
- {stewbeet-2.0.12 → stewbeet-2.0.14}/stewbeet/plugins/ingame_manual/assets/wiki_ingredient_of_craft.png +0 -0
- {stewbeet-2.0.12 → stewbeet-2.0.14}/stewbeet/plugins/ingame_manual/assets/wiki_ingredient_of_craft_template.png +0 -0
- {stewbeet-2.0.12 → stewbeet-2.0.14}/stewbeet/plugins/ingame_manual/assets/wiki_result_of_craft.png +0 -0
- {stewbeet-2.0.12 → stewbeet-2.0.14}/stewbeet/plugins/ingame_manual/book_components.py +0 -0
- {stewbeet-2.0.12 → stewbeet-2.0.14}/stewbeet/plugins/ingame_manual/book_optimizer.py +0 -0
- {stewbeet-2.0.12 → stewbeet-2.0.14}/stewbeet/plugins/ingame_manual/craft_content.py +0 -0
- {stewbeet-2.0.12 → stewbeet-2.0.14}/stewbeet/plugins/ingame_manual/image_utils.py +0 -0
- {stewbeet-2.0.12 → stewbeet-2.0.14}/stewbeet/plugins/ingame_manual/iso_renders.py +0 -0
- {stewbeet-2.0.12 → stewbeet-2.0.14}/stewbeet/plugins/ingame_manual/main.py +0 -0
- {stewbeet-2.0.12 → stewbeet-2.0.14}/stewbeet/plugins/ingame_manual/other_utils.py +0 -0
- {stewbeet-2.0.12 → stewbeet-2.0.14}/stewbeet/plugins/ingame_manual/page_font.py +0 -0
- {stewbeet-2.0.12 → stewbeet-2.0.14}/stewbeet/plugins/ingame_manual/shared_import.py +0 -0
- {stewbeet-2.0.12 → stewbeet-2.0.14}/stewbeet/plugins/ingame_manual/templates/.gitignore +0 -0
- {stewbeet-2.0.12 → stewbeet-2.0.14}/stewbeet/plugins/ingame_manual/templates/_README.md +0 -0
- {stewbeet-2.0.12 → stewbeet-2.0.14}/stewbeet/plugins/ingame_manual/templates/furnace.png +0 -0
- {stewbeet-2.0.12 → stewbeet-2.0.14}/stewbeet/plugins/ingame_manual/templates/heavy_workbench.png +0 -0
- {stewbeet-2.0.12 → stewbeet-2.0.14}/stewbeet/plugins/ingame_manual/templates/invisible_item.png +0 -0
- {stewbeet-2.0.12 → stewbeet-2.0.14}/stewbeet/plugins/ingame_manual/templates/invisible_item_release.png +0 -0
- {stewbeet-2.0.12 → stewbeet-2.0.14}/stewbeet/plugins/ingame_manual/templates/minecraft_font.ttf +0 -0
- {stewbeet-2.0.12 → stewbeet-2.0.14}/stewbeet/plugins/ingame_manual/templates/none.png +0 -0
- {stewbeet-2.0.12 → stewbeet-2.0.14}/stewbeet/plugins/ingame_manual/templates/none_release.png +0 -0
- {stewbeet-2.0.12 → stewbeet-2.0.14}/stewbeet/plugins/ingame_manual/templates/pulverizing.png +0 -0
- {stewbeet-2.0.12 → stewbeet-2.0.14}/stewbeet/plugins/ingame_manual/templates/shaped_2x2.png +0 -0
- {stewbeet-2.0.12 → stewbeet-2.0.14}/stewbeet/plugins/ingame_manual/templates/shaped_3x3.png +0 -0
- {stewbeet-2.0.12 → stewbeet-2.0.14}/stewbeet/plugins/ingame_manual/templates/simple_case_no_border.png +0 -0
- {stewbeet-2.0.12 → stewbeet-2.0.14}/stewbeet/plugins/ingame_manual/templates/wiki_information.png +0 -0
- {stewbeet-2.0.12 → stewbeet-2.0.14}/stewbeet/plugins/ingame_manual/templates/wiki_ingredient_of_craft.png +0 -0
- {stewbeet-2.0.12 → stewbeet-2.0.14}/stewbeet/plugins/ingame_manual/templates/wiki_ingredient_of_craft_template.png +0 -0
- {stewbeet-2.0.12 → stewbeet-2.0.14}/stewbeet/plugins/ingame_manual/templates/wiki_result_of_craft.png +0 -0
- {stewbeet-2.0.12 → stewbeet-2.0.14}/stewbeet/plugins/ingame_manual/text_components.py +0 -0
- {stewbeet-2.0.12 → stewbeet-2.0.14}/stewbeet/plugins/merge_smithed_weld/__init__.py +0 -0
- {stewbeet-2.0.12 → stewbeet-2.0.14}/stewbeet/plugins/merge_smithed_weld/weld.py +0 -0
- {stewbeet-2.0.12 → stewbeet-2.0.14}/stewbeet/plugins/resource_pack/check_power_of_2/__init__.py +0 -0
- {stewbeet-2.0.12 → stewbeet-2.0.14}/stewbeet/plugins/resource_pack/item_models/__init__.py +0 -0
- {stewbeet-2.0.12 → stewbeet-2.0.14}/stewbeet/plugins/resource_pack/item_models/object.py +0 -0
- {stewbeet-2.0.12 → stewbeet-2.0.14}/stewbeet/plugins/resource_pack/sounds/__init__.py +0 -0
- {stewbeet-2.0.12 → stewbeet-2.0.14}/stewbeet/plugins/verify_definitions/__init__.py +0 -0
- {stewbeet-2.0.12 → stewbeet-2.0.14}/stewbeet/utils.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: stewbeet
|
|
3
|
-
Version: 2.0.
|
|
3
|
+
Version: 2.0.14
|
|
4
4
|
Summary: Beet Framework made to help generating advanced Minecraft datapack contents
|
|
5
5
|
Project-URL: Homepage, https://github.com/Stoupy51/stewbeet
|
|
6
6
|
Project-URL: Issues, https://github.com/Stoupy51/stewbeet/issues
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
from ..dependencies.bookshelf import BOOKSHELF_MODULES
|
|
5
5
|
|
|
6
6
|
# Minecraft version constants
|
|
7
|
-
MINECRAFT_VERSION: str = "1.21.
|
|
7
|
+
MINECRAFT_VERSION: str = "1.21.7" # Text used when loading the datapack to warn the user when the data version is not right
|
|
8
8
|
DATA_VERSION: int = 4435 # Depending on MC version, given by /data get entity @p DataVersion to check if the datapack is not running in an older version of MC
|
|
9
9
|
|
|
10
10
|
|
|
@@ -50,6 +50,10 @@ def beet_default(ctx: Context) -> None:
|
|
|
50
50
|
# Create archives for each pack
|
|
51
51
|
@handle_error
|
|
52
52
|
def handle_pack(pack: DataPack | ResourcePack) -> None:
|
|
53
|
+
all_items = set(pack.all())
|
|
54
|
+
if not len(all_items) > 0:
|
|
55
|
+
return # Skip empty packs
|
|
56
|
+
|
|
53
57
|
# Get pack name and type
|
|
54
58
|
pack_name: str = ctx.project_name.replace(" ", "") or pack.name or "pack"
|
|
55
59
|
|
|
@@ -66,13 +66,14 @@ def _copy_datapacks(output_path: str, project_name_simple: str, libs_folder: str
|
|
|
66
66
|
libs_folder (str): The folder containing library files.
|
|
67
67
|
destinations (list[str]): List of destination paths for datapacks.
|
|
68
68
|
"""
|
|
69
|
+
any_copied: bool = False
|
|
69
70
|
main_datapack = relative_path(f"{output_path}/{project_name_simple}_datapack.zip")
|
|
70
71
|
|
|
71
72
|
if os.path.exists(main_datapack):
|
|
72
73
|
for dest in destinations:
|
|
73
74
|
dest_file = relative_path(f"{dest}/{os.path.basename(main_datapack)}")
|
|
74
75
|
if _copy_with_retry(main_datapack, dest_file):
|
|
75
|
-
|
|
76
|
+
any_copied = True
|
|
76
77
|
|
|
77
78
|
# Copy all library datapacks
|
|
78
79
|
if libs_folder:
|
|
@@ -84,7 +85,10 @@ def _copy_datapacks(output_path: str, project_name_simple: str, libs_folder: str
|
|
|
84
85
|
for dest in destinations:
|
|
85
86
|
dest_file = relative_path(f"{dest}/{lib_zip}")
|
|
86
87
|
if _copy_with_retry(lib_zip_path, dest_file):
|
|
87
|
-
|
|
88
|
+
any_copied = True
|
|
89
|
+
|
|
90
|
+
if any_copied:
|
|
91
|
+
info(f"Copied datapacks to destinations: {', '.join(destinations)}")
|
|
88
92
|
|
|
89
93
|
|
|
90
94
|
def _copy_resource_packs(output_path: str, project_name_simple: str, destinations: list[str]) -> None:
|
|
@@ -95,6 +99,7 @@ def _copy_resource_packs(output_path: str, project_name_simple: str, destination
|
|
|
95
99
|
project_name_simple (str): The simplified project name.
|
|
96
100
|
destinations (list[str]): List of destination paths for resource packs.
|
|
97
101
|
"""
|
|
102
|
+
any_copied: bool = False
|
|
98
103
|
merged_resource_pack: str = relative_path(f"{output_path}/{project_name_simple}_resource_pack_with_libs.zip")
|
|
99
104
|
normal_resource_pack: str = relative_path(f"{output_path}/{project_name_simple}_resource_pack.zip")
|
|
100
105
|
|
|
@@ -102,14 +107,18 @@ def _copy_resource_packs(output_path: str, project_name_simple: str, destination
|
|
|
102
107
|
resource_pack_to_copy: str = merged_resource_pack if os.path.exists(merged_resource_pack) else normal_resource_pack
|
|
103
108
|
|
|
104
109
|
if os.path.exists(resource_pack_to_copy):
|
|
110
|
+
pack_type = "merged" if resource_pack_to_copy == merged_resource_pack else "normal"
|
|
105
111
|
for dest in destinations:
|
|
106
112
|
# Use original name (without _with_libs suffix) for the destination
|
|
107
113
|
with_libs = "_with_libs" if resource_pack_to_copy == merged_resource_pack else ""
|
|
108
114
|
dest_name = f"{project_name_simple}_resource_pack{with_libs}.zip"
|
|
109
115
|
dest_file = relative_path(f"{dest}/{dest_name}")
|
|
110
116
|
if _copy_with_retry(resource_pack_to_copy, dest_file):
|
|
111
|
-
|
|
112
|
-
|
|
117
|
+
any_copied = True
|
|
118
|
+
|
|
119
|
+
if any_copied:
|
|
120
|
+
pack_type = "merged" if resource_pack_to_copy == merged_resource_pack else "normal"
|
|
121
|
+
info(f"Copied {pack_type} resource pack to destinations: {', '.join(destinations)}")
|
|
113
122
|
|
|
114
123
|
|
|
115
124
|
def _copy_official_libs(datapack_destinations: list[str]) -> None:
|
|
@@ -125,6 +134,7 @@ def _copy_official_libs(datapack_destinations: list[str]) -> None:
|
|
|
125
134
|
if datapack_destinations:
|
|
126
135
|
official_datapack_path = relative_path(f"{OFFICIAL_LIBS_PATH}/datapack")
|
|
127
136
|
if os.path.exists(official_datapack_path):
|
|
137
|
+
any_copied: bool = False
|
|
128
138
|
for lib in OFFICIAL_LIBS.values():
|
|
129
139
|
if not lib.get("is_used", False):
|
|
130
140
|
continue
|
|
@@ -135,7 +145,9 @@ def _copy_official_libs(datapack_destinations: list[str]) -> None:
|
|
|
135
145
|
for dest in datapack_destinations:
|
|
136
146
|
dest_file = relative_path(f"{dest}/{lib_zip}")
|
|
137
147
|
if _copy_with_retry(lib_zip_path, dest_file):
|
|
138
|
-
|
|
148
|
+
any_copied = True
|
|
149
|
+
if any_copied:
|
|
150
|
+
info(f"Copied official libraries to datapack destinations: {', '.join(datapack_destinations)}")
|
|
139
151
|
|
|
140
152
|
|
|
141
153
|
def _copy_with_retry(src: str, dst: str, max_retries: int = 10, delay: float = 1.0) -> bool:
|
|
@@ -67,12 +67,15 @@ def beet_default(ctx: Context) -> None:
|
|
|
67
67
|
project_name: str = ctx.project_name
|
|
68
68
|
author: str = ctx.project_author
|
|
69
69
|
|
|
70
|
+
# Track newly found official libraries
|
|
71
|
+
newly_found_libs: list[str] = []
|
|
72
|
+
|
|
70
73
|
# Find if furnace_nbt_recipes is used
|
|
71
74
|
if ns != "furnace_nbt_recipes":
|
|
72
75
|
for function in ctx.data.functions.values():
|
|
73
76
|
if "furnace_nbt_recipes" in function.text:
|
|
74
77
|
if not official_lib_used("furnace_nbt_recipes"):
|
|
75
|
-
|
|
78
|
+
newly_found_libs.append("furnace_nbt_recipes")
|
|
76
79
|
break
|
|
77
80
|
|
|
78
81
|
# Find if common_signals is used
|
|
@@ -80,7 +83,7 @@ def beet_default(ctx: Context) -> None:
|
|
|
80
83
|
for function in ctx.data.functions.values():
|
|
81
84
|
if "common_signals" in function.text:
|
|
82
85
|
if not official_lib_used("common_signals"):
|
|
83
|
-
|
|
86
|
+
newly_found_libs.append("common_signals")
|
|
84
87
|
break
|
|
85
88
|
|
|
86
89
|
# Find if itemio is used
|
|
@@ -88,7 +91,7 @@ def beet_default(ctx: Context) -> None:
|
|
|
88
91
|
for function in ctx.data.functions.values():
|
|
89
92
|
if "itemio" in function.text:
|
|
90
93
|
if not official_lib_used("itemio"):
|
|
91
|
-
|
|
94
|
+
newly_found_libs.append("itemio")
|
|
92
95
|
break
|
|
93
96
|
|
|
94
97
|
# Find for each bookshelf module if it is used
|
|
@@ -97,9 +100,13 @@ def beet_default(ctx: Context) -> None:
|
|
|
97
100
|
for function in ctx.data.functions.values():
|
|
98
101
|
if f"#{module_ns}:" in function.text:
|
|
99
102
|
if not official_lib_used(module_ns):
|
|
100
|
-
|
|
103
|
+
newly_found_libs.append(module_ns)
|
|
101
104
|
break
|
|
102
105
|
|
|
106
|
+
# Debug message for newly found libraries
|
|
107
|
+
if newly_found_libs:
|
|
108
|
+
debug(f"Found the use of official supported libraries: {', '.join(newly_found_libs)}, adding them to the datapack")
|
|
109
|
+
|
|
103
110
|
# Get all dependencies (official and custom)
|
|
104
111
|
dependencies: list[tuple[str, dict]] = [(lib_ns, data) for lib_ns, data in OFFICIAL_LIBS.items() if data["is_used"]]
|
|
105
112
|
load_dependencies: JsonDict = ctx.meta.get("stewbeet", {}).get("load_dependencies", {})
|
|
@@ -12,7 +12,7 @@ from stouputils.io import super_json_dump
|
|
|
12
12
|
from stouputils.print import warning
|
|
13
13
|
|
|
14
14
|
from ...core import Mem
|
|
15
|
-
from .source_lore_font import find_pack_png,
|
|
15
|
+
from .source_lore_font import create_source_lore_font, find_pack_png, prepare_source_lore_font
|
|
16
16
|
|
|
17
17
|
|
|
18
18
|
# Main entry point
|
|
@@ -37,7 +37,7 @@ def beet_default(ctx: Context):
|
|
|
37
37
|
source_lore: TextComponent = Mem.ctx.meta.stewbeet.source_lore
|
|
38
38
|
if not source_lore or source_lore == "auto":
|
|
39
39
|
Mem.ctx.meta.stewbeet.source_lore = [{"text":"ICON"},{"text":f" {ctx.project_name}","italic":True,"color":"blue"}]
|
|
40
|
-
|
|
40
|
+
src_lore: str = prepare_source_lore_font(Mem.ctx.meta.stewbeet.source_lore)
|
|
41
41
|
|
|
42
42
|
# Preprocess manual name
|
|
43
43
|
manual_name: TextComponent = Mem.ctx.meta.stewbeet.manual.name
|
|
@@ -92,11 +92,6 @@ def beet_default(ctx: Context):
|
|
|
92
92
|
os.rename(old_path, new_path)
|
|
93
93
|
warning(f"Renamed texture '{file}' to '{new_name}'")
|
|
94
94
|
|
|
95
|
-
# Add the pack icon to the output directory for datapack and resource pack
|
|
96
|
-
pack_icon = find_pack_png()
|
|
97
|
-
if pack_icon:
|
|
98
|
-
Mem.ctx.data.extra["pack.png"] = Mem.ctx.assets.extra["pack.png"] = PngFile(source_path=pack_icon)
|
|
99
|
-
|
|
100
95
|
# Add missing pack format registries if not present
|
|
101
96
|
ctx.data.pack_format_registry.update({
|
|
102
97
|
(1, 21, 5): 71,
|
|
@@ -112,3 +107,18 @@ def beet_default(ctx: Context):
|
|
|
112
107
|
# Yield message to indicate successful build
|
|
113
108
|
yield
|
|
114
109
|
|
|
110
|
+
# If source lore is present and there are item definitions using it, create the source lore font
|
|
111
|
+
if src_lore and Mem.ctx.meta.stewbeet.source_lore and any(
|
|
112
|
+
isinstance(item, dict) and item.get("lore") == Mem.ctx.meta.stewbeet.source_lore
|
|
113
|
+
for item in Mem.definitions.values()
|
|
114
|
+
):
|
|
115
|
+
create_source_lore_font(src_lore)
|
|
116
|
+
|
|
117
|
+
# Add the pack icon to the output directory for datapack and resource pack
|
|
118
|
+
pack_icon = find_pack_png()
|
|
119
|
+
if pack_icon:
|
|
120
|
+
Mem.ctx.data.extra["pack.png"] = PngFile(source_path=pack_icon)
|
|
121
|
+
all_assets = set(Mem.ctx.assets.all())
|
|
122
|
+
if len(all_assets) > 0:
|
|
123
|
+
Mem.ctx.assets.extra["pack.png"] = PngFile(source_path=pack_icon)
|
|
124
|
+
|
|
@@ -27,25 +27,14 @@ def find_pack_png() -> str | None:
|
|
|
27
27
|
|
|
28
28
|
|
|
29
29
|
# Main function to create the source lore font
|
|
30
|
-
def
|
|
30
|
+
def prepare_source_lore_font(source_lore: TextComponent) -> str:
|
|
31
31
|
|
|
32
32
|
# If the source_lore has an ICON text component and pack_icon is present,
|
|
33
33
|
if source_lore and any(isinstance(component, dict) and "ICON" == component.get("text") for component in source_lore):
|
|
34
34
|
|
|
35
35
|
pack_icon = find_pack_png()
|
|
36
36
|
if not pack_icon:
|
|
37
|
-
return
|
|
38
|
-
|
|
39
|
-
# Create the font file
|
|
40
|
-
Mem.ctx.assets[Mem.ctx.project_id].fonts["icons"] = Font(
|
|
41
|
-
super_json_dump({"providers": [{"type": "bitmap","file": f"{Mem.ctx.project_id}:font/original_icon.png","ascent": 8,"height": 9,"chars": ["I"]}]})
|
|
42
|
-
)
|
|
43
|
-
|
|
44
|
-
# Copy the pack.png to the resource pack
|
|
45
|
-
image: Image.Image = Image.open(pack_icon).convert("RGBA")
|
|
46
|
-
if image.width > 256:
|
|
47
|
-
image = image.resize((256, 256))
|
|
48
|
-
Mem.ctx.assets[Mem.ctx.project_id].textures["font/original_icon"] = Texture(image)
|
|
37
|
+
return ""
|
|
49
38
|
|
|
50
39
|
# Replace every ICON text component with the original icon
|
|
51
40
|
for component in source_lore:
|
|
@@ -56,6 +45,21 @@ def make_source_lore_font(source_lore: TextComponent) -> None:
|
|
|
56
45
|
component["font"] = f"{Mem.ctx.project_id}:icons"
|
|
57
46
|
source_lore.insert(0, "")
|
|
58
47
|
Mem.ctx.meta.stewbeet.source_lore = source_lore
|
|
48
|
+
return pack_icon
|
|
49
|
+
|
|
50
|
+
return ""
|
|
51
|
+
|
|
52
|
+
def create_source_lore_font(pack_icon: str) -> None:
|
|
53
|
+
""" Create the source lore font using the provided pack icon. """
|
|
54
|
+
|
|
55
|
+
# Create the font file
|
|
56
|
+
Mem.ctx.assets[Mem.ctx.project_id].fonts["icons"] = Font(
|
|
57
|
+
super_json_dump({"providers": [{"type": "bitmap","file": f"{Mem.ctx.project_id}:font/original_icon.png","ascent": 8,"height": 9,"chars": ["I"]}]})
|
|
58
|
+
)
|
|
59
59
|
|
|
60
|
-
|
|
60
|
+
# Copy the pack.png to the resource pack
|
|
61
|
+
image: Image.Image = Image.open(pack_icon).convert("RGBA")
|
|
62
|
+
if image.width > 256:
|
|
63
|
+
image = image.resize((256, 256))
|
|
64
|
+
Mem.ctx.assets[Mem.ctx.project_id].textures["font/original_icon"] = Texture(image)
|
|
61
65
|
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{stewbeet-2.0.12 → stewbeet-2.0.14}/stewbeet/core/definitions_helper/smart_ore_generation.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{stewbeet-2.0.12 → stewbeet-2.0.14}/stewbeet/dependencies/datapack/Bookshelf Environment.zip
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{stewbeet-2.0.12 → stewbeet-2.0.14}/stewbeet/dependencies/datapack/Bookshelf Interaction.zip
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{stewbeet-2.0.12 → stewbeet-2.0.14}/stewbeet/plugins/compatibilities/neo_enchant/__init__.py
RENAMED
|
File without changes
|
{stewbeet-2.0.12 → stewbeet-2.0.14}/stewbeet/plugins/compatibilities/simpledrawer/__init__.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{stewbeet-2.0.12 → stewbeet-2.0.14}/stewbeet/plugins/finalyze/basic_datapack_structure/__init__.py
RENAMED
|
File without changes
|
{stewbeet-2.0.12 → stewbeet-2.0.14}/stewbeet/plugins/finalyze/check_unused_textures/__init__.py
RENAMED
|
File without changes
|
{stewbeet-2.0.12 → stewbeet-2.0.14}/stewbeet/plugins/finalyze/custom_blocks_ticking/__init__.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{stewbeet-2.0.12 → stewbeet-2.0.14}/stewbeet/plugins/ingame_manual/assets/heavy_workbench.png
RENAMED
|
File without changes
|
{stewbeet-2.0.12 → stewbeet-2.0.14}/stewbeet/plugins/ingame_manual/assets/invisible_item.png
RENAMED
|
File without changes
|
{stewbeet-2.0.12 → stewbeet-2.0.14}/stewbeet/plugins/ingame_manual/assets/invisible_item_release.png
RENAMED
|
File without changes
|
{stewbeet-2.0.12 → stewbeet-2.0.14}/stewbeet/plugins/ingame_manual/assets/minecraft_font.ttf
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{stewbeet-2.0.12 → stewbeet-2.0.14}/stewbeet/plugins/ingame_manual/assets/simple_case_no_border.png
RENAMED
|
File without changes
|
{stewbeet-2.0.12 → stewbeet-2.0.14}/stewbeet/plugins/ingame_manual/assets/wiki_information.png
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{stewbeet-2.0.12 → stewbeet-2.0.14}/stewbeet/plugins/ingame_manual/assets/wiki_result_of_craft.png
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{stewbeet-2.0.12 → stewbeet-2.0.14}/stewbeet/plugins/ingame_manual/templates/heavy_workbench.png
RENAMED
|
File without changes
|
{stewbeet-2.0.12 → stewbeet-2.0.14}/stewbeet/plugins/ingame_manual/templates/invisible_item.png
RENAMED
|
File without changes
|
|
File without changes
|
{stewbeet-2.0.12 → stewbeet-2.0.14}/stewbeet/plugins/ingame_manual/templates/minecraft_font.ttf
RENAMED
|
File without changes
|
|
File without changes
|
{stewbeet-2.0.12 → stewbeet-2.0.14}/stewbeet/plugins/ingame_manual/templates/none_release.png
RENAMED
|
File without changes
|
{stewbeet-2.0.12 → stewbeet-2.0.14}/stewbeet/plugins/ingame_manual/templates/pulverizing.png
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{stewbeet-2.0.12 → stewbeet-2.0.14}/stewbeet/plugins/ingame_manual/templates/wiki_information.png
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{stewbeet-2.0.12 → stewbeet-2.0.14}/stewbeet/plugins/resource_pack/check_power_of_2/__init__.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|