(node, depth = 0)
| 307 | const node = nodes[commandNode] |
| 308 | const commandName = node.extraNodeData.name |
| 309 | function visit (node, depth = 0) { |
| 310 | const name = node.extraNodeData.name |
| 311 | if (node.extraNodeData.parser === 'minecraft:message') { |
| 312 | sliceIndexForMessage[commandName] = [name, depth] |
| 313 | } |
| 314 | for (const child of node.children) { |
| 315 | visit(nodes[child], depth + 1) |
| 316 | } |
| 317 | } |
| 318 | visit(node, 0) |
| 319 | } |
| 320 | }) |