Implement world_border packet

This commit is contained in:
Will Franzen 2014-12-30 12:40:22 -06:00
parent 7efeba68de
commit 255957c6ef

View file

@ -538,7 +538,34 @@ var packets = {
{ name: "cameraId", type: "varint" }
]},
world_border: { id: 0x44, fields: [
/* TODO: Going to be a pain... */
{ name: "action", type: "varint"},
{ name: "radius", type: "double", condition: function(field_values) {
return field_values['action'] == 0;
} },
{ name: "x", type: "double", condition: function(field_values) {
return field_values['action'] == 2 || field_values['action'] == 3;
} },
{ name: "z", type: "double", condition: function(field_values) {
return field_values['action'] == 2 || field_values['action'] == 3;
} },
{ name: "old_radius", type: "double", condition: function(field_values) {
return field_values['action'] == 1 || field_values['action'] == 3;
} },
{ name: "new_radius", type: "double", condition: function(field_values) {
return field_values['action'] == 1 || field_values['action'] == 3;
} },
{ name: "speed", type: "varlong", condition: function(field_values) {
return field_values['action'] == 1 || field_values['action'] == 3;
} },
{ name: "portalBoundary", type: "varint", condition: function(field_values) {
return field_values['action'] == 3;
} },
{ name: "warning_time", type: "varint", condition: function(field_values) {
return field_values['action'] == 4 || field_values['action'] == 3;
} },
{ name: "warning_blocks", type: "varint", condition: function(field_values) {
return field_values['action'] == 5 || field_values['action'] == 3;
} }
]},
title: { id: 0x45, fields: [
/* TODO: Going to be a pain too */