From 6999b42b1f33a32c70a621db9b47328937c7a9ff Mon Sep 17 00:00:00 2001 From: DBotThePony Date: Wed, 17 Jan 2024 20:02:14 +0700 Subject: [PATCH] Since OTM does not specifically modify vanilla behavior when it's structures are in "default" state, accept connections to vanilla servers or server with OTM missing --- .../ru/dbotthepony/mc/otm/network/MatteryNetworkChannel.kt | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/main/kotlin/ru/dbotthepony/mc/otm/network/MatteryNetworkChannel.kt b/src/main/kotlin/ru/dbotthepony/mc/otm/network/MatteryNetworkChannel.kt index 7b69da821..ff1e4cf11 100644 --- a/src/main/kotlin/ru/dbotthepony/mc/otm/network/MatteryNetworkChannel.kt +++ b/src/main/kotlin/ru/dbotthepony/mc/otm/network/MatteryNetworkChannel.kt @@ -38,7 +38,8 @@ interface MatteryPacket { abstract class MatteryNetworkChannel(val version: Int, val name: String) { val channel: SimpleChannel = ChannelBuilder .named(ResourceLocation(OverdriveThatMatters.MOD_ID, name)) - .acceptedVersions(Channel.VersionTest.exact(version)) + .clientAcceptedVersions { status, version -> (status == Channel.VersionTest.Status.MISSING || status == Channel.VersionTest.Status.VANILLA) || version == this.version } + .serverAcceptedVersions { status, version -> status == Channel.VersionTest.Status.PRESENT || version == this.version } .networkProtocolVersion(version) .simpleChannel()