Major client code cleanup

This commit is contained in:
Woah 2021-03-24 15:51:22 -04:00
parent 9b97a8799a
commit 9a3d79abf0
235 changed files with 29482 additions and 29717 deletions

View file

@ -11,19 +11,18 @@ import java.util.Objects;
public class DataBuffer extends Linkable {
public byte[] buffer;
public int index;
public DataBuffer(int capacity) {
this.buffer = ByteArrayPool.INSTANCE.getByteArray(capacity);
this.index = 0;
}
public DataBuffer(byte[] buffer) {
this.index = 0;
this.buffer = buffer;
}
public byte[] buffer;
public int index;
public final int readUnsignedShort() {
this.index += 2;
return (this.buffer[-2 + this.index] << 8 & 0xff00) + (this.buffer[-1 + this.index] & 255);
@ -196,7 +195,7 @@ public class DataBuffer extends Linkable {
try {
byte var2 = this.buffer[this.index++];
if (var1 < 50) {
this.buffer = (byte[]) null;
this.buffer = null;
}
if (0 == var2) {