Skip to content

Commit f278636

Browse files
author
UserNugget
committed
Velocity b586+ support
Fixes #246
1 parent b845d00 commit f278636

2 files changed

Lines changed: 3 additions & 2 deletions

File tree

plugin/src/main/java/net/elytrium/limboapi/LimboAPI.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@
3737
import com.velocitypowered.proxy.event.VelocityEventManager;
3838
import com.velocitypowered.proxy.network.Connections;
3939
import com.velocitypowered.proxy.protocol.MinecraftPacket;
40+
import com.velocitypowered.proxy.protocol.ProtocolUtils;
4041
import com.velocitypowered.proxy.protocol.StateRegistry;
4142
import com.velocitypowered.proxy.protocol.netty.MinecraftCompressDecoder;
4243
import com.velocitypowered.proxy.protocol.netty.MinecraftCompressorAndLengthEncoder;
@@ -532,7 +533,7 @@ public void fixCompressor(ChannelPipeline pipeline, ProtocolVersion version) {
532533
}
533534

534535
if (pipeline.get(Connections.COMPRESSION_DECODER) instanceof LimboCompressDecoder) {
535-
MinecraftCompressDecoder decoder = new MinecraftCompressDecoder(compressionThreshold, compressor);
536+
MinecraftCompressDecoder decoder = new MinecraftCompressDecoder(compressionThreshold, compressor, ProtocolUtils.Direction.SERVERBOUND);
536537
pipeline.replace(Connections.COMPRESSION_DECODER, Connections.COMPRESSION_DECODER, decoder);
537538
} else if (Settings.IMP.MAIN.COMPATIBILITY_MODE) {
538539
compressor.close();

plugin/src/main/java/net/elytrium/limboapi/injection/packet/MinecraftLimitedCompressDecoder.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ public class MinecraftLimitedCompressDecoder extends MinecraftCompressDecoder im
5151
private int uncompressedCap = Settings.IMP.MAIN.MAX_PACKET_LENGTH_TO_SUPPRESS_IT;
5252

5353
public MinecraftLimitedCompressDecoder(int threshold, VelocityCompressor compressor) {
54-
super(threshold, compressor);
54+
super(threshold, compressor, ProtocolUtils.Direction.SERVERBOUND);
5555
this.threshold = threshold;
5656
this.compressor = compressor;
5757
}

0 commit comments

Comments
 (0)