1.20.3->1.20.5 implementations

This commit is contained in:
FlorianMichael 2024-04-30 23:33:55 +02:00
parent 251bc6c39f
commit a8ae5ce73d
No known key found for this signature in database
GPG Key ID: C2FB87E71C425126
3 changed files with 18 additions and 4 deletions

View File

@ -1,9 +1,7 @@
package com.viaversion.aas.platform; package com.viaversion.aas.platform;
import com.viaversion.aas.provider.AspirinCompressionProvider; import com.viaversion.aas.provider.*;
import com.viaversion.aas.provider.AspirinEncryptionProvider; import com.viaversion.viabackwards.protocol.protocol1_20_3to1_20_5.provider.TransferProvider;
import com.viaversion.aas.provider.AspirinProfileProvider;
import com.viaversion.aas.provider.AspirinVersionProvider;
import com.viaversion.viaversion.api.Via; import com.viaversion.viaversion.api.Via;
import com.viaversion.viaversion.api.platform.ViaPlatformLoader; import com.viaversion.viaversion.api.platform.ViaPlatformLoader;
import com.viaversion.viaversion.api.protocol.version.VersionProvider; import com.viaversion.viaversion.api.protocol.version.VersionProvider;
@ -17,6 +15,9 @@ public class AspirinLoader implements ViaPlatformLoader {
Via.getManager().getProviders().use(VersionProvider.class, new AspirinVersionProvider()); Via.getManager().getProviders().use(VersionProvider.class, new AspirinVersionProvider());
Via.getManager().getProviders().use(CompressionProvider.class, new AspirinCompressionProvider()); Via.getManager().getProviders().use(CompressionProvider.class, new AspirinCompressionProvider());
//ViaBackwards
Via.getManager().getProviders().use(TransferProvider.class, new AspirinTransferProvider());
//ViaLegacy //ViaLegacy
Via.getManager().getProviders().use(GameProfileFetcher.class, new AspirinProfileProvider()); Via.getManager().getProviders().use(GameProfileFetcher.class, new AspirinProfileProvider());
Via.getManager().getProviders().use(EncryptionProvider.class, new AspirinEncryptionProvider()); Via.getManager().getProviders().use(EncryptionProvider.class, new AspirinEncryptionProvider());

View File

@ -0,0 +1,11 @@
package com.viaversion.aas.provider;
import com.viaversion.viabackwards.protocol.protocol1_20_3to1_20_5.provider.TransferProvider;
import com.viaversion.viaversion.api.connection.UserConnection;
public class AspirinTransferProvider implements TransferProvider {
@Override
public void connectToServer(UserConnection userConnection, String s, int i) {
}
}

View File

@ -12,6 +12,7 @@ import com.viaversion.aas.web.ViaWebApp
import com.viaversion.viaversion.api.Via import com.viaversion.viaversion.api.Via
import com.viaversion.viaversion.api.protocol.version.ProtocolVersion import com.viaversion.viaversion.api.protocol.version.ProtocolVersion
import com.viaversion.viaversion.api.protocol.version.VersionType import com.viaversion.viaversion.api.protocol.version.VersionType
import com.viaversion.viaversion.protocols.protocol1_20_5to1_20_3.Protocol1_20_5To1_20_3
import io.ktor.server.application.* import io.ktor.server.application.*
import kotlinx.coroutines.CoroutineScope import kotlinx.coroutines.CoroutineScope
import kotlinx.coroutines.Job import kotlinx.coroutines.Job
@ -67,6 +68,7 @@ private fun initVia() {
Via.getManager().configurationProvider.register(VIAaaSConfig) Via.getManager().configurationProvider.register(VIAaaSConfig)
} }
Protocol1_20_5To1_20_3.strictErrorHandling = false
ProtocolVersion.register(AUTO) ProtocolVersion.register(AUTO)
registerAspirinProtocols() registerAspirinProtocols()
} }