minecraft-datapack-language 17.0.10__py3-none-any.whl → 17.0.12__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.
Files changed (43) hide show
  1. minecraft_datapack_language/_embedded/docs/404.html +42 -0
  2. minecraft_datapack_language/_embedded/docs/Gemfile +26 -0
  3. minecraft_datapack_language/_embedded/docs/README.md +84 -0
  4. minecraft_datapack_language/_embedded/docs/_config.yml +74 -0
  5. minecraft_datapack_language/_embedded/docs/_data/version.yml +3 -0
  6. minecraft_datapack_language/_embedded/docs/_docs/cli-reference.md +506 -0
  7. minecraft_datapack_language/_embedded/docs/_docs/contributing.md +352 -0
  8. minecraft_datapack_language/_embedded/docs/_docs/docs-hub.md +266 -0
  9. minecraft_datapack_language/_embedded/docs/_docs/documentation.md +135 -0
  10. minecraft_datapack_language/_embedded/docs/_docs/examples.md +194 -0
  11. minecraft_datapack_language/_embedded/docs/_docs/getting-started.md +230 -0
  12. minecraft_datapack_language/_embedded/docs/_docs/language-reference.md +1637 -0
  13. minecraft_datapack_language/_embedded/docs/_docs/multi-file-projects.md +221 -0
  14. minecraft_datapack_language/_embedded/docs/_docs/python-bindings.md +446 -0
  15. minecraft_datapack_language/_embedded/docs/_docs/vscode-extension.md +381 -0
  16. minecraft_datapack_language/_embedded/docs/_includes/head-custom.html +983 -0
  17. minecraft_datapack_language/_embedded/docs/_includes/navigation.html +362 -0
  18. minecraft_datapack_language/_embedded/docs/_layouts/default.html +27 -0
  19. minecraft_datapack_language/_embedded/docs/_layouts/page.html +281 -0
  20. minecraft_datapack_language/_embedded/docs/_plugins/test_version.rb +13 -0
  21. minecraft_datapack_language/_embedded/docs/_plugins/version_reader.rb +37 -0
  22. minecraft_datapack_language/_embedded/docs/assets/css/style.css +211 -0
  23. minecraft_datapack_language/_embedded/docs/docs.md +134 -0
  24. minecraft_datapack_language/_embedded/docs/downloads.md +444 -0
  25. minecraft_datapack_language/_embedded/docs/icons/favicon-16.png +0 -0
  26. minecraft_datapack_language/_embedded/docs/icons/favicon-32.png +0 -0
  27. minecraft_datapack_language/_embedded/docs/icons/favicon-48.png +0 -0
  28. minecraft_datapack_language/_embedded/docs/icons/favicon-64.png +0 -0
  29. minecraft_datapack_language/_embedded/docs/icons/icon-1024.png +0 -0
  30. minecraft_datapack_language/_embedded/docs/icons/icon-128.png +0 -0
  31. minecraft_datapack_language/_embedded/docs/icons/icon-256.png +0 -0
  32. minecraft_datapack_language/_embedded/docs/icons/icon-512.png +0 -0
  33. minecraft_datapack_language/_embedded/docs/icons/icon-64.png +0 -0
  34. minecraft_datapack_language/_embedded/docs/index.md +378 -0
  35. minecraft_datapack_language/_version.py +2 -2
  36. minecraft_datapack_language/cli.py +5 -1
  37. {minecraft_datapack_language-17.0.10.dist-info → minecraft_datapack_language-17.0.12.dist-info}/METADATA +1 -1
  38. minecraft_datapack_language-17.0.12.dist-info/RECORD +56 -0
  39. minecraft_datapack_language-17.0.10.dist-info/RECORD +0 -22
  40. {minecraft_datapack_language-17.0.10.dist-info → minecraft_datapack_language-17.0.12.dist-info}/WHEEL +0 -0
  41. {minecraft_datapack_language-17.0.10.dist-info → minecraft_datapack_language-17.0.12.dist-info}/entry_points.txt +0 -0
  42. {minecraft_datapack_language-17.0.10.dist-info → minecraft_datapack_language-17.0.12.dist-info}/licenses/LICENSE +0 -0
  43. {minecraft_datapack_language-17.0.10.dist-info → minecraft_datapack_language-17.0.12.dist-info}/top_level.txt +0 -0
