mirror of https://github.com/FabricMC/yarn.git
31 lines
1.5 KiB
Plaintext
31 lines
1.5 KiB
Plaintext
CLASS net/minecraft/class_2547 net/minecraft/network/listener/PacketListener
|
|
COMMENT A packet listener listens to packets on a {@linkplain ClientConnection
|
|
COMMENT connection}.
|
|
COMMENT
|
|
COMMENT <p>Its listener methods will be called on the netty event loop than the
|
|
COMMENT client or server game engine threads.
|
|
METHOD method_10839 onDisconnected (Lnet/minecraft/class_2561;)V
|
|
COMMENT Called when the connection this listener listens to has disconnected.
|
|
COMMENT Can be used to display the disconnection reason.
|
|
ARG 1 reason
|
|
COMMENT the reason of disconnection; may be a generic message
|
|
METHOD method_2872 getConnection ()Lnet/minecraft/class_2535;
|
|
COMMENT Returns the connection this packet listener intends to listen to.
|
|
COMMENT
|
|
COMMENT @apiNote The returned connection may or may not have this listener as
|
|
COMMENT its current packet listener.
|
|
COMMENT
|
|
COMMENT @see ClientConnection#getPacketListener()
|
|
METHOD method_40065 shouldCrashOnException ()Z
|
|
COMMENT {@return whether uncaught exceptions in main thread should crash the game
|
|
COMMENT instead of logging and ignoring them}
|
|
COMMENT
|
|
COMMENT @implNote This is {@code true} by default.
|
|
COMMENT
|
|
COMMENT @apiNote This only affects the processing on the main thread done by calling
|
|
COMMENT methods in {@link net.minecraft.network.NetworkThreadUtils}. Uncaught exceptions
|
|
COMMENT in other threads or processing in the main thread using the {@code client.execute(() -> {})}
|
|
COMMENT code will be unaffected, and always gets logged without crashing.
|
|
COMMENT
|
|
COMMENT @see ServerPacketListener
|