mirror of
https://github.com/PrismarineJS/node-minecraft-protocol.git
synced 2024-11-29 18:55:40 -05:00
Implement world_border packet
This commit is contained in:
parent
7efeba68de
commit
255957c6ef
1 changed files with 28 additions and 1 deletions
|
@ -538,7 +538,34 @@ var packets = {
|
||||||
{ name: "cameraId", type: "varint" }
|
{ name: "cameraId", type: "varint" }
|
||||||
]},
|
]},
|
||||||
world_border: { id: 0x44, fields: [
|
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: [
|
title: { id: 0x45, fields: [
|
||||||
/* TODO: Going to be a pain too */
|
/* TODO: Going to be a pain too */
|
||||||
|
|
Loading…
Reference in a new issue