minecraft-datapack-language 16.0.22__py3-none-any.whl → 16.0.23__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/mdl_compiler.py +7 -9
- {minecraft_datapack_language-16.0.22.dist-info → minecraft_datapack_language-16.0.23.dist-info}/METADATA +1 -1
- {minecraft_datapack_language-16.0.22.dist-info → minecraft_datapack_language-16.0.23.dist-info}/RECORD +8 -8
- {minecraft_datapack_language-16.0.22.dist-info → minecraft_datapack_language-16.0.23.dist-info}/WHEEL +0 -0
- {minecraft_datapack_language-16.0.22.dist-info → minecraft_datapack_language-16.0.23.dist-info}/entry_points.txt +0 -0
- {minecraft_datapack_language-16.0.22.dist-info → minecraft_datapack_language-16.0.23.dist-info}/licenses/LICENSE +0 -0
- {minecraft_datapack_language-16.0.22.dist-info → minecraft_datapack_language-16.0.23.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 = '16.0.
|
32
|
-
__version_tuple__ = version_tuple = (16, 0,
|
31
|
+
__version__ = version = '16.0.23'
|
32
|
+
__version_tuple__ = version_tuple = (16, 0, 23)
|
33
33
|
|
34
34
|
__commit_id__ = commit_id = None
|
@@ -324,9 +324,8 @@ class MDLCompiler:
|
|
324
324
|
if getattr(decl, 'initial_value', None) is None:
|
325
325
|
continue
|
326
326
|
objective = self.variables.get(decl.name, decl.name)
|
327
|
-
|
328
|
-
if
|
329
|
-
scope = "@a"
|
327
|
+
resolved_scope = self._resolve_scope(decl.scope) if decl.scope else "@a"
|
328
|
+
scope = "@a" if resolved_scope == "@s" else resolved_scope
|
330
329
|
init = decl.initial_value
|
331
330
|
from .ast_nodes import LiteralExpression, VariableSubstitution
|
332
331
|
if isinstance(init, LiteralExpression):
|
@@ -340,9 +339,8 @@ class MDLCompiler:
|
|
340
339
|
lines.append(f"scoreboard players set {scope} {objective} {val_str}")
|
341
340
|
elif isinstance(init, VariableSubstitution):
|
342
341
|
src_obj = self.variables.get(init.name, init.name)
|
343
|
-
|
344
|
-
if
|
345
|
-
src_scope = "@a"
|
342
|
+
src_resolved = self._resolve_scope(init.scope) if init.scope else "@a"
|
343
|
+
src_scope = "@a" if src_resolved == "@s" else src_resolved
|
346
344
|
lines.append(f"scoreboard players operation {scope} {objective} = {src_scope} {src_obj}")
|
347
345
|
|
348
346
|
lines.append("")
|
@@ -404,7 +402,7 @@ class MDLCompiler:
|
|
404
402
|
if assignment.name not in self.variables:
|
405
403
|
self.variables[assignment.name] = assignment.name
|
406
404
|
objective = self.variables.get(assignment.name, assignment.name)
|
407
|
-
scope = assignment.scope
|
405
|
+
scope = self._resolve_scope(assignment.scope)
|
408
406
|
|
409
407
|
# Check if the value is a complex expression
|
410
408
|
if isinstance(assignment.value, BinaryExpression):
|
@@ -435,7 +433,7 @@ class MDLCompiler:
|
|
435
433
|
# Register objective so load function adds it
|
436
434
|
self.variables[decl.name] = objective
|
437
435
|
# If there is an initial value, set it in current context
|
438
|
-
scope = decl.scope
|
436
|
+
scope = self._resolve_scope(decl.scope)
|
439
437
|
init = None
|
440
438
|
try:
|
441
439
|
init = self._expression_to_value(decl.initial_value)
|
@@ -474,7 +472,7 @@ class MDLCompiler:
|
|
474
472
|
parts.append(f'{{"text":"{text_before}"}}')
|
475
473
|
|
476
474
|
objective = self.variables.get(var.name, var.name)
|
477
|
-
scope = var.scope
|
475
|
+
scope = self._resolve_scope(var.scope)
|
478
476
|
parts.append(f'{{"score":{{"name":"{scope}","objective":"{objective}"}}}}')
|
479
477
|
|
480
478
|
current_pos = var_pos + len(var_pattern)
|
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.4
|
2
2
|
Name: minecraft-datapack-language
|
3
|
-
Version: 16.0.
|
3
|
+
Version: 16.0.23
|
4
4
|
Summary: Compile MDL language with explicit scoping 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,18 +1,18 @@
|
|
1
1
|
minecraft_datapack_language/__init__.py,sha256=0KVXBE4ScRaRUrf83aA2tVB-y8A_jplyaxVvtHH6Uw0,1199
|
2
|
-
minecraft_datapack_language/_version.py,sha256=
|
2
|
+
minecraft_datapack_language/_version.py,sha256=eWTNBh-P4HhLgybIHAOAGijWNHcasRe4IaGpZ8W0Ess,708
|
3
3
|
minecraft_datapack_language/ast_nodes.py,sha256=L5izavSeXDr766vsfRvJrcnflXNJyXcy0WSfyJPq2ZA,4484
|
4
4
|
minecraft_datapack_language/cli.py,sha256=shmQtNNXgw5XNlGquAR52wWtYeNyYusZTwwCZl56mMU,9522
|
5
5
|
minecraft_datapack_language/dir_map.py,sha256=HmxFkuvWGkzHF8o_GFb4BpuMCRc6QMw8UbmcAI8JVdY,1788
|
6
|
-
minecraft_datapack_language/mdl_compiler.py,sha256
|
6
|
+
minecraft_datapack_language/mdl_compiler.py,sha256=DRE6du7JRScZo8NRIGN9hF0CkDPeHspsKaYXNL8ZPRc,70187
|
7
7
|
minecraft_datapack_language/mdl_errors.py,sha256=r0Gu3KhoX1YLPAVW_iO7Q_fPgaf_Dv9tOGSOdKNSzmw,16114
|
8
8
|
minecraft_datapack_language/mdl_lexer.py,sha256=YuRflOkoMOcjECPAZzoAkJciMks5amWMtGbcTIVKmAs,24166
|
9
9
|
minecraft_datapack_language/mdl_linter.py,sha256=z85xoAglENurCh30bR7kEHZ_JeMxcYaLDcGNRAl-RAI,17253
|
10
10
|
minecraft_datapack_language/mdl_parser.py,sha256=vIcPRudxDaezNy85Q5CBcumLhCglofCNITsrRmj9YWw,27302
|
11
11
|
minecraft_datapack_language/python_api.py,sha256=Iao1jbdeW6ekeA80BZG6gNqHVjxQJEheB3DbpVsuTZQ,12304
|
12
12
|
minecraft_datapack_language/utils.py,sha256=Aq0HAGlXqj9BUTEjaEilpvzEW0EtZYYMMwOqG9db6dE,684
|
13
|
-
minecraft_datapack_language-16.0.
|
14
|
-
minecraft_datapack_language-16.0.
|
15
|
-
minecraft_datapack_language-16.0.
|
16
|
-
minecraft_datapack_language-16.0.
|
17
|
-
minecraft_datapack_language-16.0.
|
18
|
-
minecraft_datapack_language-16.0.
|
13
|
+
minecraft_datapack_language-16.0.23.dist-info/licenses/LICENSE,sha256=OXLcl0T2SZ8Pmy2_dmlvKuetivmyPd5m1q-Gyd-zaYY,35149
|
14
|
+
minecraft_datapack_language-16.0.23.dist-info/METADATA,sha256=hEDfmoYVnMwMaVIVVT86YmaV1fqS4uDSweWNLkqLz0E,8344
|
15
|
+
minecraft_datapack_language-16.0.23.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
16
|
+
minecraft_datapack_language-16.0.23.dist-info/entry_points.txt,sha256=c6vjBeCiyQflvPHBRyBk2nJCSfYt3Oc7Sc9V87ySi_U,108
|
17
|
+
minecraft_datapack_language-16.0.23.dist-info/top_level.txt,sha256=ADtFI476tbKLLxEAA-aJQAfg53MA3k_DOb0KTFiggfw,28
|
18
|
+
minecraft_datapack_language-16.0.23.dist-info/RECORD,,
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|