@@ -0,0 +1,381 @@
1
+ ---
2
+ layout: page
3
+ title: VS Code Extension
4
+ permalink: /docs/vscode-extension/
5
+ ---
6
+
7
+ The MDL VS Code extension provides syntax highlighting, error checking, and build commands for `.mdl` files in VS Code, Cursor, and other VS Code-based editors.
8
+
9
+ ## Features
10
+
11
+ - **Syntax Highlighting**: Color-coded MDL syntax including raw text blocks
12
+ - **Error Checking**: Real-time error checking and validation
13
+ - **Build Commands**: Quick datapack compilation
14
+ - **Workspace Validation**: Check entire projects at once
15
+ - **Raw Text Support**: Special highlighting and snippets for `$!raw` blocks
16
+
17
+ ## Installation
18
+
19
+ ### Option 1: Download from GitHub Releases (Easiest)
20
+
21
+ The VS Code extension is automatically built and available for download with each release:
22
+
23
+ 1. **Go to [GitHub Releases](https://github.com/aaron777collins/MinecraftDatapackLanguage/releases)**
24
+ 2. **Download the latest `.vsix` file** from the release assets
25
+ 3. **Install in your editor**:
26
+ - Open VS Code/Cursor
27
+ - Go to Extensions (Ctrl+Shift+X)
28
+ - Click the "..." menu in the Extensions panel
29
+ - Select "Install from VSIX..."
30
+ - Choose the downloaded `.vsix` file
31
+ - Click "Install"
32
+
33
+ ### Option 2: Build from Source
34
+
35
+ If you want to build the extension yourself:
36
+
37
+ #### For VS Code/Cursor:
38
+
39
+ 1. **Download the extension**:
40
+ ```bash
41
+ # Clone the repository
42
+ git clone https://github.com/aaron777collins/MinecraftDatapackLanguage.git
43
+ cd MinecraftDatapackLanguage/vscode-extension
44
+
45
+ # Build the extension
46
+ npm install
47
+ npm run compile
48
+ npm install -g @vscode/vsce
49
+ vsce package
50
+ ```
51
+
52
+ 2. **Install in your editor**:
53
+ - Open VS Code/Cursor
54
+ - Go to Extensions (Ctrl+Shift+X)
55
+ - Click the "..." menu in the Extensions panel
56
+ - Select "Install from VSIX..."
57
+ - Navigate to `minecraft-datapack-language-0.1.0.vsix`
58
+ - Click "Install"
59
+
60
+ #### Alternative: Command Line Installation
61
+
62
+ ```bash
63
+ # Install directly from command line
64
+ code --install-extension minecraft-datapack-language-0.1.0.vsix
65
+ ```
66
+
67
+ ### Option 3: Development Installation
68
+
69
+ For development and testing:
70
+
71
+ 1. **Clone and setup**:
72
+ ```bash
73
+ git clone https://github.com/aaron777collins/MinecraftDatapackLanguage.git
74
+ cd MinecraftDatapackLanguage/vscode-extension
75
+ npm install
76
+ npm run compile
77
+ ```
78
+
79
+ 2. **Launch Extension Development Host**:
80
+ - Press `F5` in VS Code to launch the extension in a new window
81
+ - Or use `npm run watch` for continuous compilation
82
+
83
+ ## Quick Start
84
+
85
+ Once installed, the extension will automatically activate when you open `.mdl` files:
86
+
87
+ 1. **Open any `.mdl` file** - syntax highlighting will activate immediately
88
+ 2. **Try the commands** - Press `Ctrl+Shift+P` and type "MDL" to see available commands
89
+ 3. **Build a datapack** - Use "MDL: Build current file" to compile your MDL files
90
+
91
+ ## Usage
92
+
93
+ ### Opening MDL Files
94
+
95
+ 1. Open any `.mdl` file in VS Code/Cursor
96
+ 2. The extension will automatically activate and provide syntax highlighting
97
+ 3. You'll see color-coded syntax for:
98
+ - Pack declarations
99
+ - Namespaces
100
+ - Functions
101
+ - Comments
102
+ - Commands
103
+
104
+ ### Syntax Highlighting
105
+
106
+ The extension highlights the following MDL elements:
107
+
108
+ - **Pack declarations**: `pack "Name" description "Desc" pack_format 48`
109
+ - **Namespaces**: `namespace "example"`
110
+ - **Functions**: `function namespace:name`
111
+ - **Lifecycle hooks**: `on_load`, `on_tick`
112
+ - **Tags**: `tag function "minecraft:tick":`
113
+ - **Comments**: `# This is a comment`
114
+ - **Commands**: All lines within function blocks
115
+ - **Raw text blocks**: `$!raw` and `raw!$` with special highlighting
116
+
117
+ ### Raw Text Support
118
+
119
+ The extension provides special support for raw text blocks:
120
+
121
+ #### Syntax Highlighting
122
+
123
+ Raw text blocks are highlighted with distinct colors:
124
+ - `$!raw` and `raw!$` keywords are highlighted as special tokens
125
+ - Content inside raw text blocks is highlighted differently from regular MDL code
126
+ - This makes it easy to distinguish raw text from parsed MDL syntax
127
+
128
+ #### Snippets
129
+
130
+ Quick snippets for raw text blocks:
131
+
132
+ 1. **Type `raw` and press Tab** - Inserts a complete raw text block:
133
+ ```mdl
134
+ $!raw
135
+ Insert raw text here - this will be inserted directly into the function without parsing
136
+ raw!$
137
+ ```
138
+
139
+ 2. **Type `rawfunction` and press Tab** - Inserts an example showing how to use "function" in commands:
140
+ ```mdl
141
+ $!raw
142
+ say "This contains the word function without breaking the parser";
143
+ say "You can put any text here, including function, if, while, etc.";
144
+ raw!$
145
+ ```
146
+
147
+ #### IntelliSense
148
+
149
+ The extension provides completion for raw text syntax:
150
+ - `$!raw` completion with snippet that inserts the full block
151
+ - `raw!$` completion for ending blocks
152
+ - Helpful documentation explaining what raw text does
153
+
154
+ #### Error Checking
155
+
156
+ Raw text blocks are validated for:
157
+ - Proper opening and closing delimiters
158
+ - Basic syntax checking
159
+ - Integration with the MDL error checker
160
+
161
+ ### Error Checking
162
+
163
+ The extension provides real-time validation:
164
+
165
+ 1. **Syntax errors**: Invalid MDL syntax is highlighted
166
+ 2. **Indentation errors**: Incorrect indentation is flagged
167
+ 3. **Missing declarations**: Missing pack declarations are detected
168
+ 4. **Duplicate names**: Duplicate function names are identified
169
+
170
+ **Error indicators:**
171
+ - Red squiggly lines under syntax errors
172
+ - Yellow warnings for potential issues
173
+ - Hover over errors for detailed explanations
174
+
175
+ ### Build Commands
176
+
177
+ The extension adds several commands to VS Code:
178
+
179
+ #### MDL: Build current file
180
+
181
+ Builds the currently open MDL file:
182
+
183
+ 1. Open an `.mdl` file
184
+ 2. Press `Ctrl+Shift+P` (or `Cmd+Shift+P` on macOS)
185
+ 3. Type "MDL: Build current file"
186
+ 4. Select the command
187
+ 5. Choose an output directory
188
+ 6. Optionally specify a wrapper name
189
+
190
+ #### MDL: Check Workspace
191
+
192
+ Validates all MDL files in the current workspace:
193
+
194
+ 1. Press `Ctrl+Shift+P` (or `Cmd+Shift+P` on macOS)
195
+ 2. Type "MDL: Check Workspace"
196
+ 3. Select the command
197
+ 4. View results in the Problems panel
198
+
199
+ ### Keyboard Shortcuts
200
+
201
+ You can add custom keyboard shortcuts for the MDL commands:
202
+
203
+ 1. Open VS Code settings (`Ctrl+,`)
204
+ 2. Go to "Keyboard Shortcuts"
205
+ 3. Search for "MDL"
206
+ 4. Add shortcuts for:
207
+ - `mdl.build` - Build current file
208
+ - `mdl.checkWorkspace` - Check workspace
209
+
210
+ **Example shortcuts:**
211
+ ```json
212
+ {
213
+ "key": "ctrl+shift+b",
214
+ "command": "mdl.build",
215
+ "when": "resourceExtname == .mdl"
216
+ },
217
+ {
218
+ "key": "ctrl+shift+c",
219
+ "command": "mdl.checkWorkspace"
220
+ }
221
+ ```
222
+
223
+ ## Configuration
224
+
225
+ ### Extension Settings
226
+
227
+ The extension can be configured through VS Code settings:
228
+
229
+ 1. Open VS Code settings (`Ctrl+,`)
230
+ 2. Search for "MDL"
231
+ 3. Configure the following options:
232
+
233
+ **`mdl.enableLinting`** (default: `true`)
234
+ - Enable or disable real-time error checking
235
+
236
+ **`mdl.lintingMode`** (default: `"onSave"`)
237
+ - When to run error checking: `"onSave"`, `"onType"`, or `"manual"`
238
+
239
+ **`mdl.buildOutputDirectory`** (default: `"dist"`)
240
+ - Default output directory for builds
241
+
242
+ ### Workspace Settings
243
+
244
+ You can configure MDL settings per workspace by creating a `.vscode/settings.json` file:
245
+
246
+ ```json
247
+ {
248
+ "mdl.enableLinting": true,
249
+ "mdl.lintingMode": "onSave",
250
+ "mdl.buildOutputDirectory": "build",
251
+ "files.associations": {
252
+ "*.mdl": "mdl"
253
+ }
254
+ }
255
+ ```
256
+
257
+ ## Troubleshooting
258
+
259
+ ### Extension Not Working
260
+
261
+ 1. **Check if MDL is installed**: The extension requires MDL to be installed on your system
262
+ 2. **Verify file association**: Make sure `.mdl` files are associated with the MDL language
263
+ 3. **Check output panel**: Look for error messages in the Output panel (View → Output → MDL)
264
+
265
+ ### Build Commands Not Available
266
+
267
+ 1. **Ensure MDL is in PATH**: The extension needs to find the `mdl` command
268
+ 2. **Restart VS Code**: Sometimes a restart is needed after installation
269
+ 3. **Check command palette**: Commands should appear when typing "MDL"
270
+
271
+ ### Error Checking Issues
272
+
273
+ 1. **Check MDL installation**: Run `mdl --version` in terminal to verify installation
274
+ 2. **Verify file syntax**: Use `mdl check filename.mdl` to test manually
275
+ 3. **Check extension logs**: Look for errors in the Developer Tools (Help → Toggle Developer Tools)
276
+
277
+ ## Development
278
+
279
+ ### Project Structure
280
+
281
+ ```
282
+ vscode-extension/
283
+ ├── src/
284
+ │ └── extension.ts # Main extension code
285
+ ├── syntaxes/
286
+ │ └── mdl.tmLanguage.json # Syntax highlighting rules
287
+ ├── language-configuration.json # Language configuration
288
+ ├── package.json # Extension manifest
289
+ └── tsconfig.json # TypeScript configuration
290
+ ```
291
+
292
+ ### Key Files
293
+
294
+ **`src/extension.ts`**: Main extension logic
295
+ - Command registration
296
+ - Error checking integration
297
+ - Build command handling
298
+
299
+ **`syntaxes/mdl.tmLanguage.json`**: Syntax highlighting rules
300
+ - Token definitions
301
+ - Pattern matching
302
+ - Color themes
303
+
304
+ **`language-configuration.json`**: Language behavior
305
+ - Comment patterns
306
+ - Bracket matching
307
+ - Auto-indentation
308
+
309
+ ### Adding Features
310
+
311
+ To add new features to the extension:
312
+
313
+ 1. **Modify `extension.ts`**: Add new commands or functionality
314
+ 2. **Update `package.json`**: Register new commands
315
+ 3. **Test locally**: Use `F5` to test changes
316
+ 4. **Build**: Run `npm run compile` to build
317
+
318
+ ### Testing
319
+
320
+ 1. **Unit tests**: Add tests in a `test/` directory
321
+ 2. **Integration tests**: Test with real MDL files
322
+ 3. **Manual testing**: Test all features in the Extension Development Host
323
+
324
+ ## Contributing
325
+
326
+ ### Development Setup
327
+
328
+ 1. Fork the repository
329
+ 2. Clone your fork
330
+ 3. Navigate to `vscode-extension/`
331
+ 4. Run `npm install`
332
+ 5. Make your changes
333
+ 6. Test with `F5`
334
+ 7. Submit a pull request
335
+
336
+ ### Code Style
337
+
338
+ - Use TypeScript for all new code
339
+ - Follow VS Code extension conventions
340
+ - Add comments for complex logic
341
+ - Include error handling
342
+
343
+ ### Testing Checklist
344
+
345
+ Before submitting changes, test:
346
+
347
+ - [ ] Syntax highlighting works correctly
348
+ - [ ] Error checking catches errors
349
+ - [ ] Build commands work
350
+ - [ ] Workspace validation functions
351
+ - [ ] Error messages are clear
352
+ - [ ] Performance is acceptable
353
+
354
+ ## Future Features
355
+
356
+ Planned enhancements for the VS Code extension:
357
+
358
+ - **IntelliSense**: Auto-completion for MDL syntax
359
+ - **Snippets**: Code templates for common patterns
360
+ - **Debugging**: Step-through debugging for MDL files
361
+ - **Multi-file support**: Better handling of multi-file projects
362
+ - **Custom themes**: Additional color themes for MDL
363
+ - **Formatting**: Auto-formatting of MDL files
364
+ - **Refactoring**: Rename functions across files
365
+ - **Search**: Search and replace across MDL files
366
+
367
+ ## Support
368
+
369
+ If you encounter issues with the VS Code extension:
370
+
371
+ 1. **Check the documentation**: This page and the main README
372
+ 2. **Search issues**: Look for similar problems on GitHub
373
+ 3. **Create an issue**: Provide detailed information about the problem
374
+ 4. **Include logs**: Share relevant error messages and logs
375
+
376
+ ## Related Documentation
377
+
378
+ - **[Getting Started]({{ site.baseurl }}/docs/getting-started/)** - Installation and first steps
379
+ - **[Language Reference]({{ site.baseurl }}/docs/language-reference/)** - Complete MDL syntax
380
+ - **[CLI Reference]({{ site.baseurl }}/docs/cli-reference/)** - Command-line tools
381
+ - **[Examples]({{ site.baseurl }}/docs/examples/)** - Working examples