Updated Via*

This commit is contained in:
RaphiMC 2023-03-10 18:20:10 +01:00
parent 60d21d0aa2
commit 3cbdc73657
5 changed files with 13 additions and 13 deletions

View File

@ -59,7 +59,7 @@ repositories {
dependencies {
compileOnly sourceSets.java17compat.output
include "com.viaversion:viaversion:4.6.0-1.19.4-rc1-SNAPSHOT"
include "com.viaversion:viaversion:4.6.0-1.19.4-rc2-SNAPSHOT"
include("com.viaversion:viabackwards-common:4.6.0-1.19.4-pre4-SNAPSHOT") {
exclude group: "com.viaversion", module: "viaversion"
exclude group: "io.netty", module: "netty-all"
@ -68,7 +68,7 @@ dependencies {
include "com.viaversion:viarewind-core:2.0.3-SNAPSHOT"
include "net.raphimc:ViaLegacy:2.2.8"
include "net.raphimc:ViaAprilFools:2.0.6"
include("net.raphimc:ViaProtocolHack:2.1.9") {
include("net.raphimc:ViaProtocolHack:2.2.0") {
exclude group: "org.slf4j", module: "slf4j-api"
}

View File

@ -50,7 +50,7 @@ public abstract class MixinProtocolVersion {
remaps.put("1.16.4/5", new Pair<>("1.16.4-1.16.5", null));
remaps.put("1.18/1.18.1", new Pair<>("1.18-1.18.1", null));
remaps.put("1.19.1/2", new Pair<>("1.19.1-1.19.2", null));
remaps.put("1.19.4", new Pair<>("1.19.4-rc1", null));
remaps.put("1.19.4", new Pair<>("1.19.4-rc2", null));
}
@Redirect(method = "<clinit>", at = @At(value = "INVOKE", target = "Lcom/viaversion/viaversion/api/protocol/version/ProtocolVersion;register(ILjava/lang/String;)Lcom/viaversion/viaversion/api/protocol/version/ProtocolVersion;"))

View File

@ -27,12 +27,12 @@ import net.raphimc.vialegacy.protocols.classic.protocola1_0_15toc0_28_30.provide
import net.raphimc.vialegacy.protocols.release.protocol1_3_1_2to1_2_4_5.providers.OldAuthProvider;
import net.raphimc.vialegacy.protocols.release.protocol1_7_2_5to1_6_4.providers.EncryptionProvider;
import net.raphimc.vialegacy.protocols.release.protocol1_8to1_7_6_10.providers.GameProfileFetcher;
import net.raphimc.viaprotocolhack.impl.viaversion.VPLoader;
import net.raphimc.viaprotocolhack.impl.viaversion.VPHLoader;
import net.raphimc.viaproxy.plugins.PluginManager;
import net.raphimc.viaproxy.plugins.events.ViaLoadingEvent;
import net.raphimc.viaproxy.protocolhack.providers.*;
public class ViaProxyVPLoader extends VPLoader {
public class ViaProxyVPLoader extends VPHLoader {
@Override
public void load() {

View File

@ -22,12 +22,12 @@ import com.viaversion.viaversion.exception.CancelCodecException;
import com.viaversion.viaversion.util.PipelineUtil;
import io.netty.buffer.ByteBuf;
import io.netty.channel.ChannelHandlerContext;
import net.raphimc.viaprotocolhack.netty.ViaDecodeHandler;
import net.raphimc.viaprotocolhack.netty.VPHDecodeHandler;
import net.raphimc.viaproxy.util.logging.Logger;
import java.util.List;
public class ViaProxyViaDecodeHandler extends ViaDecodeHandler {
public class ViaProxyViaDecodeHandler extends VPHDecodeHandler {
public ViaProxyViaDecodeHandler(final UserConnection info) {
super(info);

View File

@ -28,8 +28,8 @@ import net.raphimc.netminecraft.packet.registry.PacketRegistryUtil;
import net.raphimc.vialegacy.netty.PreNettyDecoder;
import net.raphimc.vialegacy.netty.PreNettyEncoder;
import net.raphimc.vialegacy.protocols.release.protocol1_7_2_5to1_6_4.baseprotocols.PreNettyBaseProtocol;
import net.raphimc.viaprotocolhack.netty.ViaEncodeHandler;
import net.raphimc.viaprotocolhack.netty.ViaPipeline;
import net.raphimc.viaprotocolhack.netty.VPHEncodeHandler;
import net.raphimc.viaprotocolhack.netty.VPHPipeline;
import net.raphimc.viaprotocolhack.util.VersionEnum;
import net.raphimc.viaproxy.plugins.PluginManager;
import net.raphimc.viaproxy.plugins.events.Proxy2ServerChannelInitializeEvent;
@ -58,13 +58,13 @@ public class Proxy2ServerChannelInitializer extends MinecraftChannelInitializer
super.initChannel(channel);
channel.attr(MCPipeline.PACKET_REGISTRY_ATTRIBUTE_KEY).set(PacketRegistryUtil.getHandshakeRegistry(true));
channel.pipeline().addBefore(MCPipeline.PACKET_CODEC_HANDLER_NAME, ViaPipeline.HANDLER_ENCODER_NAME, new ViaEncodeHandler(user));
channel.pipeline().addBefore(MCPipeline.PACKET_CODEC_HANDLER_NAME, ViaPipeline.HANDLER_DECODER_NAME, new ViaProxyViaDecodeHandler(user));
channel.pipeline().addBefore(MCPipeline.PACKET_CODEC_HANDLER_NAME, VPHPipeline.ENCODER_HANDLER_NAME, new VPHEncodeHandler(user));
channel.pipeline().addBefore(MCPipeline.PACKET_CODEC_HANDLER_NAME, VPHPipeline.DECODER_HANDLER_NAME, new ViaProxyViaDecodeHandler(user));
if (ProxyConnection.fromChannel(channel).getServerVersion().isOlderThanOrEqualTo(VersionEnum.r1_6_4)) {
user.getProtocolInfo().getPipeline().add(PreNettyBaseProtocol.INSTANCE);
channel.pipeline().addBefore(MCPipeline.SIZER_HANDLER_NAME, ViaPipeline.HANDLER_PRE_NETTY_ENCODER_NAME, new PreNettyEncoder(user));
channel.pipeline().addBefore(MCPipeline.SIZER_HANDLER_NAME, ViaPipeline.HANDLER_PRE_NETTY_DECODER_NAME, new PreNettyDecoder(user));
channel.pipeline().addBefore(MCPipeline.SIZER_HANDLER_NAME, VPHPipeline.PRE_NETTY_ENCODER_HANDLER_NAME, new PreNettyEncoder(user));
channel.pipeline().addBefore(MCPipeline.SIZER_HANDLER_NAME, VPHPipeline.PRE_NETTY_DECODER_HANDLER_NAME, new PreNettyDecoder(user));
}
if (PluginManager.EVENT_MANAGER.call(new Proxy2ServerChannelInitializeEvent(ITyped.Type.POST, channel)).isCancelled()) {