3
0
Mirror von https://github.com/PaperMC/Velocity.git synchronisiert 2024-12-25 15:50:19 +01:00
Dieser Commit ist enthalten in:
Andrew Steinborn 2018-07-26 14:02:23 -04:00
Ursprung 87dcd4415d
Commit a8df4c493e
2 geänderte Dateien mit 11 neuen und 9 gelöschten Zeilen

Datei anzeigen

@ -15,11 +15,13 @@ repositories {
}
dependencies {
def nettyVersion = '4.1.27.Final'
compile 'com.google.code.gson:gson:2.8.5'
compile 'com.google.guava:guava:25.1-jre'
compile 'io.netty:netty-codec:4.1.27.Final'
compile 'io.netty:netty-codec-http:4.1.27.Final'
compile 'io.netty:netty-handler:4.1.27.Final'
compile "io.netty:netty-codec:${nettyVersion}"
compile "io.netty:netty-codec-http:${nettyVersion}"
compile "io.netty:netty-handler:${nettyVersion}"
compile 'net.kyori:text:1.12-1.5.0'
testCompile 'org.junit.jupiter:junit-jupiter-api:5.3.0-M1'
testCompile 'org.junit.jupiter:junit-jupiter-engine:5.3.0-M1'

Datei anzeigen

@ -4,10 +4,7 @@ import com.google.common.base.Preconditions;
import com.velocitypowered.proxy.protocol.PacketWrapper;
import com.velocitypowered.proxy.protocol.StateRegistry;
import com.velocitypowered.proxy.protocol.compression.JavaVelocityCompressor;
import com.velocitypowered.proxy.protocol.netty.MinecraftCompressDecoder;
import com.velocitypowered.proxy.protocol.netty.MinecraftCompressEncoder;
import com.velocitypowered.proxy.protocol.netty.MinecraftDecoder;
import com.velocitypowered.proxy.protocol.netty.MinecraftEncoder;
import com.velocitypowered.proxy.protocol.netty.*;
import com.velocitypowered.proxy.protocol.packets.SetCompression;
import io.netty.channel.Channel;
import io.netty.channel.ChannelFutureListener;
@ -15,6 +12,9 @@ import io.netty.channel.ChannelHandlerContext;
import io.netty.channel.ChannelInboundHandlerAdapter;
import io.netty.util.ReferenceCountUtil;
import static com.velocitypowered.proxy.protocol.netty.MinecraftPipelineUtils.MINECRAFT_DECODER;
import static com.velocitypowered.proxy.protocol.netty.MinecraftPipelineUtils.MINECRAFT_ENCODER;
/**
* A utility class to make working with the pipeline a little less painful and transparently handles certain Minecraft
* protocol mechanics.
@ -152,7 +152,7 @@ public class MinecraftConnection extends ChannelInboundHandlerAdapter {
MinecraftCompressEncoder encoder = new MinecraftCompressEncoder(threshold, compressor);
MinecraftCompressDecoder decoder = new MinecraftCompressDecoder(threshold, compressor);
channel.pipeline().addBefore("minecraft-decoder", "compress-decoder", decoder);
channel.pipeline().addBefore("minecraft-encoder", "compress-encoder", encoder);
channel.pipeline().addBefore(MINECRAFT_DECODER, "compress-decoder", decoder);
channel.pipeline().addBefore(MINECRAFT_ENCODER, "compress-encoder", encoder);
}
}