mirror of
https://github.com/ViaVersion/ViaLoader.git
synced 2024-09-27 04:12:43 +02:00
Fixed version comparisons
This commit is contained in:
parent
164f229aa0
commit
d8aff7f979
@ -62,7 +62,7 @@ public abstract class VLLegacyPipeline extends ChannelInboundHandlerAdapter {
|
||||
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());
|
||||
|
@ -58,7 +58,7 @@ public abstract class VLPipeline extends ChannelInboundHandlerAdapter {
|
||||
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());
|
||||
|
Loading…
Reference in New Issue
Block a user