Fix map chunk decompressing itself

This commit is contained in:
md_5 2012-10-14 15:57:21 +11:00
parent 8153b9e848
commit 7415afdbfd
2 changed files with 35 additions and 2 deletions

View File

@ -42,9 +42,9 @@ public abstract class Packet {
} }
} }
public abstract void a(DataInputStream datainputstream); public abstract void a(DataInputStream datainputstream) throws IOException;
public abstract void a(DataOutputStream dataoutputstream); public abstract void a(DataOutputStream dataoutputstream) throws IOException;
public abstract void handle(NetHandler nethandler); public abstract void handle(NetHandler nethandler);

View File

@ -0,0 +1,33 @@
package net.minecraft.server;
import java.io.DataInputStream;
import java.io.DataOutputStream;
import java.io.IOException;
public class Packet51MapChunk extends Packet {
@Override
public void a(DataInputStream datainputstream) throws IOException {
datainputstream.readInt();
datainputstream.readInt();
datainputstream.readBoolean();
datainputstream.readShort();
datainputstream.readShort();
int size = datainputstream.readInt();
byte[] buf = new byte[size];
datainputstream.readFully(buf, 0, size);
}
@Override
public void a(DataOutputStream dataoutputstream) throws IOException {
}
@Override
public void handle(NetHandler nethandler) {
}
@Override
public int a() {
return 0;
}
}