Package net.minecraft.client.multiplayer
Class ClientPacketListener
java.lang.Object
net.minecraft.client.multiplayer.ClientPacketListener
- All Implemented Interfaces:
PacketListener,ClientGamePacketListener
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final ClientAdvancementsprivate final Screencom.mojang.brigadier.CommandDispatcher<SharedSuggestionProvider>private final Connectionprivate final DebugQueryHandlerprivate static final Componentprivate final UUIDprivate final LastSeenMessagesTrackerprivate Optional<LastSeenMessages.Entry>private ClientLevelprivate ClientLevel.ClientLevelDataprivate Set<ResourceKey<Level>>private final com.mojang.authlib.GameProfileprivate static final org.slf4j.Loggerprivate final Minecraftprivate final Map<UUID,PlayerInfo> private final RandomSourceprivate final RecipeManagerprivate RegistryAccess.Frozenprivate intprivate intprivate final SignedMessageChain.Encoderprivate final ClientSuggestionProviderprivate final ClientTelemetryManagerprivate static final intprivate intprivate static final Componentprivate static final Component -
Constructor Summary
ConstructorsConstructorDescriptionClientPacketListener(Minecraft p_194193_, Screen p_194194_, Connection p_194195_, com.mojang.authlib.GameProfile p_194196_, ClientTelemetryManager p_194197_) -
Method Summary
Modifier and TypeMethodDescriptionprivate voidapplyLightData(int p_194249_, int p_194250_, ClientboundLightUpdatePacketData p_194251_) voidcleanup()private voiddownloadCallback(CompletableFuture<?> p_104952_) private voidenableChunkLight(LevelChunk p_194213_, int p_194214_, int p_194215_) private static ItemStackcom.mojang.brigadier.CommandDispatcher<SharedSuggestionProvider>getId()getLevel()com.mojang.authlib.GameProfilegetPlayerInfo(String p_104939_) getPlayerInfo(UUID p_104950_) voidhandleAddEntity(ClientboundAddEntityPacket p_104958_) voidvoidhandleAddObjective(ClientboundSetObjectivePacket p_105100_) voidhandleAddOrRemoveRecipes(ClientboundRecipePacket p_105058_) voidhandleAddPlayer(ClientboundAddPlayerPacket p_104966_) voidhandleAnimate(ClientboundAnimatePacket p_104968_) voidhandleAwardStats(ClientboundAwardStatsPacket p_104970_) voidvoidvoidvoidhandleBlockEvent(ClientboundBlockEventPacket p_104978_) voidhandleBlockUpdate(ClientboundBlockUpdatePacket p_104980_) voidhandleBossUpdate(ClientboundBossEventPacket p_104982_) voidvoidhandleChatPreview(ClientboundChatPreviewPacket p_233700_) voidvoidhandleCommands(ClientboundCommandsPacket p_104990_) voidvoidvoidvoidvoidvoidvoidvoidvoidhandleDeleteChat(ClientboundDeleteChatPacket p_241325_) voidhandleDisconnect(ClientboundDisconnectPacket p_105008_) voidhandleEntityEvent(ClientboundEntityEventPacket p_105010_) voidvoidhandleExplosion(ClientboundExplodePacket p_105012_) voidvoidhandleGameEvent(ClientboundGameEventPacket p_105016_) voidvoidvoidhandleItemCooldown(ClientboundCooldownPacket p_105002_) voidhandleKeepAlive(ClientboundKeepAlivePacket p_105020_) voidvoidhandleLevelEvent(ClientboundLevelEventPacket p_105024_) voidvoidhandleLogin(ClientboundLoginPacket p_105030_) voidhandleLookAt(ClientboundPlayerLookAtPacket p_105054_) voidhandleMapItemData(ClientboundMapItemDataPacket p_105032_) voidvoidhandleMoveEntity(ClientboundMoveEntityPacket p_105036_) voidhandleMovePlayer(ClientboundPlayerPositionPacket p_105056_) voidhandleMoveVehicle(ClientboundMoveVehiclePacket p_105038_) voidhandleOpenBook(ClientboundOpenBookPacket p_105040_) voidhandleOpenScreen(ClientboundOpenScreenPacket p_105042_) voidvoidvoidhandlePing(ClientboundPingPacket p_171769_) voidvoidvoidhandlePlayerChat(ClientboundPlayerChatPacket p_233702_) voidvoidvoidvoidvoidhandlePlayerInfo(ClientboundPlayerInfoPacket p_105052_) voidvoidvoidhandleResourcePack(ClientboundResourcePackPacket p_105064_) voidhandleRespawn(ClientboundRespawnPacket p_105066_) voidhandleRotateMob(ClientboundRotateHeadPacket p_105068_) voidvoidhandleServerData(ClientboundServerDataPacket p_233704_) voidvoidvoidvoidvoidvoidhandleSetCamera(ClientboundSetCameraPacket p_105076_) voidvoidvoidvoidvoidvoidvoidvoidvoidhandleSetEquipment(ClientboundSetEquipmentPacket p_105094_) voidvoidhandleSetHealth(ClientboundSetHealthPacket p_105098_) voidvoidhandleSetScore(ClientboundSetScorePacket p_105106_) voidvoidvoidhandleSetTime(ClientboundSetTimePacket p_105108_) voidvoidhandleSoundEvent(ClientboundSoundPacket p_105114_) voidhandleStopSoundEvent(ClientboundStopSoundPacket p_105116_) voidhandleSystemChat(ClientboundSystemChatPacket p_233708_) voidvoidhandleTagQueryPacket(ClientboundTagQueryPacket p_105120_) voidvoidvoidhandleTitlesClear(ClientboundClearTitlesPacket p_171765_) voidvoidvoidvoidvoidhandleUpdateTags(ClientboundUpdateTagsPacket p_105134_) levels()voidmarkMessageAsProcessed(PlayerChatMessage p_242356_, boolean p_242455_) voidonDisconnect(Component p_104954_) private static URLparseResourcePackUrl(String p_233710_) private voidpostAddEntitySoundInstance(Entity p_233664_) private static ComponentpreparePackPrompt(Component p_171760_, Component p_171761_) private voidqueueLightUpdate(int p_194203_, int p_194204_, ClientboundLightUpdatePacketData p_194205_) private voidprivate voidreadSectionList(int p_171735_, int p_171736_, LevelLightEngine p_171737_, LightLayer p_171738_, BitSet p_171739_, BitSet p_171740_, Iterator<byte[]> p_171741_, boolean p_171742_) private voidsend(ServerboundResourcePackPacket.Action p_105136_) voidvoidvoidsetSubtitleText(ClientboundSetSubtitleTextPacket p_171791_) voidvoidsetTitleText(ClientboundSetTitleTextPacket p_171793_) private voidupdateLevelChunk(int p_194199_, int p_194200_, ClientboundLevelChunkPacketData p_194201_) private <T> voidupdateTagsForRegistry(ResourceKey<? extends Registry<? extends T>> p_205561_, TagNetworkSerialization.NetworkPayload p_205562_) Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface net.minecraft.network.PacketListener
shouldPropagateHandlingExceptions
-
Field Details
-
LOGGER
private static final org.slf4j.Logger LOGGER -
GENERIC_DISCONNECT_MESSAGE
-
UNSECURE_SERVER_TOAST_TITLE
-
UNSERURE_SERVER_TOAST
-
UNACKNOWLEDGED_MESSAGES_THRESHOLD
private static final int UNACKNOWLEDGED_MESSAGES_THRESHOLD- See Also:
-
connection
-
localGameProfile
private final com.mojang.authlib.GameProfile localGameProfile -
callbackScreen
-
minecraft
-
level
-
levelData
-
playerInfoMap
-
advancements
-
suggestionsProvider
-
debugQueryHandler
-
serverChunkRadius
private int serverChunkRadius -
serverSimulationDistance
private int serverSimulationDistance -
random
-
commands
-
recipeManager
-
id
-
levels
-
registryAccess
-
telemetryManager
-
signedMessageEncoder
-
lastSeenMessagesTracker
-
lastUnacknowledgedReceivedMessage
-
unacknowledgedReceivedMessageCount
private int unacknowledgedReceivedMessageCount
-
-
Constructor Details
-
ClientPacketListener
public ClientPacketListener(Minecraft p_194193_, Screen p_194194_, Connection p_194195_, com.mojang.authlib.GameProfile p_194196_, ClientTelemetryManager p_194197_)
-
-
Method Details
-
getSuggestionsProvider
-
cleanup
public void cleanup() -
getRecipeManager
-
handleLogin
- Specified by:
handleLoginin interfaceClientGamePacketListener
-
handleAddEntity
- Specified by:
handleAddEntityin interfaceClientGamePacketListener
-
postAddEntitySoundInstance
-
handleAddExperienceOrb
- Specified by:
handleAddExperienceOrbin interfaceClientGamePacketListener
-
handleSetEntityMotion
- Specified by:
handleSetEntityMotionin interfaceClientGamePacketListener
-
handleSetEntityData
- Specified by:
handleSetEntityDatain interfaceClientGamePacketListener
-
handleAddPlayer
- Specified by:
handleAddPlayerin interfaceClientGamePacketListener
-
handleTeleportEntity
- Specified by:
handleTeleportEntityin interfaceClientGamePacketListener
-
handleSetCarriedItem
- Specified by:
handleSetCarriedItemin interfaceClientGamePacketListener
-
handleMoveEntity
- Specified by:
handleMoveEntityin interfaceClientGamePacketListener
-
handleRotateMob
- Specified by:
handleRotateMobin interfaceClientGamePacketListener
-
handleRemoveEntities
- Specified by:
handleRemoveEntitiesin interfaceClientGamePacketListener
-
handleMovePlayer
- Specified by:
handleMovePlayerin interfaceClientGamePacketListener
-
handleChatPreview
- Specified by:
handleChatPreviewin interfaceClientGamePacketListener
-
handleSetDisplayChatPreview
- Specified by:
handleSetDisplayChatPreviewin interfaceClientGamePacketListener
-
handleChunkBlocksUpdate
- Specified by:
handleChunkBlocksUpdatein interfaceClientGamePacketListener
-
handleLevelChunkWithLight
- Specified by:
handleLevelChunkWithLightin interfaceClientGamePacketListener
-
updateLevelChunk
private void updateLevelChunk(int p_194199_, int p_194200_, ClientboundLevelChunkPacketData p_194201_) -
queueLightUpdate
private void queueLightUpdate(int p_194203_, int p_194204_, ClientboundLightUpdatePacketData p_194205_) -
enableChunkLight
-
handleForgetLevelChunk
- Specified by:
handleForgetLevelChunkin interfaceClientGamePacketListener
-
queueLightUpdate
-
handleBlockUpdate
- Specified by:
handleBlockUpdatein interfaceClientGamePacketListener
-
handleDisconnect
- Specified by:
handleDisconnectin interfaceClientGamePacketListener
-
onDisconnect
- Specified by:
onDisconnectin interfacePacketListener
-
send
-
handleTakeItemEntity
- Specified by:
handleTakeItemEntityin interfaceClientGamePacketListener
-
handleSystemChat
- Specified by:
handleSystemChatin interfaceClientGamePacketListener
-
handlePlayerChat
- Specified by:
handlePlayerChatin interfaceClientGamePacketListener
-
handlePlayerChatHeader
- Specified by:
handlePlayerChatHeaderin interfaceClientGamePacketListener
-
handleDeleteChat
- Specified by:
handleDeleteChatin interfaceClientGamePacketListener
-
handleAnimate
- Specified by:
handleAnimatein interfaceClientGamePacketListener
-
handleSetTime
- Specified by:
handleSetTimein interfaceClientGamePacketListener
-
handleSetSpawn
- Specified by:
handleSetSpawnin interfaceClientGamePacketListener
-
handleSetEntityPassengersPacket
- Specified by:
handleSetEntityPassengersPacketin interfaceClientGamePacketListener
-
handleEntityLinkPacket
- Specified by:
handleEntityLinkPacketin interfaceClientGamePacketListener
-
findTotem
-
handleEntityEvent
- Specified by:
handleEntityEventin interfaceClientGamePacketListener
-
handleSetHealth
- Specified by:
handleSetHealthin interfaceClientGamePacketListener
-
handleSetExperience
- Specified by:
handleSetExperiencein interfaceClientGamePacketListener
-
handleRespawn
- Specified by:
handleRespawnin interfaceClientGamePacketListener
-
handleExplosion
- Specified by:
handleExplosionin interfaceClientGamePacketListener
-
handleHorseScreenOpen
- Specified by:
handleHorseScreenOpenin interfaceClientGamePacketListener
-
handleOpenScreen
- Specified by:
handleOpenScreenin interfaceClientGamePacketListener
-
handleContainerSetSlot
- Specified by:
handleContainerSetSlotin interfaceClientGamePacketListener
-
handleContainerContent
- Specified by:
handleContainerContentin interfaceClientGamePacketListener
-
handleOpenSignEditor
- Specified by:
handleOpenSignEditorin interfaceClientGamePacketListener
-
handleBlockEntityData
- Specified by:
handleBlockEntityDatain interfaceClientGamePacketListener
-
handleContainerSetData
- Specified by:
handleContainerSetDatain interfaceClientGamePacketListener
-
handleSetEquipment
- Specified by:
handleSetEquipmentin interfaceClientGamePacketListener
-
handleContainerClose
- Specified by:
handleContainerClosein interfaceClientGamePacketListener
-
handleBlockEvent
- Specified by:
handleBlockEventin interfaceClientGamePacketListener
-
handleBlockDestruction
- Specified by:
handleBlockDestructionin interfaceClientGamePacketListener
-
handleGameEvent
- Specified by:
handleGameEventin interfaceClientGamePacketListener
-
handleMapItemData
- Specified by:
handleMapItemDatain interfaceClientGamePacketListener
-
handleLevelEvent
- Specified by:
handleLevelEventin interfaceClientGamePacketListener
-
handleUpdateAdvancementsPacket
- Specified by:
handleUpdateAdvancementsPacketin interfaceClientGamePacketListener
-
handleSelectAdvancementsTab
- Specified by:
handleSelectAdvancementsTabin interfaceClientGamePacketListener
-
handleCommands
- Specified by:
handleCommandsin interfaceClientGamePacketListener
-
handleStopSoundEvent
- Specified by:
handleStopSoundEventin interfaceClientGamePacketListener
-
handleCommandSuggestions
- Specified by:
handleCommandSuggestionsin interfaceClientGamePacketListener
-
handleUpdateRecipes
- Specified by:
handleUpdateRecipesin interfaceClientGamePacketListener
-
handleLookAt
- Specified by:
handleLookAtin interfaceClientGamePacketListener
-
handleTagQueryPacket
- Specified by:
handleTagQueryPacketin interfaceClientGamePacketListener
-
handleAwardStats
- Specified by:
handleAwardStatsin interfaceClientGamePacketListener
-
handleAddOrRemoveRecipes
- Specified by:
handleAddOrRemoveRecipesin interfaceClientGamePacketListener
-
handleUpdateMobEffect
- Specified by:
handleUpdateMobEffectin interfaceClientGamePacketListener
-
handleUpdateTags
- Specified by:
handleUpdateTagsin interfaceClientGamePacketListener
-
updateTagsForRegistry
private <T> void updateTagsForRegistry(ResourceKey<? extends Registry<? extends T>> p_205561_, TagNetworkSerialization.NetworkPayload p_205562_) -
handlePlayerCombatEnd
- Specified by:
handlePlayerCombatEndin interfaceClientGamePacketListener
-
handlePlayerCombatEnter
- Specified by:
handlePlayerCombatEnterin interfaceClientGamePacketListener
-
handlePlayerCombatKill
- Specified by:
handlePlayerCombatKillin interfaceClientGamePacketListener
-
handleChangeDifficulty
- Specified by:
handleChangeDifficultyin interfaceClientGamePacketListener
-
handleSetCamera
- Specified by:
handleSetCamerain interfaceClientGamePacketListener
-
handleInitializeBorder
- Specified by:
handleInitializeBorderin interfaceClientGamePacketListener
-
handleSetBorderCenter
- Specified by:
handleSetBorderCenterin interfaceClientGamePacketListener
-
handleSetBorderLerpSize
- Specified by:
handleSetBorderLerpSizein interfaceClientGamePacketListener
-
handleSetBorderSize
- Specified by:
handleSetBorderSizein interfaceClientGamePacketListener
-
handleSetBorderWarningDistance
- Specified by:
handleSetBorderWarningDistancein interfaceClientGamePacketListener
-
handleSetBorderWarningDelay
- Specified by:
handleSetBorderWarningDelayin interfaceClientGamePacketListener
-
handleTitlesClear
- Specified by:
handleTitlesClearin interfaceClientGamePacketListener
-
handleServerData
- Specified by:
handleServerDatain interfaceClientGamePacketListener
-
handleCustomChatCompletions
- Specified by:
handleCustomChatCompletionsin interfaceClientGamePacketListener
-
setActionBarText
- Specified by:
setActionBarTextin interfaceClientGamePacketListener
-
setTitleText
- Specified by:
setTitleTextin interfaceClientGamePacketListener
-
setSubtitleText
- Specified by:
setSubtitleTextin interfaceClientGamePacketListener
-
setTitlesAnimation
- Specified by:
setTitlesAnimationin interfaceClientGamePacketListener
-
handleTabListCustomisation
- Specified by:
handleTabListCustomisationin interfaceClientGamePacketListener
-
handleRemoveMobEffect
- Specified by:
handleRemoveMobEffectin interfaceClientGamePacketListener
-
handlePlayerInfo
- Specified by:
handlePlayerInfoin interfaceClientGamePacketListener
-
handleKeepAlive
- Specified by:
handleKeepAlivein interfaceClientGamePacketListener
-
handlePlayerAbilities
- Specified by:
handlePlayerAbilitiesin interfaceClientGamePacketListener
-
handleSoundEvent
- Specified by:
handleSoundEventin interfaceClientGamePacketListener
-
handleSoundEntityEvent
- Specified by:
handleSoundEntityEventin interfaceClientGamePacketListener
-
handleCustomSoundEvent
- Specified by:
handleCustomSoundEventin interfaceClientGamePacketListener
-
handleResourcePack
- Specified by:
handleResourcePackin interfaceClientGamePacketListener
-
preparePackPrompt
-
parseResourcePackUrl
-
downloadCallback
-
send
-
handleBossUpdate
- Specified by:
handleBossUpdatein interfaceClientGamePacketListener
-
handleItemCooldown
- Specified by:
handleItemCooldownin interfaceClientGamePacketListener
-
handleMoveVehicle
- Specified by:
handleMoveVehiclein interfaceClientGamePacketListener
-
handleOpenBook
- Specified by:
handleOpenBookin interfaceClientGamePacketListener
-
handleCustomPayload
- Specified by:
handleCustomPayloadin interfaceClientGamePacketListener
-
handleAddObjective
- Specified by:
handleAddObjectivein interfaceClientGamePacketListener
-
handleSetScore
- Specified by:
handleSetScorein interfaceClientGamePacketListener
-
handleSetDisplayObjective
- Specified by:
handleSetDisplayObjectivein interfaceClientGamePacketListener
-
handleSetPlayerTeamPacket
- Specified by:
handleSetPlayerTeamPacketin interfaceClientGamePacketListener
-
handleParticleEvent
- Specified by:
handleParticleEventin interfaceClientGamePacketListener
-
handlePing
- Specified by:
handlePingin interfaceClientGamePacketListener
-
handleUpdateAttributes
- Specified by:
handleUpdateAttributesin interfaceClientGamePacketListener
-
handlePlaceRecipe
- Specified by:
handlePlaceRecipein interfaceClientGamePacketListener
-
handleLightUpdatePacket
- Specified by:
handleLightUpdatePacketin interfaceClientGamePacketListener
-
applyLightData
private void applyLightData(int p_194249_, int p_194250_, ClientboundLightUpdatePacketData p_194251_) -
handleMerchantOffers
- Specified by:
handleMerchantOffersin interfaceClientGamePacketListener
-
handleSetChunkCacheRadius
- Specified by:
handleSetChunkCacheRadiusin interfaceClientGamePacketListener
-
handleSetSimulationDistance
- Specified by:
handleSetSimulationDistancein interfaceClientGamePacketListener
-
handleSetChunkCacheCenter
- Specified by:
handleSetChunkCacheCenterin interfaceClientGamePacketListener
-
handleBlockChangedAck
- Specified by:
handleBlockChangedAckin interfaceClientGamePacketListener
-
readSectionList
private void readSectionList(int p_171735_, int p_171736_, LevelLightEngine p_171737_, LightLayer p_171738_, BitSet p_171739_, BitSet p_171740_, Iterator<byte[]> p_171741_, boolean p_171742_) -
getConnection
- Specified by:
getConnectionin interfacePacketListener
-
getOnlinePlayers
-
getOnlinePlayerIds
-
getPlayerInfo
-
getPlayerInfo
-
getLocalGameProfile
public com.mojang.authlib.GameProfile getLocalGameProfile() -
getAdvancements
-
getCommands
-
getLevel
-
getDebugQueryHandler
-
getId
-
levels
-
registryAccess
-
signedMessageEncoder
-
generateMessageAcknowledgements
-
markMessageAsProcessed
-