Package net.minecraft.network
Class ClientConnection
java.lang.Object
- All Implemented Interfaces:
ChannelHandler,ChannelInboundHandler
- Direct Known Subclasses:
RateLimitedConnection
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 intermediary net/minecraft/class_2535official sdnamed net/minecraft/network/ClientConnection
-
Nested Class Summary
Nested ClassesNested classes/interfaces inherited from interface io.netty.channel.ChannelHandler
ChannelHandler.Sharable -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate SocketAddressprivate floatprivate floatprivate Channelstatic final Lazy<NioEventLoopGroup>private static final floatRepresents when the average packet counter is updated, what percent of the value of the average counter is set from the current counter.private booleanprivate Textprivate booleanstatic final Lazy<EpollEventLoopGroup>private booleanstatic final Lazy<DefaultEventLoopGroup>private static final Loggerstatic final Markerstatic final Markerstatic final Markerstatic final Markerprivate PacketListenerprivate final Queue<ClientConnection.QueuedPacket>private intprivate intstatic final AttributeKey<NetworkState>The attribute key for the current network state of the backing netty channel.private final NetworkSideThe side this connection is to.private int -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic voidaddHandlers(ChannelPipeline pipeline, NetworkSide side) voidchannelActive(ChannelHandlerContext context) voidchannelInactive(ChannelHandlerContext context) protected voidchannelRead0(ChannelHandlerContext channelHandlerContext, Packet<?> packet) static ClientConnectionconnect(InetSocketAddress address, boolean useEpoll) static ClientConnectionconnectLocal(SocketAddress address) voidvoiddisconnect(Text disconnectReason) voidexceptionCaught(ChannelHandlerContext context, Throwable ex) floatfloatReturns the opposite side of this connection, or the direction of the packets sent by this connection.getSide()Returns the side of this connection, or the direction of the packets received by this connection.private NetworkStategetState()Returns the current network state of this connection.voidprivate static <T extends PacketListener>
voidhandlePacket(Packet<T> packet, PacketListener listener) booleanbooleanbooleanisLocal()booleanisOpen()voidvoidsend(Packet<?> packet, @Nullable PacketCallbacks callbacks) private voidsendImmediately(Packet<?> packet, @Nullable PacketCallbacks callbacks) private voidsendInternal(Packet<?> packet, @Nullable PacketCallbacks callbacks, NetworkState packetState, NetworkState currentState) private voidvoidsetCompressionThreshold(int compressionThreshold, boolean rejectsBadPackets) Sets the compression threshold of this connection.voidsetPacketListener(PacketListener listener) Sets the packet listener that will handle oncoming packets, including ones that are not yet handled by the current packet listener.voidsetState(NetworkState state) voidsetupEncryption(Cipher decryptionCipher, Cipher encryptionCipher) voidtick()protected voidMethods 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
ensureNotSharable, 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
-
CURRENT_PACKET_COUNTER_WEIGHT
private static final float CURRENT_PACKET_COUNTER_WEIGHTRepresents 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 intermediary field_33280Lnet/minecraft/class_2535;field_33280:Fofficial iLsd;i:Fnamed CURRENT_PACKET_COUNTER_WEIGHTLnet/minecraft/network/ClientConnection;CURRENT_PACKET_COUNTER_WEIGHT:F
-
LOGGER
- Mappings:
Namespace Name Mixin selector intermediary field_11642Lnet/minecraft/class_2535;field_11642:Lorg/slf4j/Logger;official jLsd;j:Lorg/slf4j/Logger;named LOGGERLnet/minecraft/network/ClientConnection;LOGGER:Lorg/slf4j/Logger;
-
NETWORK_MARKER
- Mappings:
Namespace Name Mixin selector intermediary field_11641Lnet/minecraft/class_2535;field_11641:Lorg/slf4j/Marker;official aLsd;a:Lorg/slf4j/Marker;named NETWORK_MARKERLnet/minecraft/network/ClientConnection;NETWORK_MARKER:Lorg/slf4j/Marker;
-
NETWORK_PACKETS_MARKER
- Mappings:
Namespace Name Mixin selector intermediary field_11639Lnet/minecraft/class_2535;field_11639:Lorg/slf4j/Marker;official bLsd;b:Lorg/slf4j/Marker;named NETWORK_PACKETS_MARKERLnet/minecraft/network/ClientConnection;NETWORK_PACKETS_MARKER:Lorg/slf4j/Marker;
-
PACKET_RECEIVED_MARKER
- Mappings:
Namespace Name Mixin selector intermediary field_36379Lnet/minecraft/class_2535;field_36379:Lorg/slf4j/Marker;official cLsd;c:Lorg/slf4j/Marker;named PACKET_RECEIVED_MARKERLnet/minecraft/network/ClientConnection;PACKET_RECEIVED_MARKER:Lorg/slf4j/Marker;
-
PACKET_SENT_MARKER
- Mappings:
Namespace Name Mixin selector intermediary field_36380Lnet/minecraft/class_2535;field_36380:Lorg/slf4j/Marker;official dLsd;d:Lorg/slf4j/Marker;named PACKET_SENT_MARKERLnet/minecraft/network/ClientConnection;PACKET_SENT_MARKER:Lorg/slf4j/Marker;
-
PROTOCOL_ATTRIBUTE_KEY
The attribute key for the current network state of the backing netty channel.- Mappings:
Namespace Name Mixin selector intermediary field_11648Lnet/minecraft/class_2535;field_11648:Lio/netty/util/AttributeKey;official eLsd;e:Lio/netty/util/AttributeKey;named PROTOCOL_ATTRIBUTE_KEYLnet/minecraft/network/ClientConnection;PROTOCOL_ATTRIBUTE_KEY:Lio/netty/util/AttributeKey;
-
CLIENT_IO_GROUP
- Mappings:
Namespace Name Mixin selector intermediary field_11650Lnet/minecraft/class_2535;field_11650:Lnet/minecraft/class_3528;official fLsd;f:Laov;named CLIENT_IO_GROUPLnet/minecraft/network/ClientConnection;CLIENT_IO_GROUP:Lnet/minecraft/util/Lazy;
-
EPOLL_CLIENT_IO_GROUP
- Mappings:
Namespace Name Mixin selector intermediary field_11657Lnet/minecraft/class_2535;field_11657:Lnet/minecraft/class_3528;official gLsd;g:Laov;named EPOLL_CLIENT_IO_GROUPLnet/minecraft/network/ClientConnection;EPOLL_CLIENT_IO_GROUP:Lnet/minecraft/util/Lazy;
-
LOCAL_CLIENT_IO_GROUP
- Mappings:
Namespace Name Mixin selector intermediary field_11649Lnet/minecraft/class_2535;field_11649:Lnet/minecraft/class_3528;official hLsd;h:Laov;named LOCAL_CLIENT_IO_GROUPLnet/minecraft/network/ClientConnection;LOCAL_CLIENT_IO_GROUP:Lnet/minecraft/util/Lazy;
-
side
The side this connection is to.- Mappings:
Namespace Name Mixin selector intermediary field_11643Lnet/minecraft/class_2535;field_11643:Lnet/minecraft/class_2598;official kLsd;k:Lup;named sideLnet/minecraft/network/ClientConnection;side:Lnet/minecraft/network/NetworkSide;
-
packetQueue
- Mappings:
Namespace Name Mixin selector intermediary field_11644Lnet/minecraft/class_2535;field_11644:Ljava/util/Queue;official lLsd;l:Ljava/util/Queue;named packetQueueLnet/minecraft/network/ClientConnection;packetQueue:Ljava/util/Queue;
-
channel
- Mappings:
Namespace Name Mixin selector intermediary field_11651Lnet/minecraft/class_2535;field_11651:Lio/netty/channel/Channel;official mLsd;m:Lio/netty/channel/Channel;named channelLnet/minecraft/network/ClientConnection;channel:Lio/netty/channel/Channel;
-
address
- Mappings:
Namespace Name Mixin selector intermediary field_11645Lnet/minecraft/class_2535;field_11645:Ljava/net/SocketAddress;official nLsd;n:Ljava/net/SocketAddress;named addressLnet/minecraft/network/ClientConnection;address:Ljava/net/SocketAddress;
-
packetListener
- Mappings:
Namespace Name Mixin selector intermediary field_11652Lnet/minecraft/class_2535;field_11652:Lnet/minecraft/class_2547;official oLsd;o:Lsk;named packetListenerLnet/minecraft/network/ClientConnection;packetListener:Lnet/minecraft/network/listener/PacketListener;
-
disconnectReason
- Mappings:
Namespace Name Mixin selector intermediary field_11660Lnet/minecraft/class_2535;field_11660:Lnet/minecraft/class_2561;official pLsd;p:Lsw;named disconnectReasonLnet/minecraft/network/ClientConnection;disconnectReason:Lnet/minecraft/text/Text;
-
encrypted
private boolean encrypted- Mappings:
Namespace Name Mixin selector intermediary field_11647Lnet/minecraft/class_2535;field_11647:Zofficial qLsd;q:Znamed encryptedLnet/minecraft/network/ClientConnection;encrypted:Z
-
disconnected
private boolean disconnected- Mappings:
Namespace Name Mixin selector intermediary field_11646Lnet/minecraft/class_2535;field_11646:Zofficial rLsd;r:Znamed disconnectedLnet/minecraft/network/ClientConnection;disconnected:Z
-
packetsReceivedCounter
private int packetsReceivedCounter- Mappings:
Namespace Name Mixin selector intermediary field_11658Lnet/minecraft/class_2535;field_11658:Iofficial sLsd;s:Inamed packetsReceivedCounterLnet/minecraft/network/ClientConnection;packetsReceivedCounter:I
-
packetsSentCounter
private int packetsSentCounter- Mappings:
Namespace Name Mixin selector intermediary field_11656Lnet/minecraft/class_2535;field_11656:Iofficial tLsd;t:Inamed packetsSentCounterLnet/minecraft/network/ClientConnection;packetsSentCounter:I
-
averagePacketsReceived
private float averagePacketsReceived- Mappings:
Namespace Name Mixin selector intermediary field_11654Lnet/minecraft/class_2535;field_11654:Fofficial uLsd;u:Fnamed averagePacketsReceivedLnet/minecraft/network/ClientConnection;averagePacketsReceived:F
-
averagePacketsSent
private float averagePacketsSent- Mappings:
Namespace Name Mixin selector intermediary field_11653Lnet/minecraft/class_2535;field_11653:Fofficial vLsd;v:Fnamed averagePacketsSentLnet/minecraft/network/ClientConnection;averagePacketsSent:F
-
ticks
private int ticks- Mappings:
Namespace Name Mixin selector intermediary field_11655Lnet/minecraft/class_2535;field_11655:Iofficial wLsd;w:Inamed ticksLnet/minecraft/network/ClientConnection;ticks:I
-
errored
private boolean errored- Mappings:
Namespace Name Mixin selector intermediary field_11640Lnet/minecraft/class_2535;field_11640:Zofficial xLsd;x:Znamed erroredLnet/minecraft/network/ClientConnection;errored:Z
-
-
Constructor Details
-
ClientConnection
- Mappings:
Namespace Name Mixin selector intermediary <init>Lnet/minecraft/class_2535;<init>(Lnet/minecraft/class_2598;)Vofficial <init>Lsd;<init>(Lup;)Vnamed <init>Lnet/minecraft/network/ClientConnection;<init>(Lnet/minecraft/network/NetworkSide;)V
-
-
Method Details
-
channelActive
- Specified by:
channelActivein interfaceChannelInboundHandler- Overrides:
channelActivein classChannelInboundHandlerAdapter- Throws:
Exception- Mappings:
Namespace Name Mixin selector intermediary channelActiveLnet/minecraft/class_2535;channelActive(Lio/netty/channel/ChannelHandlerContext;)Vofficial channelActiveLsd;channelActive(Lio/netty/channel/ChannelHandlerContext;)Vnamed channelActiveLnet/minecraft/network/ClientConnection;channelActive(Lio/netty/channel/ChannelHandlerContext;)V
-
setState
- Mappings:
Namespace Name Mixin selector intermediary method_10750Lnet/minecraft/class_2535;method_10750(Lnet/minecraft/class_2539;)Vofficial aLsd;a(Lse;)Vnamed setStateLnet/minecraft/network/ClientConnection;setState(Lnet/minecraft/network/NetworkState;)V
-
channelInactive
- Specified by:
channelInactivein interfaceChannelInboundHandler- Overrides:
channelInactivein classChannelInboundHandlerAdapter- Mappings:
Namespace Name Mixin selector intermediary channelInactiveLnet/minecraft/class_2535;channelInactive(Lio/netty/channel/ChannelHandlerContext;)Vofficial channelInactiveLsd;channelInactive(Lio/netty/channel/ChannelHandlerContext;)Vnamed channelInactiveLnet/minecraft/network/ClientConnection;channelInactive(Lio/netty/channel/ChannelHandlerContext;)V
-
exceptionCaught
- Specified by:
exceptionCaughtin interfaceChannelHandler- Specified by:
exceptionCaughtin interfaceChannelInboundHandler- Overrides:
exceptionCaughtin classChannelInboundHandlerAdapter- Mappings:
Namespace Name Mixin selector intermediary exceptionCaughtLnet/minecraft/class_2535;exceptionCaught(Lio/netty/channel/ChannelHandlerContext;Ljava/lang/Throwable;)Vofficial exceptionCaughtLsd;exceptionCaught(Lio/netty/channel/ChannelHandlerContext;Ljava/lang/Throwable;)Vnamed exceptionCaughtLnet/minecraft/network/ClientConnection;exceptionCaught(Lio/netty/channel/ChannelHandlerContext;Ljava/lang/Throwable;)V
-
channelRead0
- Specified by:
channelRead0in classSimpleChannelInboundHandler<Packet<?>>- Mappings:
Namespace Name Mixin selector intermediary method_10770Lnet/minecraft/class_2535;method_10770(Lio/netty/channel/ChannelHandlerContext;Lnet/minecraft/class_2596;)Vofficial aLsd;a(Lio/netty/channel/ChannelHandlerContext;Luo;)Vnamed channelRead0Lnet/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 intermediary method_10759Lnet/minecraft/class_2535;method_10759(Lnet/minecraft/class_2596;Lnet/minecraft/class_2547;)Vofficial aLsd;a(Luo;Lsk;)Vnamed handlePacketLnet/minecraft/network/ClientConnection;handlePacket(Lnet/minecraft/network/packet/Packet;Lnet/minecraft/network/listener/PacketListener;)V
-
setPacketListener
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 intermediary method_10763Lnet/minecraft/class_2535;method_10763(Lnet/minecraft/class_2547;)Vofficial aLsd;a(Lsk;)Vnamed setPacketListenerLnet/minecraft/network/ClientConnection;setPacketListener(Lnet/minecraft/network/listener/PacketListener;)V
-
send
- Mappings:
Namespace Name Mixin selector intermediary method_10743Lnet/minecraft/class_2535;method_10743(Lnet/minecraft/class_2596;)Vofficial aLsd;a(Luo;)Vnamed sendLnet/minecraft/network/ClientConnection;send(Lnet/minecraft/network/packet/Packet;)V
-
send
- Mappings:
Namespace Name Mixin selector intermediary method_10752Lnet/minecraft/class_2535;method_10752(Lnet/minecraft/class_2596;Lnet/minecraft/class_7648;)Vofficial aLsd;a(Luo;Lsl;)Vnamed sendLnet/minecraft/network/ClientConnection;send(Lnet/minecraft/network/packet/Packet;Lnet/minecraft/network/PacketCallbacks;)V
-
sendImmediately
- Mappings:
Namespace Name Mixin selector intermediary method_10764Lnet/minecraft/class_2535;method_10764(Lnet/minecraft/class_2596;Lnet/minecraft/class_7648;)Vofficial bLsd;b(Luo;Lsl;)Vnamed sendImmediatelyLnet/minecraft/network/ClientConnection;sendImmediately(Lnet/minecraft/network/packet/Packet;Lnet/minecraft/network/PacketCallbacks;)V
-
sendInternal
private void sendInternal(Packet<?> packet, @Nullable @Nullable PacketCallbacks callbacks, NetworkState packetState, NetworkState currentState) - Mappings:
Namespace Name Mixin selector intermediary method_36942Lnet/minecraft/class_2535;method_36942(Lnet/minecraft/class_2596;Lnet/minecraft/class_7648;Lnet/minecraft/class_2539;Lnet/minecraft/class_2539;)Vofficial aLsd;a(Luo;Lsl;Lse;Lse;)Vnamed sendInternalLnet/minecraft/network/ClientConnection;sendInternal(Lnet/minecraft/network/packet/Packet;Lnet/minecraft/network/PacketCallbacks;Lnet/minecraft/network/NetworkState;Lnet/minecraft/network/NetworkState;)V
-
getState
Returns the current network state of this connection.- Mappings:
Namespace Name Mixin selector intermediary method_32306Lnet/minecraft/class_2535;method_32306()Lnet/minecraft/class_2539;official pLsd;p()Lse;named getStateLnet/minecraft/network/ClientConnection;getState()Lnet/minecraft/network/NetworkState;
-
sendQueuedPackets
private void sendQueuedPackets()- Mappings:
Namespace Name Mixin selector intermediary method_10751Lnet/minecraft/class_2535;method_10751()Vofficial qLsd;q()Vnamed sendQueuedPacketsLnet/minecraft/network/ClientConnection;sendQueuedPackets()V
-
tick
public void tick()- Mappings:
Namespace Name Mixin selector intermediary method_10754Lnet/minecraft/class_2535;method_10754()Vofficial aLsd;a()Vnamed tickLnet/minecraft/network/ClientConnection;tick()V
-
updateStats
protected void updateStats()- Mappings:
Namespace Name Mixin selector intermediary method_30615Lnet/minecraft/class_2535;method_30615()Vofficial bLsd;b()Vnamed updateStatsLnet/minecraft/network/ClientConnection;updateStats()V
-
getAddress
- Mappings:
Namespace Name Mixin selector intermediary method_10755Lnet/minecraft/class_2535;method_10755()Ljava/net/SocketAddress;official cLsd;c()Ljava/net/SocketAddress;named getAddressLnet/minecraft/network/ClientConnection;getAddress()Ljava/net/SocketAddress;
-
disconnect
- Mappings:
Namespace Name Mixin selector intermediary method_10747Lnet/minecraft/class_2535;method_10747(Lnet/minecraft/class_2561;)Vofficial aLsd;a(Lsw;)Vnamed disconnectLnet/minecraft/network/ClientConnection;disconnect(Lnet/minecraft/text/Text;)V
-
isLocal
public boolean isLocal()- Mappings:
Namespace Name Mixin selector intermediary method_10756Lnet/minecraft/class_2535;method_10756()Zofficial dLsd;d()Znamed isLocalLnet/minecraft/network/ClientConnection;isLocal()Z
-
getSide
Returns the side of this connection, or the direction of the packets received by this connection.- Mappings:
Namespace Name Mixin selector intermediary method_36121Lnet/minecraft/class_2535;method_36121()Lnet/minecraft/class_2598;official eLsd;e()Lup;named getSideLnet/minecraft/network/ClientConnection;getSide()Lnet/minecraft/network/NetworkSide;
-
getOppositeSide
Returns the opposite side of this connection, or the direction of the packets sent by this connection.- Mappings:
Namespace Name Mixin selector intermediary method_36122Lnet/minecraft/class_2535;method_36122()Lnet/minecraft/class_2598;official fLsd;f()Lup;named getOppositeSideLnet/minecraft/network/ClientConnection;getOppositeSide()Lnet/minecraft/network/NetworkSide;
-
connect
- Mappings:
Namespace Name Mixin selector intermediary method_10753Lnet/minecraft/class_2535;method_10753(Ljava/net/InetSocketAddress;Z)Lnet/minecraft/class_2535;official aLsd;a(Ljava/net/InetSocketAddress;Z)Lsd;named connectLnet/minecraft/network/ClientConnection;connect(Ljava/net/InetSocketAddress;Z)Lnet/minecraft/network/ClientConnection;
-
addHandlers
- Mappings:
Namespace Name Mixin selector intermediary method_48311Lnet/minecraft/class_2535;method_48311(Lio/netty/channel/ChannelPipeline;Lnet/minecraft/class_2598;)Vofficial aLsd;a(Lio/netty/channel/ChannelPipeline;Lup;)Vnamed addHandlersLnet/minecraft/network/ClientConnection;addHandlers(Lio/netty/channel/ChannelPipeline;Lnet/minecraft/network/NetworkSide;)V
-
connectLocal
- Mappings:
Namespace Name Mixin selector intermediary method_10769Lnet/minecraft/class_2535;method_10769(Ljava/net/SocketAddress;)Lnet/minecraft/class_2535;official aLsd;a(Ljava/net/SocketAddress;)Lsd;named connectLocalLnet/minecraft/network/ClientConnection;connectLocal(Ljava/net/SocketAddress;)Lnet/minecraft/network/ClientConnection;
-
setupEncryption
- Mappings:
Namespace Name Mixin selector intermediary method_10746Lnet/minecraft/class_2535;method_10746(Ljavax/crypto/Cipher;Ljavax/crypto/Cipher;)Vofficial aLsd;a(Ljavax/crypto/Cipher;Ljavax/crypto/Cipher;)Vnamed setupEncryptionLnet/minecraft/network/ClientConnection;setupEncryption(Ljavax/crypto/Cipher;Ljavax/crypto/Cipher;)V
-
isEncrypted
public boolean isEncrypted()- Mappings:
Namespace Name Mixin selector intermediary method_10771Lnet/minecraft/class_2535;method_10771()Zofficial gLsd;g()Znamed isEncryptedLnet/minecraft/network/ClientConnection;isEncrypted()Z
-
isOpen
public boolean isOpen()- Mappings:
Namespace Name Mixin selector intermediary method_10758Lnet/minecraft/class_2535;method_10758()Zofficial hLsd;h()Znamed isOpenLnet/minecraft/network/ClientConnection;isOpen()Z
-
isChannelAbsent
public boolean isChannelAbsent()- Mappings:
Namespace Name Mixin selector intermediary method_10772Lnet/minecraft/class_2535;method_10772()Zofficial iLsd;i()Znamed isChannelAbsentLnet/minecraft/network/ClientConnection;isChannelAbsent()Z
-
getPacketListener
- Mappings:
Namespace Name Mixin selector intermediary method_10744Lnet/minecraft/class_2535;method_10744()Lnet/minecraft/class_2547;official jLsd;j()Lsk;named getPacketListenerLnet/minecraft/network/ClientConnection;getPacketListener()Lnet/minecraft/network/listener/PacketListener;
-
getDisconnectReason
- Mappings:
Namespace Name Mixin selector intermediary method_10748Lnet/minecraft/class_2535;method_10748()Lnet/minecraft/class_2561;official kLsd;k()Lsw;named getDisconnectReasonLnet/minecraft/network/ClientConnection;getDisconnectReason()Lnet/minecraft/text/Text;
-
disableAutoRead
public void disableAutoRead()- Mappings:
Namespace Name Mixin selector intermediary method_10757Lnet/minecraft/class_2535;method_10757()Vofficial lLsd;l()Vnamed disableAutoReadLnet/minecraft/network/ClientConnection;disableAutoRead()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
0byte 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 bytesrejectsBadPackets- whether this connection may abort if a compressed packet with a bad size is received- Mappings:
Namespace Name Mixin selector intermediary method_10760Lnet/minecraft/class_2535;method_10760(IZ)Vofficial aLsd;a(IZ)Vnamed setCompressionThresholdLnet/minecraft/network/ClientConnection;setCompressionThreshold(IZ)V
-
handleDisconnection
public void handleDisconnection()- Mappings:
Namespace Name Mixin selector intermediary method_10768Lnet/minecraft/class_2535;method_10768()Vofficial mLsd;m()Vnamed handleDisconnectionLnet/minecraft/network/ClientConnection;handleDisconnection()V
-
getAveragePacketsReceived
public float getAveragePacketsReceived()- Mappings:
Namespace Name Mixin selector intermediary method_10762Lnet/minecraft/class_2535;method_10762()Fofficial nLsd;n()Fnamed getAveragePacketsReceivedLnet/minecraft/network/ClientConnection;getAveragePacketsReceived()F
-
getAveragePacketsSent
public float getAveragePacketsSent()- Mappings:
Namespace Name Mixin selector intermediary method_10745Lnet/minecraft/class_2535;method_10745()Fofficial oLsd;o()Fnamed getAveragePacketsSentLnet/minecraft/network/ClientConnection;getAveragePacketsSent()F
-