Implement title packet

This commit is contained in:
Will Franzen 2014-12-30 12:55:38 -06:00
parent 255957c6ef
commit b12beb3265

View File

@ -568,7 +568,19 @@ var packets = {
} } } }
]}, ]},
title: { id: 0x45, fields: [ title: { id: 0x45, fields: [
/* TODO: Going to be a pain too */ { name: "action", type: "varint"},
{ name: "text", type: "string", condition: function(field_values) {
return field_values['action'] == 0 || field_values['action'] == 1;
} },
{ name: "fadeIn", type: "int", condition: function(field_values) {
return field_values['action'] == 0 || field_values['action'] == 1;
} },
{ name: "stay", type: "int", condition: function(field_values) {
return field_values['action'] == 2;
} },
{ name: "fadeOut", type: "int", condition: function(field_values) {
return field_values['action'] == 2;
} }
]}, ]},
set_compression: { id: 0x46, fields: [ set_compression: { id: 0x46, fields: [
{ name: "threshold", type: "varint"} { name: "threshold", type: "varint"}