Closed zardoy closed 4 months ago
thanks for the pr; but as said in comments this should live in node-protodef and be more generic
node-minecraft-protocol relies on node-protodef for the definition and implementation of its serialization functions
I'm really interested in this. I do hope to not forget to do this, The last time I looked at it I realized I need more time to implement it there... for now I will just use generated files: https://github.com/zardoy/prismarine-web-client/blob/d36bec02bfb7222ef8ea1b0503371bf16812a9e2/src/generatedServerPackets.ts its really handy
Add intellisense for packets:
Unfortunately in TS no way to display optionality or jsdoc for overloaded methods, its only possible with js proxied objects.
Alternatively, data can be generated in minecraft-data and reused here as type.
If everything is ok, I'll add the same for events (receive from server data)