Compare commits
11 Commits
Author | SHA1 | Date |
---|---|---|
|
71986906a3 | 2 years ago |
|
299877e3a8 | 2 years ago |
|
0db2839566 | 2 years ago |
|
4a5a8ad3b3 | 2 years ago |
|
45ea420a96 | 2 years ago |
|
9ef845ce80 | 2 years ago |
|
41e55c7e03 | 2 years ago |
|
eeb5c8dc71 | 2 years ago |
|
1a6aabf6da | 2 years ago |
|
f68155d718 | 2 years ago |
|
f19cc6e533 | 2 years ago |
@ -0,0 +1,101 @@
|
||||
package net.minecraft.src;
|
||||
|
||||
import java.io.DataInputStream;
|
||||
import java.io.DataOutputStream;
|
||||
import java.io.IOException;
|
||||
|
||||
import org.mcmodule.math.BigInteger;
|
||||
|
||||
public class Packet57ExtraChunk extends Packet {
|
||||
|
||||
private byte[] blockLSB, blockMSB, metadata, skyLight, blockLight;
|
||||
private BigInteger x, z;
|
||||
private int y, blockRefCnt;
|
||||
|
||||
public Packet57ExtraChunk() {}
|
||||
|
||||
public Packet57ExtraChunk(BigInteger x, int y, BigInteger z, ExtendedBlockStorage storage) {
|
||||
this.x = x;
|
||||
this.y = y;
|
||||
this.z = z;
|
||||
this.blockLSB = storage.getBlockLSBArray();
|
||||
this.blockMSB = storage.getBlockMSBArray().data;
|
||||
this.metadata = storage.getMetadataArray().data;
|
||||
this.skyLight = storage.getSkylightArray().data;
|
||||
this.blockLight = storage.getBlocklightArray().data;
|
||||
this.blockRefCnt = storage.getBlockRefCnt();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void readPacketData(DataInputStream var1) throws IOException {
|
||||
this.x = readBigInteger(var1);
|
||||
this.y = var1.readInt();
|
||||
this.z = readBigInteger(var1);
|
||||
this.blockLSB = readBytesFromStream(var1);
|
||||
this.blockMSB = readBytesFromStream(var1);
|
||||
this.metadata = readBytesFromStream(var1);
|
||||
this.skyLight = readBytesFromStream(var1);
|
||||
this.blockLight = readBytesFromStream(var1);
|
||||
this.blockRefCnt = var1.readInt();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void writePacketData(DataOutputStream var1) throws IOException {
|
||||
writeBigInteger(var1, this.x);
|
||||
var1.writeInt(this.y);
|
||||
writeBigInteger(var1, this.z);
|
||||
writeByteArray(var1, this.blockLSB);
|
||||
writeByteArray(var1, this.blockMSB);
|
||||
writeByteArray(var1, this.metadata);
|
||||
writeByteArray(var1, this.skyLight);
|
||||
writeByteArray(var1, this.blockLight);
|
||||
var1.writeInt(blockRefCnt);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void processPacket(NetHandler var1) {
|
||||
var1.handleAddExtraChunk(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getPacketSize() {
|
||||
return 0;
|
||||
}
|
||||
|
||||
public byte[] getBlockLSB() {
|
||||
return blockLSB;
|
||||
}
|
||||
|
||||
public byte[] getBlockMSB() {
|
||||
return blockMSB;
|
||||
}
|
||||
|
||||
public byte[] getMetadata() {
|
||||
return metadata;
|
||||
}
|
||||
|
||||
public byte[] getSkyLight() {
|
||||
return skyLight;
|
||||
}
|
||||
|
||||
public byte[] getBlockLight() {
|
||||
return blockLight;
|
||||
}
|
||||
|
||||
public BigInteger getX() {
|
||||
return x;
|
||||
}
|
||||
|
||||
public BigInteger getZ() {
|
||||
return z;
|
||||
}
|
||||
|
||||
public int getY() {
|
||||
return y;
|
||||
}
|
||||
|
||||
public int getBlockRefCnt() {
|
||||
return blockRefCnt;
|
||||
}
|
||||
|
||||
}
|
Loading…
Reference in New Issue