Package net.minecraft.network.listener
Interface PacketListener
- All Known Subinterfaces:
ClientCommonPacketListener
,ClientConfigurationPacketListener
,ClientCookieRequestPacketListener
,ClientLoginPacketListener
,ClientPacketListener
,ClientPingResultPacketListener
,ClientPlayPacketListener
,ClientQueryPacketListener
,ServerCommonPacketListener
,ServerConfigurationPacketListener
,ServerCookieResponsePacketListener
,ServerCrashSafePacketListener
,ServerHandshakePacketListener
,ServerLoginPacketListener
,ServerPacketListener
,ServerPlayPacketListener
,ServerQueryPacketListener
,ServerQueryPingPacketListener
,TickablePacketListener
- All Known Implementing Classes:
ClientCommonNetworkHandler
,ClientConfigurationNetworkHandler
,ClientLoginNetworkHandler
,ClientPlayNetworkHandler
,LocalServerHandshakeNetworkHandler
,ServerCommonNetworkHandler
,ServerConfigurationNetworkHandler
,ServerHandshakeNetworkHandler
,ServerLoginNetworkHandler
,ServerPlayNetworkHandler
,ServerQueryNetworkHandler
public interface PacketListener
A packet listener listens to packets on a connection.
Its listener methods will be called on the netty event loop than the client or server game engine threads.
- Mappings:
Namespace Name named net/minecraft/network/listener/PacketListener
intermediary net/minecraft/class_2547
official wv
-
Method Summary
Modifier and TypeMethodDescriptiondefault boolean
default void
default void
fillCrashReport
(CrashReport report) getPhase()
getSide()
boolean
void
onDisconnected
(Text reason) Called when the connection this listener listens to has disconnected.default void
onPacketException
(Packet packet, Exception exception)
-
Method Details
-
getSide
NetworkSide getSide()- Mappings:
Namespace Name Mixin selector named getSide
Lnet/minecraft/network/listener/PacketListener;getSide()Lnet/minecraft/network/NetworkSide;
intermediary method_52895
Lnet/minecraft/class_2547;method_52895()Lnet/minecraft/class_2598;
official a
Lwv;a()Lzx;
-
getPhase
NetworkPhase getPhase()- Mappings:
Namespace Name Mixin selector named getPhase
Lnet/minecraft/network/listener/PacketListener;getPhase()Lnet/minecraft/network/NetworkPhase;
intermediary method_52280
Lnet/minecraft/class_2547;method_52280()Lnet/minecraft/class_2539;
official b
Lwv;b()Lwl;
-
onDisconnected
Called when the connection this listener listens to has disconnected. Can be used to display the disconnection reason.- Parameters:
reason
- the reason of disconnection; may be a generic message- Mappings:
Namespace Name Mixin selector named onDisconnected
Lnet/minecraft/network/listener/PacketListener;onDisconnected(Lnet/minecraft/text/Text;)V
intermediary method_10839
Lnet/minecraft/class_2547;method_10839(Lnet/minecraft/class_2561;)V
official a
Lwv;a(Lxp;)V
-
onPacketException
- Throws:
CrashException
- Mappings:
Namespace Name Mixin selector named onPacketException
Lnet/minecraft/network/listener/PacketListener;onPacketException(Lnet/minecraft/network/packet/Packet;Ljava/lang/Exception;)V
intermediary method_59807
Lnet/minecraft/class_2547;method_59807(Lnet/minecraft/class_2596;Ljava/lang/Exception;)V
official a
Lwv;a(Lzw;Ljava/lang/Exception;)V
-
isConnectionOpen
boolean isConnectionOpen()- Mappings:
Namespace Name Mixin selector named isConnectionOpen
Lnet/minecraft/network/listener/PacketListener;isConnectionOpen()Z
intermediary method_48106
Lnet/minecraft/class_2547;method_48106()Z
official c
Lwv;c()Z
-
accepts
- Mappings:
Namespace Name Mixin selector named accepts
Lnet/minecraft/network/listener/PacketListener;accepts(Lnet/minecraft/network/packet/Packet;)Z
intermediary method_52413
Lnet/minecraft/class_2547;method_52413(Lnet/minecraft/class_2596;)Z
official a
Lwv;a(Lzw;)Z
-
fillCrashReport
- Mappings:
Namespace Name Mixin selector named fillCrashReport
Lnet/minecraft/network/listener/PacketListener;fillCrashReport(Lnet/minecraft/util/crash/CrashReport;)V
intermediary method_55622
Lnet/minecraft/class_2547;method_55622(Lnet/minecraft/class_128;)V
official a
Lwv;a(Lo;)V
-
addCustomCrashReportInfo
- Mappings:
Namespace Name Mixin selector named addCustomCrashReportInfo
Lnet/minecraft/network/listener/PacketListener;addCustomCrashReportInfo(Lnet/minecraft/util/crash/CrashReportSection;)V
intermediary method_55597
Lnet/minecraft/class_2547;method_55597(Lnet/minecraft/class_129;)V
official a
Lwv;a(Lp;)V
-