Attempt a fix for the new chunk compression changes.
This commit is contained in:
parent
2ad434fda4
commit
0c5563fbf5
2 changed files with 15 additions and 9 deletions
|
@ -17,7 +17,7 @@
|
||||||
public Packet51MapChunk()
|
public Packet51MapChunk()
|
||||||
{
|
{
|
||||||
this.isChunkDataPacket = true;
|
this.isChunkDataPacket = true;
|
||||||
@@ -57,16 +60,20 @@
|
@@ -57,17 +60,22 @@
|
||||||
this.zCh = par1Chunk.zPosition;
|
this.zCh = par1Chunk.zPosition;
|
||||||
this.includeInitialize = par2;
|
this.includeInitialize = par2;
|
||||||
Packet51MapChunkData var4 = getMapChunkData(par1Chunk, par2, par3);
|
Packet51MapChunkData var4 = getMapChunkData(par1Chunk, par2, par3);
|
||||||
|
@ -39,11 +39,14 @@
|
||||||
+ var5.setInput(field_73596_g, 0, field_73596_g.length);
|
+ var5.setInput(field_73596_g, 0, field_73596_g.length);
|
||||||
var5.finish();
|
var5.finish();
|
||||||
- this.chunkData = new byte[var4.field_74582_a.length];
|
- this.chunkData = new byte[var4.field_74582_a.length];
|
||||||
+ this.chunkData = new byte[field_73596_g.length];
|
- this.tempLength = var5.deflate(this.chunkData);
|
||||||
this.tempLength = var5.deflate(this.chunkData);
|
+ byte[] deflated = new byte[field_73596_g.length];
|
||||||
|
+ this.tempLength = var5.deflate(deflated);
|
||||||
|
+ this.chunkData = deflated;
|
||||||
}
|
}
|
||||||
finally
|
finally
|
||||||
@@ -95,13 +102,16 @@
|
{
|
||||||
|
@@ -95,13 +103,16 @@
|
||||||
par1DataInputStream.readFully(temp, 0, this.tempLength);
|
par1DataInputStream.readFully(temp, 0, this.tempLength);
|
||||||
int var2 = 0;
|
int var2 = 0;
|
||||||
int var3;
|
int var3;
|
||||||
|
@ -60,7 +63,7 @@
|
||||||
|
|
||||||
if (this.includeInitialize)
|
if (this.includeInitialize)
|
||||||
{
|
{
|
||||||
@@ -131,6 +141,16 @@
|
@@ -131,6 +142,16 @@
|
||||||
*/
|
*/
|
||||||
public void writePacketData(DataOutputStream par1DataOutputStream) throws IOException
|
public void writePacketData(DataOutputStream par1DataOutputStream) throws IOException
|
||||||
{
|
{
|
||||||
|
|
|
@ -18,7 +18,7 @@
|
||||||
|
|
||||||
public Packet56MapChunks() {}
|
public Packet56MapChunks() {}
|
||||||
|
|
||||||
@@ -40,30 +44,35 @@
|
@@ -40,31 +44,37 @@
|
||||||
{
|
{
|
||||||
Chunk var5 = (Chunk)par1List.get(var4);
|
Chunk var5 = (Chunk)par1List.get(var4);
|
||||||
Packet51MapChunkData var6 = Packet51MapChunk.getMapChunkData(var5, true, 65535);
|
Packet51MapChunkData var6 = Packet51MapChunk.getMapChunkData(var5, true, 65535);
|
||||||
|
@ -61,11 +61,14 @@
|
||||||
+ var11.setInput(data, 0, maxLen);
|
+ var11.setInput(data, 0, maxLen);
|
||||||
var11.finish();
|
var11.finish();
|
||||||
- this.field_73587_e = new byte[var3];
|
- this.field_73587_e = new byte[var3];
|
||||||
+ this.field_73587_e = new byte[maxLen];
|
- this.field_73585_g = var11.deflate(this.field_73587_e);
|
||||||
this.field_73585_g = var11.deflate(this.field_73587_e);
|
+ byte[] deflated = new byte[maxLen];
|
||||||
|
+ this.field_73585_g = var11.deflate(deflated);
|
||||||
|
+ this.field_73587_e = deflated;
|
||||||
}
|
}
|
||||||
finally
|
finally
|
||||||
@@ -146,6 +155,16 @@
|
{
|
||||||
|
@@ -146,6 +156,16 @@
|
||||||
*/
|
*/
|
||||||
public void writePacketData(DataOutputStream par1DataOutputStream) throws IOException
|
public void writePacketData(DataOutputStream par1DataOutputStream) throws IOException
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in a new issue