mirror of
https://github.com/ViaVersion/ViaProxy.git
synced 2024-11-21 11:45:16 +01:00
Updated Via*
This commit is contained in:
parent
482155250d
commit
4a78b4becb
@ -42,8 +42,8 @@ dependencies {
|
||||
exclude group: "com.google.guava", module: "guava"
|
||||
}
|
||||
include "com.viaversion:viarewind-core:2.0.3-SNAPSHOT"
|
||||
include "net.raphimc:ViaLegacy:2.0.4"
|
||||
include("net.raphimc:ViaProtocolHack:2.0.1") {
|
||||
include "net.raphimc:ViaLegacy:2.1.0"
|
||||
include("net.raphimc:ViaProtocolHack:2.1.0") {
|
||||
exclude group: "org.slf4j", module: "slf4j-api"
|
||||
}
|
||||
|
||||
|
@ -6,4 +6,4 @@ org.gradle.configureondemand=true
|
||||
# Project properties
|
||||
maven_name=ViaProxy
|
||||
maven_group=net.raphimc
|
||||
maven_version=3.0.5
|
||||
maven_version=3.0.6
|
||||
|
@ -15,7 +15,6 @@ import net.lenni0451.classtransform.utils.loader.InjectionClassLoader;
|
||||
import net.lenni0451.reflect.ClassLoaders;
|
||||
import net.raphimc.netminecraft.constants.MCPipeline;
|
||||
import net.raphimc.netminecraft.netty.connection.NetServer;
|
||||
import net.raphimc.vialegacy.util.VersionEnum;
|
||||
import net.raphimc.viaproxy.cli.ConsoleHandler;
|
||||
import net.raphimc.viaproxy.cli.options.Options;
|
||||
import net.raphimc.viaproxy.plugins.PluginManager;
|
||||
@ -58,7 +57,6 @@ public class ViaProxy {
|
||||
ConsoleHandler.hookConsole();
|
||||
Logger.LOGGER.info("Initializing ViaProxy v" + VERSION + "...");
|
||||
saveManager = new SaveManager();
|
||||
VersionEnum.init();
|
||||
setNettyParameters();
|
||||
MCPipeline.useOptimizedPipeline();
|
||||
c2pChannels = new DefaultChannelGroup(GlobalEventExecutor.INSTANCE);
|
||||
|
@ -1,8 +1,10 @@
|
||||
package net.raphimc.viaproxy.cli.options;
|
||||
|
||||
import joptsimple.*;
|
||||
import joptsimple.OptionParser;
|
||||
import joptsimple.OptionSet;
|
||||
import joptsimple.OptionSpec;
|
||||
import net.raphimc.mcauth.step.java.StepMCProfile;
|
||||
import net.raphimc.vialegacy.util.VersionEnum;
|
||||
import net.raphimc.viaprotocolhack.util.VersionEnum;
|
||||
import net.raphimc.viaproxy.util.logging.Logger;
|
||||
|
||||
import java.io.IOException;
|
||||
|
@ -2,7 +2,7 @@ package net.raphimc.viaproxy.cli.options;
|
||||
|
||||
import joptsimple.ValueConversionException;
|
||||
import joptsimple.ValueConverter;
|
||||
import net.raphimc.vialegacy.util.VersionEnum;
|
||||
import net.raphimc.viaprotocolhack.util.VersionEnum;
|
||||
|
||||
public class VersionEnumConverter implements ValueConverter<VersionEnum> {
|
||||
|
||||
|
@ -6,15 +6,20 @@ import com.viaversion.viaversion.api.minecraft.chunks.Chunk;
|
||||
import com.viaversion.viaversion.api.minecraft.chunks.ChunkSection;
|
||||
import com.viaversion.viaversion.api.protocol.remapper.PacketRemapper;
|
||||
import com.viaversion.viaversion.api.type.Type;
|
||||
import com.viaversion.viaversion.libs.opennbt.tag.builtin.*;
|
||||
import com.viaversion.viaversion.libs.opennbt.tag.builtin.CompoundTag;
|
||||
import com.viaversion.viaversion.libs.opennbt.tag.builtin.IntTag;
|
||||
import com.viaversion.viaversion.libs.opennbt.tag.builtin.ListTag;
|
||||
import com.viaversion.viaversion.libs.opennbt.tag.builtin.Tag;
|
||||
import com.viaversion.viaversion.protocols.protocol1_17to1_16_4.Protocol1_17To1_16_4;
|
||||
import com.viaversion.viaversion.protocols.protocol1_17to1_16_4.types.Chunk1_17Type;
|
||||
import net.raphimc.vialegacy.protocols.classic.protocola1_0_15toc0_28_30.model.ClassicLevel;
|
||||
import net.raphimc.vialegacy.protocols.classic.protocola1_0_15toc0_28_30.providers.ClassicWorldHeightProvider;
|
||||
import net.raphimc.vialegacy.protocols.classic.protocola1_0_15toc0_28_30.storage.ClassicLevelStorage;
|
||||
import net.raphimc.vialegacy.util.VersionEnum;
|
||||
import net.raphimc.viaprotocolhack.util.VersionEnum;
|
||||
|
||||
import java.util.*;
|
||||
import java.util.ArrayList;
|
||||
import java.util.BitSet;
|
||||
import java.util.List;
|
||||
|
||||
public class ClassicWorldHeightInjection {
|
||||
|
||||
|
@ -4,8 +4,10 @@ import com.viaversion.viaversion.api.connection.UserConnection;
|
||||
import com.viaversion.viaversion.api.minecraft.BlockFace;
|
||||
import com.viaversion.viaversion.api.minecraft.Position;
|
||||
import com.viaversion.viaversion.protocols.protocol1_13to1_12_2.blockconnections.AbstractFenceConnectionHandler;
|
||||
import net.raphimc.vialegacy.util.VersionEnum;
|
||||
import org.spongepowered.asm.mixin.*;
|
||||
import net.raphimc.viaprotocolhack.util.VersionEnum;
|
||||
import org.spongepowered.asm.mixin.Mixin;
|
||||
import org.spongepowered.asm.mixin.Overwrite;
|
||||
import org.spongepowered.asm.mixin.Shadow;
|
||||
|
||||
@Mixin(value = AbstractFenceConnectionHandler.class, remap = false)
|
||||
public abstract class MixinAbstractFenceConnectionHandler {
|
||||
|
@ -5,7 +5,7 @@ import com.viaversion.viaversion.api.connection.UserConnection;
|
||||
import com.viaversion.viaversion.api.minecraft.Position;
|
||||
import com.viaversion.viaversion.protocols.protocol1_13to1_12_2.blockconnections.AbstractFenceConnectionHandler;
|
||||
import com.viaversion.viaversion.protocols.protocol1_13to1_12_2.blockconnections.GlassConnectionHandler;
|
||||
import net.raphimc.vialegacy.util.VersionEnum;
|
||||
import net.raphimc.viaprotocolhack.util.VersionEnum;
|
||||
import org.spongepowered.asm.mixin.Mixin;
|
||||
import org.spongepowered.asm.mixin.Overwrite;
|
||||
|
||||
|
@ -2,7 +2,7 @@ package net.raphimc.viaproxy.plugins.events;
|
||||
|
||||
import io.netty.channel.Channel;
|
||||
import net.raphimc.netminecraft.util.ServerAddress;
|
||||
import net.raphimc.vialegacy.util.VersionEnum;
|
||||
import net.raphimc.viaprotocolhack.util.VersionEnum;
|
||||
import net.raphimc.viaproxy.plugins.events.types.ICancellable;
|
||||
|
||||
public class PreConnectEvent implements ICancellable {
|
||||
|
@ -2,7 +2,7 @@ package net.raphimc.viaproxy.protocolhack.providers;
|
||||
|
||||
import com.viaversion.viaversion.api.connection.UserConnection;
|
||||
import net.raphimc.vialegacy.protocols.classic.protocola1_0_15toc0_28_30.providers.ClassicWorldHeightProvider;
|
||||
import net.raphimc.vialegacy.util.VersionEnum;
|
||||
import net.raphimc.viaprotocolhack.util.VersionEnum;
|
||||
import net.raphimc.viaproxy.proxy.ProxyConnection;
|
||||
|
||||
public class ViaProxyClassicWorldHeightProvider extends ClassicWorldHeightProvider {
|
||||
|
@ -5,19 +5,25 @@ import com.viaversion.viaversion.api.connection.UserConnection;
|
||||
import com.viaversion.viaversion.libs.gson.JsonObject;
|
||||
import com.viaversion.viaversion.libs.gson.JsonPrimitive;
|
||||
import io.netty.bootstrap.Bootstrap;
|
||||
import io.netty.buffer.*;
|
||||
import io.netty.buffer.ByteBuf;
|
||||
import io.netty.buffer.ByteBufUtil;
|
||||
import io.netty.buffer.Unpooled;
|
||||
import io.netty.channel.*;
|
||||
import io.netty.channel.socket.SocketChannel;
|
||||
import io.netty.util.AttributeKey;
|
||||
import net.raphimc.netminecraft.constants.*;
|
||||
import net.raphimc.netminecraft.constants.ConnectionState;
|
||||
import net.raphimc.netminecraft.constants.MCPackets;
|
||||
import net.raphimc.netminecraft.constants.MCPipeline;
|
||||
import net.raphimc.netminecraft.netty.connection.NetClient;
|
||||
import net.raphimc.netminecraft.netty.crypto.AESEncryption;
|
||||
import net.raphimc.netminecraft.packet.PacketTypes;
|
||||
import net.raphimc.netminecraft.packet.impl.login.*;
|
||||
import net.raphimc.netminecraft.packet.impl.login.C2SLoginHelloPacket1_7;
|
||||
import net.raphimc.netminecraft.packet.impl.login.S2CLoginCustomPayloadPacket;
|
||||
import net.raphimc.netminecraft.packet.impl.login.S2CLoginDisconnectPacket;
|
||||
import net.raphimc.netminecraft.packet.impl.status.S2CStatusResponsePacket;
|
||||
import net.raphimc.netminecraft.packet.registry.PacketRegistryUtil;
|
||||
import net.raphimc.netminecraft.util.ServerAddress;
|
||||
import net.raphimc.vialegacy.util.VersionEnum;
|
||||
import net.raphimc.viaprotocolhack.util.VersionEnum;
|
||||
import net.raphimc.viaproxy.proxy.util.CloseAndReturn;
|
||||
import net.raphimc.viaproxy.util.logging.Logger;
|
||||
|
||||
|
@ -3,22 +3,30 @@ package net.raphimc.viaproxy.proxy.client2proxy;
|
||||
import com.viaversion.viaversion.api.protocol.version.ProtocolVersion;
|
||||
import io.netty.buffer.ByteBuf;
|
||||
import io.netty.buffer.Unpooled;
|
||||
import io.netty.channel.*;
|
||||
import io.netty.channel.ChannelFutureListener;
|
||||
import io.netty.channel.ChannelHandlerContext;
|
||||
import io.netty.channel.SimpleChannelInboundHandler;
|
||||
import io.netty.channel.socket.SocketChannel;
|
||||
import net.raphimc.netminecraft.constants.*;
|
||||
import net.raphimc.netminecraft.constants.ConnectionState;
|
||||
import net.raphimc.netminecraft.constants.MCPackets;
|
||||
import net.raphimc.netminecraft.constants.MCPipeline;
|
||||
import net.raphimc.netminecraft.netty.crypto.AESEncryption;
|
||||
import net.raphimc.netminecraft.netty.crypto.CryptUtil;
|
||||
import net.raphimc.netminecraft.packet.*;
|
||||
import net.raphimc.netminecraft.packet.IPacket;
|
||||
import net.raphimc.netminecraft.packet.PacketTypes;
|
||||
import net.raphimc.netminecraft.packet.UnknownPacket;
|
||||
import net.raphimc.netminecraft.packet.impl.handshake.C2SHandshakePacket;
|
||||
import net.raphimc.netminecraft.packet.impl.login.*;
|
||||
import net.raphimc.netminecraft.util.ServerAddress;
|
||||
import net.raphimc.vialegacy.util.VersionEnum;
|
||||
import net.raphimc.viaprotocolhack.util.VersionEnum;
|
||||
import net.raphimc.viaproxy.ViaProxy;
|
||||
import net.raphimc.viaproxy.cli.options.Options;
|
||||
import net.raphimc.viaproxy.plugins.PluginManager;
|
||||
import net.raphimc.viaproxy.plugins.events.PreConnectEvent;
|
||||
import net.raphimc.viaproxy.protocolhack.providers.ViaProxyGameProfileFetcher;
|
||||
import net.raphimc.viaproxy.proxy.*;
|
||||
import net.raphimc.viaproxy.proxy.ExternalInterface;
|
||||
import net.raphimc.viaproxy.proxy.LoginState;
|
||||
import net.raphimc.viaproxy.proxy.ProxyConnection;
|
||||
import net.raphimc.viaproxy.proxy.proxy2server.Proxy2ServerChannelInitializer;
|
||||
import net.raphimc.viaproxy.proxy.proxy2server.Proxy2ServerHandler;
|
||||
import net.raphimc.viaproxy.proxy.util.CloseAndReturn;
|
||||
@ -29,7 +37,9 @@ import net.raphimc.viaproxy.util.logging.Logger;
|
||||
import javax.crypto.SecretKey;
|
||||
import java.math.BigInteger;
|
||||
import java.nio.charset.StandardCharsets;
|
||||
import java.security.*;
|
||||
import java.security.GeneralSecurityException;
|
||||
import java.security.KeyPair;
|
||||
import java.security.NoSuchAlgorithmException;
|
||||
import java.security.spec.InvalidKeySpecException;
|
||||
import java.time.Instant;
|
||||
import java.util.Arrays;
|
||||
|
@ -11,9 +11,9 @@ 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.vialegacy.util.VersionEnum;
|
||||
import net.raphimc.viaprotocolhack.netty.ViaEncodeHandler;
|
||||
import net.raphimc.viaprotocolhack.netty.ViaPipeline;
|
||||
import net.raphimc.viaprotocolhack.util.VersionEnum;
|
||||
import net.raphimc.viaproxy.plugins.PluginManager;
|
||||
import net.raphimc.viaproxy.plugins.events.Proxy2ServerChannelInitializeEvent;
|
||||
import net.raphimc.viaproxy.plugins.events.types.ITyped;
|
||||
|
@ -1,7 +1,9 @@
|
||||
package net.raphimc.viaproxy.proxy.proxy2server;
|
||||
|
||||
import com.github.steveice10.mc.auth.data.GameProfile;
|
||||
import io.netty.channel.*;
|
||||
import io.netty.channel.ChannelFutureListener;
|
||||
import io.netty.channel.ChannelHandlerContext;
|
||||
import io.netty.channel.SimpleChannelInboundHandler;
|
||||
import net.raphimc.netminecraft.constants.ConnectionState;
|
||||
import net.raphimc.netminecraft.constants.MCPipeline;
|
||||
import net.raphimc.netminecraft.netty.crypto.AESEncryption;
|
||||
@ -9,7 +11,7 @@ import net.raphimc.netminecraft.netty.crypto.CryptUtil;
|
||||
import net.raphimc.netminecraft.packet.IPacket;
|
||||
import net.raphimc.netminecraft.packet.impl.login.*;
|
||||
import net.raphimc.vialegacy.protocols.release.protocol1_7_2_5to1_6_4.storage.ProtocolMetadataStorage;
|
||||
import net.raphimc.vialegacy.util.VersionEnum;
|
||||
import net.raphimc.viaprotocolhack.util.VersionEnum;
|
||||
import net.raphimc.viaproxy.cli.options.Options;
|
||||
import net.raphimc.viaproxy.proxy.ExternalInterface;
|
||||
import net.raphimc.viaproxy.proxy.ProxyConnection;
|
||||
|
@ -1,7 +1,7 @@
|
||||
package net.raphimc.viaproxy.ui.impl;
|
||||
|
||||
import com.google.common.net.HostAndPort;
|
||||
import net.raphimc.vialegacy.util.VersionEnum;
|
||||
import net.raphimc.viaprotocolhack.util.VersionEnum;
|
||||
import net.raphimc.viaproxy.ViaProxy;
|
||||
import net.raphimc.viaproxy.cli.options.Options;
|
||||
import net.raphimc.viaproxy.ui.AUITab;
|
||||
@ -67,7 +67,7 @@ public class GeneralTab extends AUITab {
|
||||
serverVersionLabel.setBounds(10, 100, 100, 20);
|
||||
contentPane.add(serverVersionLabel);
|
||||
|
||||
this.serverVersion = new JComboBox<>(VersionEnum.RENDER_VERSIONS.toArray(new VersionEnum[0]));
|
||||
this.serverVersion = new JComboBox<>(VersionEnum.SORTED_VERSIONS.toArray(new VersionEnum[0]));
|
||||
this.serverVersion.setBounds(10, 120, 465, 20);
|
||||
this.serverVersion.setRenderer(new DefaultListCellRenderer() {
|
||||
@Override
|
||||
|
Loading…
Reference in New Issue
Block a user