Package net.minecraft.client.multiplayer
Class ClientCommonPacketListenerImpl
java.lang.Object
net.minecraft.client.multiplayer.ClientCommonPacketListenerImpl
- All Implemented Interfaces:
ClientboundPacketListener
,PacketListener
,ClientCommonPacketListener
,ClientCookiePacketListener
- Direct Known Subclasses:
ClientConfigurationPacketListenerImpl
,ClientPacketListener
public abstract class ClientCommonPacketListenerImpl
extends Object
implements ClientCommonPacketListener
-
Nested Class Summary
Modifier and TypeClassDescription(package private) static final record
(package private) class
-
Field Summary
Modifier and TypeFieldDescriptionprotected final Connection
private final List
<ClientCommonPacketListenerImpl.DeferredPacket> private static final Component
protected boolean
private static final org.slf4j.Logger
protected final Minecraft
protected final Screen
protected String
protected final Map
<ResourceLocation, byte[]> protected final ServerData
protected final boolean
Deprecated, for removal: This API element is subject to removal in a future version.protected final WorldSessionTelemetryManager
-
Constructor Summary
ModifierConstructorDescriptionprotected
ClientCommonPacketListenerImpl
(Minecraft p_300051_, Connection p_300688_, CommonListenerCookie p_300429_) -
Method Summary
Modifier and TypeMethodDescriptionprivate Screen
addOrUpdatePackPrompt
(UUID p_313077_, URL p_312880_, String p_309420_, boolean p_312218_, Component p_309535_) protected Screen
createDisconnectScreen
(Component p_299787_) void
void
protected abstract void
handleCustomPayload
(CustomPacketPayload p_297976_) void
handleDisconnect
(ClientboundDisconnectPacket p_298016_) void
handleKeepAlive
(ClientboundKeepAlivePacket p_301155_) void
handlePing
(ClientboundPingPacket p_300922_) void
void
void
void
handleStoreCookie
(ClientboundStoreCookiePacket p_333290_) void
handleTransfer
(ClientboundTransferPacket p_332424_) void
onDisconnect
(Component p_298766_) void
onPacketError
(Packet p_333124_, Exception p_332903_) private static URL
parseResourcePackUrl
(String p_298850_) (package private) static Component
preparePackPrompt
(Component p_299226_, Component p_298885_) void
protected void
private void
sendWhen
(Packet<? extends ServerboundPacketListener> p_300852_, BooleanSupplier p_299754_, Duration p_299011_) boolean
shouldHandleMessage
(Packet<?> p_332498_) Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface net.minecraft.network.ClientboundPacketListener
flow
Methods inherited from interface net.minecraft.network.protocol.common.ClientCommonPacketListener
handleUpdateTags
Methods inherited from interface net.minecraft.network.PacketListener
fillCrashReport, isAcceptingMessages, protocol
-
Field Details
-
GENERIC_DISCONNECT_MESSAGE
-
LOGGER
private static final org.slf4j.Logger LOGGER -
minecraft
-
connection
-
serverData
-
serverBrand
-
telemetryManager
-
postDisconnectScreen
-
isTransferring
protected boolean isTransferring -
strictErrorHandling
Deprecated, for removal: This API element is subject to removal in a future version. -
deferredPackets
-
serverCookies
-
-
Constructor Details
-
ClientCommonPacketListenerImpl
protected ClientCommonPacketListenerImpl(Minecraft p_300051_, Connection p_300688_, CommonListenerCookie p_300429_)
-
-
Method Details
-
onPacketError
- Specified by:
onPacketError
in interfacePacketListener
-
shouldHandleMessage
- Specified by:
shouldHandleMessage
in interfacePacketListener
-
handleKeepAlive
- Specified by:
handleKeepAlive
in interfaceClientCommonPacketListener
-
handlePing
- Specified by:
handlePing
in interfaceClientCommonPacketListener
-
handleCustomPayload
- Specified by:
handleCustomPayload
in interfaceClientCommonPacketListener
-
handleCustomPayload
-
handleResourcePackPush
- Specified by:
handleResourcePackPush
in interfaceClientCommonPacketListener
-
handleResourcePackPop
- Specified by:
handleResourcePackPop
in interfaceClientCommonPacketListener
-
preparePackPrompt
-
parseResourcePackUrl
-
handleRequestCookie
- Specified by:
handleRequestCookie
in interfaceClientCookiePacketListener
-
handleStoreCookie
- Specified by:
handleStoreCookie
in interfaceClientCommonPacketListener
-
handleTransfer
- Specified by:
handleTransfer
in interfaceClientCommonPacketListener
-
handleDisconnect
- Specified by:
handleDisconnect
in interfaceClientCommonPacketListener
-
sendDeferredPackets
protected void sendDeferredPackets() -
send
-
onDisconnect
- Specified by:
onDisconnect
in interfacePacketListener
-
fillListenerSpecificCrashDetails
- Specified by:
fillListenerSpecificCrashDetails
in interfacePacketListener
-
createDisconnectScreen
-
serverBrand
-
sendWhen
private void sendWhen(Packet<? extends ServerboundPacketListener> p_300852_, BooleanSupplier p_299754_, Duration p_299011_) -
addOrUpdatePackPrompt
-