Updated Via* API usage

This commit is contained in:
RaphiMC 2025-01-01 23:59:04 +01:00
parent 78b4ed8231
commit 9748b586f5
No known key found for this signature in database
GPG Key ID: 0F6BB0657A03AC94
14 changed files with 24 additions and 24 deletions

View File

@ -61,16 +61,16 @@ repositories {
}
dependencies {
include "com.viaversion:viaversion-common:5.2.1-SNAPSHOT"
include "com.viaversion:viabackwards-common:5.2.1-SNAPSHOT"
include "com.viaversion:viarewind-common:4.0.5-SNAPSHOT"
include "net.raphimc:ViaLegacy:3.0.7-SNAPSHOT"
include "net.raphimc:viaaprilfools-common:3.0.5-SNAPSHOT"
include "com.viaversion:viaversion-common:5.2.1"
include "com.viaversion:viabackwards-common:5.2.1"
include "com.viaversion:viarewind-common:4.0.5"
include "net.raphimc:ViaLegacy:3.0.7"
include "com.viaversion:viaaprilfools-common:4.0.0"
include("net.raphimc:ViaBedrock:0.0.14-SNAPSHOT") {
exclude group: "io.netty"
exclude group: "io.jsonwebtoken"
}
include("net.raphimc:ViaLoader:3.0.5-SNAPSHOT") {
include("com.viaversion:vialoader:4.0.0") {
exclude group: "org.slf4j", module: "slf4j-api"
}

View File

@ -5,4 +5,4 @@ org.gradle.jvmargs=-Xmx2G
maven_group=net.raphimc
maven_name=ViaProxy
maven_version=3.3.8-SNAPSHOT
maven_version=3.4.0-SNAPSHOT

View File

@ -17,14 +17,14 @@
*/
package net.raphimc.viaproxy.protocoltranslator;
import com.viaversion.vialoader.ViaLoader;
import com.viaversion.vialoader.impl.platform.ViaAprilFoolsPlatformImpl;
import com.viaversion.vialoader.impl.platform.ViaBackwardsPlatformImpl;
import com.viaversion.vialoader.impl.platform.ViaBedrockPlatformImpl;
import com.viaversion.vialoader.impl.platform.ViaRewindPlatformImpl;
import com.viaversion.viaversion.api.protocol.version.ProtocolVersion;
import com.viaversion.viaversion.api.protocol.version.VersionType;
import com.viaversion.viaversion.protocols.v1_20_3to1_20_5.Protocol1_20_3To1_20_5;
import net.raphimc.vialoader.ViaLoader;
import net.raphimc.vialoader.impl.platform.ViaAprilFoolsPlatformImpl;
import net.raphimc.vialoader.impl.platform.ViaBackwardsPlatformImpl;
import net.raphimc.vialoader.impl.platform.ViaBedrockPlatformImpl;
import net.raphimc.vialoader.impl.platform.ViaRewindPlatformImpl;
import net.raphimc.viaproxy.ViaProxy;
import net.raphimc.viaproxy.plugins.events.ProtocolTranslatorInitEvent;
import net.raphimc.viaproxy.protocoltranslator.impl.ViaProxyVLLoader;

View File

@ -18,6 +18,7 @@
package net.raphimc.viaproxy.protocoltranslator.impl;
import com.viaversion.viabackwards.protocol.v1_20_5to1_20_3.provider.TransferProvider;
import com.viaversion.vialoader.impl.viaversion.VLLoader;
import com.viaversion.viaversion.api.Via;
import com.viaversion.viaversion.api.protocol.version.VersionProvider;
import com.viaversion.viaversion.protocols.v1_8to1_9.provider.CompressionProvider;
@ -28,7 +29,6 @@ import net.raphimc.vialegacy.protocol.classic.c0_28_30toa1_0_15.provider.Classic
import net.raphimc.vialegacy.protocol.release.r1_2_4_5tor1_3_1_2.provider.OldAuthProvider;
import net.raphimc.vialegacy.protocol.release.r1_6_4tor1_7_2_5.provider.EncryptionProvider;
import net.raphimc.vialegacy.protocol.release.r1_7_6_10tor1_8.provider.GameProfileFetcher;
import net.raphimc.vialoader.impl.viaversion.VLLoader;
import net.raphimc.viaproxy.ViaProxy;
import net.raphimc.viaproxy.plugins.events.ViaLoadingEvent;
import net.raphimc.viaproxy.protocoltranslator.providers.*;

View File

@ -17,10 +17,10 @@
*/
package net.raphimc.viaproxy.protocoltranslator.impl;
import com.viaversion.vialoader.netty.VLPipeline;
import com.viaversion.viaversion.api.connection.UserConnection;
import io.netty.channel.ChannelHandler;
import net.raphimc.netminecraft.constants.MCPipeline;
import net.raphimc.vialoader.netty.VLPipeline;
public class ViaProxyVLPipeline extends VLPipeline {

View File

@ -17,9 +17,9 @@
*/
package net.raphimc.viaproxy.protocoltranslator.impl;
import com.viaversion.vialoader.netty.ViaCodec;
import com.viaversion.viaversion.api.connection.UserConnection;
import io.netty.channel.ChannelHandlerContext;
import net.raphimc.vialoader.netty.ViaCodec;
import net.raphimc.viaproxy.ViaProxy;
import net.raphimc.viaproxy.util.logging.Logger;

View File

@ -17,7 +17,7 @@
*/
package net.raphimc.viaproxy.protocoltranslator.impl;
import net.raphimc.vialoader.impl.platform.ViaLegacyPlatformImpl;
import com.viaversion.vialoader.impl.platform.ViaLegacyPlatformImpl;
import net.raphimc.viaproxy.ViaProxy;
public class ViaProxyViaLegacyPlatformImpl extends ViaLegacyPlatformImpl {

View File

@ -17,9 +17,9 @@
*/
package net.raphimc.viaproxy.protocoltranslator.impl;
import com.viaversion.vialoader.impl.platform.ViaVersionPlatformImpl;
import com.viaversion.viaversion.libs.gson.JsonArray;
import com.viaversion.viaversion.libs.gson.JsonObject;
import net.raphimc.vialoader.impl.platform.ViaVersionPlatformImpl;
import net.raphimc.viaproxy.ViaProxy;
import net.raphimc.viaproxy.cli.ConsoleFormatter;
import net.raphimc.viaproxy.plugins.ViaProxyPlugin;

View File

@ -17,6 +17,7 @@
*/
package net.raphimc.viaproxy.protocoltranslator.providers;
import com.viaversion.vialoader.netty.VLPipeline;
import com.viaversion.viaversion.api.connection.UserConnection;
import io.netty.channel.Channel;
import net.raphimc.netminecraft.constants.MCPipeline;
@ -24,7 +25,6 @@ import net.raphimc.viabedrock.api.io.compression.ProtocolCompression;
import net.raphimc.viabedrock.netty.AesEncryptionCodec;
import net.raphimc.viabedrock.netty.CompressionCodec;
import net.raphimc.viabedrock.protocol.provider.NettyPipelineProvider;
import net.raphimc.vialoader.netty.VLPipeline;
import net.raphimc.viaproxy.proxy.session.ProxyConnection;
import javax.crypto.SecretKey;

View File

@ -17,6 +17,7 @@
*/
package net.raphimc.viaproxy.proxy.client2proxy;
import com.viaversion.vialoader.netty.VLPipeline;
import com.viaversion.viaversion.api.connection.UserConnection;
import com.viaversion.viaversion.connection.UserConnectionImpl;
import com.viaversion.viaversion.protocol.ProtocolPipelineImpl;
@ -27,7 +28,6 @@ import net.raphimc.netminecraft.constants.MCPipeline;
import net.raphimc.netminecraft.netty.codec.NoReadFlowControlHandler;
import net.raphimc.netminecraft.netty.connection.MinecraftChannelInitializer;
import net.raphimc.netminecraft.packet.registry.DefaultPacketRegistry;
import net.raphimc.vialoader.netty.VLPipeline;
import net.raphimc.viaproxy.ViaProxy;
import net.raphimc.viaproxy.plugins.events.Client2ProxyChannelInitializeEvent;
import net.raphimc.viaproxy.plugins.events.types.ITyped;

View File

@ -17,6 +17,7 @@
*/
package net.raphimc.viaproxy.proxy.proxy2server;
import com.viaversion.vialoader.netty.VLPipeline;
import com.viaversion.viaversion.api.connection.UserConnection;
import com.viaversion.viaversion.connection.UserConnectionImpl;
import com.viaversion.viaversion.protocol.ProtocolPipelineImpl;
@ -32,7 +33,6 @@ import net.raphimc.netminecraft.netty.codec.NoReadFlowControlHandler;
import net.raphimc.netminecraft.netty.connection.MinecraftChannelInitializer;
import net.raphimc.netminecraft.packet.registry.DefaultPacketRegistry;
import net.raphimc.viabedrock.api.BedrockProtocolVersion;
import net.raphimc.vialoader.netty.VLPipeline;
import net.raphimc.viaproxy.ViaProxy;
import net.raphimc.viaproxy.plugins.events.Proxy2ServerChannelInitializeEvent;
import net.raphimc.viaproxy.plugins.events.types.ITyped;

View File

@ -17,6 +17,8 @@
*/
package net.raphimc.viaproxy.proxy.session;
import com.viaversion.vialoader.netty.VLPipeline;
import com.viaversion.vialoader.netty.viabedrock.PingEncapsulationCodec;
import com.viaversion.viaversion.api.protocol.version.ProtocolVersion;
import io.netty.bootstrap.Bootstrap;
import io.netty.channel.Channel;
@ -29,8 +31,6 @@ import net.raphimc.netminecraft.constants.ConnectionState;
import net.raphimc.netminecraft.constants.MCPipeline;
import net.raphimc.netminecraft.util.ChannelType;
import net.raphimc.viabedrock.protocol.data.ProtocolConstants;
import net.raphimc.vialoader.netty.VLPipeline;
import net.raphimc.vialoader.netty.viabedrock.PingEncapsulationCodec;
import net.raphimc.viaproxy.ViaProxy;
import org.cloudburstmc.netty.channel.raknet.RakChannelFactory;
import org.cloudburstmc.netty.channel.raknet.config.RakChannelOption;

View File

@ -17,13 +17,13 @@
*/
package net.raphimc.viaproxy.ui.impl;
import com.viaversion.vialoader.util.ProtocolVersionList;
import com.viaversion.viaversion.api.Via;
import com.viaversion.viaversion.api.protocol.version.ProtocolVersion;
import net.lenni0451.commons.swing.GBC;
import net.lenni0451.lambdaevents.EventHandler;
import net.raphimc.viabedrock.api.BedrockProtocolVersion;
import net.raphimc.vialegacy.api.LegacyProtocolVersion;
import net.raphimc.vialoader.util.ProtocolVersionList;
import net.raphimc.viaproxy.ViaProxy;
import net.raphimc.viaproxy.protocoltranslator.viaproxy.ViaProxyConfig;
import net.raphimc.viaproxy.saves.impl.accounts.ClassicAccount;

View File

@ -17,11 +17,11 @@
*/
package net.raphimc.viaproxy.util;
import com.viaversion.vialoader.util.ProtocolVersionList;
import com.viaversion.viaversion.api.protocol.version.ProtocolVersion;
import net.lenni0451.mcping.MCPing;
import net.lenni0451.mcping.pings.sockets.impl.factories.SocketChannelSocketFactory;
import net.lenni0451.mcping.responses.MCPingResponse;
import net.raphimc.vialoader.util.ProtocolVersionList;
import java.net.SocketAddress;