RedScript VSCode Extension
Version 1.3.80 | RedScript 3.0
Full language support for RedScript — a compiler targeting Minecraft Java Edition datapacks.
Features
Syntax Highlighting
Language Server (LSP)
- Diagnostics — Real-time error checking
- Hover — Type info and
/// doc comments
- Go to Definition — Jump to function/struct declarations
- Auto-complete — Functions, types, stdlib modules
- Lint warnings — 5 built-in lint rules
Code Snippets
| Trigger |
Result |
fn |
Function declaration |
tickfn |
@tick function |
struct |
Struct declaration |
match |
Match expression |
foreach |
Entity foreach loop |
result |
Result handling |
Install
VS Code Marketplace
Search for "RedScript" in the Extensions panel, or:
ext install bkmashiro.redscript-vscode
Manual (VSIX)
cd editors/vscode
npm install -g @vscode/vsce
vsce package
code --install-extension redscript-vscode-1.3.80.vsix
File Extensions
.mcrs — Recommended (no conflict with Rust)
.rs — Supported, but may conflict with Rust extension
To force .rs as RedScript:
// settings.json
{
"files.associations": {
"*.rs": "redscript"
}
}
Usage
import math;
import player;
@tick(rate=20)
fn gravity_check() {
foreach (p in @a[tag=flying]) {
let y = player::get_y(p);
if y > 100 {
effect::give(p, "slow_falling", 5);
}
}
}
Compile:
redscript build src/ -o dist/mypack/
Links
| |