Skip to content

Commit 95cd314

Browse files
committed
Updated ViaVersion API usage
1 parent 6a44cbf commit 95cd314

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ repositories {
4343
}
4444

4545
dependencies {
46-
compileOnly "com.viaversion:viaversion-common:5.4.2"
46+
compileOnly "com.viaversion:viaversion-common:5.5.0-SNAPSHOT"
4747
compileOnly "com.viaversion:viabackwards-common:5.4.2"
4848
compileOnly "com.viaversion:viarewind-common:4.0.9"
4949
compileOnly "net.raphimc:ViaLegacy:3.0.10"

src/main/java/com/viaversion/vialoader/netty/ViaCodec.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ protected void encode(ChannelHandlerContext ctx, ByteBuf in, ByteBuf out) {
5454

5555
@Override
5656
protected void decode(ChannelHandlerContext ctx, ByteBuf in, List<Object> out) throws Exception {
57-
if (!this.connection.checkIncomingPacket()) {
57+
if (!this.connection.checkIncomingPacket(in.readableBytes())) {
5858
throw CancelDecoderException.generate(null);
5959
}
6060

src/main/java/com/viaversion/vialoader/netty/ViaDecoder.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ public ViaDecoder(final UserConnection connection) {
4040

4141
@Override
4242
protected void decode(ChannelHandlerContext ctx, ByteBuf in, List<Object> out) {
43-
if (!this.connection.checkIncomingPacket()) {
43+
if (!this.connection.checkIncomingPacket(in.readableBytes())) {
4444
throw CancelDecoderException.generate(null);
4545
}
4646
if (!this.connection.shouldTransformPacket()) {

0 commit comments

Comments
 (0)