diff --git a/src/main/java/net/raphimc/vialoader/netty/VLLegacyPipeline.java b/src/main/java/net/raphimc/vialoader/netty/VLLegacyPipeline.java index b5a3322..8ac2085 100644 --- a/src/main/java/net/raphimc/vialoader/netty/VLLegacyPipeline.java +++ b/src/main/java/net/raphimc/vialoader/netty/VLLegacyPipeline.java @@ -63,7 +63,7 @@ public void handlerAdded(ChannelHandlerContext ctx) { if (this.user.isClientSide()) { final ProtocolVersion r1_6_4 = ProtocolVersion.getProtocol(VersionType.RELEASE_INITIAL, 78); - if (r1_6_4.isKnown() && this.version.olderThanOrEqualTo(r1_6_4)) { + if (ProtocolVersion.isRegistered(r1_6_4.getVersionType(), r1_6_4.getOriginalVersion()) && this.version.olderThanOrEqualTo(r1_6_4)) { ctx.pipeline().addBefore(this.lengthSplitterName(), VIALEGACY_PRE_NETTY_LENGTH_PREPENDER_NAME, this.createViaLegacyPreNettyLengthPrepender()); ctx.pipeline().addBefore(this.lengthPrependerName(), VIALEGACY_PRE_NETTY_LENGTH_REMOVER_NAME, this.createViaLegacyPreNettyLengthRemover()); } else if (this.version.getName().startsWith("Bedrock")) { diff --git a/src/main/java/net/raphimc/vialoader/netty/VLPipeline.java b/src/main/java/net/raphimc/vialoader/netty/VLPipeline.java index 54d7102..4463901 100644 --- a/src/main/java/net/raphimc/vialoader/netty/VLPipeline.java +++ b/src/main/java/net/raphimc/vialoader/netty/VLPipeline.java @@ -60,7 +60,7 @@ public void handlerAdded(ChannelHandlerContext ctx) { if (this.user.isClientSide()) { final ProtocolVersion r1_6_4 = ProtocolVersion.getProtocol(VersionType.RELEASE_INITIAL, 78); - if (r1_6_4.isKnown() && this.version.olderThanOrEqualTo(r1_6_4)) { + if (ProtocolVersion.isRegistered(r1_6_4.getVersionType(), r1_6_4.getOriginalVersion()) && this.version.olderThanOrEqualTo(r1_6_4)) { ctx.pipeline().addBefore(this.lengthCodecName(), VIALEGACY_PRE_NETTY_LENGTH_CODEC_NAME, this.createViaLegacyPreNettyLengthCodec()); } else if (this.version.getName().startsWith("Bedrock")) { ctx.pipeline().addBefore(this.lengthCodecName(), VIABEDROCK_DISCONNECT_HANDLER_NAME, this.createViaBedrockDisconnectHandler());