mirror of
https://github.com/PrismarineJS/node-minecraft-protocol.git
synced 2025-08-01 08:39:06 -04:00
use protodef:
* move general datatypes to protodef along with their tests * move states to states.js file * use one protodef serializer by state and direction instead of one big serializer for everything (same thing for the deserializer) * define a packet as a protodef type using a switch and a container, and adding each minecraft packet as a type (packet_ + name) * use mapper type from protodef to convert id to name in packet definition * use general string type : pstring * divide by 10 the number of iteration in the benchmark to get back to a reasonable test execution time
This commit is contained in:
parent
75303f412f
commit
f45c6dff49
26 changed files with 169 additions and 1363 deletions
examples/server_helloworld
|
@ -14,6 +14,10 @@ server.on('login', function(client) {
|
|||
console.log('Connection closed', '(' + addr + ')');
|
||||
});
|
||||
|
||||
client.on('error', function(error) {
|
||||
console.log('Error:', error);
|
||||
});
|
||||
|
||||
// send init data so client will start rendering world
|
||||
client.write('login', {
|
||||
entityId: client.id,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue