Archived
0

Merge branch 'proto_1.12.2' into world-loader-anvil

# Conflicts:
#	proto_1.12.2_netty/src/main/java/mc/core/network/proto_1_12_2/netty/PacketEncoder.java
This commit is contained in:
2019-01-27 03:44:01 +03:00
6 changed files with 60 additions and 32 deletions

View File

@@ -3,10 +3,11 @@ package mc.core.network;
import com.flowpowered.nbt.Tag;
import lombok.Getter;
import lombok.Setter;
import org.jetbrains.annotations.NotNull;
import java.io.IOException;
import java.io.InputStream;
import java.util.UUID;
import java.util.concurrent.atomic.AtomicInteger;
public abstract class NetInputStream extends InputStream {
@Getter
@@ -24,7 +25,7 @@ public abstract class NetInputStream extends InputStream {
public abstract short readShort();
public abstract int readInt();
public abstract int readVarInt();
public abstract int readVarInt(int[] countReadBytes);
public abstract int readVarInt(AtomicInteger countReadBytes);
public abstract long readLong();
public abstract float readFloat();
public abstract double readDouble();
@@ -35,22 +36,22 @@ public abstract class NetInputStream extends InputStream {
public abstract void skipBytes(int count);
@Override
public int read() throws IOException {
public int read() {
return readByte();
}
@Override
public int read(byte[] b) throws IOException {
public int read(@NotNull byte[] b) {
return readBytes(b);
}
@Override
public int read(byte[] b, int off, int len) throws IOException {
public int read(@NotNull byte[] b, int off, int len) {
return readBytes(b, off, len);
}
@Override
public long skip(long n) throws IOException {
public long skip(long n) {
skipBytes((int) n);
return n;
}