mirror of
https://github.com/PrismarineJS/node-minecraft-protocol.git
synced 2025-02-27 22:53:51 -05:00
Some packets have conditional fields. The previous way to handle those was to provide a single condition for each packet type which determined if additional fields are appended to the packet. Unfortunately this is not enough for some packets: They have complex conditions that cannot be expressed this way. This diff changes the way conditional fields are handled: For each field in each packet there is a new optional 'condition' function which will be called with the packet data. Only if the 'condition' function returns true, the field is de/encoded. This diff also adds new (previously missing) conditions. |
||
---|---|---|
.. | ||
client.js | ||
ping.js | ||
protocol.js | ||
server.js |