0.2.34 • Published 2 months ago
@spyglassmc/mcfunction v0.2.34
@spyglassmc/mcfunction
This package contains parsers and processors for mcfunction.
Usage
import * as mcf from '@spyglassmc/mcfunction'
// Register the command tree for a specific version.
mcf.CommandTreeRegistry.instance.register('1.15', vanillaCommandTreeFor1_15, customCommandTreePatchFor1_15)
// Define a function that returns the corresponding parser for the provided argument tree node.
const argument: mcf.parser.ArgumentParserGetter = (treeNode: mcf.ArgumentTreeNode) => {
switch (treeNode.parser) {
case 'brigadier:double':
return parser1
case 'brigadier:int':
return parser2
// ...
default:
// Unsupported parser.
// Just return `undefined`.
return undefined
}
}
// Get the command parser.
const commandParser = mcf.parser.command('1.15', argument)
// Or the mcfunction parser.
const mcfunctionParser = mcf.parser.entry('1.15', argument)
Contributions
Languages
mcfunction
language that is associated with the.mcfunction
file extension.
AST Nodes
Processors
0.2.27
5 months ago
0.2.26
6 months ago
0.2.25
6 months ago
0.2.24
6 months ago
0.2.23
6 months ago
0.2.22
6 months ago
0.2.21
6 months ago
0.2.20
7 months ago
0.2.19
7 months ago
0.2.18
7 months ago
0.2.17
8 months ago
0.2.30
3 months ago
0.2.34
2 months ago
0.2.33
2 months ago
0.2.32
2 months ago
0.2.31
3 months ago
0.2.29
5 months ago
0.2.28
5 months ago
0.2.16
10 months ago
0.2.15
10 months ago
0.2.14
11 months ago
0.2.13
11 months ago
0.2.12
1 year ago
0.2.11
1 year ago
0.2.10
1 year ago
0.2.9
1 year ago
0.2.8
1 year ago
0.2.7
1 year ago
0.2.6
1 year ago
0.2.5
1 year ago
0.2.3
2 years ago
0.2.4
2 years ago
0.2.1
3 years ago
0.2.2
3 years ago
0.1.2
3 years ago
0.2.0
3 years ago
0.1.1
3 years ago
0.1.0
3 years ago