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
-
Field Summary
Modifier and TypeFieldDescriptionfinal 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_295454_, Connection p_294773_, CommonListenerCookie p_294647_) -
Method Summary
Modifier and TypeMethodDescriptionprotected Screen
createDisconnectScreen
(Component p_296470_) void
protected abstract void
handleCustomPayload
(ClientboundCustomPayloadPacket p_295727_, CustomPacketPayload p_295776_) void
handleDisconnect
(ClientboundDisconnectPacket p_296159_) void
handleKeepAlive
(ClientboundKeepAlivePacket p_295361_) void
handlePing
(ClientboundPingPacket p_295594_) void
handleResourcePack
(ClientboundResourcePackPacket p_294620_) void
handleUpdateTags
(ClientboundUpdateTagsPacket p_294605_) void
onDisconnect
(Component p_295485_) private void
packApplicationCallback
(CompletableFuture<?> p_294183_) private static URL
parseResourcePackUrl
(String p_295495_) private static Component
preparePackPrompt
(Component p_296200_, Component p_295584_) protected abstract RegistryAccess.Frozen
private void
send
(ServerboundResourcePackPacket.Action p_296064_) void
protected void
private void
sendWhen
(Packet<? extends ServerboundPacketListener> p_296259_, BooleanSupplier p_296086_, Duration p_294812_) private void
showServerPackPrompt
(URL p_294328_, String p_295567_, boolean p_294890_, Component p_295229_) private <T> void
updateTagsForRegistry
(ResourceKey<? extends Registry<? extends T>> p_294128_, TagNetworkSerialization.NetworkPayload p_294666_) 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
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_295454_, Connection p_294773_, CommonListenerCookie p_294647_)
-
-
Method Details
-
handleKeepAlive
- Specified by:
handleKeepAlive
in interfaceClientCommonPacketListener
-
handlePing
- Specified by:
handlePing
in interfaceClientCommonPacketListener
-
handleCustomPayload
- Specified by:
handleCustomPayload
in interfaceClientCommonPacketListener
-
handleCustomPayload
protected abstract void handleCustomPayload(ClientboundCustomPayloadPacket p_295727_, CustomPacketPayload p_295776_) -
registryAccess
-
handleResourcePack
- Specified by:
handleResourcePack
in interfaceClientCommonPacketListener
-
showServerPackPrompt
-
preparePackPrompt
-
parseResourcePackUrl
-
packApplicationCallback
-
handleUpdateTags
- Specified by:
handleUpdateTags
in interfaceClientCommonPacketListener
-
updateTagsForRegistry
private <T> void updateTagsForRegistry(ResourceKey<? extends Registry<? extends T>> p_294128_, TagNetworkSerialization.NetworkPayload p_294666_) -
send
-
handleDisconnect
- Specified by:
handleDisconnect
in interfaceClientCommonPacketListener
-
sendDeferredPackets
protected void sendDeferredPackets() -
send
-
onDisconnect
- Specified by:
onDisconnect
in interfacePacketListener
-
createDisconnectScreen
-
serverBrand
-
sendWhen
private void sendWhen(Packet<? extends ServerboundPacketListener> p_296259_, BooleanSupplier p_296086_, Duration p_294812_)
-