minecraft-datapack-language 15.1.53__py3-none-any.whl → 15.1.55__py3-none-any.whl
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.
- minecraft_datapack_language/_version.py +2 -2
- minecraft_datapack_language/cli_build.py +22 -7
- minecraft_datapack_language/cli_check.py +1 -0
- minecraft_datapack_language/cli_new.py +5 -5
- {minecraft_datapack_language-15.1.53.dist-info → minecraft_datapack_language-15.1.55.dist-info}/METADATA +1 -1
- {minecraft_datapack_language-15.1.53.dist-info → minecraft_datapack_language-15.1.55.dist-info}/RECORD +10 -10
- {minecraft_datapack_language-15.1.53.dist-info → minecraft_datapack_language-15.1.55.dist-info}/WHEEL +0 -0
- {minecraft_datapack_language-15.1.53.dist-info → minecraft_datapack_language-15.1.55.dist-info}/entry_points.txt +0 -0
- {minecraft_datapack_language-15.1.53.dist-info → minecraft_datapack_language-15.1.55.dist-info}/licenses/LICENSE +0 -0
- {minecraft_datapack_language-15.1.53.dist-info → minecraft_datapack_language-15.1.55.dist-info}/top_level.txt +0 -0
@@ -28,7 +28,7 @@ version_tuple: VERSION_TUPLE
|
|
28
28
|
commit_id: COMMIT_ID
|
29
29
|
__commit_id__: COMMIT_ID
|
30
30
|
|
31
|
-
__version__ = version = '15.1.
|
32
|
-
__version_tuple__ = version_tuple = (15, 1,
|
31
|
+
__version__ = version = '15.1.55'
|
32
|
+
__version_tuple__ = version_tuple = (15, 1, 55)
|
33
33
|
|
34
34
|
__commit_id__ = commit_id = None
|
@@ -101,6 +101,12 @@ def _merge_mdl_files(files: List[Path], verbose: bool = False, error_collector:
|
|
101
101
|
ast['variables'] = []
|
102
102
|
ast['variables'].extend(additional_ast['variables'])
|
103
103
|
|
104
|
+
# Merge namespaces (append to existing list)
|
105
|
+
if 'namespaces' in additional_ast:
|
106
|
+
if 'namespaces' not in ast:
|
107
|
+
ast['namespaces'] = []
|
108
|
+
ast['namespaces'].extend(additional_ast['namespaces'])
|
109
|
+
|
104
110
|
# Merge registry declarations
|
105
111
|
for registry_type in ['recipes', 'loot_tables', 'advancements', 'predicates', 'item_modifiers', 'structures']:
|
106
112
|
if registry_type in additional_ast:
|
@@ -355,8 +361,17 @@ def _generate_hook_files(ast: Dict[str, Any], output_dir: Path, namespace: str,
|
|
355
361
|
load_tag_dir = output_dir / "data" / "minecraft" / "tags" / "function"
|
356
362
|
ensure_dir(str(load_tag_dir))
|
357
363
|
|
364
|
+
# Start with the load function
|
365
|
+
load_values = [f"{namespace}:load"]
|
366
|
+
|
367
|
+
# Add functions specified in on_load hooks
|
368
|
+
if 'hooks' in ast:
|
369
|
+
for hook in ast['hooks']:
|
370
|
+
if hook['hook_type'] == 'load':
|
371
|
+
load_values.append(hook['function_name'])
|
372
|
+
|
358
373
|
load_tag_content = {
|
359
|
-
"values":
|
374
|
+
"values": load_values
|
360
375
|
}
|
361
376
|
write_json(str(load_tag_dir / "load.json"), load_tag_content)
|
362
377
|
|
@@ -729,12 +744,12 @@ def build_mdl(input_path: str, output_path: str, verbose: bool = False, pack_for
|
|
729
744
|
# Generate global load function
|
730
745
|
_generate_global_load_function(ast, output_dir, namespace, build_context)
|
731
746
|
|
732
|
-
# Create zip file
|
733
|
-
if wrapper
|
734
|
-
|
735
|
-
|
736
|
-
|
737
|
-
|
747
|
+
# Create zip file (always create one, use wrapper name if specified)
|
748
|
+
zip_name = wrapper if wrapper else output_dir.name
|
749
|
+
zip_path = output_dir.parent / f"{zip_name}.zip"
|
750
|
+
_create_zip_file(output_dir, zip_path)
|
751
|
+
if verbose:
|
752
|
+
print(f"[ZIP] Created zip file: {zip_path}")
|
738
753
|
|
739
754
|
print(f"[OK] Successfully built datapack: {output_path}")
|
740
755
|
if verbose:
|
@@ -39,7 +39,7 @@ def create_new_project(project_name: str, pack_name: str = None, pack_format: in
|
|
39
39
|
project_dir.mkdir(parents=True, exist_ok=False)
|
40
40
|
|
41
41
|
# Create the main MDL file
|
42
|
-
mdl_file = project_dir /
|
42
|
+
mdl_file = project_dir / "main.mdl"
|
43
43
|
|
44
44
|
# Generate template content
|
45
45
|
template_content = _generate_mdl_template(clean_name, pack_name, pack_format)
|
@@ -61,9 +61,9 @@ def create_new_project(project_name: str, pack_name: str = None, pack_format: in
|
|
61
61
|
print()
|
62
62
|
print("[NEXT] Next steps:")
|
63
63
|
print(f" 1. cd {clean_name}")
|
64
|
-
print(f" 2. Edit
|
65
|
-
print(f" 3. mdl build --mdl
|
66
|
-
print(f" 4. mdl check
|
64
|
+
print(f" 2. Edit main.mdl with your code")
|
65
|
+
print(f" 3. mdl build --mdl main.mdl -o dist")
|
66
|
+
print(f" 4. mdl check main.mdl")
|
67
67
|
print()
|
68
68
|
print("[INFO] Learn more:")
|
69
69
|
print(" • Language Reference: https://www.mcmdl.com/docs/language-reference")
|
@@ -168,7 +168,7 @@ This datapack was generated using the MDL CLI tool. MDL is a simplified language
|
|
168
168
|
```
|
169
169
|
{project_name}/
|
170
170
|
├── README.md # This file
|
171
|
-
└──
|
171
|
+
└── main.mdl # Main MDL source file
|
172
172
|
```
|
173
173
|
|
174
174
|
## [NEXT] Getting Started
|
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.4
|
2
2
|
Name: minecraft-datapack-language
|
3
|
-
Version: 15.1.
|
3
|
+
Version: 15.1.55
|
4
4
|
Summary: Compile JavaScript-style MDL language or Python API into a Minecraft datapack (1.21+ ready). Features variables, control flow, error handling, and VS Code extension.
|
5
5
|
Project-URL: Homepage, https://www.mcmdl.com
|
6
6
|
Project-URL: Documentation, https://www.mcmdl.com/docs
|
@@ -1,11 +1,11 @@
|
|
1
1
|
minecraft_datapack_language/__init__.py,sha256=i-qCchbe5b2Fshgc6yCU9mddOLs2UBt9SAcLqfUIrT0,606
|
2
|
-
minecraft_datapack_language/_version.py,sha256=
|
2
|
+
minecraft_datapack_language/_version.py,sha256=NQnt-crdDKDeC7jaDFNdbb6plbYvj8ruHh-M1rXOL3I,708
|
3
3
|
minecraft_datapack_language/ast_nodes.py,sha256=pgjI2Nlap3ixFPgWqGSkqncG9zB91h5BKgRjtcJqMew,2118
|
4
4
|
minecraft_datapack_language/cli.py,sha256=p5A_tEEXugN2NhQFbbgfwi4FxbWYD91RWeKR_A3Vuec,6263
|
5
|
-
minecraft_datapack_language/cli_build.py,sha256
|
6
|
-
minecraft_datapack_language/cli_check.py,sha256=
|
5
|
+
minecraft_datapack_language/cli_build.py,sha256=jtBBQiyySb1zQS2ShiaM0LHSP2LR51ILlrgNfYPYfAE,32722
|
6
|
+
minecraft_datapack_language/cli_check.py,sha256=bPq9gHsxQ1CIiftkrAtRCifWkVAyjp5c8Oay2NNQ1qs,6277
|
7
7
|
minecraft_datapack_language/cli_help.py,sha256=jUTHUQBONAZKVTdQK9tNPXq4c_6xpsafNOvHDjkEldg,12243
|
8
|
-
minecraft_datapack_language/cli_new.py,sha256=
|
8
|
+
minecraft_datapack_language/cli_new.py,sha256=uaKH0VBC43XBt_Hztc35-BfC9bYlsDdLbAfe_42rrtI,8235
|
9
9
|
minecraft_datapack_language/cli_utils.py,sha256=gLGe2nAn8pLiSJhn-DpNvMxo0th_Gj89I-oSeyPx4zU,9293
|
10
10
|
minecraft_datapack_language/dir_map.py,sha256=HmxFkuvWGkzHF8o_GFb4BpuMCRc6QMw8UbmcAI8JVdY,1788
|
11
11
|
minecraft_datapack_language/expression_processor.py,sha256=GN6cuRNvgI8TrV6YnEHrA9P0X-ACTT7rCBh4WlOPjSI,20140
|
@@ -16,9 +16,9 @@ minecraft_datapack_language/mdl_linter.py,sha256=z85xoAglENurCh30bR7kEHZ_JeMxcYa
|
|
16
16
|
minecraft_datapack_language/mdl_parser_js.py,sha256=Ng22mKVbMNC4412Xb09i8fcNFPTPrW4NxFeK7Tv7EBQ,38539
|
17
17
|
minecraft_datapack_language/pack.py,sha256=nYiXQ3jgJlDfc4m-65f7C2LFhDRioaUU_XVy6Na4SJI,34625
|
18
18
|
minecraft_datapack_language/utils.py,sha256=Aq0HAGlXqj9BUTEjaEilpvzEW0EtZYYMMwOqG9db6dE,684
|
19
|
-
minecraft_datapack_language-15.1.
|
20
|
-
minecraft_datapack_language-15.1.
|
21
|
-
minecraft_datapack_language-15.1.
|
22
|
-
minecraft_datapack_language-15.1.
|
23
|
-
minecraft_datapack_language-15.1.
|
24
|
-
minecraft_datapack_language-15.1.
|
19
|
+
minecraft_datapack_language-15.1.55.dist-info/licenses/LICENSE,sha256=OXLcl0T2SZ8Pmy2_dmlvKuetivmyPd5m1q-Gyd-zaYY,35149
|
20
|
+
minecraft_datapack_language-15.1.55.dist-info/METADATA,sha256=INh-sneVWPG4lLmN7cmitdRDplKFW-zuFb9SFAIRsYA,35230
|
21
|
+
minecraft_datapack_language-15.1.55.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
22
|
+
minecraft_datapack_language-15.1.55.dist-info/entry_points.txt,sha256=c6vjBeCiyQflvPHBRyBk2nJCSfYt3Oc7Sc9V87ySi_U,108
|
23
|
+
minecraft_datapack_language-15.1.55.dist-info/top_level.txt,sha256=ADtFI476tbKLLxEAA-aJQAfg53MA3k_DOb0KTFiggfw,28
|
24
|
+
minecraft_datapack_language-15.1.55.dist-info/RECORD,,
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|