Get it working

This commit is contained in:
mhsjlw 2015-08-23 10:28:56 -04:00
parent 9609f1261b
commit c73bb0feb0
3 changed files with 5 additions and 5 deletions

2
app.js
View file

@ -1,5 +1,5 @@
var mc = require('minecraft-protocol'); var mc = require('minecraft-protocol');
var states = mc.protocol.states; var states = mc.states;
var World = require('./world'); var World = require('./world');
var options = { var options = {

View file

@ -12,7 +12,7 @@
"type": "MIT" "type": "MIT"
}, },
"dependencies": { "dependencies": {
"minecraft-protocol": "git://github.com/roblabla/node-minecraft-protocol.git", "minecraft-protocol": "^0.14.0",
"buffers": "0.1.1" "buffers": "0.1.1"
}, },
"repository": { "repository": {

View file

@ -141,7 +141,7 @@ ChunkColumn.prototype.unpack_section = function(buff, section, mask) {
} }
ChunkColumn.prototype.pack = function() { ChunkColumn.prototype.pack = function() {
var bufs = new Buffers[]; var bufs = new [];
var mask1 = 0; var mask1 = 0;
for (var i = 0; i < 16; i++) { for (var i = 0; i < 16; i++) {
if (this.chunks[i] !== null) { if (this.chunks[i] !== null) {
@ -163,7 +163,7 @@ ChunkColumn.prototype.pack = function() {
} }
ChunkColumn.prototype.pack_section = function(section) { ChunkColumn.prototype.pack_section = function(section) {
var bufs = new Buffers[]; var bufs = new [];
for (var i = 0; i < 16; i++) { for (var i = 0; i < 16; i++) {
if (this.chunks[i] !== null) if (this.chunks[i] !== null)
bufs.push(this.chunks[i][section].pack()); bufs.push(this.chunks[i][section].pack());
@ -192,7 +192,7 @@ World.prototype.unpack = function(packetData) {
} }
World.prototype.packMapChunkBulk = function() { World.prototype.packMapChunkBulk = function() {
var bufs = new Buffers[]; var bufs = new [];
var metadatas = []; var metadatas = [];
var cb = arguments[arguments.length - 1]; var cb = arguments[arguments.length - 1];