net.minecraft.network

public class Connection

extends io.netty.channel.SimpleChannelInboundHandler<Packet<?>>

ug
net.minecraft.network.Connection
net.minecraft.class_2535
net.minecraft.network.ClientConnection
net.minecraft.src.C_4961_
net.minecraft.network.NetworkManager

Field summary

Modifier and TypeField
private static final float
j
AVERAGE_PACKETS_SMOOTHING
field_33280
CURRENT_PACKET_COUNTER_WEIGHT
f_178299_
private static final org.slf4j.Logger
k
LOGGER
field_11642
LOGGER
f_129465_
public static final org.slf4j.Marker
a
ROOT_MARKER
field_11641
NETWORK_MARKER
f_129459_
public static final org.slf4j.Marker
b
PACKET_MARKER
field_11639
NETWORK_PACKETS_MARKER
f_129460_
public static final org.slf4j.Marker
c
PACKET_RECEIVED_MARKER
field_36379
PACKET_RECEIVED_MARKER
f_202554_
public static final org.slf4j.Marker
d
PACKET_SENT_MARKER
field_36380
PACKET_SENT_MARKER
f_202555_
public static final io.netty.util.AttributeKey<ConnectionProtocol$CodecData<?>>
e
ATTRIBUTE_SERVERBOUND_PROTOCOL
field_45666
SERVERBOUND_PROTOCOL_KEY
f_290984_
public static final io.netty.util.AttributeKey<ConnectionProtocol$CodecData<?>>
f
ATTRIBUTE_CLIENTBOUND_PROTOCOL
field_45667
CLIENTBOUND_PROTOCOL_KEY
f_291426_
public static final Supplier<io.netty.channel.nio.NioEventLoopGroup>
g
NETWORK_WORKER_GROUP
field_11650
CLIENT_IO_GROUP
f_129462_
public static final Supplier<io.netty.channel.epoll.EpollEventLoopGroup>
h
NETWORK_EPOLL_WORKER_GROUP
field_11657
EPOLL_CLIENT_IO_GROUP
f_129463_
public static final Supplier<io.netty.channel.DefaultEventLoopGroup>
i
LOCAL_WORKER_GROUP
field_11649
LOCAL_CLIENT_IO_GROUP
f_129464_
private final PacketFlow
l
receiving
field_11643
side
f_129466_
private final Queue<Consumer<Connection>>
m
pendingActions
field_45668
queuedTasks
f_290881_
private io.netty.channel.Channel
n
channel
field_11651
channel
f_129468_
private SocketAddress
o
address
field_11645
address
f_129469_
private volatile PacketListener
p
disconnectListener
field_45669
prePlayStateListener
f_290681_
private volatile PacketListener
q
packetListener
field_11652
packetListener
f_129470_
private Component
r
disconnectedReason
field_11660
disconnectReason
f_129471_
private boolean
s
encrypted
field_11647
encrypted
f_129472_
private boolean
t
disconnectionHandled
field_11646
disconnected
f_129473_
private int
u
receivedPackets
field_11658
packetsReceivedCounter
f_129474_
private int
v
sentPackets
field_11656
packetsSentCounter
f_129475_
private float
w
averageReceivedPackets
field_11654
averagePacketsReceived
f_129476_
private float
x
averageSentPackets
field_11653
averagePacketsSent
f_129477_
private int
y
tickCount
field_11655
ticks
f_129478_
private boolean
z
handlingFault
field_11640
errored
f_129479_
private volatile Component
A
delayedDisconnect
field_44972
pendingDisconnectionReason
f_290021_
BandwidthDebugMonitor
B
bandwidthDebugMonitor
field_45955
packetSizeLogger
f_291520_

Constructor summary

ModifierConstructor
public (PacketFlow side)

Method summary

