using minecraftVersion everywhere

This commit is contained in:
Romain Beaumont 2016-02-19 01:02:57 +01:00
parent a129d13cf1
commit 14ec6077cd
3 changed files with 4 additions and 4 deletions

View file

@ -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);

View file

@ -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;

View file

@ -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++) {