PrismarineJS / flying-squid

Create Minecraft servers with a powerful, stable, and high level JavaScript API.
https://prismarinejs.github.io/flying-squid/
MIT License
547 stars 100 forks source link

Support command data graph (tab completion for 1.13+) #636

Open zardoy opened 1 year ago

zardoy commented 1 year ago

https://wiki.vg/Command_Data

on login server seems to send declare_commands (0x10) packet that looks like this:

packet data example ``` { nodes: [ { "flags": { "unused": 0, "has_custom_suggestions": 0, "has_redirect_node": 0, "has_command": 0, "command_node_type": 0 }, "children": [ 1, 2, 3, 4, 5, 6, 7, 8, 9 ] }, { "flags": { "unused": 0, "has_custom_suggestions": 0, "has_redirect_node": 0, "has_command": 1, "command_node_type": 1 }, "children": [ 11 ], "extraNodeData": { "name": "help" } } ], rootIndex: 0 } ```

don't think it would hard to implement, just posting it here for the record.