Package net.minecraft.network
Class ClientConnection
java.lang.Object
- All Implemented Interfaces:
ChannelHandler,ChannelInboundHandler
public class ClientConnection extends SimpleChannelInboundHandler<Packet>
- Mappings:
Namespace Name official ekintermediary net/minecraft/class_1432named net/minecraft/network/ClientConnection
-
Nested Class Summary
Nested Classes Modifier and Type Class Description (package private) static classClientConnection.PacketWrapperNested classes/interfaces inherited from interface io.netty.channel.ChannelHandler
ChannelHandler.Sharable -
Field Summary
Fields Modifier and Type Field Description private SocketAddressaddressstatic AttributeKey<NetworkState>ATTR_KEY_PROTOCOLprivate Channelchannelprivate booleandisconnectedprivate booleanencryptedstatic Lazy<NioEventLoopGroup>field_5955static Lazy<EpollEventLoopGroup>field_5956static Lazy<LocalEventLoopGroup>field_5957private NetworkSidefield_5959private ReentrantReadWriteLockfield_5961private PacketListenerfield_5964private Textfield_5965private static LoggerLOGGERstatic MarkerMARKER_NETWORKstatic MarkerMARKER_NETWORK_PACKETSprivate Queue<ClientConnection.PacketWrapper>packetQueue -
Constructor Summary
Constructors Constructor Description ClientConnection(NetworkSide networkSide) -
Method Summary
Modifier and Type Method Description voidchannelActive(ChannelHandlerContext channelHandlerContext)voidchannelInactive(ChannelHandlerContext channelHandlerContext)protected voidchannelRead0(ChannelHandlerContext channelHandlerContext, Packet packet)static ClientConnectionconnect(InetAddress address, int port, boolean shouldUseNativeTransport)static ClientConnectionconnectLocal(SocketAddress address)voiddisableAutoRead()voiddisconnect(Text disconnectReason)voidexceptionCaught(ChannelHandlerContext channelHandlerContext, Throwable throwable)SocketAddressgetAddress()TextgetDisconnectReason()PacketListenergetPacketListener()voidhandleDisconnection()booleanhasChannel()booleanisEncrypted()booleanisLocal()booleanisOpen()private voidmethod_5100(Packet packet, GenericFutureListener<? extends Future<? super Void>>[] genericFutureListener)voidsend(Packet packet)voidsend(Packet packet, GenericFutureListener<? extends Future<? super Void>> genericFutureListener, GenericFutureListener<? extends Future<? super Void>>[] genericFutureListener2)private voidsendQueuedPackets()voidsetCompressionThreshold(int compressionThreshold)voidsetPacketListener(PacketListener listener)voidsetState(NetworkState state)voidsetupEncryption(SecretKey secretKey)voidtick()Methods inherited from class io.netty.channel.SimpleChannelInboundHandler
acceptInboundMessage, channelReadMethods inherited from class io.netty.channel.ChannelInboundHandlerAdapter
channelReadComplete, channelRegistered, channelUnregistered, channelWritabilityChanged, userEventTriggeredMethods inherited from class io.netty.channel.ChannelHandlerAdapter
handlerAdded, handlerRemoved, isSharableMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface io.netty.channel.ChannelHandler
handlerAdded, handlerRemoved
-
Field Details
-
LOGGER
- Mappings:
Namespace Name Mixin selector official gLek;g:Lorg/apache/logging/log4j/Logger;intermediary field_5958Lnet/minecraft/class_1432;field_5958:Lorg/apache/logging/log4j/Logger;named LOGGERLnet/minecraft/network/ClientConnection;LOGGER:Lorg/apache/logging/log4j/Logger;
-
MARKER_NETWORK
- Mappings:
Namespace Name Mixin selector official aLek;a:Lorg/apache/logging/log4j/Marker;intermediary field_5952Lnet/minecraft/class_1432;field_5952:Lorg/apache/logging/log4j/Marker;named MARKER_NETWORKLnet/minecraft/network/ClientConnection;MARKER_NETWORK:Lorg/apache/logging/log4j/Marker;
-
MARKER_NETWORK_PACKETS
- Mappings:
Namespace Name Mixin selector official bLek;b:Lorg/apache/logging/log4j/Marker;intermediary field_5953Lnet/minecraft/class_1432;field_5953:Lorg/apache/logging/log4j/Marker;named MARKER_NETWORK_PACKETSLnet/minecraft/network/ClientConnection;MARKER_NETWORK_PACKETS:Lorg/apache/logging/log4j/Marker;
-
ATTR_KEY_PROTOCOL
- Mappings:
Namespace Name Mixin selector official cLek;c:Lio/netty/util/AttributeKey;intermediary field_5954Lnet/minecraft/class_1432;field_5954:Lio/netty/util/AttributeKey;named ATTR_KEY_PROTOCOLLnet/minecraft/network/ClientConnection;ATTR_KEY_PROTOCOL:Lio/netty/util/AttributeKey;
-
field_5955
- Mappings:
Namespace Name Mixin selector official dLek;d:Lno;intermediary field_5955Lnet/minecraft/class_1432;field_5955:Lnet/minecraft/class_1699;named field_5955Lnet/minecraft/network/ClientConnection;field_5955:Lnet/minecraft/util/Lazy;
-
field_5956
- Mappings:
Namespace Name Mixin selector official eLek;e:Lno;intermediary field_5956Lnet/minecraft/class_1432;field_5956:Lnet/minecraft/class_1699;named field_5956Lnet/minecraft/network/ClientConnection;field_5956:Lnet/minecraft/util/Lazy;
-
field_5957
- Mappings:
Namespace Name Mixin selector official fLek;f:Lno;intermediary field_5957Lnet/minecraft/class_1432;field_5957:Lnet/minecraft/class_1699;named field_5957Lnet/minecraft/network/ClientConnection;field_5957:Lnet/minecraft/util/Lazy;
-
field_5959
- Mappings:
Namespace Name Mixin selector official hLek;h:Lfg;intermediary field_5959Lnet/minecraft/class_1432;field_5959:Lnet/minecraft/class_1458;named field_5959Lnet/minecraft/network/ClientConnection;field_5959:Lnet/minecraft/network/NetworkSide;
-
packetQueue
- Mappings:
Namespace Name Mixin selector official iLek;i:Ljava/util/Queue;intermediary field_5960Lnet/minecraft/class_1432;field_5960:Ljava/util/Queue;named packetQueueLnet/minecraft/network/ClientConnection;packetQueue:Ljava/util/Queue;
-
field_5961
- Mappings:
Namespace Name Mixin selector official jLek;j:Ljava/util/concurrent/locks/ReentrantReadWriteLock;intermediary field_5961Lnet/minecraft/class_1432;field_5961:Ljava/util/concurrent/locks/ReentrantReadWriteLock;named field_5961Lnet/minecraft/network/ClientConnection;field_5961:Ljava/util/concurrent/locks/ReentrantReadWriteLock;
-
channel
- Mappings:
Namespace Name Mixin selector official kLek;k:Lio/netty/channel/Channel;intermediary field_5962Lnet/minecraft/class_1432;field_5962:Lio/netty/channel/Channel;named channelLnet/minecraft/network/ClientConnection;channel:Lio/netty/channel/Channel;
-
address
- Mappings:
Namespace Name Mixin selector official lLek;l:Ljava/net/SocketAddress;intermediary field_5963Lnet/minecraft/class_1432;field_5963:Ljava/net/SocketAddress;named addressLnet/minecraft/network/ClientConnection;address:Ljava/net/SocketAddress;
-
field_5964
- Mappings:
Namespace Name Mixin selector official mLek;m:Lep;intermediary field_5964Lnet/minecraft/class_1432;field_5964:Lnet/minecraft/class_1438;named field_5964Lnet/minecraft/network/ClientConnection;field_5964:Lnet/minecraft/network/listener/PacketListener;
-
field_5965
- Mappings:
Namespace Name Mixin selector official nLek;n:Leu;intermediary field_5965Lnet/minecraft/class_1432;field_5965:Lnet/minecraft/class_1444;named field_5965Lnet/minecraft/network/ClientConnection;field_5965:Lnet/minecraft/text/Text;
-
encrypted
private boolean encrypted- Mappings:
Namespace Name Mixin selector official oLek;o:Zintermediary field_5966Lnet/minecraft/class_1432;field_5966:Znamed encryptedLnet/minecraft/network/ClientConnection;encrypted:Z
-
disconnected
private boolean disconnected- Mappings:
Namespace Name Mixin selector official pLek;p:Zintermediary field_5967Lnet/minecraft/class_1432;field_5967:Znamed disconnectedLnet/minecraft/network/ClientConnection;disconnected:Z
-
-
Constructor Details
-
ClientConnection
-
-
Method Details
-
channelActive
- Specified by:
channelActivein interfaceChannelInboundHandler- Overrides:
channelActivein classChannelInboundHandlerAdapter- Throws:
Exception- Mappings:
Namespace Name Mixin selector official channelActiveLek;channelActive(Lio/netty/channel/ChannelHandlerContext;)Vintermediary channelActiveLnet/minecraft/class_1432;channelActive(Lio/netty/channel/ChannelHandlerContext;)Vnamed channelActiveLnet/minecraft/network/ClientConnection;channelActive(Lio/netty/channel/ChannelHandlerContext;)V
-
setState
- Mappings:
Namespace Name Mixin selector official aLek;a(Lel;)Vintermediary method_5095Lnet/minecraft/class_1432;method_5095(Lnet/minecraft/class_1434;)Vnamed setStateLnet/minecraft/network/ClientConnection;setState(Lnet/minecraft/network/NetworkState;)V
-
channelInactive
- Specified by:
channelInactivein interfaceChannelInboundHandler- Overrides:
channelInactivein classChannelInboundHandlerAdapter- Throws:
Exception- Mappings:
Namespace Name Mixin selector official channelInactiveLek;channelInactive(Lio/netty/channel/ChannelHandlerContext;)Vintermediary channelInactiveLnet/minecraft/class_1432;channelInactive(Lio/netty/channel/ChannelHandlerContext;)Vnamed channelInactiveLnet/minecraft/network/ClientConnection;channelInactive(Lio/netty/channel/ChannelHandlerContext;)V
-
exceptionCaught
public void exceptionCaught(ChannelHandlerContext channelHandlerContext, Throwable throwable) throws Exception- Specified by:
exceptionCaughtin interfaceChannelHandler- Specified by:
exceptionCaughtin interfaceChannelInboundHandler- Overrides:
exceptionCaughtin classChannelInboundHandlerAdapter- Throws:
Exception- Mappings:
Namespace Name Mixin selector official exceptionCaughtLek;exceptionCaught(Lio/netty/channel/ChannelHandlerContext;Ljava/lang/Throwable;)Vintermediary exceptionCaughtLnet/minecraft/class_1432;exceptionCaught(Lio/netty/channel/ChannelHandlerContext;Ljava/lang/Throwable;)Vnamed exceptionCaughtLnet/minecraft/network/ClientConnection;exceptionCaught(Lio/netty/channel/ChannelHandlerContext;Ljava/lang/Throwable;)V
-
channelRead0
protected void channelRead0(ChannelHandlerContext channelHandlerContext, Packet packet) throws Exception- Specified by:
channelRead0in classSimpleChannelInboundHandler<Packet>- Throws:
Exception- Mappings:
Namespace Name Mixin selector official aLek;a(Lio/netty/channel/ChannelHandlerContext;Lff;)Vintermediary method_5101Lnet/minecraft/class_1432;method_5101(Lio/netty/channel/ChannelHandlerContext;Lnet/minecraft/class_1457;)Vnamed channelRead0Lnet/minecraft/network/ClientConnection;channelRead0(Lio/netty/channel/ChannelHandlerContext;Lnet/minecraft/network/Packet;)V
-
setPacketListener
- Mappings:
Namespace Name Mixin selector official aLek;a(Lep;)Vintermediary method_5096Lnet/minecraft/class_1432;method_5096(Lnet/minecraft/class_1438;)Vnamed setPacketListenerLnet/minecraft/network/ClientConnection;setPacketListener(Lnet/minecraft/network/listener/PacketListener;)V
-
send
- Mappings:
Namespace Name Mixin selector official aLek;a(Lff;)Vintermediary method_5098Lnet/minecraft/class_1432;method_5098(Lnet/minecraft/class_1457;)Vnamed sendLnet/minecraft/network/ClientConnection;send(Lnet/minecraft/network/Packet;)V
-
send
public void send(Packet packet, GenericFutureListener<? extends Future<? super Void>> genericFutureListener, GenericFutureListener<? extends Future<? super Void>>[] genericFutureListener2)- Mappings:
Namespace Name Mixin selector official aLek;a(Lff;Lio/netty/util/concurrent/GenericFutureListener;[Lio/netty/util/concurrent/GenericFutureListener;)Vintermediary method_5099Lnet/minecraft/class_1432;method_5099(Lnet/minecraft/class_1457;Lio/netty/util/concurrent/GenericFutureListener;[Lio/netty/util/concurrent/GenericFutureListener;)Vnamed sendLnet/minecraft/network/ClientConnection;send(Lnet/minecraft/network/Packet;Lio/netty/util/concurrent/GenericFutureListener;[Lio/netty/util/concurrent/GenericFutureListener;)V
-
method_5100
private void method_5100(Packet packet, GenericFutureListener<? extends Future<? super Void>>[] genericFutureListener)- Mappings:
Namespace Name Mixin selector official aLek;a(Lff;[Lio/netty/util/concurrent/GenericFutureListener;)Vintermediary method_5100Lnet/minecraft/class_1432;method_5100(Lnet/minecraft/class_1457;[Lio/netty/util/concurrent/GenericFutureListener;)Vnamed method_5100Lnet/minecraft/network/ClientConnection;method_5100(Lnet/minecraft/network/Packet;[Lio/netty/util/concurrent/GenericFutureListener;)V
-
sendQueuedPackets
private void sendQueuedPackets()- Mappings:
Namespace Name Mixin selector official mLek;m()Vintermediary method_5114Lnet/minecraft/class_1432;method_5114()Vnamed sendQueuedPacketsLnet/minecraft/network/ClientConnection;sendQueuedPackets()V
-
tick
public void tick()- Mappings:
Namespace Name Mixin selector official aLek;a()Vintermediary method_5092Lnet/minecraft/class_1432;method_5092()Vnamed tickLnet/minecraft/network/ClientConnection;tick()V
-
getAddress
- Mappings:
Namespace Name Mixin selector official bLek;b()Ljava/net/SocketAddress;intermediary method_5105Lnet/minecraft/class_1432;method_5105()Ljava/net/SocketAddress;named getAddressLnet/minecraft/network/ClientConnection;getAddress()Ljava/net/SocketAddress;
-
disconnect
- Mappings:
Namespace Name Mixin selector official aLek;a(Leu;)Vintermediary method_5097Lnet/minecraft/class_1432;method_5097(Lnet/minecraft/class_1444;)Vnamed disconnectLnet/minecraft/network/ClientConnection;disconnect(Lnet/minecraft/text/Text;)V
-
isLocal
public boolean isLocal()- Mappings:
Namespace Name Mixin selector official cLek;c()Zintermediary method_5106Lnet/minecraft/class_1432;method_5106()Znamed isLocalLnet/minecraft/network/ClientConnection;isLocal()Z
-
connect
@Environment(CLIENT) public static ClientConnection connect(InetAddress address, int port, boolean shouldUseNativeTransport)- Mappings:
Namespace Name Mixin selector official aLek;a(Ljava/net/InetAddress;IZ)Lek;intermediary method_5102Lnet/minecraft/class_1432;method_5102(Ljava/net/InetAddress;IZ)Lnet/minecraft/class_1432;named connectLnet/minecraft/network/ClientConnection;connect(Ljava/net/InetAddress;IZ)Lnet/minecraft/network/ClientConnection;
-
connectLocal
- Mappings:
Namespace Name Mixin selector official aLek;a(Ljava/net/SocketAddress;)Lek;intermediary method_5103Lnet/minecraft/class_1432;method_5103(Ljava/net/SocketAddress;)Lnet/minecraft/class_1432;named connectLocalLnet/minecraft/network/ClientConnection;connectLocal(Ljava/net/SocketAddress;)Lnet/minecraft/network/ClientConnection;
-
setupEncryption
- Mappings:
Namespace Name Mixin selector official aLek;a(Ljavax/crypto/SecretKey;)Vintermediary method_5104Lnet/minecraft/class_1432;method_5104(Ljavax/crypto/SecretKey;)Vnamed setupEncryptionLnet/minecraft/network/ClientConnection;setupEncryption(Ljavax/crypto/SecretKey;)V
-
isEncrypted
- Mappings:
Namespace Name Mixin selector official fLek;f()Zintermediary method_5107Lnet/minecraft/class_1432;method_5107()Znamed isEncryptedLnet/minecraft/network/ClientConnection;isEncrypted()Z
-
isOpen
public boolean isOpen()- Mappings:
Namespace Name Mixin selector official gLek;g()Zintermediary method_5108Lnet/minecraft/class_1432;method_5108()Znamed isOpenLnet/minecraft/network/ClientConnection;isOpen()Z
-
hasChannel
public boolean hasChannel()- Mappings:
Namespace Name Mixin selector official hLek;h()Zintermediary method_5109Lnet/minecraft/class_1432;method_5109()Znamed hasChannelLnet/minecraft/network/ClientConnection;hasChannel()Z
-
getPacketListener
- Mappings:
Namespace Name Mixin selector official iLek;i()Lep;intermediary method_5110Lnet/minecraft/class_1432;method_5110()Lnet/minecraft/class_1438;named getPacketListenerLnet/minecraft/network/ClientConnection;getPacketListener()Lnet/minecraft/network/listener/PacketListener;
-
getDisconnectReason
- Mappings:
Namespace Name Mixin selector official jLek;j()Leu;intermediary method_5111Lnet/minecraft/class_1432;method_5111()Lnet/minecraft/class_1444;named getDisconnectReasonLnet/minecraft/network/ClientConnection;getDisconnectReason()Lnet/minecraft/text/Text;
-
disableAutoRead
public void disableAutoRead()- Mappings:
Namespace Name Mixin selector official kLek;k()Vintermediary method_5112Lnet/minecraft/class_1432;method_5112()Vnamed disableAutoReadLnet/minecraft/network/ClientConnection;disableAutoRead()V
-
setCompressionThreshold
public void setCompressionThreshold(int compressionThreshold)- Mappings:
Namespace Name Mixin selector official aLek;a(I)Vintermediary method_5093Lnet/minecraft/class_1432;method_5093(I)Vnamed setCompressionThresholdLnet/minecraft/network/ClientConnection;setCompressionThreshold(I)V
-
handleDisconnection
public void handleDisconnection()- Mappings:
Namespace Name Mixin selector official lLek;l()Vintermediary method_5113Lnet/minecraft/class_1432;method_5113()Vnamed handleDisconnectionLnet/minecraft/network/ClientConnection;handleDisconnection()V
-