mirror of
https://github.com/unmojang/node-minecraft-protocol.git
synced 2025-09-29 14:13:45 -04:00
Implement title packet
This commit is contained in:
parent
255957c6ef
commit
b12beb3265
@ -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"}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user