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 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 TypeMethodDescriptionprotected Screen
createDisconnectScreen
(Component p_299787_) void
protected abstract void
handleCustomPayload
(CustomPacketPayload p_297976_) void
handleDisconnect
(ClientboundDisconnectPacket p_298016_) void
handleKeepAlive
(ClientboundKeepAlivePacket p_301155_) void
handlePing
(ClientboundPingPacket p_300922_) void
handleResourcePack
(ClientboundResourcePackPacket p_300555_) void
handleUpdateTags
(ClientboundUpdateTagsPacket p_299537_) void
onDisconnect
(Component p_298766_) private void
packApplicationCallback
(CompletableFuture<?> p_297539_) private static URL
parseResourcePackUrl
(String p_298850_) private static Component
preparePackPrompt
(Component p_299226_, Component p_298885_) protected abstract RegistryAccess.Frozen
private void
send
(ServerboundResourcePackPacket.Action p_299758_) void
protected void
private void
sendWhen
(Packet<? extends ServerboundPacketListener> p_300852_, BooleanSupplier p_299754_, Duration p_299011_) private void
showServerPackPrompt
(URL p_299293_, String p_297795_, boolean p_297484_, Component p_300186_) 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
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
-
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_301094_, TagNetworkSerialization.NetworkPayload p_297701_) -
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_300852_, BooleanSupplier p_299754_, Duration p_299011_)
-