From 744cbbd49f5ca599ce21a1ac573f4f95fedd5f15 Mon Sep 17 00:00:00 2001 From: md_5 Date: Tue, 2 Jul 2013 13:23:38 +1000 Subject: [PATCH] Fix nibble array patch - we will need to stage Packet51 in the near future --- .../0014-Compressed-Nibble-Arrays.patch | 40 +++++++++---------- 1 file changed, 20 insertions(+), 20 deletions(-) diff --git a/CraftBukkit-Patches/0014-Compressed-Nibble-Arrays.patch b/CraftBukkit-Patches/0014-Compressed-Nibble-Arrays.patch index 62abfca..11a5b4d 100644 --- a/CraftBukkit-Patches/0014-Compressed-Nibble-Arrays.patch +++ b/CraftBukkit-Patches/0014-Compressed-Nibble-Arrays.patch @@ -1,4 +1,4 @@ -From 92a6ffad3c78692c77614e848c7b42c76b273889 Mon Sep 17 00:00:00 2001 +From 004bae243fac61ac72370588bbbe248a767f80c7 Mon Sep 17 00:00:00 2001 From: Mike Primm Date: Sun, 13 Jan 2013 03:49:07 -0800 Subject: [PATCH] Compressed Nibble Arrays @@ -272,14 +272,14 @@ index 53c1cb5..9a9e20f 100644 } diff --git a/src/main/java/net/minecraft/server/Packet51MapChunk.java b/src/main/java/net/minecraft/server/Packet51MapChunk.java new file mode 100644 -index 0000000..3c3bdbf +index 0000000..b7b4fd6 --- /dev/null +++ b/src/main/java/net/minecraft/server/Packet51MapChunk.java @@ -0,0 +1,198 @@ +package net.minecraft.server; + -+import java.io.DataInputStream; -+import java.io.DataOutputStream; ++import java.io.DataInput; ++import java.io.DataOutput; +import java.io.IOException; +import java.util.zip.DataFormatException; +import java.util.zip.Deflater; @@ -323,18 +323,18 @@ index 0000000..3c3bdbf + } + } + -+ public void a(DataInputStream datainputstream) throws IOException { // CraftBukkit - throws IOException -+ this.a = datainputstream.readInt(); -+ this.b = datainputstream.readInt(); -+ this.e = datainputstream.readBoolean(); -+ this.c = datainputstream.readShort(); -+ this.d = datainputstream.readShort(); -+ this.size = datainputstream.readInt(); ++ public void a(DataInput datainput) throws IOException { // CraftBukkit - throws IOException ++ this.a = datainput.readInt(); ++ this.b = datainput.readInt(); ++ this.e = datainput.readBoolean(); ++ this.c = datainput.readShort(); ++ this.d = datainput.readShort(); ++ this.size = datainput.readInt(); + if (buildBuffer.length < this.size) { + buildBuffer = new byte[this.size]; + } + -+ datainputstream.readFully(buildBuffer, 0, this.size); ++ datainput.readFully(buildBuffer, 0, this.size); + int i = 0; + + int j; @@ -362,14 +362,14 @@ index 0000000..3c3bdbf + } + } + -+ public void a(DataOutputStream dataoutputstream) throws IOException { // CraftBukkit - throws IOException -+ dataoutputstream.writeInt(this.a); -+ dataoutputstream.writeInt(this.b); -+ dataoutputstream.writeBoolean(this.e); -+ dataoutputstream.writeShort((short) (this.c & '\uffff')); -+ dataoutputstream.writeShort((short) (this.d & '\uffff')); -+ dataoutputstream.writeInt(this.size); -+ dataoutputstream.write(this.buffer, 0, this.size); ++ public void a(DataOutput dataoutput) throws IOException { // CraftBukkit - throws IOException ++ dataoutput.writeInt(this.a); ++ dataoutput.writeInt(this.b); ++ dataoutput.writeBoolean(this.e); ++ dataoutput.writeShort((short) (this.c & '\uffff')); ++ dataoutput.writeShort((short) (this.d & '\uffff')); ++ dataoutput.writeInt(this.size); ++ dataoutput.write(this.buffer, 0, this.size); + } + + public void handle(Connection connection) {