net.minecraft.network

public class Connection

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

vt
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
h
AVERAGE_PACKETS_SMOOTHING
field_33280
CURRENT_PACKET_COUNTER_WEIGHT
f_178299_
private static final org.slf4j.Logger
i
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 Supplier<io.netty.channel.nio.NioEventLoopGroup>
e
NETWORK_WORKER_GROUP
field_11650
CLIENT_IO_GROUP
f_129462_
public static final Supplier<io.netty.channel.epoll.EpollEventLoopGroup>
f
NETWORK_EPOLL_WORKER_GROUP
field_11657
EPOLL_CLIENT_IO_GROUP
f_129463_
public static final Supplier<io.netty.channel.DefaultEventLoopGroup>
g
LOCAL_WORKER_GROUP
field_11649
LOCAL_CLIENT_IO_GROUP
f_129464_
private static final ProtocolInfo<ServerHandshakePacketListener>
j
INITIAL_PROTOCOL
field_48514
C2S_HANDSHAKE_STATE
f_315400_
private final PacketFlow
k
receiving
field_11643
side
f_129466_
private volatile boolean
l
sendLoginDisconnect
field_48515
duringLogin
f_316930_
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 DisconnectionDetails
r
disconnectionDetails
field_52180
disconnectionInfo
f_337253_
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 DisconnectionDetails
A
delayedDisconnect
field_44972
pendingDisconnectionInfo
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 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, zg<?> 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(zg<T> arg0, wf 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_)
private void
b(wh<?> arg0, wf arg1)
validateListener(ProtocolInfo<?> arg0, PacketListener arg1)
method_56332(class_9127<?> arg0, class_2547 arg1)
setPacketListener(NetworkState<?> state, PacketListener listener)
m_318737_(C_313600_<?> p_331542_, C_4986_ arg1)
private static void
a(io.netty.channel.ChannelFuture arg0)
syncAfterConfigurationChange(io.netty.channel.ChannelFuture arg0)
method_59851(io.netty.channel.ChannelFuture arg0)
syncUninterruptibly(io.netty.channel.ChannelFuture future)
m_319552_(io.netty.channel.ChannelFuture p_330528_)
public <T extends PacketListener> void
a(wh<T> arg0, T arg1)
setupInboundProtocol(ProtocolInfo<T> arg0, T arg1)
method_56330(class_9127<T> arg0, T arg1)
transitionInbound(NetworkState<T> state, T packetListener)
m_324855_(C_313600_<T> p_330962_, T arg1)
public void
a(wh<?> arg0)
setupOutboundProtocol(ProtocolInfo<?> arg0)
method_56329(class_9127<?> arg0)
transitionOutbound(NetworkState<?> newState)
m_319763_(C_313600_<?> arg0)
public void
a(wf arg0)
setListenerForServerboundHandshake(PacketListener arg0)
method_52912(class_2547 arg0)
setInitialPacketListener(PacketListener packetListener)
m_294587_(C_4986_ arg0)
public void
a(String arg0, int arg1, ajo 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, aio 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)
public <S extends ServerboundPacketListener, C extends ClientboundPacketListener> void
a(String arg0, int arg1, wh<S> arg2, wh<C> arg3, C arg4, boolean arg5)
initiateServerboundPlayConnection(String arg0, int arg1, ProtocolInfo<S> arg2, ProtocolInfo<C> arg3, C arg4, boolean arg5)
method_56326(String arg0, int arg1, class_9127<S> arg2, class_9127<C> arg3, C arg4, boolean arg5)
connect(String address, int port, NetworkState<S> outboundState, NetworkState<C> inboundState, C prePlayStateListener, boolean transfer)
m_321635_(String p_334200_, int p_332351_, C_313600_<S> p_328002_, C_313600_<C> p_329302_, C p_331884_, boolean arg5)
private <S extends ServerboundPacketListener, C extends ClientboundPacketListener> void
a(String arg0, int arg1, wh<S> arg2, wh<C> arg3, C arg4, aii arg5)
initiateServerboundConnection(String arg0, int arg1, ProtocolInfo<S> arg2, ProtocolInfo<C> arg3, C arg4, ClientIntent arg5)
method_52904(String arg0, int arg1, class_9127<S> arg2, class_9127<C> arg3, C arg4, class_8592 arg5)
connect(String address, int port, NetworkState<S> outboundState, NetworkState<C> inboundState, C prePlayStateListener, ConnectionIntent intent)
m_295796_(String p_300598_, int p_328134_, C_313600_<S> p_329827_, C_313600_<C> p_330656_, C p_297789_, C_290271_ arg5)
public void
a(zg<?> arg0)
send(Packet<?> arg0)
method_10743(class_2596<?> arg0)
send(Packet<?> packet)
m_129512_(C_5028_<?> arg0)
public void
a(zg<?> arg0, wg 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(zg<?> arg0, wg 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<vt> arg0)
runOnceConnected(Consumer<Connection> arg0)
method_52905(Consumer<class_2535> arg0)
submit(Consumer<ClientConnection> task)
m_295864_(Consumer<C_4961_> arg0)
private void
b(zg<?> arg0, wg 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(zg<?> arg0, wg 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
a()
flushChannel()
method_52915()
flush()
m_295610_()
private void
q()
flush()
method_52918()
flushInternal()
m_294674_()
private void
r()
flushQueue()
method_10751()
handleQueuedTasks()
m_129544_()
public void
b()
tick()
method_10754()
tick()
m_129483_()
protected void
c()
tickSecond()
method_30615()
updateStats()
m_7073_()
public SocketAddress
d()
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(wz arg0)
disconnect(Component arg0)
method_10747(class_2561 arg0)
disconnect(Text disconnectReason)
m_129507_(C_4996_ arg0)
public void
a(vv arg0)
disconnect(DisconnectionDetails arg0)
method_60924(class_9812 arg0)
disconnect(DisconnectionInfo disconnectionInfo)
m_339805_(C_336456_ arg0)
public boolean
e()
isMemoryConnection()
method_10756()
isLocal()
m_129531_()
public PacketFlow
f()
getReceiving()
method_36121()
getSide()
m_178313_()
public PacketFlow
g()
getSending()
method_36122()
getOppositeSide()
m_178314_()
public static Connection
a(InetSocketAddress arg0, boolean arg1, blr arg2)
connectToServer(InetSocketAddress arg0, boolean arg1, LocalSampleLogger arg2)
method_10753(InetSocketAddress arg0, boolean arg1, class_9191 arg2)
connect(InetSocketAddress address, boolean useEpoll, MultiValueDebugSampleLogImpl packetSizeLog)
m_178300_(InetSocketAddress p_178301_, boolean p_178302_, C_313429_ p_333468_)
public static io.netty.channel.ChannelFuture
a(InetSocketAddress arg0, boolean arg1, vt 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_)
private static String
b(boolean arg0)
outboundHandlerName(boolean arg0)
method_56333(boolean arg0)
getOutboundHandlerName(boolean sendingSide)
m_323525_(boolean p_334174_)
private static String
c(boolean arg0)
inboundHandlerName(boolean arg0)
method_56334(boolean arg0)
getInboundHandlerName(boolean receivingSide)
m_323969_(boolean p_334983_)
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)
public static void
a(io.netty.channel.ChannelPipeline arg0, zh arg1, boolean arg2, vm arg3)
configureSerialization(io.netty.channel.ChannelPipeline arg0, PacketFlow arg1, boolean arg2, BandwidthDebugMonitor arg3)
method_48311(io.netty.channel.ChannelPipeline arg0, class_2598 arg1, boolean arg2, class_8762 arg3)
addHandlers(io.netty.channel.ChannelPipeline pipeline, NetworkSide side, boolean local, PacketSizeLogger packetSizeLogger)
m_264299_(io.netty.channel.ChannelPipeline p_265436_, C_5029_ p_265104_, boolean p_328504_, C_290249_ p_299297_)
private static io.netty.channel.ChannelOutboundHandler
d(boolean arg0)
createFrameEncoder(boolean arg0)
method_59853(boolean arg0)
getPrepender(boolean local)
m_322880_(boolean p_335200_)
private static io.netty.channel.ChannelInboundHandler
a(vm arg0, boolean arg1)
createFrameDecoder(BandwidthDebugMonitor arg0, boolean arg1)
method_59852(class_8762 arg0, boolean arg1)
getSplitter(PacketSizeLogger packetSizeLogger, boolean local)
m_320433_(C_290249_ p_329567_, boolean p_335874_)
public static void
a(io.netty.channel.ChannelPipeline arg0, zh arg1)
configureInMemoryPipeline(io.netty.channel.ChannelPipeline arg0, PacketFlow arg1)
method_52911(io.netty.channel.ChannelPipeline arg0, class_2598 arg1)
addLocalValidator(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
h()
isEncrypted()
method_10771()
isEncrypted()
m_129535_()
public boolean
i()
isConnected()
method_10758()
isOpen()
m_129536_()
public boolean
j()
isConnecting()
method_10772()
isChannelAbsent()
m_129537_()
public PacketListener
k()
getPacketListener()
method_10744()
getPacketListener()
m_129538_()
public DisconnectionDetails
l()
getDisconnectionDetails()
method_60926()
method_60926()
m_339542_()
public void
m()
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
n()
handleDisconnection()
method_10768()
handleDisconnection()
m_129541_()
public float
o()
getAverageReceivedPackets()
method_10762()
getAveragePacketsReceived()
m_129542_()
public float
p()
getAverageSentPackets()
method_10745()
getAveragePacketsSent()
m_129543_()
public void
a(blr arg0)
setBandwidthLogger(LocalSampleLogger arg0)
method_53505(class_9191 arg0)
resetPacketSizeLog(MultiValueDebugSampleLogImpl log)
m_292855_(C_313429_ arg0)