Update to mc-dev rename revision 01

This commit is contained in:
Nathan Adams
2012-01-12 15:27:39 +00:00
parent 7f079a0cd6
commit 897551e39e
59 changed files with 246 additions and 250 deletions

View File

@@ -15,8 +15,8 @@ public class Packet51MapChunk extends Packet {
public int d;
public int e;
public int f;
public byte[] g;
public int h; // CraftBukkit - private -> public
public byte[] buffer;
public int size; // CraftBukkit - private -> public
public byte[] rawData; // CraftBukkit
public Packet51MapChunk() {
@@ -59,17 +59,17 @@ public class Packet51MapChunk extends Packet {
this.d = datainputstream.read() + 1;
this.e = datainputstream.read() + 1;
this.f = datainputstream.read() + 1;
this.h = datainputstream.readInt();
byte[] abyte = new byte[this.h];
this.size = datainputstream.readInt();
byte[] abyte = new byte[this.size];
datainputstream.readFully(abyte);
this.g = new byte[this.d * this.e * this.f * 5 / 2];
this.buffer = new byte[this.d * this.e * this.f * 5 / 2];
Inflater inflater = new Inflater();
inflater.setInput(abyte);
try {
inflater.inflate(this.g);
inflater.inflate(this.buffer);
} catch (DataFormatException dataformatexception) {
throw new IOException("Bad compressed data format");
} finally {
@@ -84,8 +84,8 @@ public class Packet51MapChunk extends Packet {
dataoutputstream.write(this.d - 1);
dataoutputstream.write(this.e - 1);
dataoutputstream.write(this.f - 1);
dataoutputstream.writeInt(this.h);
dataoutputstream.write(this.g, 0, this.h);
dataoutputstream.writeInt(this.size);
dataoutputstream.write(this.buffer, 0, this.size);
}
public void a(NetHandler nethandler) {
@@ -93,6 +93,6 @@ public class Packet51MapChunk extends Packet {
}
public int a() {
return 17 + this.h;
return 17 + this.size;
}
}