Package net.minecraft.network
Class ClientConnection
java.lang.Object
- All Implemented Interfaces:
ChannelHandler
,ChannelInboundHandler
- Direct Known Subclasses:
RateLimitedConnection
public class ClientConnection extends SimpleChannelInboundHandler<Packet<?>>
- Mappings:
Namespace Name official nu
intermediary net/minecraft/class_2535
named net/minecraft/network/ClientConnection
-
Nested Class Summary
Nested Classes Modifier and Type Class Description (package private) static class
ClientConnection.QueuedPacket
Nested classes/interfaces inherited from interface io.netty.channel.ChannelHandler
ChannelHandler.Sharable
-
Field Summary
Fields Modifier and Type Field Description private SocketAddress
address
static AttributeKey<NetworkState>
ATTR_KEY_PROTOCOL
private float
avgPacketsReceived
private float
avgPacketsSent
private Channel
channel
static Lazy<NioEventLoopGroup>
CLIENT_IO_GROUP
static Lazy<EpollEventLoopGroup>
CLIENT_IO_GROUP_EPOLL
static Lazy<DefaultEventLoopGroup>
CLIENT_IO_GROUP_LOCAL
private boolean
disconnected
private Text
disconnectReason
private boolean
encrypted
private boolean
errored
private static Logger
LOGGER
static Marker
MARKER_NETWORK
static Marker
MARKER_NETWORK_PACKETS
private PacketListener
packetListener
private Queue<ClientConnection.QueuedPacket>
packetQueue
private int
packetsReceivedCounter
private int
packetsSentCounter
private NetworkSide
side
private int
ticks
-
Constructor Summary
Constructors Constructor Description ClientConnection(NetworkSide side)
-
Method Summary
Methods inherited from class io.netty.channel.SimpleChannelInboundHandler
acceptInboundMessage, channelRead
Methods inherited from class io.netty.channel.ChannelInboundHandlerAdapter
channelReadComplete, channelRegistered, channelUnregistered, channelWritabilityChanged, userEventTriggered
Methods inherited from class io.netty.channel.ChannelHandlerAdapter
ensureNotSharable, handlerAdded, handlerRemoved, isSharable
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface io.netty.channel.ChannelHandler
handlerAdded, handlerRemoved
-
Field Details
-
LOGGER
- Mappings:
Namespace Name Mixin selector official g
Lnu;g:Lorg/apache/logging/log4j/Logger;
intermediary field_11642
Lnet/minecraft/class_2535;field_11642:Lorg/apache/logging/log4j/Logger;
named LOGGER
Lnet/minecraft/network/ClientConnection;LOGGER:Lorg/apache/logging/log4j/Logger;
-
MARKER_NETWORK
- Mappings:
Namespace Name Mixin selector official a
Lnu;a:Lorg/apache/logging/log4j/Marker;
intermediary field_11641
Lnet/minecraft/class_2535;field_11641:Lorg/apache/logging/log4j/Marker;
named MARKER_NETWORK
Lnet/minecraft/network/ClientConnection;MARKER_NETWORK:Lorg/apache/logging/log4j/Marker;
-
MARKER_NETWORK_PACKETS
- Mappings:
Namespace Name Mixin selector official b
Lnu;b:Lorg/apache/logging/log4j/Marker;
intermediary field_11639
Lnet/minecraft/class_2535;field_11639:Lorg/apache/logging/log4j/Marker;
named MARKER_NETWORK_PACKETS
Lnet/minecraft/network/ClientConnection;MARKER_NETWORK_PACKETS:Lorg/apache/logging/log4j/Marker;
-
ATTR_KEY_PROTOCOL
- Mappings:
Namespace Name Mixin selector official c
Lnu;c:Lio/netty/util/AttributeKey;
intermediary field_11648
Lnet/minecraft/class_2535;field_11648:Lio/netty/util/AttributeKey;
named ATTR_KEY_PROTOCOL
Lnet/minecraft/network/ClientConnection;ATTR_KEY_PROTOCOL:Lio/netty/util/AttributeKey;
-
CLIENT_IO_GROUP
- Mappings:
Namespace Name Mixin selector official d
Lnu;d:Lafz;
intermediary field_11650
Lnet/minecraft/class_2535;field_11650:Lnet/minecraft/class_3528;
named CLIENT_IO_GROUP
Lnet/minecraft/network/ClientConnection;CLIENT_IO_GROUP:Lnet/minecraft/util/Lazy;
-
CLIENT_IO_GROUP_EPOLL
- Mappings:
Namespace Name Mixin selector official e
Lnu;e:Lafz;
intermediary field_11657
Lnet/minecraft/class_2535;field_11657:Lnet/minecraft/class_3528;
named CLIENT_IO_GROUP_EPOLL
Lnet/minecraft/network/ClientConnection;CLIENT_IO_GROUP_EPOLL:Lnet/minecraft/util/Lazy;
-
CLIENT_IO_GROUP_LOCAL
- Mappings:
Namespace Name Mixin selector official f
Lnu;f:Lafz;
intermediary field_11649
Lnet/minecraft/class_2535;field_11649:Lnet/minecraft/class_3528;
named CLIENT_IO_GROUP_LOCAL
Lnet/minecraft/network/ClientConnection;CLIENT_IO_GROUP_LOCAL:Lnet/minecraft/util/Lazy;
-
side
- Mappings:
Namespace Name Mixin selector official h
Lnu;h:Lpb;
intermediary field_11643
Lnet/minecraft/class_2535;field_11643:Lnet/minecraft/class_2598;
named side
Lnet/minecraft/network/ClientConnection;side:Lnet/minecraft/network/NetworkSide;
-
packetQueue
- Mappings:
Namespace Name Mixin selector official i
Lnu;i:Ljava/util/Queue;
intermediary field_11644
Lnet/minecraft/class_2535;field_11644:Ljava/util/Queue;
named packetQueue
Lnet/minecraft/network/ClientConnection;packetQueue:Ljava/util/Queue;
-
channel
- Mappings:
Namespace Name Mixin selector official j
Lnu;j: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
- Mappings:
Namespace Name Mixin selector official k
Lnu;k: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;
-
packetListener
- Mappings:
Namespace Name Mixin selector official l
Lnu;l:Lnz;
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
- Mappings:
Namespace Name Mixin selector official m
Lnu;m:Loi;
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 n
Lnu;n: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 o
Lnu;o: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 p
Lnu;p: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 q
Lnu;q:I
intermediary field_11656
Lnet/minecraft/class_2535;field_11656:I
named packetsSentCounter
Lnet/minecraft/network/ClientConnection;packetsSentCounter:I
-
avgPacketsReceived
private float avgPacketsReceived- Mappings:
Namespace Name Mixin selector official r
Lnu;r:F
intermediary field_11654
Lnet/minecraft/class_2535;field_11654:F
named avgPacketsReceived
Lnet/minecraft/network/ClientConnection;avgPacketsReceived:F
-
avgPacketsSent
private float avgPacketsSent- Mappings:
Namespace Name Mixin selector official s
Lnu;s:F
intermediary field_11653
Lnet/minecraft/class_2535;field_11653:F
named avgPacketsSent
Lnet/minecraft/network/ClientConnection;avgPacketsSent:F
-
ticks
private int ticks- Mappings:
Namespace Name Mixin selector official t
Lnu;t: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 u
Lnu;u:Z
intermediary field_11640
Lnet/minecraft/class_2535;field_11640:Z
named errored
Lnet/minecraft/network/ClientConnection;errored:Z
-
-
Constructor Details
-
ClientConnection
- Mappings:
Namespace Name Mixin selector official <init>
Lnu;<init>(Lpb;)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
- Specified by:
channelActive
in interfaceChannelInboundHandler
- Overrides:
channelActive
in classChannelInboundHandlerAdapter
- Throws:
Exception
- Mappings:
Namespace Name Mixin selector official channelActive
Lnu;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
-
setState
- Mappings:
Namespace Name Mixin selector official a
Lnu;a(Lnv;)V
intermediary method_10750
Lnet/minecraft/class_2535;method_10750(Lnet/minecraft/class_2539;)V
named setState
Lnet/minecraft/network/ClientConnection;setState(Lnet/minecraft/network/NetworkState;)V
-
channelInactive
- Specified by:
channelInactive
in interfaceChannelInboundHandler
- Overrides:
channelInactive
in classChannelInboundHandlerAdapter
- Mappings:
Namespace Name Mixin selector official channelInactive
Lnu;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
- Specified by:
exceptionCaught
in interfaceChannelHandler
- Specified by:
exceptionCaught
in interfaceChannelInboundHandler
- Overrides:
exceptionCaught
in classChannelInboundHandlerAdapter
- Mappings:
Namespace Name Mixin selector official exceptionCaught
Lnu;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
- Specified by:
channelRead0
in classSimpleChannelInboundHandler<Packet<?>>
- Mappings:
Namespace Name Mixin selector official a
Lnu;a(Lio/netty/channel/ChannelHandlerContext;Lpa;)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;)V
-
handlePacket
private static <T extends PacketListener> void handlePacket(Packet<T> packet, PacketListener listener)- Mappings:
Namespace Name Mixin selector official a
Lnu;a(Lpa;Lnz;)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;Lnet/minecraft/network/listener/PacketListener;)V
-
setPacketListener
- Mappings:
Namespace Name Mixin selector official a
Lnu;a(Lnz;)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
-
send
- Mappings:
Namespace Name Mixin selector official a
Lnu;a(Lpa;)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;)V
-
send
public void send(Packet<?> packet, @Nullable GenericFutureListener<? extends Future<? super Void>> callback)- Mappings:
Namespace Name Mixin selector official a
Lnu;a(Lpa;Lio/netty/util/concurrent/GenericFutureListener;)V
intermediary method_10752
Lnet/minecraft/class_2535;method_10752(Lnet/minecraft/class_2596;Lio/netty/util/concurrent/GenericFutureListener;)V
named send
Lnet/minecraft/network/ClientConnection;send(Lnet/minecraft/network/Packet;Lio/netty/util/concurrent/GenericFutureListener;)V
-
sendImmediately
private void sendImmediately(Packet<?> packet, @Nullable GenericFutureListener<? extends Future<? super Void>> callback)- Mappings:
Namespace Name Mixin selector official b
Lnu;b(Lpa;Lio/netty/util/concurrent/GenericFutureListener;)V
intermediary method_10764
Lnet/minecraft/class_2535;method_10764(Lnet/minecraft/class_2596;Lio/netty/util/concurrent/GenericFutureListener;)V
named sendImmediately
Lnet/minecraft/network/ClientConnection;sendImmediately(Lnet/minecraft/network/Packet;Lio/netty/util/concurrent/GenericFutureListener;)V
-
method_32306
- Mappings:
Namespace Name Mixin selector official p
Lnu;p()Lnv;
intermediary method_32306
Lnet/minecraft/class_2535;method_32306()Lnet/minecraft/class_2539;
named method_32306
Lnet/minecraft/network/ClientConnection;method_32306()Lnet/minecraft/network/NetworkState;
-
sendQueuedPackets
private void sendQueuedPackets()- Mappings:
Namespace Name Mixin selector official q
Lnu;q()V
intermediary method_10751
Lnet/minecraft/class_2535;method_10751()V
named sendQueuedPackets
Lnet/minecraft/network/ClientConnection;sendQueuedPackets()V
-
tick
public void tick()- Mappings:
Namespace Name Mixin selector official a
Lnu;a()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 b
Lnu;b()V
intermediary method_30615
Lnet/minecraft/class_2535;method_30615()V
named updateStats
Lnet/minecraft/network/ClientConnection;updateStats()V
-
getAddress
- Mappings:
Namespace Name Mixin selector official c
Lnu;c()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;
-
disconnect
- Mappings:
Namespace Name Mixin selector official a
Lnu;a(Loi;)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 d
Lnu;d()Z
intermediary method_10756
Lnet/minecraft/class_2535;method_10756()Z
named isLocal
Lnet/minecraft/network/ClientConnection;isLocal()Z
-
connect
@Environment(CLIENT) public static ClientConnection connect(InetAddress address, int port, boolean shouldUseNativeTransport)- Mappings:
Namespace Name Mixin selector official a
Lnu;a(Ljava/net/InetAddress;IZ)Lnu;
intermediary method_10753
Lnet/minecraft/class_2535;method_10753(Ljava/net/InetAddress;IZ)Lnet/minecraft/class_2535;
named connect
Lnet/minecraft/network/ClientConnection;connect(Ljava/net/InetAddress;IZ)Lnet/minecraft/network/ClientConnection;
-
connectLocal
- Mappings:
Namespace Name Mixin selector official a
Lnu;a(Ljava/net/SocketAddress;)Lnu;
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
- Mappings:
Namespace Name Mixin selector official a
Lnu;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
- Mappings:
Namespace Name Mixin selector official g
Lnu;g()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 h
Lnu;h()Z
intermediary method_10758
Lnet/minecraft/class_2535;method_10758()Z
named isOpen
Lnet/minecraft/network/ClientConnection;isOpen()Z
-
hasChannel
public boolean hasChannel()- Mappings:
Namespace Name Mixin selector official i
Lnu;i()Z
intermediary method_10772
Lnet/minecraft/class_2535;method_10772()Z
named hasChannel
Lnet/minecraft/network/ClientConnection;hasChannel()Z
-
getPacketListener
- Mappings:
Namespace Name Mixin selector official j
Lnu;j()Lnz;
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
- Mappings:
Namespace Name Mixin selector official k
Lnu;k()Loi;
intermediary method_10748
Lnet/minecraft/class_2535;method_10748()Lnet/minecraft/class_2561;
named getDisconnectReason
Lnet/minecraft/network/ClientConnection;getDisconnectReason()Lnet/minecraft/text/Text;
-
disableAutoRead
public void disableAutoRead()- Mappings:
Namespace Name Mixin selector official l
Lnu;l()V
intermediary method_10757
Lnet/minecraft/class_2535;method_10757()V
named disableAutoRead
Lnet/minecraft/network/ClientConnection;disableAutoRead()V
-
setCompressionThreshold
public void setCompressionThreshold(int compressionThreshold)- Mappings:
Namespace Name Mixin selector official a
Lnu;a(I)V
intermediary method_10760
Lnet/minecraft/class_2535;method_10760(I)V
named setCompressionThreshold
Lnet/minecraft/network/ClientConnection;setCompressionThreshold(I)V
-
handleDisconnection
public void handleDisconnection()- Mappings:
Namespace Name Mixin selector official m
Lnu;m()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 n
Lnu;n()F
intermediary method_10762
Lnet/minecraft/class_2535;method_10762()F
named getAveragePacketsReceived
Lnet/minecraft/network/ClientConnection;getAveragePacketsReceived()F
-
getAveragePacketsSent
- Mappings:
Namespace Name Mixin selector official o
Lnu;o()F
intermediary method_10745
Lnet/minecraft/class_2535;method_10745()F
named getAveragePacketsSent
Lnet/minecraft/network/ClientConnection;getAveragePacketsSent()F
-