update to version 2.1.0 (protocol 60)

This commit is contained in:
mhsjlw 2016-05-14 21:26:38 -04:00
commit 3006fd44bf
7 changed files with 62 additions and 36 deletions

View file

@ -1,3 +1,7 @@
## 2.1.0
* normalize names of packet fields
* update to version 0.14.2
## 2.0.1
* player list is now an array
* reconnecting has been fixed

View file

@ -8,7 +8,7 @@ Parse and serialize Minecraft PE packets.
## Features
* Supports Minecraft PE `0.14.1`
* Supports Minecraft PE `0.14.2`
* Pure JavaScript
* Easily send and listen for any packet
* RakNet support through [node-raknet](https://github.com/mhsjlw/node-raknet)

View file

@ -27,7 +27,7 @@
]
},
{
"name": "resultCount",
"name": "result_count",
"type": "i32"
},
{
@ -79,7 +79,7 @@
]
},
{
"name": "resultCount",
"name": "result_count",
"type": "i32"
},
{
@ -175,15 +175,15 @@
"4": "lstring",
"5": ["container",[
{
"name":"blockId",
"name":"block_id",
"type":"li16"
},
{
"name":"itemCount",
"name":"item_count",
"type":"li8"
},
{
"name":"itemDamage",
"name":"item_damage",
"type":"li16"
}
]],
@ -267,7 +267,7 @@
"container",
[
{
"name": "blockId",
"name": "block_id",
"type": "i16"
},
{
@ -275,7 +275,7 @@
"type": [
"switch",
{
"compareTo": "blockId",
"compareTo": "block_id",
"fields": {
"0": "void"
},
@ -283,15 +283,15 @@
"container",
[
{
"name": "itemCount",
"name": "item_count",
"type": "i8"
},
{
"name": "itemDamage",
"name": "item_damage",
"type": "i16"
},
{
"name": "nbtData",
"name": "nbt_data",
"type": ["buffer",{"countType":"li16"}]
}
]
@ -320,7 +320,7 @@
"container",
[
{
"name": "skinType",
"name": "skin_type",
"type": "string"
},
{
@ -354,7 +354,7 @@
"bitfield",
[
{
"name": "blockData",
"name": "block_data",
"size": 4,
"signed": false
},
@ -401,11 +401,11 @@
"container",
[
{
"name": "minValue",
"name": "min_value",
"type": "f32"
},
{
"name": "maxValue",
"name": "max_value",
"type": "f32"
},
{
@ -432,15 +432,15 @@
"type": "i64"
},
{
"name": "motX",
"name": "mot_x",
"type": "f32"
},
{
"name": "motY",
"name": "mot_y",
"type": "f32"
},
{
"name": "motZ",
"name": "mot_z",
"type": "f32"
}
]
@ -509,7 +509,7 @@
"type": "f32"
},
{
"name": "headYaw",
"name": "head_yaw",
"type": "f32"
},
{
@ -891,8 +891,20 @@
"type": "f32"
},
{
"name": "unknown",
"name": "unknown1",
"type": "i8"
},
{
"name": "unknown2",
"type": "i8"
},
{
"name": "unknown3",
"type": "i8"
},
{
"name": "unknown4",
"type": "string"
}
]
],
@ -1742,6 +1754,14 @@
{
"name": "flags",
"type": "i32"
},
{
"name": "user_permission",
"type": "i32"
},
{
"name": "global_permission",
"type": "i32"
}
]
],
@ -1818,15 +1838,15 @@
"container",
[
{
"name": "clientUuid",
"name": "client_uuid",
"type": "uuid"
},
{
"name": "entityId",
"name": "entity_id",
"type": "i64"
},
{
"name": "displayName",
"name": "display_name",
"type": "string"
},
{
@ -1839,7 +1859,7 @@
"container",
[
{
"name": "clientUuid",
"name": "client_uuid",
"type": "uuid"
}
]

View file

@ -11,14 +11,14 @@ var client = pmp.createClient({
username:process.argv[4]
});
client.on('mcpe',packet => console.log(packet));
client.on('mcpe', packet => console.log(packet));
client.on('set_spawn_position',() => {
client.writeMCPE('request_chunk_radius',{
client.on('set_spawn_position', () => {
client.writeMCPE('request_chunk_radius', {
chunk_radius:8
})
});
client.on('error',function(err){
console.log(err);
});
});

View file

@ -11,7 +11,7 @@ if(process.argv.length !=4) {
var server = pmp.createServer({
host: process.argv[2],
port: parseInt(process.argv[3]),
name: 'MCPE;Minecraft: PE Server;45 45;0.14.1;0;20'
name: 'MCPE;Minecraft: PE Server;60 60;0.14.2;0;20'
});
server.on('connection', function(client) {
@ -19,7 +19,6 @@ server.on('connection', function(client) {
client.on("mcpe",packet => console.log(packet));
client.on("game_login",packet => {
client.writeMCPE("player_status",{
status:0
@ -48,7 +47,10 @@ server.on('connection', function(client) {
x:0,
y:1+1.62,
z:0,
unknown:0
unknown1:0,
unknown2:0,
unknown3:0,
unknown4:""
});
client.writeMCPE('set_spawn_position', {
@ -102,4 +104,4 @@ server.on('connection', function(client) {
client.on('end',function() {
console.log("client left");
})
});
});

View file

@ -1,6 +1,6 @@
{
"name": "pocket-minecraft-protocol",
"version": "2.0.1",
"version": "2.1.0",
"description": "Parse and serialize Minecraft PE packets",
"main": "index.js",
"scripts": {

View file

@ -33,8 +33,8 @@ function createClient(options) {
client.writeMCPE('game_login',
{
username: client.username,
protocol: 46,
protocol2: 46,
protocol: 60,
protocol2: 60,
client_id: [ -1, -697896776 ],
client_uuid: '86372ed8-d055-b23a-9171-5e3ac594d766',
server_address: client.host+":"+client.port,
@ -58,4 +58,4 @@ function createClient(options) {
return client;
}
module.exports = createClient;
module.exports = createClient;