Fix nibble array patch - we will need to stage Packet51 in the near future
Dieser Commit ist enthalten in:
Ursprung
11056f21c8
Commit
744cbbd49f
@ -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 <mike@primmhome.com>
|
From: Mike Primm <mike@primmhome.com>
|
||||||
Date: Sun, 13 Jan 2013 03:49:07 -0800
|
Date: Sun, 13 Jan 2013 03:49:07 -0800
|
||||||
Subject: [PATCH] Compressed Nibble Arrays
|
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
|
diff --git a/src/main/java/net/minecraft/server/Packet51MapChunk.java b/src/main/java/net/minecraft/server/Packet51MapChunk.java
|
||||||
new file mode 100644
|
new file mode 100644
|
||||||
index 0000000..3c3bdbf
|
index 0000000..b7b4fd6
|
||||||
--- /dev/null
|
--- /dev/null
|
||||||
+++ b/src/main/java/net/minecraft/server/Packet51MapChunk.java
|
+++ b/src/main/java/net/minecraft/server/Packet51MapChunk.java
|
||||||
@@ -0,0 +1,198 @@
|
@@ -0,0 +1,198 @@
|
||||||
+package net.minecraft.server;
|
+package net.minecraft.server;
|
||||||
+
|
+
|
||||||
+import java.io.DataInputStream;
|
+import java.io.DataInput;
|
||||||
+import java.io.DataOutputStream;
|
+import java.io.DataOutput;
|
||||||
+import java.io.IOException;
|
+import java.io.IOException;
|
||||||
+import java.util.zip.DataFormatException;
|
+import java.util.zip.DataFormatException;
|
||||||
+import java.util.zip.Deflater;
|
+import java.util.zip.Deflater;
|
||||||
@ -323,18 +323,18 @@ index 0000000..3c3bdbf
|
|||||||
+ }
|
+ }
|
||||||
+ }
|
+ }
|
||||||
+
|
+
|
||||||
+ public void a(DataInputStream datainputstream) throws IOException { // CraftBukkit - throws IOException
|
+ public void a(DataInput datainput) throws IOException { // CraftBukkit - throws IOException
|
||||||
+ this.a = datainputstream.readInt();
|
+ this.a = datainput.readInt();
|
||||||
+ this.b = datainputstream.readInt();
|
+ this.b = datainput.readInt();
|
||||||
+ this.e = datainputstream.readBoolean();
|
+ this.e = datainput.readBoolean();
|
||||||
+ this.c = datainputstream.readShort();
|
+ this.c = datainput.readShort();
|
||||||
+ this.d = datainputstream.readShort();
|
+ this.d = datainput.readShort();
|
||||||
+ this.size = datainputstream.readInt();
|
+ this.size = datainput.readInt();
|
||||||
+ if (buildBuffer.length < this.size) {
|
+ if (buildBuffer.length < this.size) {
|
||||||
+ buildBuffer = new byte[this.size];
|
+ buildBuffer = new byte[this.size];
|
||||||
+ }
|
+ }
|
||||||
+
|
+
|
||||||
+ datainputstream.readFully(buildBuffer, 0, this.size);
|
+ datainput.readFully(buildBuffer, 0, this.size);
|
||||||
+ int i = 0;
|
+ int i = 0;
|
||||||
+
|
+
|
||||||
+ int j;
|
+ int j;
|
||||||
@ -362,14 +362,14 @@ index 0000000..3c3bdbf
|
|||||||
+ }
|
+ }
|
||||||
+ }
|
+ }
|
||||||
+
|
+
|
||||||
+ public void a(DataOutputStream dataoutputstream) throws IOException { // CraftBukkit - throws IOException
|
+ public void a(DataOutput dataoutput) throws IOException { // CraftBukkit - throws IOException
|
||||||
+ dataoutputstream.writeInt(this.a);
|
+ dataoutput.writeInt(this.a);
|
||||||
+ dataoutputstream.writeInt(this.b);
|
+ dataoutput.writeInt(this.b);
|
||||||
+ dataoutputstream.writeBoolean(this.e);
|
+ dataoutput.writeBoolean(this.e);
|
||||||
+ dataoutputstream.writeShort((short) (this.c & '\uffff'));
|
+ dataoutput.writeShort((short) (this.c & '\uffff'));
|
||||||
+ dataoutputstream.writeShort((short) (this.d & '\uffff'));
|
+ dataoutput.writeShort((short) (this.d & '\uffff'));
|
||||||
+ dataoutputstream.writeInt(this.size);
|
+ dataoutput.writeInt(this.size);
|
||||||
+ dataoutputstream.write(this.buffer, 0, this.size);
|
+ dataoutput.write(this.buffer, 0, this.size);
|
||||||
+ }
|
+ }
|
||||||
+
|
+
|
||||||
+ public void handle(Connection connection) {
|
+ public void handle(Connection connection) {
|
||||||
|
In neuem Issue referenzieren
Einen Benutzer sperren