Package net.minecraft.client.multiplayer
Class ClientCommonPacketListenerImpl
java.lang.Object
net.minecraft.client.multiplayer.ClientCommonPacketListenerImpl
- All Implemented Interfaces:
ClientboundPacketListener
,PacketListener
,ClientCommonPacketListener
- 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
private static final org.slf4j.Logger
protected final Minecraft
protected final Screen
protected String
protected final ServerData
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
handleUpdateTags
(ClientboundUpdateTagsPacket p_299537_) void
onDisconnect
(Component p_298766_) private static URL
parseResourcePackUrl
(String p_298850_) (package private) static Component
preparePackPrompt
(Component p_299226_, Component p_298885_) protected abstract RegistryAccess.Frozen
void
protected void
private void
sendWhen
(Packet<? extends ServerboundPacketListener> p_300852_, BooleanSupplier p_299754_, Duration p_299011_) private <T> void
updateTagsForRegistry
(ResourceKey<? extends Registry<? extends T>> p_301094_, TagNetworkSerialization.NetworkPayload p_297701_) 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.PacketListener
fillCrashReport, isAcceptingMessages, protocol, shouldHandleMessage, shouldPropagateHandlingExceptions
-
Field Details
-
GENERIC_DISCONNECT_MESSAGE
-
LOGGER
private static final org.slf4j.Logger LOGGER -
minecraft
-
connection
-
serverData
-
serverBrand
-
telemetryManager
-
postDisconnectScreen
-
deferredPackets
-
-
Constructor Details
-
ClientCommonPacketListenerImpl
protected ClientCommonPacketListenerImpl(Minecraft p_300051_, Connection p_300688_, CommonListenerCookie p_300429_)
-
-
Method Details
-
handleKeepAlive
- Specified by:
handleKeepAlive
in interfaceClientCommonPacketListener
-
handlePing
- Specified by:
handlePing
in interfaceClientCommonPacketListener
-
handleCustomPayload
- Specified by:
handleCustomPayload
in interfaceClientCommonPacketListener
-
handleCustomPayload
-
registryAccess
-
handleResourcePackPush
- Specified by:
handleResourcePackPush
in interfaceClientCommonPacketListener
-
handleResourcePackPop
- Specified by:
handleResourcePackPop
in interfaceClientCommonPacketListener
-
preparePackPrompt
-
parseResourcePackUrl
-
handleUpdateTags
- Specified by:
handleUpdateTags
in interfaceClientCommonPacketListener
-
updateTagsForRegistry
private <T> void updateTagsForRegistry(ResourceKey<? extends Registry<? extends T>> p_301094_, TagNetworkSerialization.NetworkPayload p_297701_) -
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
-