minecraft-datapack-language 15.4.4__py3-none-any.whl → 15.4.6__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_help.py +23 -24
- minecraft_datapack_language/cli_new.py +26 -95
- {minecraft_datapack_language-15.4.4.dist-info → minecraft_datapack_language-15.4.6.dist-info}/METADATA +1 -1
- {minecraft_datapack_language-15.4.4.dist-info → minecraft_datapack_language-15.4.6.dist-info}/RECORD +9 -9
- {minecraft_datapack_language-15.4.4.dist-info → minecraft_datapack_language-15.4.6.dist-info}/WHEEL +0 -0
- {minecraft_datapack_language-15.4.4.dist-info → minecraft_datapack_language-15.4.6.dist-info}/entry_points.txt +0 -0
- {minecraft_datapack_language-15.4.4.dist-info → minecraft_datapack_language-15.4.6.dist-info}/licenses/LICENSE +0 -0
- {minecraft_datapack_language-15.4.4.dist-info → minecraft_datapack_language-15.4.6.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.4.
|
32
|
-
__version_tuple__ = version_tuple = (15, 4,
|
31
|
+
__version__ = version = '15.4.6'
|
32
|
+
__version_tuple__ = version_tuple = (15, 4, 6)
|
33
33
|
|
34
34
|
__commit_id__ = commit_id = None
|
@@ -5,7 +5,7 @@ CLI Help System - Comprehensive help documentation for MDL CLI
|
|
5
5
|
from .cli_colors import (
|
6
6
|
print_header, print_title, print_section, print_separator,
|
7
7
|
print_success, print_warning, print_info, print_bullet,
|
8
|
-
print_code,
|
8
|
+
print_code, color
|
9
9
|
)
|
10
10
|
|
11
11
|
|
@@ -27,15 +27,15 @@ def show_main_help():
|
|
27
27
|
print_section("Available Commands")
|
28
28
|
print()
|
29
29
|
|
30
|
-
|
30
|
+
print_code("build")
|
31
31
|
print_info(" - Compile MDL files into a Minecraft datapack")
|
32
32
|
print()
|
33
33
|
|
34
|
-
|
34
|
+
print_code("check")
|
35
35
|
print_info(" - Validate MDL files for syntax and semantic errors")
|
36
36
|
print()
|
37
37
|
|
38
|
-
|
38
|
+
print_code("new")
|
39
39
|
print_info(" - Create a new MDL project with template files")
|
40
40
|
print()
|
41
41
|
|
@@ -110,12 +110,12 @@ def show_build_help():
|
|
110
110
|
print_section("Arguments")
|
111
111
|
print()
|
112
112
|
|
113
|
-
|
113
|
+
print_code("--mdl, -m <input>")
|
114
114
|
print_info(" Input MDL file or directory containing .mdl files")
|
115
115
|
print_info(" Examples: --mdl project.mdl, --mdl src/, --mdl .")
|
116
116
|
print()
|
117
117
|
|
118
|
-
|
118
|
+
print_code("-o, --output <output>")
|
119
119
|
print_info(" Output directory for the generated datapack")
|
120
120
|
print_info(" Example: -o dist, -o build/my_pack")
|
121
121
|
print()
|
@@ -123,22 +123,22 @@ def show_build_help():
|
|
123
123
|
print_section("Options")
|
124
124
|
print()
|
125
125
|
|
126
|
-
|
126
|
+
print_code("--verbose, -v")
|
127
127
|
print_info(" Enable verbose output with detailed build information")
|
128
128
|
print_info(" Shows file parsing, function generation, and progress")
|
129
129
|
print()
|
130
130
|
|
131
|
-
|
131
|
+
print_code("--pack-format <number>")
|
132
132
|
print_info(" Override the pack format number (default: 82)")
|
133
133
|
print_info(" Higher numbers support newer Minecraft versions")
|
134
134
|
print()
|
135
135
|
|
136
|
-
|
136
|
+
print_code("--wrapper <name>")
|
137
137
|
print_info(" Create a zip file with the specified name")
|
138
138
|
print_info(" Example: --wrapper my_pack.zip")
|
139
139
|
print()
|
140
140
|
|
141
|
-
|
141
|
+
print_code("--ignore-warnings")
|
142
142
|
print_info(" Suppress warning messages during build")
|
143
143
|
print_info(" Only errors will be shown")
|
144
144
|
print()
|
@@ -189,7 +189,7 @@ def show_check_help():
|
|
189
189
|
print_section("Arguments")
|
190
190
|
print()
|
191
191
|
|
192
|
-
|
192
|
+
print_code("<input>")
|
193
193
|
print_info(" Input MDL file or directory to check")
|
194
194
|
print_info(" Examples: project.mdl, src/, .")
|
195
195
|
print()
|
@@ -197,12 +197,12 @@ def show_check_help():
|
|
197
197
|
print_section("Options")
|
198
198
|
print()
|
199
199
|
|
200
|
-
|
200
|
+
print_code("--verbose, -v")
|
201
201
|
print_info(" Enable verbose output with detailed validation information")
|
202
202
|
print_info(" Shows parsing steps, variable analysis, and scope checking")
|
203
203
|
print()
|
204
204
|
|
205
|
-
|
205
|
+
print_code("--ignore-warnings")
|
206
206
|
print_info(" Suppress warning messages during check")
|
207
207
|
print_info(" Only errors will be shown")
|
208
208
|
print()
|
@@ -266,7 +266,7 @@ def show_new_help():
|
|
266
266
|
print_section("Arguments")
|
267
267
|
print()
|
268
268
|
|
269
|
-
|
269
|
+
print_code("<project_name>")
|
270
270
|
print_info(" Name for the new project (will create project_name/ directory)")
|
271
271
|
print_info(" Examples: my_datapack, adventure_pack, minigame")
|
272
272
|
print()
|
@@ -274,12 +274,12 @@ def show_new_help():
|
|
274
274
|
print_section("Options")
|
275
275
|
print()
|
276
276
|
|
277
|
-
|
277
|
+
print_code("--pack-name <name>")
|
278
278
|
print_info(" Custom pack name (default: same as project name)")
|
279
279
|
print_info(" This appears in the pack.mcmeta file")
|
280
280
|
print()
|
281
281
|
|
282
|
-
|
282
|
+
print_code("--pack-format <number>")
|
283
283
|
print_info(" Pack format number (default: 82)")
|
284
284
|
print_info(" Higher numbers support newer Minecraft versions")
|
285
285
|
print_info(" Common values: 15 (1.17+), 26 (1.18+), 82 (1.20+)")
|
@@ -290,11 +290,11 @@ def show_new_help():
|
|
290
290
|
|
291
291
|
print_info("The new command creates:")
|
292
292
|
print_bullet("project_name/ directory")
|
293
|
-
print_bullet("
|
293
|
+
print_bullet("main.mdl - Main MDL source file with basic hello world example")
|
294
294
|
print_bullet("README.md - Project documentation template")
|
295
295
|
print_bullet("Proper pack.mcmeta configuration")
|
296
|
-
print_bullet("
|
297
|
-
print_bullet("
|
296
|
+
print_bullet("Simple function structure (main function with on_load hook)")
|
297
|
+
print_bullet("Clean, working example that demonstrates basic MDL syntax")
|
298
298
|
print()
|
299
299
|
|
300
300
|
print_section("Examples")
|
@@ -316,11 +316,10 @@ def show_new_help():
|
|
316
316
|
print()
|
317
317
|
|
318
318
|
print_info("New projects include:")
|
319
|
-
print_bullet("
|
320
|
-
print_bullet("
|
321
|
-
print_bullet("
|
322
|
-
print_bullet("
|
323
|
-
print_bullet("Basic command structure")
|
319
|
+
print_bullet("main function - Simple hello world example")
|
320
|
+
print_bullet("on_load hook - Automatically runs the main function when loaded")
|
321
|
+
print_bullet("Clean, minimal code that compiles and works immediately")
|
322
|
+
print_bullet("Proper pack declaration and namespace setup")
|
324
323
|
print()
|
325
324
|
|
326
325
|
print_success("Project created! Start editing the .mdl file and use 'mdl build' to compile.")
|
@@ -78,79 +78,16 @@ def create_new_project(project_name: str, pack_name: str = None, pack_format: in
|
|
78
78
|
|
79
79
|
|
80
80
|
def _generate_mdl_template(project_name: str, pack_name: str, pack_format: int) -> str:
|
81
|
-
"""Generate the template
|
82
|
-
return f'''pack "{pack_name}" "
|
83
|
-
namespace "{
|
81
|
+
"""Generate the MDL template content."""
|
82
|
+
return f'''pack "{pack_name}" "A simple hello world datapack" {pack_format};
|
83
|
+
namespace "{project_name}";
|
84
84
|
|
85
|
-
// Example variables
|
86
|
-
var num score = 0;
|
87
|
-
var num lives = 3;
|
88
|
-
|
89
|
-
// Main function - this runs when called
|
90
85
|
function "main" {{
|
91
|
-
say Hello
|
92
|
-
|
93
|
-
// Set initial values
|
94
|
-
score = 10;
|
95
|
-
lives = 3;
|
96
|
-
|
97
|
-
// Display current values
|
98
|
-
say Score: $score$;
|
99
|
-
say Lives: $lives$;
|
100
|
-
|
101
|
-
// Example conditional statement
|
102
|
-
if "$score$ > 5" {{
|
103
|
-
say Great score!;
|
104
|
-
}} else {{
|
105
|
-
say Keep trying!;
|
106
|
-
}};
|
107
|
-
|
108
|
-
// Example while loop
|
109
|
-
while "$lives$ > 0" {{
|
110
|
-
say You have $lives$ lives remaining;
|
111
|
-
lives = lives - 1;
|
112
|
-
}};
|
113
|
-
|
114
|
-
say Game over!;
|
115
|
-
}}
|
116
|
-
|
117
|
-
// Init function - this runs when the datapack loads
|
118
|
-
function "init" {{
|
119
|
-
say [GAME] {pack_name} loaded successfully!;
|
120
|
-
say Type: /function {project_name}:main;
|
121
|
-
}}
|
122
|
-
|
123
|
-
// Tick function - this runs every tick (20 times per second)
|
124
|
-
function "tick" {{
|
125
|
-
// Add your tick logic here
|
126
|
-
// Be careful with performance!
|
86
|
+
say Hello, Minecraft!;
|
87
|
+
tellraw @a {{"text":"Welcome to my datapack!","color":"green"}};
|
127
88
|
}}
|
128
89
|
|
129
|
-
|
130
|
-
function "greet_player" {{
|
131
|
-
say Welcome to {pack_name}!;
|
132
|
-
say Have fun playing!;
|
133
|
-
}}
|
134
|
-
|
135
|
-
// Raw Minecraft commands example
|
136
|
-
$!raw
|
137
|
-
# You can use raw Minecraft commands here
|
138
|
-
# These are passed through directly to the output
|
139
|
-
# Useful for complex commands or commands not yet supported by MDL
|
140
|
-
tellraw @a {{"text":"Raw command example","color":"gold"}}
|
141
|
-
raw!$
|
142
|
-
|
143
|
-
// Example recipe (optional)
|
144
|
-
// recipe "diamond_sword" "diamond_sword.json";
|
145
|
-
|
146
|
-
// Example loot table (optional)
|
147
|
-
// loot_table "chest_loot" "chest_loot.json";
|
148
|
-
|
149
|
-
// Example advancement (optional)
|
150
|
-
// advancement "first_diamond" "first_diamond.json";
|
151
|
-
|
152
|
-
// Hook the init function to run when the datapack loads
|
153
|
-
on_load "{project_name}:init";
|
90
|
+
on_load "{project_name}:main";
|
154
91
|
'''
|
155
92
|
|
156
93
|
|
@@ -162,14 +99,14 @@ A Minecraft datapack created with MDL (Minecraft Datapack Language).
|
|
162
99
|
|
163
100
|
## [GAME] About
|
164
101
|
|
165
|
-
This datapack was generated using the MDL CLI tool. MDL is a simplified language for creating Minecraft datapacks with
|
102
|
+
This datapack was generated using the MDL CLI tool. MDL is a simplified language for creating Minecraft datapacks with clean, readable syntax.
|
166
103
|
|
167
104
|
## [DIR] Project Structure
|
168
105
|
|
169
106
|
```
|
170
107
|
{project_name}/
|
171
108
|
├── README.md # This file
|
172
|
-
└── main.mdl # Main MDL source file
|
109
|
+
└── main.mdl # Main MDL source file with basic hello world example
|
173
110
|
```
|
174
111
|
|
175
112
|
## [NEXT] Getting Started
|
@@ -183,19 +120,19 @@ This datapack was generated using the MDL CLI tool. MDL is a simplified language
|
|
183
120
|
|
184
121
|
1. **Build the project:**
|
185
122
|
```bash
|
186
|
-
mdl build --mdl
|
123
|
+
mdl build --mdl main.mdl -o dist
|
187
124
|
```
|
188
125
|
|
189
126
|
2. **Check for errors:**
|
190
127
|
```bash
|
191
|
-
mdl check
|
128
|
+
mdl check main.mdl
|
192
129
|
```
|
193
130
|
|
194
131
|
3. **Install in Minecraft:**
|
195
132
|
- Copy the `dist` folder to your world's `datapacks` directory
|
196
133
|
- Or use the `--wrapper` option to create a zip file:
|
197
134
|
```bash
|
198
|
-
mdl build --mdl
|
135
|
+
mdl build --mdl main.mdl -o dist --wrapper {project_name}
|
199
136
|
```
|
200
137
|
|
201
138
|
### Using the Datapack
|
@@ -208,37 +145,31 @@ This datapack was generated using the MDL CLI tool. MDL is a simplified language
|
|
208
145
|
|
209
146
|
### Editing the Code
|
210
147
|
|
211
|
-
Open `
|
148
|
+
Open `main.mdl` in your favorite text editor. The file contains:
|
212
149
|
|
213
150
|
- **Pack declaration** - Datapack metadata
|
214
|
-
- **
|
151
|
+
- **Namespace** - Datapack namespace for organization
|
215
152
|
- **Functions** - The main logic of your datapack
|
216
|
-
- **
|
217
|
-
- **Raw commands** - Direct Minecraft commands when needed
|
153
|
+
- **on_load hook** - Automatically runs when the datapack loads
|
218
154
|
|
219
155
|
### Key Features
|
220
156
|
|
221
|
-
- **
|
222
|
-
- **
|
223
|
-
- **
|
224
|
-
- **
|
225
|
-
- **Variable substitution**: Use `$variable$` in commands to insert values
|
157
|
+
- **Functions**: Define reusable code blocks with `function "name" {{ ... }}`
|
158
|
+
- **Basic commands**: Use `say` and `tellraw` for player communication
|
159
|
+
- **Automatic loading**: The `on_load` hook runs your main function automatically
|
160
|
+
- **Clean syntax**: Simple, readable MDL syntax that compiles to Minecraft commands
|
226
161
|
|
227
162
|
### Example Code
|
228
163
|
|
229
164
|
```mdl
|
230
|
-
//
|
231
|
-
|
232
|
-
|
233
|
-
|
234
|
-
say "Your score is: $score$"
|
235
|
-
|
236
|
-
// Conditional logic
|
237
|
-
if (score > 5) {{
|
238
|
-
say "Great job!"
|
239
|
-
}} else {{
|
240
|
-
say "Keep trying!"
|
165
|
+
// Define a function
|
166
|
+
function "main" {{
|
167
|
+
say Hello, Minecraft!;
|
168
|
+
tellraw @a {{"text":"Welcome!","color":"green"}};
|
241
169
|
}}
|
170
|
+
|
171
|
+
// Hook it to run when loaded
|
172
|
+
on_load "{project_name}:main";
|
242
173
|
```
|
243
174
|
|
244
175
|
## [INFO] Resources
|
@@ -258,7 +189,7 @@ if (score > 5) {{
|
|
258
189
|
- Check that the file has a `.mdl` extension
|
259
190
|
|
260
191
|
2. **Syntax errors**
|
261
|
-
- Use `mdl check
|
192
|
+
- Use `mdl check main.mdl` to find and fix errors
|
262
193
|
- Check the error messages for line numbers and suggestions
|
263
194
|
|
264
195
|
3. **Datapack not loading**
|
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.4
|
2
2
|
Name: minecraft-datapack-language
|
3
|
-
Version: 15.4.
|
3
|
+
Version: 15.4.6
|
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
|
{minecraft_datapack_language-15.4.4.dist-info → minecraft_datapack_language-15.4.6.dist-info}/RECORD
RENAMED
@@ -1,12 +1,12 @@
|
|
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=orqZrdTIAmN40ec2-mUiqfcn77NJi5YYCW2ApoD5pgg,706
|
3
3
|
minecraft_datapack_language/ast_nodes.py,sha256=pgjI2Nlap3ixFPgWqGSkqncG9zB91h5BKgRjtcJqMew,2118
|
4
4
|
minecraft_datapack_language/cli.py,sha256=p5A_tEEXugN2NhQFbbgfwi4FxbWYD91RWeKR_A3Vuec,6263
|
5
5
|
minecraft_datapack_language/cli_build.py,sha256=hbBqAI0VeoffF2EPaZu0HSCRfFBsEnjpwSZm0PNCfDE,9023
|
6
6
|
minecraft_datapack_language/cli_check.py,sha256=bPq9gHsxQ1CIiftkrAtRCifWkVAyjp5c8Oay2NNQ1qs,6277
|
7
7
|
minecraft_datapack_language/cli_colors.py,sha256=Ims0KbdYpsiwoqv96Y_g89uOB5l1qdETm_P51rkljfk,7884
|
8
|
-
minecraft_datapack_language/cli_help.py,sha256=
|
9
|
-
minecraft_datapack_language/cli_new.py,sha256=
|
8
|
+
minecraft_datapack_language/cli_help.py,sha256=z7PTqkrRYOFhfqe7CLdaF68kEAO5R1iP0j45b_36bEw,13196
|
9
|
+
minecraft_datapack_language/cli_new.py,sha256=3K6gHCYwmOTXysicSWJNsjU1YXyz2xa5IGjoOtj1CKc,6489
|
10
10
|
minecraft_datapack_language/cli_utils.py,sha256=nl22j96vpCW0XRMpD_zjwamnMU4e4LXEjACsnwiFGzs,9931
|
11
11
|
minecraft_datapack_language/dir_map.py,sha256=HmxFkuvWGkzHF8o_GFb4BpuMCRc6QMw8UbmcAI8JVdY,1788
|
12
12
|
minecraft_datapack_language/expression_processor.py,sha256=GN6cuRNvgI8TrV6YnEHrA9P0X-ACTT7rCBh4WlOPjSI,20140
|
@@ -17,9 +17,9 @@ minecraft_datapack_language/mdl_linter.py,sha256=z85xoAglENurCh30bR7kEHZ_JeMxcYa
|
|
17
17
|
minecraft_datapack_language/mdl_parser_js.py,sha256=SQzc67pKls3NVnQaT0xIILGqpZYAmcZn78TQ0KIM4TE,40216
|
18
18
|
minecraft_datapack_language/pack.py,sha256=nYiXQ3jgJlDfc4m-65f7C2LFhDRioaUU_XVy6Na4SJI,34625
|
19
19
|
minecraft_datapack_language/utils.py,sha256=LauI6WqNys1F9R6j-TaMVDsTBXzpDxDb5snHYJT8NZo,1074
|
20
|
-
minecraft_datapack_language-15.4.
|
21
|
-
minecraft_datapack_language-15.4.
|
22
|
-
minecraft_datapack_language-15.4.
|
23
|
-
minecraft_datapack_language-15.4.
|
24
|
-
minecraft_datapack_language-15.4.
|
25
|
-
minecraft_datapack_language-15.4.
|
20
|
+
minecraft_datapack_language-15.4.6.dist-info/licenses/LICENSE,sha256=OXLcl0T2SZ8Pmy2_dmlvKuetivmyPd5m1q-Gyd-zaYY,35149
|
21
|
+
minecraft_datapack_language-15.4.6.dist-info/METADATA,sha256=fZugtvdrhsWv_BWLUgKoUxf3ZI22VePFcE-u9Ij01Mc,35229
|
22
|
+
minecraft_datapack_language-15.4.6.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
23
|
+
minecraft_datapack_language-15.4.6.dist-info/entry_points.txt,sha256=c6vjBeCiyQflvPHBRyBk2nJCSfYt3Oc7Sc9V87ySi_U,108
|
24
|
+
minecraft_datapack_language-15.4.6.dist-info/top_level.txt,sha256=ADtFI476tbKLLxEAA-aJQAfg53MA3k_DOb0KTFiggfw,28
|
25
|
+
minecraft_datapack_language-15.4.6.dist-info/RECORD,,
|
{minecraft_datapack_language-15.4.4.dist-info → minecraft_datapack_language-15.4.6.dist-info}/WHEEL
RENAMED
File without changes
|
File without changes
|
File without changes
|
File without changes
|