Skip to content

Commit

Permalink
Fixed version comparisons
Browse files Browse the repository at this point in the history
  • Loading branch information
RaphiMC committed Feb 14, 2024
1 parent 164f229 commit d8aff7f
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ public void handlerAdded(ChannelHandlerContext ctx) {
this.user.getProtocolInfo().getPipeline().add(PreNettyBaseProtocol.INSTANCE);
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.equalTo(BedrockProtocolVersion.bedrockLatest)) {
} else if (this.version.equals(BedrockProtocolVersion.bedrockLatest)) {
this.user.getProtocolInfo().getPipeline().add(BedrockBaseProtocol.INSTANCE);
ctx.pipeline().addBefore(this.lengthSplitterName(), VIABEDROCK_DISCONNECT_HANDLER_NAME, this.createViaBedrockDisconnectHandler());
ctx.pipeline().addBefore(this.lengthSplitterName(), VIABEDROCK_FRAME_ENCAPSULATION_HANDLER_NAME, this.createViaBedrockFrameEncapsulationHandler());
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/net/raphimc/vialoader/netty/VLPipeline.java
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ public void handlerAdded(ChannelHandlerContext ctx) {
if (this.version.olderThanOrEquals(LegacyProtocolVersion.r1_6_4)) {
this.user.getProtocolInfo().getPipeline().add(PreNettyBaseProtocol.INSTANCE);
ctx.pipeline().addBefore(this.lengthCodecName(), VIALEGACY_PRE_NETTY_LENGTH_CODEC_NAME, this.createViaLegacyPreNettyLengthCodec());
} else if (this.version.equalTo(BedrockProtocolVersion.bedrockLatest)) {
} else if (this.version.equals(BedrockProtocolVersion.bedrockLatest)) {
this.user.getProtocolInfo().getPipeline().add(BedrockBaseProtocol.INSTANCE);
ctx.pipeline().addBefore(this.lengthCodecName(), VIABEDROCK_DISCONNECT_HANDLER_NAME, this.createViaBedrockDisconnectHandler());
ctx.pipeline().addBefore(this.lengthCodecName(), VIABEDROCK_FRAME_ENCAPSULATION_HANDLER_NAME, this.createViaBedrockFrameEncapsulationHandler());
Expand Down

0 comments on commit d8aff7f

Please sign in to comment.