mirror of
https://github.com/PrismarineJS/node-minecraft-protocol.git
synced 2024-11-14 19:04:59 -05:00
using minecraftVersion everywhere
This commit is contained in:
parent
a129d13cf1
commit
14ec6077cd
3 changed files with 4 additions and 4 deletions
|
@ -25,7 +25,7 @@ function createClient(options) {
|
|||
options.majorVersion = version.majorVersion;
|
||||
options.protocolVersion = version.version;
|
||||
|
||||
const client = new Client(false, options.majorVersion);
|
||||
const client = new Client(false, version.minecraftVersion);
|
||||
|
||||
tcp_dns(client, options);
|
||||
caseCorrect(client, options);
|
||||
|
|
|
@ -32,7 +32,7 @@ function createServer(options) {
|
|||
|
||||
const serverKey = ursa.generatePrivateKey(1024);
|
||||
|
||||
const server = new Server(version.majorVersion);
|
||||
const server = new Server(version.minecraftVersion);
|
||||
server.motd = options.motd || "A Minecraft server";
|
||||
server.maxPlayers = options['max-players'] || 20;
|
||||
server.playerCount = 0;
|
||||
|
|
|
@ -18,7 +18,7 @@ mc.supportedVersions.forEach(function(supportedVersion){
|
|||
this.timeout(60 * 1000);
|
||||
var inputData = [];
|
||||
it("bench serializing",function(done){
|
||||
var serializer=new mc.createSerializer({state:states.PLAY,isServer:false,version:version.majorVersion});
|
||||
var serializer=new mc.createSerializer({state:states.PLAY,isServer:false,version:version.minecraftVersion});
|
||||
var start, i, j;
|
||||
console.log('Beginning write test');
|
||||
start = Date.now();
|
||||
|
@ -33,7 +33,7 @@ mc.supportedVersions.forEach(function(supportedVersion){
|
|||
});
|
||||
|
||||
it("bench parsing",function(done){
|
||||
var deserializer=new mc.createDeserializer({state:states.PLAY,isServer:true,version:version.majorVersion});
|
||||
var deserializer=new mc.createDeserializer({state:states.PLAY,isServer:true,version:version.minecraftVersion});
|
||||
console.log('Beginning read test');
|
||||
start = Date.now();
|
||||
for (var j = 0; j < inputData.length; j++) {
|
||||
|
|
Loading…
Reference in a new issue