Update Via* libraries and API usage to 1.21+ (#240)

* update vv deps

* add 1.21(.1)

* 1.21.3 update

* remove PreNettyBaseProtocol
7f1cb82cf6 (diff-b335630551682c19a781afebcf4d07bf978fb1f8ac04c6bf87428ed5106870f5L109)

* match viaaprilfools to the other vv deps
i see there's a -common in the repo, figured it should match the others because of it
This commit is contained in:
RoblKyogre 2024-11-14 09:59:02 -08:00 committed by GitHub
parent 97ed9a9fc6
commit 26699454a1
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 8 additions and 10 deletions

View File

@ -60,14 +60,15 @@ dependencies {
implementation(kotlin("stdlib-jdk8"))
implementation(kotlin("reflect"))
val vvVer = "5.0.2-SNAPSHOT"
val vbVer = "5.0.2-SNAPSHOT"
val vrVer = "4.0.2-SNAPSHOT"
val vvVer = "5.1.2-SNAPSHOT"
val vbVer = "5.1.2-SNAPSHOT"
val vrVer = "4.0.4-SNAPSHOT"
val vafVer = "3.0.5-SNAPSHOT"
implementation("com.viaversion:viaversion-common:$vvVer") { isTransitive = false }
implementation("com.viaversion:viabackwards-common:$vbVer") { isTransitive = false }
implementation("com.viaversion:viarewind-common:$vrVer") { isTransitive = false }
implementation("net.raphimc:ViaAprilFools:3.0.1-SNAPSHOT")
implementation("net.raphimc:ViaLegacy:3.0.2-SNAPSHOT")
implementation("net.raphimc:viaaprilfools-common:$vafVer") { isTransitive = false }
implementation("net.raphimc:ViaLegacy:3.0.6-SNAPSHOT")
val nettyVer = "4.1.111.Final"
implementation("io.netty:netty-handler-proxy:$nettyVer")

View File

@ -8,7 +8,6 @@ import io.netty.channel.Channel
import io.netty.channel.ChannelInitializer
import io.netty.handler.timeout.ReadTimeoutHandler
import net.raphimc.vialegacy.api.LegacyProtocolVersion
import net.raphimc.vialegacy.api.protocol.PreNettyBaseProtocol
import net.raphimc.vialegacy.netty.PreNettyLengthCodec
import java.net.InetSocketAddress
import java.net.URI
@ -22,10 +21,6 @@ class BackEndInit(private val connectionData: ConnectionData, private val proxyU
val version = connectionData.backServerVer!!
val isLegacy = version.olderThanOrEqualTo(LegacyProtocolVersion.r1_6_4)
if (isLegacy) {
pipeline.add(PreNettyBaseProtocol.INSTANCE)
}
ch.pipeline()
.also { addProxyHandler(it, proxyUri, proxyAddress) }
.also { if (isLegacy) it.addLast("vl-prenetty", PreNettyLengthCodec(user)) }

View File

@ -122,6 +122,8 @@ frame-src 'self' https://login.microsoftonline.com/ https://login.live.com/"
</div>
<datalist id="backend_version_list">
<option>AUTO</option>
<option value="1.21.3">1.21.2/3</option>
<option value="1.21.1">1.21(.1)</option>
<option value="1.20.5">1.20.5/6</option>
<option value="1.20.4">1.20.3/4</option>
<option>1.20.2</option>