mirror of
https://github.com/ViaVersion/VIAaaS.git
synced 2025-02-19 02:11:50 +01:00
front-end only compression
This commit is contained in:
parent
182e2f0591
commit
b477194b05
@ -84,6 +84,12 @@ class LoginState : ConnectionState {
|
||||
}
|
||||
|
||||
private fun handleLoginSuccess(handler: MinecraftHandler, loginSuccess: LoginSuccess) {
|
||||
if (handler.data.compressionLevel == -1) {
|
||||
// Enable front-end compression
|
||||
val threshold = 256
|
||||
forward(handler, SetCompression().also { it.threshold = threshold })
|
||||
setCompression(handler.data.frontChannel, threshold)
|
||||
}
|
||||
handler.data.state = PlayState()
|
||||
forward(handler, loginSuccess)
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user