Package net.minecraft.client.multiplayer
Class ClientPacketListener
java.lang.Object
net.minecraft.client.multiplayer.ClientPacketListener
- All Implemented Interfaces:
PacketListener
,ClientGamePacketListener
-
Field Summary
Modifier and TypeFieldDescriptionprivate ClientAdvancements
private Screen
private com.mojang.brigadier.CommandDispatcher<SharedSuggestionProvider>
private Connection
private DebugQueryHandler
private static Component
private UUID
private ClientLevel
private ClientLevel.ClientLevelData
private Set<ResourceKey<Level>>
private com.mojang.authlib.GameProfile
private static org.apache.logging.log4j.Logger
private Minecraft
private Map<UUID,PlayerInfo>
private Random
private RecipeManager
private RegistryAccess
private int
private boolean
private ClientSuggestionProvider
private TagContainer
-
Constructor Summary
ConstructorDescriptionClientPacketListener(Minecraft p_104906_, Screen p_104907_, Connection p_104908_, com.mojang.authlib.GameProfile p_104909_)
-
Method Summary
Modifier and TypeMethodDescriptionvoid
cleanup()
private void
downloadCallback(CompletableFuture<?> p_104952_)
private static ItemStack
com.mojang.brigadier.CommandDispatcher<SharedSuggestionProvider>
getId()
getLevel()
com.mojang.authlib.GameProfile
getPlayerInfo(String p_104939_)
getPlayerInfo(UUID p_104950_)
getTags()
void
handleAddEntity(ClientboundAddEntityPacket p_104958_)
void
void
handleAddMob(ClientboundAddMobPacket p_104962_)
void
handleAddObjective(ClientboundSetObjectivePacket p_105100_)
void
handleAddOrRemoveRecipes(ClientboundRecipePacket p_105058_)
void
handleAddPainting(ClientboundAddPaintingPacket p_104964_)
void
handleAddPlayer(ClientboundAddPlayerPacket p_104966_)
void
void
handleAnimate(ClientboundAnimatePacket p_104968_)
void
handleAwardStats(ClientboundAwardStatsPacket p_104970_)
void
handleBlockBreakAck(ClientboundBlockBreakAckPacket p_104972_)
void
void
void
handleBlockEvent(ClientboundBlockEventPacket p_104978_)
void
handleBlockUpdate(ClientboundBlockUpdatePacket p_104980_)
void
handleBossUpdate(ClientboundBossEventPacket p_104982_)
void
void
handleChat(ClientboundChatPacket p_104986_)
void
void
handleCommands(ClientboundCommandsPacket p_104990_)
void
void
handleContainerClose(ClientboundContainerClosePacket p_104994_)
void
void
void
void
handleCustomPayload(ClientboundCustomPayloadPacket p_105004_)
void
handleCustomSoundEvent(ClientboundCustomSoundPacket p_105006_)
void
handleDisconnect(ClientboundDisconnectPacket p_105008_)
void
handleEntityEvent(ClientboundEntityEventPacket p_105010_)
void
handleEntityLinkPacket(ClientboundSetEntityLinkPacket p_105090_)
void
handleExplosion(ClientboundExplodePacket p_105012_)
void
void
handleGameEvent(ClientboundGameEventPacket p_105016_)
void
void
void
handleItemCooldown(ClientboundCooldownPacket p_105002_)
void
handleKeepAlive(ClientboundKeepAlivePacket p_105020_)
void
handleLevelChunk(ClientboundLevelChunkPacket p_105022_)
void
handleLevelEvent(ClientboundLevelEventPacket p_105024_)
void
handleLightUpdatePacked(ClientboundLightUpdatePacket p_105028_)
void
handleLogin(ClientboundLoginPacket p_105030_)
void
handleLookAt(ClientboundPlayerLookAtPacket p_105054_)
void
handleMapItemData(ClientboundMapItemDataPacket p_105032_)
void
handleMerchantOffers(ClientboundMerchantOffersPacket p_105034_)
void
handleMoveEntity(ClientboundMoveEntityPacket p_105036_)
void
handleMovePlayer(ClientboundPlayerPositionPacket p_105056_)
void
handleMoveVehicle(ClientboundMoveVehiclePacket p_105038_)
void
handleOpenBook(ClientboundOpenBookPacket p_105040_)
void
handleOpenScreen(ClientboundOpenScreenPacket p_105042_)
void
handleOpenSignEditor(ClientboundOpenSignEditorPacket p_105044_)
void
handleParticleEvent(ClientboundLevelParticlesPacket p_105026_)
void
handlePing(ClientboundPingPacket p_171769_)
void
handlePlaceRecipe(ClientboundPlaceGhostRecipePacket p_105046_)
void
void
void
void
void
handlePlayerInfo(ClientboundPlayerInfoPacket p_105052_)
void
handleRemoveEntities(ClientboundRemoveEntitiesPacket p_182633_)
void
void
handleResourcePack(ClientboundResourcePackPacket p_105064_)
void
handleRespawn(ClientboundRespawnPacket p_105066_)
void
handleRotateMob(ClientboundRotateHeadPacket p_105068_)
void
void
void
void
handleSetBorderSize(ClientboundSetBorderSizePacket p_171785_)
void
void
void
handleSetCamera(ClientboundSetCameraPacket p_105076_)
void
handleSetCarriedItem(ClientboundSetCarriedItemPacket p_105078_)
void
void
void
void
handleSetEntityData(ClientboundSetEntityDataPacket p_105088_)
void
void
void
handleSetEquipment(ClientboundSetEquipmentPacket p_105094_)
void
handleSetExperience(ClientboundSetExperiencePacket p_105096_)
void
handleSetHealth(ClientboundSetHealthPacket p_105098_)
void
void
handleSetScore(ClientboundSetScorePacket p_105106_)
void
void
handleSetTime(ClientboundSetTimePacket p_105108_)
void
handleSoundEntityEvent(ClientboundSoundEntityPacket p_105112_)
void
handleSoundEvent(ClientboundSoundPacket p_105114_)
void
handleStopSoundEvent(ClientboundStopSoundPacket p_105116_)
void
handleTabListCustomisation(ClientboundTabListPacket p_105118_)
void
handleTagQueryPacket(ClientboundTagQueryPacket p_105120_)
void
handleTakeItemEntity(ClientboundTakeItemEntityPacket p_105122_)
void
handleTeleportEntity(ClientboundTeleportEntityPacket p_105124_)
void
handleTitlesClear(ClientboundClearTitlesPacket p_171765_)
void
void
void
void
handleUpdateRecipes(ClientboundUpdateRecipesPacket p_105132_)
void
handleUpdateTags(ClientboundUpdateTagsPacket p_105134_)
levels()
void
onDisconnect(Component p_104954_)
private static Component
preparePackPrompt(Component p_171760_, Component p_171761_)
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_)
private void
send(ServerboundResourcePackPacket.Action p_105136_)
void
void
setActionBarText(ClientboundSetActionBarTextPacket p_171779_)
void
setSubtitleText(ClientboundSetSubtitleTextPacket p_171791_)
void
void
setTitleText(ClientboundSetTitleTextPacket p_171793_)
private boolean
validateResourcePackUrl(String p_105139_)
-
Field Details
-
LOGGER
private static final org.apache.logging.log4j.Logger LOGGER -
GENERIC_DISCONNECT_MESSAGE
-
connection
-
localGameProfile
private final com.mojang.authlib.GameProfile localGameProfile -
callbackScreen
-
minecraft
-
level
-
levelData
-
started
private boolean started -
playerInfoMap
-
advancements
-
suggestionsProvider
-
tags
-
debugQueryHandler
-
serverChunkRadius
private int serverChunkRadius -
random
-
commands
-
recipeManager
-
id
-
levels
-
registryAccess
-
-
Constructor Details
-
ClientPacketListener
public ClientPacketListener(Minecraft p_104906_, Screen p_104907_, Connection p_104908_, com.mojang.authlib.GameProfile p_104909_)
-
-
Method Details
-
getSuggestionsProvider
-
cleanup
public void cleanup() -
getRecipeManager
-
handleLogin
- Specified by:
handleLogin
in interfaceClientGamePacketListener
-
handleAddEntity
- Specified by:
handleAddEntity
in interfaceClientGamePacketListener
-
handleAddExperienceOrb
- Specified by:
handleAddExperienceOrb
in interfaceClientGamePacketListener
-
handleAddVibrationSignal
- Specified by:
handleAddVibrationSignal
in interfaceClientGamePacketListener
-
handleAddPainting
- Specified by:
handleAddPainting
in interfaceClientGamePacketListener
-
handleSetEntityMotion
- Specified by:
handleSetEntityMotion
in interfaceClientGamePacketListener
-
handleSetEntityData
- Specified by:
handleSetEntityData
in interfaceClientGamePacketListener
-
handleAddPlayer
- Specified by:
handleAddPlayer
in interfaceClientGamePacketListener
-
handleTeleportEntity
- Specified by:
handleTeleportEntity
in interfaceClientGamePacketListener
-
handleSetCarriedItem
- Specified by:
handleSetCarriedItem
in interfaceClientGamePacketListener
-
handleMoveEntity
- Specified by:
handleMoveEntity
in interfaceClientGamePacketListener
-
handleRotateMob
- Specified by:
handleRotateMob
in interfaceClientGamePacketListener
-
handleRemoveEntities
- Specified by:
handleRemoveEntities
in interfaceClientGamePacketListener
-
handleMovePlayer
- Specified by:
handleMovePlayer
in interfaceClientGamePacketListener
-
handleChunkBlocksUpdate
- Specified by:
handleChunkBlocksUpdate
in interfaceClientGamePacketListener
-
handleLevelChunk
- Specified by:
handleLevelChunk
in interfaceClientGamePacketListener
-
handleForgetLevelChunk
- Specified by:
handleForgetLevelChunk
in interfaceClientGamePacketListener
-
handleBlockUpdate
- Specified by:
handleBlockUpdate
in interfaceClientGamePacketListener
-
handleDisconnect
- Specified by:
handleDisconnect
in interfaceClientGamePacketListener
-
onDisconnect
- Specified by:
onDisconnect
in interfacePacketListener
-
send
-
handleTakeItemEntity
- Specified by:
handleTakeItemEntity
in interfaceClientGamePacketListener
-
handleChat
- Specified by:
handleChat
in interfaceClientGamePacketListener
-
handleAnimate
- Specified by:
handleAnimate
in interfaceClientGamePacketListener
-
handleAddMob
- Specified by:
handleAddMob
in interfaceClientGamePacketListener
-
handleSetTime
- Specified by:
handleSetTime
in interfaceClientGamePacketListener
-
handleSetSpawn
- Specified by:
handleSetSpawn
in interfaceClientGamePacketListener
-
handleSetEntityPassengersPacket
- Specified by:
handleSetEntityPassengersPacket
in interfaceClientGamePacketListener
-
handleEntityLinkPacket
- Specified by:
handleEntityLinkPacket
in interfaceClientGamePacketListener
-
findTotem
-
handleEntityEvent
- Specified by:
handleEntityEvent
in interfaceClientGamePacketListener
-
handleSetHealth
- Specified by:
handleSetHealth
in interfaceClientGamePacketListener
-
handleSetExperience
- Specified by:
handleSetExperience
in interfaceClientGamePacketListener
-
handleRespawn
- Specified by:
handleRespawn
in interfaceClientGamePacketListener
-
handleExplosion
- Specified by:
handleExplosion
in interfaceClientGamePacketListener
-
handleHorseScreenOpen
- Specified by:
handleHorseScreenOpen
in interfaceClientGamePacketListener
-
handleOpenScreen
- Specified by:
handleOpenScreen
in interfaceClientGamePacketListener
-
handleContainerSetSlot
- Specified by:
handleContainerSetSlot
in interfaceClientGamePacketListener
-
handleContainerContent
- Specified by:
handleContainerContent
in interfaceClientGamePacketListener
-
handleOpenSignEditor
- Specified by:
handleOpenSignEditor
in interfaceClientGamePacketListener
-
handleBlockEntityData
- Specified by:
handleBlockEntityData
in interfaceClientGamePacketListener
-
handleContainerSetData
- Specified by:
handleContainerSetData
in interfaceClientGamePacketListener
-
handleSetEquipment
- Specified by:
handleSetEquipment
in interfaceClientGamePacketListener
-
handleContainerClose
- Specified by:
handleContainerClose
in interfaceClientGamePacketListener
-
handleBlockEvent
- Specified by:
handleBlockEvent
in interfaceClientGamePacketListener
-
handleBlockDestruction
- Specified by:
handleBlockDestruction
in interfaceClientGamePacketListener
-
handleGameEvent
- Specified by:
handleGameEvent
in interfaceClientGamePacketListener
-
handleMapItemData
- Specified by:
handleMapItemData
in interfaceClientGamePacketListener
-
handleLevelEvent
- Specified by:
handleLevelEvent
in interfaceClientGamePacketListener
-
handleUpdateAdvancementsPacket
- Specified by:
handleUpdateAdvancementsPacket
in interfaceClientGamePacketListener
-
handleSelectAdvancementsTab
- Specified by:
handleSelectAdvancementsTab
in interfaceClientGamePacketListener
-
handleCommands
- Specified by:
handleCommands
in interfaceClientGamePacketListener
-
handleStopSoundEvent
- Specified by:
handleStopSoundEvent
in interfaceClientGamePacketListener
-
handleCommandSuggestions
- Specified by:
handleCommandSuggestions
in interfaceClientGamePacketListener
-
handleUpdateRecipes
- Specified by:
handleUpdateRecipes
in interfaceClientGamePacketListener
-
handleLookAt
- Specified by:
handleLookAt
in interfaceClientGamePacketListener
-
handleTagQueryPacket
- Specified by:
handleTagQueryPacket
in interfaceClientGamePacketListener
-
handleAwardStats
- Specified by:
handleAwardStats
in interfaceClientGamePacketListener
-
handleAddOrRemoveRecipes
- Specified by:
handleAddOrRemoveRecipes
in interfaceClientGamePacketListener
-
handleUpdateMobEffect
- Specified by:
handleUpdateMobEffect
in interfaceClientGamePacketListener
-
handleUpdateTags
- Specified by:
handleUpdateTags
in interfaceClientGamePacketListener
-
handlePlayerCombatEnd
- Specified by:
handlePlayerCombatEnd
in interfaceClientGamePacketListener
-
handlePlayerCombatEnter
- Specified by:
handlePlayerCombatEnter
in interfaceClientGamePacketListener
-
handlePlayerCombatKill
- Specified by:
handlePlayerCombatKill
in interfaceClientGamePacketListener
-
handleChangeDifficulty
- Specified by:
handleChangeDifficulty
in interfaceClientGamePacketListener
-
handleSetCamera
- Specified by:
handleSetCamera
in interfaceClientGamePacketListener
-
handleInitializeBorder
- Specified by:
handleInitializeBorder
in interfaceClientGamePacketListener
-
handleSetBorderCenter
- Specified by:
handleSetBorderCenter
in interfaceClientGamePacketListener
-
handleSetBorderLerpSize
- Specified by:
handleSetBorderLerpSize
in interfaceClientGamePacketListener
-
handleSetBorderSize
- Specified by:
handleSetBorderSize
in interfaceClientGamePacketListener
-
handleSetBorderWarningDistance
- Specified by:
handleSetBorderWarningDistance
in interfaceClientGamePacketListener
-
handleSetBorderWarningDelay
- Specified by:
handleSetBorderWarningDelay
in interfaceClientGamePacketListener
-
handleTitlesClear
- Specified by:
handleTitlesClear
in interfaceClientGamePacketListener
-
setActionBarText
- Specified by:
setActionBarText
in interfaceClientGamePacketListener
-
setTitleText
- Specified by:
setTitleText
in interfaceClientGamePacketListener
-
setSubtitleText
- Specified by:
setSubtitleText
in interfaceClientGamePacketListener
-
setTitlesAnimation
- Specified by:
setTitlesAnimation
in interfaceClientGamePacketListener
-
handleTabListCustomisation
- Specified by:
handleTabListCustomisation
in interfaceClientGamePacketListener
-
handleRemoveMobEffect
- Specified by:
handleRemoveMobEffect
in interfaceClientGamePacketListener
-
handlePlayerInfo
- Specified by:
handlePlayerInfo
in interfaceClientGamePacketListener
-
handleKeepAlive
- Specified by:
handleKeepAlive
in interfaceClientGamePacketListener
-
handlePlayerAbilities
- Specified by:
handlePlayerAbilities
in interfaceClientGamePacketListener
-
handleSoundEvent
- Specified by:
handleSoundEvent
in interfaceClientGamePacketListener
-
handleSoundEntityEvent
- Specified by:
handleSoundEntityEvent
in interfaceClientGamePacketListener
-
handleCustomSoundEvent
- Specified by:
handleCustomSoundEvent
in interfaceClientGamePacketListener
-
handleResourcePack
- Specified by:
handleResourcePack
in interfaceClientGamePacketListener
-
preparePackPrompt
-
validateResourcePackUrl
-
downloadCallback
-
send
-
handleBossUpdate
- Specified by:
handleBossUpdate
in interfaceClientGamePacketListener
-
handleItemCooldown
- Specified by:
handleItemCooldown
in interfaceClientGamePacketListener
-
handleMoveVehicle
- Specified by:
handleMoveVehicle
in interfaceClientGamePacketListener
-
handleOpenBook
- Specified by:
handleOpenBook
in interfaceClientGamePacketListener
-
handleCustomPayload
- Specified by:
handleCustomPayload
in interfaceClientGamePacketListener
-
handleAddObjective
- Specified by:
handleAddObjective
in interfaceClientGamePacketListener
-
handleSetScore
- Specified by:
handleSetScore
in interfaceClientGamePacketListener
-
handleSetDisplayObjective
- Specified by:
handleSetDisplayObjective
in interfaceClientGamePacketListener
-
handleSetPlayerTeamPacket
- Specified by:
handleSetPlayerTeamPacket
in interfaceClientGamePacketListener
-
handleParticleEvent
- Specified by:
handleParticleEvent
in interfaceClientGamePacketListener
-
handlePing
- Specified by:
handlePing
in interfaceClientGamePacketListener
-
handleUpdateAttributes
- Specified by:
handleUpdateAttributes
in interfaceClientGamePacketListener
-
handlePlaceRecipe
- Specified by:
handlePlaceRecipe
in interfaceClientGamePacketListener
-
handleLightUpdatePacked
- Specified by:
handleLightUpdatePacked
in interfaceClientGamePacketListener
-
handleMerchantOffers
- Specified by:
handleMerchantOffers
in interfaceClientGamePacketListener
-
handleSetChunkCacheRadius
- Specified by:
handleSetChunkCacheRadius
in interfaceClientGamePacketListener
-
handleSetChunkCacheCenter
- Specified by:
handleSetChunkCacheCenter
in interfaceClientGamePacketListener
-
handleBlockBreakAck
- Specified by:
handleBlockBreakAck
in 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:
getConnection
in interfacePacketListener
-
getOnlinePlayers
-
getOnlinePlayerIds
-
getPlayerInfo
-
getPlayerInfo
-
getLocalGameProfile
public com.mojang.authlib.GameProfile getLocalGameProfile() -
getAdvancements
-
getCommands
-
getLevel
-
getTags
-
getDebugQueryHandler
-
getId
-
levels
-
registryAccess
-