Package net.minecraft.network.listener
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
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/ServerCrashSafePacketListenerintermediary net/minecraft/class_6857official agt
-
Method Summary
Modifier and TypeMethodDescriptiondefault booleanReturns whether uncaught exceptions in main thread should crash the game instead of logging and ignoring them.Methods inherited from interface net.minecraft.network.listener.PacketListener
accepts, addCustomCrashReportInfo, fillCrashReport, getPhase, isConnectionOpen, onDisconnectedMethods inherited from interface net.minecraft.network.listener.ServerPacketListener
getSide
-
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:
shouldCrashOnExceptionin interfacePacketListener- 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 theclient.execute(() -> {})code will be unaffected, and always gets logged without crashing. - Implementation Note:
- This is
trueby default. - Mappings:
Namespace Name Mixin selector named shouldCrashOnExceptionLnet/minecraft/network/listener/PacketListener;shouldCrashOnException()Zintermediary method_40065Lnet/minecraft/class_2547;method_40065()Zofficial dLwr;d()Z
-