Modifier and TypeMethod
public void
channelActive(io.netty.channel.ChannelHandlerContext arg0)
channelActive(io.netty.channel.ChannelHandlerContext arg0)
channelActive(io.netty.channel.ChannelHandlerContext arg0)
channelActive(io.netty.channel.ChannelHandlerContext context)
channelActive(io.netty.channel.ChannelHandlerContext arg0)
public static void
a(io.netty.channel.Channel arg0)
setInitialProtocolAttributes(io.netty.channel.Channel arg0)
method_52901(io.netty.channel.Channel arg0)
setHandlers(io.netty.channel.Channel channel)
m_294111_(io.netty.channel.Channel p_300821_)
public void
channelInactive(io.netty.channel.ChannelHandlerContext arg0)
channelInactive(io.netty.channel.ChannelHandlerContext arg0)
channelInactive(io.netty.channel.ChannelHandlerContext arg0)
channelInactive(io.netty.channel.ChannelHandlerContext context)
channelInactive(io.netty.channel.ChannelHandlerContext arg0)
public void
exceptionCaught(io.netty.channel.ChannelHandlerContext arg0, Throwable arg1)
exceptionCaught(io.netty.channel.ChannelHandlerContext arg0, Throwable arg1)
exceptionCaught(io.netty.channel.ChannelHandlerContext arg0, Throwable arg1)
exceptionCaught(io.netty.channel.ChannelHandlerContext context, Throwable ex)
exceptionCaught(io.netty.channel.ChannelHandlerContext p_129534_, Throwable arg1)
protected void
a(io.netty.channel.ChannelHandlerContext arg0, xf<?> arg1)
channelRead0(io.netty.channel.ChannelHandlerContext arg0, Packet<?> arg1)
method_10770(io.netty.channel.ChannelHandlerContext arg0, class_2596<?> arg1)
channelRead0(io.netty.channel.ChannelHandlerContext arg0, Packet<?> arg1)
channelRead0(io.netty.channel.ChannelHandlerContext p_129488_, C_5028_<?> arg1)
private static <T extends PacketListener> void
a(xf<T> arg0, uo arg1)
genericsFtw(Packet<T> arg0, PacketListener arg1)
method_10759(class_2596<T> arg0, class_2547 arg1)
handlePacket(Packet<T> packet, PacketListener listener)
m_129517_(C_5028_<T> p_129518_, C_4986_ p_129519_)
public void
a()
suspendInboundAfterProtocolChange()
method_52898()
disableAutoRead()
m_294044_()
public void
b()
resumeInboundAfterProtocolChange()
method_52910()
enableAutoRead()
m_294304_()
public void
a(uo arg0)
setListener(PacketListener arg0)
method_10763(class_2547 arg0)
setPacketListener(PacketListener packetListener)
m_129505_(C_4986_ arg0)
public void
b(uo arg0)
setListenerForServerboundHandshake(PacketListener arg0)
method_52912(class_2547 arg0)
setInitialPacketListener(PacketListener packetListener)
m_294587_(C_4986_ arg0)
public void
a(String arg0, int arg1, age arg2)
initiateServerboundStatusConnection(String arg0, int arg1, ClientStatusPacketListener arg2)
method_52903(String arg0, int arg1, class_2921 arg2)
connect(String address, int port, ClientQueryPacketListener listener)
m_292894_(String p_297423_, int p_300237_, C_5213_ arg2)
public void
a(String arg0, int arg1, afm arg2)
initiateServerboundPlayConnection(String arg0, int arg1, ClientLoginPacketListener arg2)
method_52902(String arg0, int arg1, class_2896 arg2)
connect(String address, int port, ClientLoginPacketListener listener)
m_295889_(String p_297906_, int p_297708_, C_5202_ arg2)
private void
a(String arg0, int arg1, uo arg2, afi arg3)
initiateServerboundConnection(String arg0, int arg1, PacketListener arg2, ClientIntent arg3)
method_52904(String arg0, int arg1, class_2547 arg2, class_8592 arg3)
connect(String address, int port, PacketListener listener, ConnectionIntent intent)
m_295796_(String p_300598_, int p_298739_, C_4986_ p_297789_, C_290271_ arg3)
public void
a(afi arg0)
setClientboundProtocolAfterHandshake(ClientIntent arg0)
method_52899(class_8592 arg0)
setS2CPacketHandler(ConnectionIntent intent)
m_294993_(C_290271_ arg0)
public void
a(xf<?> arg0)
send(Packet<?> arg0)
method_10743(class_2596<?> arg0)
send(Packet<?> packet)
m_129512_(C_5028_<?> arg0)
public void
a(xf<?> arg0, up arg1)
send(Packet<?> arg0, PacketSendListener arg1)
method_10752(class_2596<?> arg0, class_7648 arg1)
send(Packet<?> packet, PacketCallbacks callbacks)
m_243124_(C_5028_<?> p_243316_, C_242986_ arg1)
public void
a(xf<?> arg0, up arg1, boolean arg2)
send(Packet<?> arg0, PacketSendListener arg1, boolean arg2)
method_52906(class_2596<?> arg0, class_7648 arg1, boolean arg2)
send(Packet<?> packet, PacketCallbacks callbacks, boolean flush)
m_294750_(C_5028_<?> p_300685_, C_242986_ p_298821_, boolean arg2)
public void
a(Consumer<ug> arg0)
runOnceConnected(Consumer<Connection> arg0)
method_52905(Consumer<class_2535> arg0)
submit(Consumer<ClientConnection> task)
m_295864_(Consumer<C_4961_> arg0)
private void
b(xf<?> arg0, up arg1, boolean arg2)
sendPacket(Packet<?> arg0, PacketSendListener arg1, boolean arg2)
method_10764(class_2596<?> arg0, class_7648 arg1, boolean arg2)
sendImmediately(Packet<?> packet, PacketCallbacks callbacks, boolean flush)
m_129520_(C_5028_<?> p_243246_, C_242986_ p_299777_, boolean arg2)
private void
c(xf<?> arg0, up arg1, boolean arg2)
doSendPacket(Packet<?> arg0, PacketSendListener arg1, boolean arg2)
method_36942(class_2596<?> arg0, class_7648 arg1, boolean arg2)
sendInternal(Packet<?> packet, PacketCallbacks callbacks, boolean flush)
m_243087_(C_5028_<?> p_243290_, C_242986_ p_299937_, boolean arg2)
public void
c()
flushChannel()
method_52915()
flush()
m_295610_()
private void
s()
flush()
method_52918()
flushInternal()
m_294674_()
private static io.netty.util.AttributeKey<ConnectionProtocol$CodecData<?>>
a(xg arg0)
getProtocolKey(PacketFlow arg0)
method_52908(class_2598 arg0)
getProtocolAttributeKey(NetworkSide side)
m_295397_(C_5029_ p_298298_)
private void
t()
flushQueue()
method_10751()
handleQueuedTasks()
m_129544_()
public void
d()
tick()
method_10754()
tick()
m_129483_()
protected void
e()
tickSecond()
method_30615()
updateStats()
m_7073_()
public SocketAddress
f()
getRemoteAddress()
method_10755()
getAddress()
m_129523_()
public String
a(boolean arg0)
getLoggableAddress(boolean arg0)
method_52909(boolean arg0)
getAddressAsString(boolean logIps)
m_295656_(boolean arg0)
public void
a(vf arg0)
disconnect(Component arg0)
method_10747(class_2561 arg0)
disconnect(Text disconnectReason)
m_129507_(C_4996_ arg0)
public boolean
g()
isMemoryConnection()
method_10756()
isLocal()
m_129531_()
public PacketFlow
h()
getReceiving()
method_36121()
getSide()
m_178313_()
public PacketFlow
i()
getSending()
method_36122()
getOppositeSide()
m_178314_()
public static Connection
a(InetSocketAddress arg0, boolean arg1, auy arg2)
connectToServer(InetSocketAddress arg0, boolean arg1, SampleLogger arg2)
method_10753(InetSocketAddress arg0, boolean arg1, class_8743 arg2)
connect(InetSocketAddress address, boolean useEpoll, PerformanceLog packetSizeLog)
m_178300_(InetSocketAddress p_178301_, boolean p_178302_, C_290154_ p_300093_)
public static io.netty.channel.ChannelFuture
a(InetSocketAddress arg0, boolean arg1, ug arg2)
connect(InetSocketAddress arg0, boolean arg1, Connection arg2)
method_52271(InetSocketAddress arg0, boolean arg1, class_2535 arg2)
connect(InetSocketAddress address, boolean useEpoll, ClientConnection connection)
m_290025_(InetSocketAddress p_290034_, boolean p_290035_, C_4961_ p_290031_)
public static void
a(io.netty.channel.ChannelPipeline arg0, xg arg1, ty arg2)
configureSerialization(io.netty.channel.ChannelPipeline arg0, PacketFlow arg1, BandwidthDebugMonitor arg2)
method_48311(io.netty.channel.ChannelPipeline arg0, class_2598 arg1, class_8762 arg2)
addHandlers(io.netty.channel.ChannelPipeline pipeline, NetworkSide side, PacketSizeLogger packetSizeLogger)
m_264299_(io.netty.channel.ChannelPipeline p_265436_, C_5029_ p_265104_, C_290249_ p_299297_)
public void
a(io.netty.channel.ChannelPipeline arg0)
configurePacketHandler(io.netty.channel.ChannelPipeline arg0)
method_53859(io.netty.channel.ChannelPipeline arg0)
addFlowControlHandler(io.netty.channel.ChannelPipeline pipeline)
m_295611_(io.netty.channel.ChannelPipeline arg0)
private static void
b(io.netty.channel.ChannelPipeline arg0, xg arg1)
configureInMemoryPacketValidation(io.netty.channel.ChannelPipeline arg0, PacketFlow arg1)
method_52916(io.netty.channel.ChannelPipeline arg0, class_2598 arg1)
addValidatorInternal(io.netty.channel.ChannelPipeline pipeline, NetworkSide side)
m_293223_(io.netty.channel.ChannelPipeline p_299383_, C_5029_ p_299305_)
public static void
a(io.netty.channel.ChannelPipeline arg0, xg arg1)
configureInMemoryPipeline(io.netty.channel.ChannelPipeline arg0, PacketFlow arg1)
method_52911(io.netty.channel.ChannelPipeline arg0, class_2598 arg1)
addValidator(io.netty.channel.ChannelPipeline pipeline, NetworkSide side)
m_294700_(io.netty.channel.ChannelPipeline p_298130_, C_5029_ p_298133_)
public static Connection
a(SocketAddress arg0)
connectToLocalServer(SocketAddress arg0)
method_10769(SocketAddress arg0)
connectLocal(SocketAddress address)
m_129493_(SocketAddress p_129494_)
public void
a(Cipher arg0, Cipher arg1)
setEncryptionKey(Cipher arg0, Cipher arg1)
method_10746(Cipher arg0, Cipher arg1)
setupEncryption(Cipher decryptionCipher, Cipher encryptionCipher)
m_129495_(Cipher p_129497_, Cipher arg1)
public boolean
j()
isEncrypted()
method_10771()
isEncrypted()
m_129535_()
public boolean
k()
isConnected()
method_10758()
isOpen()
m_129536_()
public boolean
l()
isConnecting()
method_10772()
isChannelAbsent()
m_129537_()
public PacketListener
m()
getPacketListener()
method_10744()
getPacketListener()
m_129538_()
public Component
n()
getDisconnectedReason()
method_10748()
getDisconnectReason()
m_129539_()
public void
o()
setReadOnly()
method_10757()
tryDisableAutoRead()
m_129540_()
public void
a(int arg0, boolean arg1)
setupCompression(int arg0, boolean arg1)
method_10760(int arg0, boolean arg1)
setCompressionThreshold(int compressionThreshold, boolean rejectsBadPackets)
m_129484_(int p_182682_, boolean arg1)
public void
p()
handleDisconnection()
method_10768()
handleDisconnection()
m_129541_()
public float
q()
getAverageReceivedPackets()
method_10762()
getAveragePacketsReceived()
m_129542_()
public float
r()
getAverageSentPackets()
method_10745()
getAveragePacketsSent()
m_129543_()
public void
a(auy arg0)
setBandwidthLogger(SampleLogger arg0)
method_53505(class_8743 arg0)
resetPacketSizeLog(PerformanceLog log)
m_292855_(C_290154_ arg0)