From b54e99f5a849bc9d97c8adeeb473eb7384a2efff Mon Sep 17 00:00:00 2001 From: FlorianMichael Date: Fri, 25 Oct 2024 18:39:17 +0200 Subject: [PATCH] Update VV API usage --- build-logic/src/main/groovy/vaf.base-conventions.gradle | 4 ++-- .../raphimc/viaaprilfools/api/VAFServerVersionProvider.java | 2 +- fabric/src/main/resources/fabric.mod.json | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/build-logic/src/main/groovy/vaf.base-conventions.gradle b/build-logic/src/main/groovy/vaf.base-conventions.gradle index 139cf57..1deb86f 100644 --- a/build-logic/src/main/groovy/vaf.base-conventions.gradle +++ b/build-logic/src/main/groovy/vaf.base-conventions.gradle @@ -22,8 +22,8 @@ base { } dependencies { - compileOnly "com.viaversion:viaversion-common:5.0.4" - compileOnly "com.viaversion:viabackwards-common:5.0.4" + compileOnly "com.viaversion:viaversion-common:5.1.0" + compileOnly "com.viaversion:viabackwards-common:5.1.0" } publishing { diff --git a/common/src/main/java/net/raphimc/viaaprilfools/api/VAFServerVersionProvider.java b/common/src/main/java/net/raphimc/viaaprilfools/api/VAFServerVersionProvider.java index 318a8d4..26897ee 100644 --- a/common/src/main/java/net/raphimc/viaaprilfools/api/VAFServerVersionProvider.java +++ b/common/src/main/java/net/raphimc/viaaprilfools/api/VAFServerVersionProvider.java @@ -33,7 +33,7 @@ public class VAFServerVersionProvider implements VersionProvider { @Override public ProtocolVersion getClientProtocol(UserConnection connection) { final ProtocolVersion version = connection.getProtocolInfo().protocolVersion(); - if (version.getVersionType() == VersionType.SPECIAL) { + if (!version.isKnown()) { return ProtocolVersion.getProtocol(VersionType.SPECIAL, version.getOriginalVersion()); } else { return delegate.getClientProtocol(connection); diff --git a/fabric/src/main/resources/fabric.mod.json b/fabric/src/main/resources/fabric.mod.json index 53953b7..df22a60 100644 --- a/fabric/src/main/resources/fabric.mod.json +++ b/fabric/src/main/resources/fabric.mod.json @@ -23,7 +23,7 @@ }, "depends": { "viafabric": ">=0.4.14", - "viabackwards": ">=5.0.4-SNAPSHOT" + "viabackwards": ">=5.1.0" }, "custom": { "modmenu:api": true,