mirror of
https://github.com/PrismarineJS/node-minecraft-protocol.git
synced 2025-02-27 14:44:01 -05:00
Implement title packet
This commit is contained in:
parent
255957c6ef
commit
b12beb3265
1 changed files with 13 additions and 1 deletions
|
@ -568,7 +568,19 @@ var packets = {
|
|||
} }
|
||||
]},
|
||||
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: [
|
||||
{ name: "threshold", type: "varint"}
|
||||
|
|
Loading…
Reference in a new issue