node-minecraft-protocol/lib
Florian Wesch 170566d700 New way to handle conditional fields in packets
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.
2013-08-26 13:00:28 +02:00
..
client.js print sent and received packet contents in debug mode 2013-04-15 06:40:09 +02:00
ping.js packet 0xfe (ping): some fields renamed, put the correct protocol version in mc.ping() 2013-07-11 08:15:53 +02:00
protocol.js New way to handle conditional fields in packets 2013-08-26 13:00:28 +02:00
server.js fix incorrect playerCount in ping. closes #41 2013-02-10 17:51:47 -05:00