Interface ServerCrashSafePacketListener

All Superinterfaces:
PacketListener, ServerPacketListener
All Known Subinterfaces:
ServerCommonPacketListener, ServerConfigurationPacketListener, ServerCookieResponsePacketListener, ServerHandshakePacketListener, ServerLoginPacketListener, ServerPlayPacketListener, ServerQueryPacketListener
All Known Implementing Classes:
LocalServerHandshakeNetworkHandler, ServerCommonNetworkHandler, ServerConfigurationNetworkHandler, ServerHandshakeNetworkHandler, ServerLoginNetworkHandler, ServerPlayNetworkHandler, ServerQueryNetworkHandler

public interface ServerCrashSafePacketListener extends ServerPacketListener
The interface for serverbound packet listeners.
Implementation Note:
Serverbound packet listeners log any uncaught exceptions without crashing.
Mappings:
Namespace Name
named net/minecraft/network/listener/ServerCrashSafePacketListener
intermediary net/minecraft/class_6857
official agt
  • Method Details

    • shouldCrashOnException

      default boolean shouldCrashOnException()
      Returns whether uncaught exceptions in main thread should crash the game instead of logging and ignoring them.
      Specified by:
      shouldCrashOnException in interface PacketListener
      Returns:
      whether uncaught exceptions in main thread should crash the game instead of logging and ignoring them
      See Also:
      API Note:
      This only affects the processing on the main thread done by calling methods in NetworkThreadUtils. Uncaught exceptions in other threads or processing in the main thread using the client.execute(() -> {}) code will be unaffected, and always gets logged without crashing.
      Implementation Note:
      This is true by default.
      Mappings:
      Namespace Name Mixin selector
      named shouldCrashOnException Lnet/minecraft/network/listener/PacketListener;shouldCrashOnException()Z
      intermediary method_40065 Lnet/minecraft/class_2547;method_40065()Z
      official d Lwr;d()Z