Class ClientConnection

All Implemented Interfaces:
ChannelHandler, ChannelInboundHandler
Direct Known Subclasses:
RateLimitedConnection

public class ClientConnection extends SimpleChannelInboundHandler<Packet<?>>
A connection backed by a netty channel. It can be one to a client on the server or one to a server on a client.
Mappings:
Namespace Name
official ug
intermediary net/minecraft/class_2535
named net/minecraft/network/ClientConnection
  • Field Details

    • CURRENT_PACKET_COUNTER_WEIGHT

      private static final float CURRENT_PACKET_COUNTER_WEIGHT
      Represents when the average packet counter is updated, what percent of the value of the average counter is set from the current counter.

      The formula is averagePacketsSent = 0.75f × packetsSentCounter + (1 - 0.75f) × averagePacketsSent.

      See Also:
      Mappings:
      Namespace Name Mixin selector
      official j Lug;j:F
      intermediary field_33280 Lnet/minecraft/class_2535;field_33280:F
      named CURRENT_PACKET_COUNTER_WEIGHT Lnet/minecraft/network/ClientConnection;CURRENT_PACKET_COUNTER_WEIGHT:F
    • LOGGER

      private static final Logger LOGGER
      Mappings:
      Namespace Name Mixin selector
      official k Lug;k:Lorg/slf4j/Logger;
      intermediary field_11642 Lnet/minecraft/class_2535;field_11642:Lorg/slf4j/Logger;
      named LOGGER Lnet/minecraft/network/ClientConnection;LOGGER:Lorg/slf4j/Logger;
    • NETWORK_MARKER

      public static final Marker NETWORK_MARKER
      Mappings:
      Namespace Name Mixin selector
      official a Lug;a:Lorg/slf4j/Marker;
      intermediary field_11641 Lnet/minecraft/class_2535;field_11641:Lorg/slf4j/Marker;
      named NETWORK_MARKER Lnet/minecraft/network/ClientConnection;NETWORK_MARKER:Lorg/slf4j/Marker;
    • NETWORK_PACKETS_MARKER

      public static final Marker NETWORK_PACKETS_MARKER
      Mappings:
      Namespace Name Mixin selector
      official b Lug;b:Lorg/slf4j/Marker;
      intermediary field_11639 Lnet/minecraft/class_2535;field_11639:Lorg/slf4j/Marker;
      named NETWORK_PACKETS_MARKER Lnet/minecraft/network/ClientConnection;NETWORK_PACKETS_MARKER:Lorg/slf4j/Marker;
    • PACKET_RECEIVED_MARKER

      public static final Marker PACKET_RECEIVED_MARKER
      Mappings:
      Namespace Name Mixin selector
      official c Lug;c:Lorg/slf4j/Marker;
      intermediary field_36379 Lnet/minecraft/class_2535;field_36379:Lorg/slf4j/Marker;
      named PACKET_RECEIVED_MARKER Lnet/minecraft/network/ClientConnection;PACKET_RECEIVED_MARKER:Lorg/slf4j/Marker;
    • PACKET_SENT_MARKER

      public static final Marker PACKET_SENT_MARKER
      Mappings:
      Namespace Name Mixin selector
      official d Lug;d:Lorg/slf4j/Marker;
      intermediary field_36380 Lnet/minecraft/class_2535;field_36380:Lorg/slf4j/Marker;
      named PACKET_SENT_MARKER Lnet/minecraft/network/ClientConnection;PACKET_SENT_MARKER:Lorg/slf4j/Marker;
    • SERVERBOUND_PROTOCOL_KEY

      public static final AttributeKey<NetworkState.PacketHandler<?>> SERVERBOUND_PROTOCOL_KEY
      Mappings:
      Namespace Name Mixin selector
      official e Lug;e:Lio/netty/util/AttributeKey;
      intermediary field_45666 Lnet/minecraft/class_2535;field_45666:Lio/netty/util/AttributeKey;
      named SERVERBOUND_PROTOCOL_KEY Lnet/minecraft/network/ClientConnection;SERVERBOUND_PROTOCOL_KEY:Lio/netty/util/AttributeKey;
    • CLIENTBOUND_PROTOCOL_KEY

      public static final AttributeKey<NetworkState.PacketHandler<?>> CLIENTBOUND_PROTOCOL_KEY
      Mappings:
      Namespace Name Mixin selector
      official f Lug;f:Lio/netty/util/AttributeKey;
      intermediary field_45667 Lnet/minecraft/class_2535;field_45667:Lio/netty/util/AttributeKey;
      named CLIENTBOUND_PROTOCOL_KEY Lnet/minecraft/network/ClientConnection;CLIENTBOUND_PROTOCOL_KEY:Lio/netty/util/AttributeKey;
    • CLIENT_IO_GROUP

      public static final Supplier<NioEventLoopGroup> CLIENT_IO_GROUP
      Mappings:
      Namespace Name Mixin selector
      official g Lug;g:Ljava/util/function/Supplier;
      intermediary field_11650 Lnet/minecraft/class_2535;field_11650:Ljava/util/function/Supplier;
      named CLIENT_IO_GROUP Lnet/minecraft/network/ClientConnection;CLIENT_IO_GROUP:Ljava/util/function/Supplier;
    • EPOLL_CLIENT_IO_GROUP

      public static final Supplier<EpollEventLoopGroup> EPOLL_CLIENT_IO_GROUP
      Mappings:
      Namespace Name Mixin selector
      official h Lug;h:Ljava/util/function/Supplier;
      intermediary field_11657 Lnet/minecraft/class_2535;field_11657:Ljava/util/function/Supplier;
      named EPOLL_CLIENT_IO_GROUP Lnet/minecraft/network/ClientConnection;EPOLL_CLIENT_IO_GROUP:Ljava/util/function/Supplier;
    • LOCAL_CLIENT_IO_GROUP

      public static final Supplier<DefaultEventLoopGroup> LOCAL_CLIENT_IO_GROUP
      Mappings:
      Namespace Name Mixin selector
      official i Lug;i:Ljava/util/function/Supplier;
      intermediary field_11649 Lnet/minecraft/class_2535;field_11649:Ljava/util/function/Supplier;
      named LOCAL_CLIENT_IO_GROUP Lnet/minecraft/network/ClientConnection;LOCAL_CLIENT_IO_GROUP:Ljava/util/function/Supplier;
    • side

      private final NetworkSide side
      The side this connection is to.
      Mappings:
      Namespace Name Mixin selector
      official l Lug;l:Lxg;
      intermediary field_11643 Lnet/minecraft/class_2535;field_11643:Lnet/minecraft/class_2598;
      named side Lnet/minecraft/network/ClientConnection;side:Lnet/minecraft/network/NetworkSide;
    • queuedTasks

      private final Queue<Consumer<ClientConnection>> queuedTasks
      Mappings:
      Namespace Name Mixin selector
      official m Lug;m:Ljava/util/Queue;
      intermediary field_45668 Lnet/minecraft/class_2535;field_45668:Ljava/util/Queue;
      named queuedTasks Lnet/minecraft/network/ClientConnection;queuedTasks:Ljava/util/Queue;
    • channel

      private Channel channel
      Mappings:
      Namespace Name Mixin selector
      official n Lug;n:Lio/netty/channel/Channel;
      intermediary field_11651 Lnet/minecraft/class_2535;field_11651:Lio/netty/channel/Channel;
      named channel Lnet/minecraft/network/ClientConnection;channel:Lio/netty/channel/Channel;
    • address

      private SocketAddress address
      Mappings:
      Namespace Name Mixin selector
      official o Lug;o:Ljava/net/SocketAddress;
      intermediary field_11645 Lnet/minecraft/class_2535;field_11645:Ljava/net/SocketAddress;
      named address Lnet/minecraft/network/ClientConnection;address:Ljava/net/SocketAddress;
    • prePlayStateListener

      @Nullable private volatile @Nullable PacketListener prePlayStateListener
      Mappings:
      Namespace Name Mixin selector
      official p Lug;p:Luo;
      intermediary field_45669 Lnet/minecraft/class_2535;field_45669:Lnet/minecraft/class_2547;
      named prePlayStateListener Lnet/minecraft/network/ClientConnection;prePlayStateListener:Lnet/minecraft/network/listener/PacketListener;
    • packetListener

      @Nullable private volatile @Nullable PacketListener packetListener
      Mappings:
      Namespace Name Mixin selector
      official q Lug;q:Luo;
      intermediary field_11652 Lnet/minecraft/class_2535;field_11652:Lnet/minecraft/class_2547;
      named packetListener Lnet/minecraft/network/ClientConnection;packetListener:Lnet/minecraft/network/listener/PacketListener;
    • disconnectReason

      @Nullable private @Nullable Text disconnectReason
      Mappings:
      Namespace Name Mixin selector
      official r Lug;r:Lvf;
      intermediary field_11660 Lnet/minecraft/class_2535;field_11660:Lnet/minecraft/class_2561;
      named disconnectReason Lnet/minecraft/network/ClientConnection;disconnectReason:Lnet/minecraft/text/Text;
    • encrypted

      private boolean encrypted
      Mappings:
      Namespace Name Mixin selector
      official s Lug;s:Z
      intermediary field_11647 Lnet/minecraft/class_2535;field_11647:Z
      named encrypted Lnet/minecraft/network/ClientConnection;encrypted:Z
    • disconnected

      private boolean disconnected
      Mappings:
      Namespace Name Mixin selector
      official t Lug;t:Z
      intermediary field_11646 Lnet/minecraft/class_2535;field_11646:Z
      named disconnected Lnet/minecraft/network/ClientConnection;disconnected:Z
    • packetsReceivedCounter

      private int packetsReceivedCounter
      Mappings:
      Namespace Name Mixin selector
      official u Lug;u:I
      intermediary field_11658 Lnet/minecraft/class_2535;field_11658:I
      named packetsReceivedCounter Lnet/minecraft/network/ClientConnection;packetsReceivedCounter:I
    • packetsSentCounter

      private int packetsSentCounter
      Mappings:
      Namespace Name Mixin selector
      official v Lug;v:I
      intermediary field_11656 Lnet/minecraft/class_2535;field_11656:I
      named packetsSentCounter Lnet/minecraft/network/ClientConnection;packetsSentCounter:I
    • averagePacketsReceived

      private float averagePacketsReceived
      Mappings:
      Namespace Name Mixin selector
      official w Lug;w:F
      intermediary field_11654 Lnet/minecraft/class_2535;field_11654:F
      named averagePacketsReceived Lnet/minecraft/network/ClientConnection;averagePacketsReceived:F
    • averagePacketsSent

      private float averagePacketsSent
      Mappings:
      Namespace Name Mixin selector
      official x Lug;x:F
      intermediary field_11653 Lnet/minecraft/class_2535;field_11653:F
      named averagePacketsSent Lnet/minecraft/network/ClientConnection;averagePacketsSent:F
    • ticks

      private int ticks
      Mappings:
      Namespace Name Mixin selector
      official y Lug;y:I
      intermediary field_11655 Lnet/minecraft/class_2535;field_11655:I
      named ticks Lnet/minecraft/network/ClientConnection;ticks:I
    • errored

      private boolean errored
      Mappings:
      Namespace Name Mixin selector
      official z Lug;z:Z
      intermediary field_11640 Lnet/minecraft/class_2535;field_11640:Z
      named errored Lnet/minecraft/network/ClientConnection;errored:Z
    • pendingDisconnectionReason

      @Nullable private volatile @Nullable Text pendingDisconnectionReason
      Mappings:
      Namespace Name Mixin selector
      official A Lug;A:Lvf;
      intermediary field_44972 Lnet/minecraft/class_2535;field_44972:Lnet/minecraft/class_2561;
      named pendingDisconnectionReason Lnet/minecraft/network/ClientConnection;pendingDisconnectionReason:Lnet/minecraft/text/Text;
    • packetSizeLogger

      Mappings:
      Namespace Name Mixin selector
      official B Lug;B:Lty;
      intermediary field_45955 Lnet/minecraft/class_2535;field_45955:Lnet/minecraft/class_8762;
      named packetSizeLogger Lnet/minecraft/network/ClientConnection;packetSizeLogger:Lnet/minecraft/network/handler/PacketSizeLogger;
  • Constructor Details

    • ClientConnection

      public ClientConnection(NetworkSide side)
      Mappings:
      Namespace Name Mixin selector
      official <init> Lug;<init>(Lxg;)V
      intermediary <init> Lnet/minecraft/class_2535;<init>(Lnet/minecraft/class_2598;)V
      named <init> Lnet/minecraft/network/ClientConnection;<init>(Lnet/minecraft/network/NetworkSide;)V
  • Method Details

    • channelActive

      public void channelActive(ChannelHandlerContext context) throws Exception
      Specified by:
      channelActive in interface ChannelInboundHandler
      Overrides:
      channelActive in class ChannelInboundHandlerAdapter
      Throws:
      Exception
      Mappings:
      Namespace Name Mixin selector
      official channelActive Lug;channelActive(Lio/netty/channel/ChannelHandlerContext;)V
      intermediary channelActive Lnet/minecraft/class_2535;channelActive(Lio/netty/channel/ChannelHandlerContext;)V
      named channelActive Lnet/minecraft/network/ClientConnection;channelActive(Lio/netty/channel/ChannelHandlerContext;)V
    • setHandlers

      public static void setHandlers(Channel channel)
      Mappings:
      Namespace Name Mixin selector
      official a Lug;a(Lio/netty/channel/Channel;)V
      intermediary method_52901 Lnet/minecraft/class_2535;method_52901(Lio/netty/channel/Channel;)V
      named setHandlers Lnet/minecraft/network/ClientConnection;setHandlers(Lio/netty/channel/Channel;)V
    • channelInactive

      public void channelInactive(ChannelHandlerContext context)
      Specified by:
      channelInactive in interface ChannelInboundHandler
      Overrides:
      channelInactive in class ChannelInboundHandlerAdapter
      Mappings:
      Namespace Name Mixin selector
      official channelInactive Lug;channelInactive(Lio/netty/channel/ChannelHandlerContext;)V
      intermediary channelInactive Lnet/minecraft/class_2535;channelInactive(Lio/netty/channel/ChannelHandlerContext;)V
      named channelInactive Lnet/minecraft/network/ClientConnection;channelInactive(Lio/netty/channel/ChannelHandlerContext;)V
    • exceptionCaught

      public void exceptionCaught(ChannelHandlerContext context, Throwable ex)
      Specified by:
      exceptionCaught in interface ChannelHandler
      Specified by:
      exceptionCaught in interface ChannelInboundHandler
      Overrides:
      exceptionCaught in class ChannelInboundHandlerAdapter
      Mappings:
      Namespace Name Mixin selector
      official exceptionCaught Lug;exceptionCaught(Lio/netty/channel/ChannelHandlerContext;Ljava/lang/Throwable;)V
      intermediary exceptionCaught Lnet/minecraft/class_2535;exceptionCaught(Lio/netty/channel/ChannelHandlerContext;Ljava/lang/Throwable;)V
      named exceptionCaught Lnet/minecraft/network/ClientConnection;exceptionCaught(Lio/netty/channel/ChannelHandlerContext;Ljava/lang/Throwable;)V
    • channelRead0

      protected void channelRead0(ChannelHandlerContext channelHandlerContext, Packet<?> packet)
      Specified by:
      channelRead0 in class SimpleChannelInboundHandler<Packet<?>>
      Mappings:
      Namespace Name Mixin selector
      official a Lug;a(Lio/netty/channel/ChannelHandlerContext;Lxf;)V
      intermediary method_10770 Lnet/minecraft/class_2535;method_10770(Lio/netty/channel/ChannelHandlerContext;Lnet/minecraft/class_2596;)V
      named channelRead0 Lnet/minecraft/network/ClientConnection;channelRead0(Lio/netty/channel/ChannelHandlerContext;Lnet/minecraft/network/packet/Packet;)V
    • handlePacket

      private static <T extends PacketListener> void handlePacket(Packet<T> packet, PacketListener listener)
      Mappings:
      Namespace Name Mixin selector
      official a Lug;a(Lxf;Luo;)V
      intermediary method_10759 Lnet/minecraft/class_2535;method_10759(Lnet/minecraft/class_2596;Lnet/minecraft/class_2547;)V
      named handlePacket Lnet/minecraft/network/ClientConnection;handlePacket(Lnet/minecraft/network/packet/Packet;Lnet/minecraft/network/listener/PacketListener;)V
    • disableAutoRead

      public void disableAutoRead()
      Mappings:
      Namespace Name Mixin selector
      official a Lug;a()V
      intermediary method_52898 Lnet/minecraft/class_2535;method_52898()V
      named disableAutoRead Lnet/minecraft/network/ClientConnection;disableAutoRead()V
    • enableAutoRead

      public void enableAutoRead()
      Mappings:
      Namespace Name Mixin selector
      official b Lug;b()V
      intermediary method_52910 Lnet/minecraft/class_2535;method_52910()V
      named enableAutoRead Lnet/minecraft/network/ClientConnection;enableAutoRead()V
    • setPacketListener

      public void setPacketListener(PacketListener packetListener)
      Sets the packet listener that will handle oncoming packets, including ones that are not yet handled by the current packet listener.
      API Note:
      This may be called from the packetListener stored in this connection.
      Mappings:
      Namespace Name Mixin selector
      official a Lug;a(Luo;)V
      intermediary method_10763 Lnet/minecraft/class_2535;method_10763(Lnet/minecraft/class_2547;)V
      named setPacketListener Lnet/minecraft/network/ClientConnection;setPacketListener(Lnet/minecraft/network/listener/PacketListener;)V
    • setInitialPacketListener

      public void setInitialPacketListener(PacketListener packetListener)
      Sets the initial packet listener.
      Throws:
      IllegalStateException - if the listener was already set
      See Also:
      Mappings:
      Namespace Name Mixin selector
      official b Lug;b(Luo;)V
      intermediary method_52912 Lnet/minecraft/class_2535;method_52912(Lnet/minecraft/class_2547;)V
      named setInitialPacketListener Lnet/minecraft/network/ClientConnection;setInitialPacketListener(Lnet/minecraft/network/listener/PacketListener;)V
    • connect

      public void connect(String address, int port, ClientQueryPacketListener listener)
      Mappings:
      Namespace Name Mixin selector
      official a Lug;a(Ljava/lang/String;ILage;)V
      intermediary method_52903 Lnet/minecraft/class_2535;method_52903(Ljava/lang/String;ILnet/minecraft/class_2921;)V
      named connect Lnet/minecraft/network/ClientConnection;connect(Ljava/lang/String;ILnet/minecraft/network/listener/ClientQueryPacketListener;)V
    • connect

      public void connect(String address, int port, ClientLoginPacketListener listener)
      Mappings:
      Namespace Name Mixin selector
      official a Lug;a(Ljava/lang/String;ILafm;)V
      intermediary method_52902 Lnet/minecraft/class_2535;method_52902(Ljava/lang/String;ILnet/minecraft/class_2896;)V
      named connect Lnet/minecraft/network/ClientConnection;connect(Ljava/lang/String;ILnet/minecraft/network/listener/ClientLoginPacketListener;)V
    • connect

      private void connect(String address, int port, PacketListener listener, ConnectionIntent intent)
      Mappings:
      Namespace Name Mixin selector
      official a Lug;a(Ljava/lang/String;ILuo;Lafi;)V
      intermediary method_52904 Lnet/minecraft/class_2535;method_52904(Ljava/lang/String;ILnet/minecraft/class_2547;Lnet/minecraft/class_8592;)V
      named connect Lnet/minecraft/network/ClientConnection;connect(Ljava/lang/String;ILnet/minecraft/network/listener/PacketListener;Lnet/minecraft/network/packet/c2s/handshake/ConnectionIntent;)V
    • setS2CPacketHandler

      public void setS2CPacketHandler(ConnectionIntent intent)
      Mappings:
      Namespace Name Mixin selector
      official a Lug;a(Lafi;)V
      intermediary method_52899 Lnet/minecraft/class_2535;method_52899(Lnet/minecraft/class_8592;)V
      named setS2CPacketHandler Lnet/minecraft/network/ClientConnection;setS2CPacketHandler(Lnet/minecraft/network/packet/c2s/handshake/ConnectionIntent;)V
    • send

      public void send(Packet<?> packet)
      Mappings:
      Namespace Name Mixin selector
      official a Lug;a(Lxf;)V
      intermediary method_10743 Lnet/minecraft/class_2535;method_10743(Lnet/minecraft/class_2596;)V
      named send Lnet/minecraft/network/ClientConnection;send(Lnet/minecraft/network/packet/Packet;)V
    • send

      public void send(Packet<?> packet, @Nullable @Nullable PacketCallbacks callbacks)
      Mappings:
      Namespace Name Mixin selector
      official a Lug;a(Lxf;Lup;)V
      intermediary method_10752 Lnet/minecraft/class_2535;method_10752(Lnet/minecraft/class_2596;Lnet/minecraft/class_7648;)V
      named send Lnet/minecraft/network/ClientConnection;send(Lnet/minecraft/network/packet/Packet;Lnet/minecraft/network/PacketCallbacks;)V
    • send

      public void send(Packet<?> packet, @Nullable @Nullable PacketCallbacks callbacks, boolean flush)
      Mappings:
      Namespace Name Mixin selector
      official a Lug;a(Lxf;Lup;Z)V
      intermediary method_52906 Lnet/minecraft/class_2535;method_52906(Lnet/minecraft/class_2596;Lnet/minecraft/class_7648;Z)V
      named send Lnet/minecraft/network/ClientConnection;send(Lnet/minecraft/network/packet/Packet;Lnet/minecraft/network/PacketCallbacks;Z)V
    • submit

      public void submit(Consumer<ClientConnection> task)
      Mappings:
      Namespace Name Mixin selector
      official a Lug;a(Ljava/util/function/Consumer;)V
      intermediary method_52905 Lnet/minecraft/class_2535;method_52905(Ljava/util/function/Consumer;)V
      named submit Lnet/minecraft/network/ClientConnection;submit(Ljava/util/function/Consumer;)V
    • sendImmediately

      private void sendImmediately(Packet<?> packet, @Nullable @Nullable PacketCallbacks callbacks, boolean flush)
      Mappings:
      Namespace Name Mixin selector
      official b Lug;b(Lxf;Lup;Z)V
      intermediary method_10764 Lnet/minecraft/class_2535;method_10764(Lnet/minecraft/class_2596;Lnet/minecraft/class_7648;Z)V
      named sendImmediately Lnet/minecraft/network/ClientConnection;sendImmediately(Lnet/minecraft/network/packet/Packet;Lnet/minecraft/network/PacketCallbacks;Z)V
    • sendInternal

      private void sendInternal(Packet<?> packet, @Nullable @Nullable PacketCallbacks callbacks, boolean flush)
      Mappings:
      Namespace Name Mixin selector
      official c Lug;c(Lxf;Lup;Z)V
      intermediary method_36942 Lnet/minecraft/class_2535;method_36942(Lnet/minecraft/class_2596;Lnet/minecraft/class_7648;Z)V
      named sendInternal Lnet/minecraft/network/ClientConnection;sendInternal(Lnet/minecraft/network/packet/Packet;Lnet/minecraft/network/PacketCallbacks;Z)V
    • flush

      public void flush()
      Mappings:
      Namespace Name Mixin selector
      official c Lug;c()V
      intermediary method_52915 Lnet/minecraft/class_2535;method_52915()V
      named flush Lnet/minecraft/network/ClientConnection;flush()V
    • flushInternal

      private void flushInternal()
      Mappings:
      Namespace Name Mixin selector
      official s Lug;s()V
      intermediary method_52918 Lnet/minecraft/class_2535;method_52918()V
      named flushInternal Lnet/minecraft/network/ClientConnection;flushInternal()V
    • getProtocolAttributeKey

      private static AttributeKey<NetworkState.PacketHandler<?>> getProtocolAttributeKey(NetworkSide side)
      Mappings:
      Namespace Name Mixin selector
      official a Lug;a(Lxg;)Lio/netty/util/AttributeKey;
      intermediary method_52908 Lnet/minecraft/class_2535;method_52908(Lnet/minecraft/class_2598;)Lio/netty/util/AttributeKey;
      named getProtocolAttributeKey Lnet/minecraft/network/ClientConnection;getProtocolAttributeKey(Lnet/minecraft/network/NetworkSide;)Lio/netty/util/AttributeKey;
    • handleQueuedTasks

      private void handleQueuedTasks()
      Mappings:
      Namespace Name Mixin selector
      official t Lug;t()V
      intermediary method_10751 Lnet/minecraft/class_2535;method_10751()V
      named handleQueuedTasks Lnet/minecraft/network/ClientConnection;handleQueuedTasks()V
    • tick

      public void tick()
      Mappings:
      Namespace Name Mixin selector
      official d Lug;d()V
      intermediary method_10754 Lnet/minecraft/class_2535;method_10754()V
      named tick Lnet/minecraft/network/ClientConnection;tick()V
    • updateStats

      protected void updateStats()
      Mappings:
      Namespace Name Mixin selector
      official e Lug;e()V
      intermediary method_30615 Lnet/minecraft/class_2535;method_30615()V
      named updateStats Lnet/minecraft/network/ClientConnection;updateStats()V
    • getAddress

      public SocketAddress getAddress()
      Mappings:
      Namespace Name Mixin selector
      official f Lug;f()Ljava/net/SocketAddress;
      intermediary method_10755 Lnet/minecraft/class_2535;method_10755()Ljava/net/SocketAddress;
      named getAddress Lnet/minecraft/network/ClientConnection;getAddress()Ljava/net/SocketAddress;
    • getAddressAsString

      public String getAddressAsString(boolean logIps)
      Mappings:
      Namespace Name Mixin selector
      official a Lug;a(Z)Ljava/lang/String;
      intermediary method_52909 Lnet/minecraft/class_2535;method_52909(Z)Ljava/lang/String;
      named getAddressAsString Lnet/minecraft/network/ClientConnection;getAddressAsString(Z)Ljava/lang/String;
    • disconnect

      public void disconnect(Text disconnectReason)
      Mappings:
      Namespace Name Mixin selector
      official a Lug;a(Lvf;)V
      intermediary method_10747 Lnet/minecraft/class_2535;method_10747(Lnet/minecraft/class_2561;)V
      named disconnect Lnet/minecraft/network/ClientConnection;disconnect(Lnet/minecraft/text/Text;)V
    • isLocal

      public boolean isLocal()
      Mappings:
      Namespace Name Mixin selector
      official g Lug;g()Z
      intermediary method_10756 Lnet/minecraft/class_2535;method_10756()Z
      named isLocal Lnet/minecraft/network/ClientConnection;isLocal()Z
    • getSide

      public NetworkSide getSide()
      Returns the side of this connection, or the direction of the packets received by this connection.
      Mappings:
      Namespace Name Mixin selector
      official h Lug;h()Lxg;
      intermediary method_36121 Lnet/minecraft/class_2535;method_36121()Lnet/minecraft/class_2598;
      named getSide Lnet/minecraft/network/ClientConnection;getSide()Lnet/minecraft/network/NetworkSide;
    • getOppositeSide

      public NetworkSide getOppositeSide()
      Returns the opposite side of this connection, or the direction of the packets sent by this connection.
      Mappings:
      Namespace Name Mixin selector
      official i Lug;i()Lxg;
      intermediary method_36122 Lnet/minecraft/class_2535;method_36122()Lnet/minecraft/class_2598;
      named getOppositeSide Lnet/minecraft/network/ClientConnection;getOppositeSide()Lnet/minecraft/network/NetworkSide;
    • connect

      public static ClientConnection connect(InetSocketAddress address, boolean useEpoll, @Nullable @Nullable PerformanceLog packetSizeLog)
      Mappings:
      Namespace Name Mixin selector
      official a Lug;a(Ljava/net/InetSocketAddress;ZLauy;)Lug;
      intermediary method_10753 Lnet/minecraft/class_2535;method_10753(Ljava/net/InetSocketAddress;ZLnet/minecraft/class_8743;)Lnet/minecraft/class_2535;
      named connect Lnet/minecraft/network/ClientConnection;connect(Ljava/net/InetSocketAddress;ZLnet/minecraft/util/profiler/PerformanceLog;)Lnet/minecraft/network/ClientConnection;
    • connect

      public static ChannelFuture connect(InetSocketAddress address, boolean useEpoll, ClientConnection connection)
      Mappings:
      Namespace Name Mixin selector
      official a Lug;a(Ljava/net/InetSocketAddress;ZLug;)Lio/netty/channel/ChannelFuture;
      intermediary method_52271 Lnet/minecraft/class_2535;method_52271(Ljava/net/InetSocketAddress;ZLnet/minecraft/class_2535;)Lio/netty/channel/ChannelFuture;
      named connect Lnet/minecraft/network/ClientConnection;connect(Ljava/net/InetSocketAddress;ZLnet/minecraft/network/ClientConnection;)Lio/netty/channel/ChannelFuture;
    • addHandlers

      public static void addHandlers(ChannelPipeline pipeline, NetworkSide side, @Nullable @Nullable PacketSizeLogger packetSizeLogger)
      Mappings:
      Namespace Name Mixin selector
      official a Lug;a(Lio/netty/channel/ChannelPipeline;Lxg;Lty;)V
      intermediary method_48311 Lnet/minecraft/class_2535;method_48311(Lio/netty/channel/ChannelPipeline;Lnet/minecraft/class_2598;Lnet/minecraft/class_8762;)V
      named addHandlers Lnet/minecraft/network/ClientConnection;addHandlers(Lio/netty/channel/ChannelPipeline;Lnet/minecraft/network/NetworkSide;Lnet/minecraft/network/handler/PacketSizeLogger;)V
    • addFlowControlHandler

      public void addFlowControlHandler(ChannelPipeline pipeline)
      Mappings:
      Namespace Name Mixin selector
      official a Lug;a(Lio/netty/channel/ChannelPipeline;)V
      intermediary method_53859 Lnet/minecraft/class_2535;method_53859(Lio/netty/channel/ChannelPipeline;)V
      named addFlowControlHandler Lnet/minecraft/network/ClientConnection;addFlowControlHandler(Lio/netty/channel/ChannelPipeline;)V
    • addValidatorInternal

      private static void addValidatorInternal(ChannelPipeline pipeline, NetworkSide side)
      Mappings:
      Namespace Name Mixin selector
      official b Lug;b(Lio/netty/channel/ChannelPipeline;Lxg;)V
      intermediary method_52916 Lnet/minecraft/class_2535;method_52916(Lio/netty/channel/ChannelPipeline;Lnet/minecraft/class_2598;)V
      named addValidatorInternal Lnet/minecraft/network/ClientConnection;addValidatorInternal(Lio/netty/channel/ChannelPipeline;Lnet/minecraft/network/NetworkSide;)V
    • addValidator

      public static void addValidator(ChannelPipeline pipeline, NetworkSide side)
      Mappings:
      Namespace Name Mixin selector
      official a Lug;a(Lio/netty/channel/ChannelPipeline;Lxg;)V
      intermediary method_52911 Lnet/minecraft/class_2535;method_52911(Lio/netty/channel/ChannelPipeline;Lnet/minecraft/class_2598;)V
      named addValidator Lnet/minecraft/network/ClientConnection;addValidator(Lio/netty/channel/ChannelPipeline;Lnet/minecraft/network/NetworkSide;)V
    • connectLocal

      public static ClientConnection connectLocal(SocketAddress address)
      Mappings:
      Namespace Name Mixin selector
      official a Lug;a(Ljava/net/SocketAddress;)Lug;
      intermediary method_10769 Lnet/minecraft/class_2535;method_10769(Ljava/net/SocketAddress;)Lnet/minecraft/class_2535;
      named connectLocal Lnet/minecraft/network/ClientConnection;connectLocal(Ljava/net/SocketAddress;)Lnet/minecraft/network/ClientConnection;
    • setupEncryption

      public void setupEncryption(Cipher decryptionCipher, Cipher encryptionCipher)
      Mappings:
      Namespace Name Mixin selector
      official a Lug;a(Ljavax/crypto/Cipher;Ljavax/crypto/Cipher;)V
      intermediary method_10746 Lnet/minecraft/class_2535;method_10746(Ljavax/crypto/Cipher;Ljavax/crypto/Cipher;)V
      named setupEncryption Lnet/minecraft/network/ClientConnection;setupEncryption(Ljavax/crypto/Cipher;Ljavax/crypto/Cipher;)V
    • isEncrypted

      public boolean isEncrypted()
      Mappings:
      Namespace Name Mixin selector
      official j Lug;j()Z
      intermediary method_10771 Lnet/minecraft/class_2535;method_10771()Z
      named isEncrypted Lnet/minecraft/network/ClientConnection;isEncrypted()Z
    • isOpen

      public boolean isOpen()
      Mappings:
      Namespace Name Mixin selector
      official k Lug;k()Z
      intermediary method_10758 Lnet/minecraft/class_2535;method_10758()Z
      named isOpen Lnet/minecraft/network/ClientConnection;isOpen()Z
    • isChannelAbsent

      public boolean isChannelAbsent()
      Mappings:
      Namespace Name Mixin selector
      official l Lug;l()Z
      intermediary method_10772 Lnet/minecraft/class_2535;method_10772()Z
      named isChannelAbsent Lnet/minecraft/network/ClientConnection;isChannelAbsent()Z
    • getPacketListener

      @Nullable public @Nullable PacketListener getPacketListener()
      Mappings:
      Namespace Name Mixin selector
      official m Lug;m()Luo;
      intermediary method_10744 Lnet/minecraft/class_2535;method_10744()Lnet/minecraft/class_2547;
      named getPacketListener Lnet/minecraft/network/ClientConnection;getPacketListener()Lnet/minecraft/network/listener/PacketListener;
    • getDisconnectReason

      @Nullable public @Nullable Text getDisconnectReason()
      Mappings:
      Namespace Name Mixin selector
      official n Lug;n()Lvf;
      intermediary method_10748 Lnet/minecraft/class_2535;method_10748()Lnet/minecraft/class_2561;
      named getDisconnectReason Lnet/minecraft/network/ClientConnection;getDisconnectReason()Lnet/minecraft/text/Text;
    • tryDisableAutoRead

      public void tryDisableAutoRead()
      Mappings:
      Namespace Name Mixin selector
      official o Lug;o()V
      intermediary method_10757 Lnet/minecraft/class_2535;method_10757()V
      named tryDisableAutoRead Lnet/minecraft/network/ClientConnection;tryDisableAutoRead()V
    • setCompressionThreshold

      public void setCompressionThreshold(int compressionThreshold, boolean rejectsBadPackets)
      Sets the compression threshold of this connection.

      Packets over the threshold in size will be written as a 0 byte followed by contents, while compressed ones will be written as a var int for the decompressed size followed by the compressed contents.

      The connections on the two sides must have the same compression threshold, or compression errors may result.

      Parameters:
      compressionThreshold - the compression threshold, in number of bytes
      rejectsBadPackets - whether this connection may abort if a compressed packet with a bad size is received
      Mappings:
      Namespace Name Mixin selector
      official a Lug;a(IZ)V
      intermediary method_10760 Lnet/minecraft/class_2535;method_10760(IZ)V
      named setCompressionThreshold Lnet/minecraft/network/ClientConnection;setCompressionThreshold(IZ)V
    • handleDisconnection

      public void handleDisconnection()
      Mappings:
      Namespace Name Mixin selector
      official p Lug;p()V
      intermediary method_10768 Lnet/minecraft/class_2535;method_10768()V
      named handleDisconnection Lnet/minecraft/network/ClientConnection;handleDisconnection()V
    • getAveragePacketsReceived

      public float getAveragePacketsReceived()
      Mappings:
      Namespace Name Mixin selector
      official q Lug;q()F
      intermediary method_10762 Lnet/minecraft/class_2535;method_10762()F
      named getAveragePacketsReceived Lnet/minecraft/network/ClientConnection;getAveragePacketsReceived()F
    • getAveragePacketsSent

      public float getAveragePacketsSent()
      Mappings:
      Namespace Name Mixin selector
      official r Lug;r()F
      intermediary method_10745 Lnet/minecraft/class_2535;method_10745()F
      named getAveragePacketsSent Lnet/minecraft/network/ClientConnection;getAveragePacketsSent()F
    • resetPacketSizeLog

      public void resetPacketSizeLog(PerformanceLog log)
      Mappings:
      Namespace Name Mixin selector
      official a Lug;a(Lauy;)V
      intermediary method_53505 Lnet/minecraft/class_2535;method_53505(Lnet/minecraft/class_8743;)V
      named resetPacketSizeLog Lnet/minecraft/network/ClientConnection;resetPacketSizeLog(Lnet/minecraft/util/profiler/PerformanceLog;)V