Package net.minecraft.client.multiplayer
Class ClientPacketListener
java.lang.Object
net.minecraft.client.multiplayer.ClientCommonPacketListenerImpl
net.minecraft.client.multiplayer.ClientPacketListener
- All Implemented Interfaces:
ClientboundPacketListener
,PacketListener
,ClientCommonPacketListener
,ClientCookiePacketListener
,ClientGamePacketListener
,ClientPongPacketListener
,TickablePacketListener
,IClientCommonPacketListenerExtension
,ICommonPacketListener
public class ClientPacketListener
extends ClientCommonPacketListenerImpl
implements ClientGamePacketListener, TickablePacketListener
-
Nested Class Summary
Nested classes/interfaces inherited from class net.minecraft.client.multiplayer.ClientCommonPacketListenerImpl
ClientCommonPacketListenerImpl.DeferredPacket, ClientCommonPacketListenerImpl.PackConfirmScreen
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final ClientAdvancements
private static final Component
private LocalChatSession
private final ChunkBatchSizeCalculator
private boolean
com.mojang.brigadier.CommandDispatcher
<SharedSuggestionProvider> private ConnectionType
private final DebugQueryHandler
private final DebugSampleSubscriber
private final FeatureFlagSet
private final UUID
private static final Component
private LastSeenMessagesTracker
private ClientLevel
Reference to the current ClientWorld instance, which many handler methods operate onprivate ClientLevel.ClientLevelData
private LevelLoadStatusManager
private Set
<ResourceKey<Level>> private final Set
<PlayerInfo> private final com.mojang.authlib.GameProfile
private static final org.slf4j.Logger
private MessageSignatureCache
private static final int
private final PingDebugMonitor
private final Map
<UUID, PlayerInfo> A mapping from player names to their respective GuiPlayerInfo (specifies the clients response time to the server)private final PotionBrewing
private final RandomSource
Just an ordinary random number generator, used to randomize audio pitch of item/orb pickup and randomize both particlespawn offset and velocityprivate final RecipeManager
private static final Component
private final RegistryAccess.Frozen
private final Scoreboard
private final SessionSearchTrees
private boolean
private int
private boolean
private int
private SignedMessageChain.Encoder
private final ClientSuggestionProvider
private static final Component
private static final Component
Fields inherited from class net.minecraft.client.multiplayer.ClientCommonPacketListenerImpl
connection, customReportDetails, isTransferring, minecraft, postDisconnectScreen, serverBrand, serverCookies, serverData, serverLinks, strictErrorHandling, telemetryManager
-
Constructor Summary
ConstructorsConstructorDescriptionClientPacketListener
(Minecraft pMinecraft, Connection pConnection, CommonListenerCookie pCommonListenerCookie) -
Method Summary
Modifier and TypeMethodDescriptionprivate void
applyLightData
(int pX, int pZ, ClientboundLightUpdatePacketData pData) private void
applyPlayerInfoUpdate
(ClientboundPlayerInfoUpdatePacket.Action pAction, ClientboundPlayerInfoUpdatePacket.Entry pEntry, PlayerInfo pPlayerInfo) void
void
close()
private Entity
private ReceivingLevelScreen.Reason
determineLevelLoadingReason
(boolean pDying, ResourceKey<Level> pSpawnDimension, ResourceKey<Level> pCurrentDimension) private void
enableChunkLight
(LevelChunk pChunk, int pX, int pZ) private boolean
private static ItemStack
com.mojang.brigadier.CommandDispatcher
<SharedSuggestionProvider> Returns the connection this listener is attached to.Returns the connection type of this packet listener.getId()
getLevel()
com.mojang.authlib.GameProfile
getPlayerInfo
(String pName) Gets the client's description information about another player on the server.getPlayerInfo
(UUID pUniqueId) void
Spawns an instance of the objecttype indicated by the packet and sets its position and momentumvoid
Spawns an experience orb and sets its value (amount of XP)void
May create a scoreboard objective, remove an objective from the scoreboard or update an objectives' displaynamevoid
void
handleAnimate
(ClientboundAnimatePacket pPacket) Renders a specified animation: Waking up a player, a living entity swinging its currently held item, being hurt or receiving a critical hit by normal or magical meansvoid
Updates the players statistics or achievementsvoid
void
Updates all registered IWorldAccess instances with destroyBlockInWorldPartiallyvoid
Updates the NBTTagCompound metadata of instances of the following entitytypes: Mob spawners, command blocks, beacons, skulls, flowerpotvoid
Triggers Block.onBlockEventReceived, which is implemented in BlockPistonBase for extension/retraction, BlockNote for setting the instrument (including audiovisual feedback) and in BlockContainer to set the number of players accessing a (Ender)Chestvoid
Updates the block and metadata and generates a blockupdate (and notify the clients)void
void
void
void
void
void
Received from the servers PlayerManager if between 1 and 64 blocks in a chunk are changed.void
void
handleCommands
(ClientboundCommandsPacket pPacket) void
This method is only called for manual tab-completion (theminecraft:ask_server
suggestion provider).void
void
Resets the ItemStack held in hand and closes the window that is openedvoid
Handles the placement of a specified ItemStack in a specified container/inventory slotvoid
Sets the progressbar of the opened window to the specified valuevoid
Handles picking up an ItemStack or dropping one in your inventory or an open (non-creative) containervoid
void
handleCustomPayload
(CustomPacketPayload pPayload) void
void
void
void
void
Invokes the entities' handleUpdateHealth method which is implemented in LivingBase (hurt/death), MinecartMobSpawner (spawn delay), FireworkRocket invalid input: '&' MinecartTNT (explosion), IronGolem (throwing, ...), Witch (spawn particles), Zombie (villager transformation), Animal (breeding mode particles), Horse (breeding/smoke particles), Sheep (...), Tameable (...), Villager (particles for breeding mode, angry and happy), Wolf (...)void
void
handleExplosion
(ClientboundExplodePacket pPacket) Initiates a new explosion (sound, particles, drop spawn) for the affected blocks indicated by the packet.void
void
void
void
void
void
void
void
void
void
handleLogin
(ClientboundLoginPacket pPacket) Registers some server properties (gametype, hardcore-mode, terraintype, difficulty, player limit), creates a new WorldClient and sets the player initial dimension.void
void
Updates the worlds MapStorage with the specified MapData for the specified map-identifier and invokes a MapItemRenderer for itvoid
void
Updates the specified entity's position by the specified relative momentum and absolute rotation.void
void
void
handleOpenBook
(ClientboundOpenBookPacket pPacket) void
void
Creates a sign in the specified location if it didn't exist and opens the GUI to edit its textvoid
Spawns a specified number of particles at the specified location with a randomized displacement according to specified boundsvoid
void
void
void
void
void
void
void
void
void
void
void
void
void
handleRespawn
(ClientboundRespawnPacket pPacket) void
Updates the direction in which the specified entity is looking, normally this head rotation is independent of the rotation of the entity itselfvoid
void
void
void
void
void
void
void
void
Updates which hotbar slot of the player is currently selectedvoid
void
void
Removes or sets the ScoreObjective to be displayed at a particular scoreboard position (list, sidebar, below name)void
Invoked when the server registers new proximate objects in your watchlist or when objects in your watchlist have changed -> Registers any changes locallyvoid
Sets the velocity of the specified entity to the specified valuevoid
void
void
void
void
Updates a team managed by the scoreboard: Create/Remove the team registration, Register/Remove the player-team-memberships, Set team displayname/prefix/suffix and/or whether friendly fire is enabledvoid
handleSetScore
(ClientboundSetScorePacket pPacket) Either updates the score with a specified value or removes the score for an objectivevoid
void
void
handleSetTime
(ClientboundSetTimePacket pPacket) void
void
handleSoundEvent
(ClientboundSoundPacket pPacket) void
void
void
void
void
void
Updates an entity's position and rotation as specified by the packetvoid
void
void
private void
void
void
Updates en entity's attributes and their respective modifiers, which are used for speed bonuses (player sprinting, animals fleeing, baby speed), weapon/tool attackDamage, hostiles followRange randomization, zombie maxHealth and knockback resistance as well as reinforcement spawning chance.void
void
void
private void
initializeChatSession
(ClientboundPlayerInfoUpdatePacket.Entry pEntry, PlayerInfo pPlayerInfo) boolean
boolean
isFeatureEnabled
(FeatureFlagSet pEnabledFeatures) levels()
void
markMessageAsProcessed
(PlayerChatMessage pChatMessage, boolean pAcknowledged) private com.mojang.brigadier.ParseResults
<SharedSuggestionProvider> parseCommand
(String p_249982_) private void
postAddEntitySoundInstance
(Entity pEntity) private void
private void
readSectionList
(int pX, int pZ, LevelLightEngine pLightEngine, LightLayer pLightLayer, BitSet pSkyYMask, BitSet pEmptySkyYMask, Iterator<byte[]> pSkyUpdates) void
private void
void
sendCommand
(String pCommand) boolean
sendUnsignedCommand
(String pCommand) void
void
setKeyPair
(ProfileKeyPair p_261475_) void
void
void
private void
startWaitingForNewLevel
(LocalPlayer pPlayer, ClientLevel pLevel, ReceivingLevelScreen.Reason pReason) Deprecated.private void
startWaitingForNewLevel
(LocalPlayer pPlayer, ClientLevel pLevel, ReceivingLevelScreen.Reason pReason, ResourceKey<Level> toDimension, ResourceKey<Level> fromDimension) void
tick()
private void
updateLevelChunk
(int pX, int pZ, ClientboundLevelChunkPacketData pData) void
Methods inherited from class net.minecraft.client.multiplayer.ClientCommonPacketListenerImpl
createDisconnectionInfo, createDisconnectScreen, fillListenerSpecificCrashDetails, handleCustomPayload, handleCustomReportDetails, handleDisconnect, handleKeepAlive, handlePing, handleRequestCookie, handleResourcePackPop, handleResourcePackPush, handleServerLinks, handleStoreCookie, handleTransfer, onDisconnect, onPacketError, preparePackPrompt, send, sendDeferredPackets, serverBrand, shouldHandleMessage
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.protocol.common.ClientCommonPacketListener
handleCustomPayload, handleCustomReportDetails, handleDisconnect, handleKeepAlive, handlePing, handleResourcePackPop, handleResourcePackPush, handleServerLinks, handleStoreCookie, handleTransfer
Methods inherited from interface net.minecraft.network.protocol.cookie.ClientCookiePacketListener
handleRequestCookie
Methods inherited from interface net.minecraft.network.protocol.game.ClientGamePacketListener
protocol
Methods inherited from interface net.neoforged.neoforge.common.extensions.IClientCommonPacketListenerExtension
disconnect, getMainThreadEventLoop, send
Methods inherited from interface net.neoforged.neoforge.common.extensions.ICommonPacketListener
hasChannel, hasChannel, hasChannel, send
Methods inherited from interface net.minecraft.network.PacketListener
createDisconnectionInfo, fillCrashReport, fillListenerSpecificCrashDetails, onDisconnect, onPacketError, shouldHandleMessage
-
Field Details
-
LOGGER
private static final org.slf4j.Logger LOGGER -
UNSECURE_SERVER_TOAST_TITLE
-
UNSERURE_SERVER_TOAST
-
INVALID_PACKET
-
CHAT_VALIDATION_FAILED_ERROR
-
RECONFIGURE_SCREEN_MESSAGE
-
PENDING_OFFSET_THRESHOLD
private static final int PENDING_OFFSET_THRESHOLD- See Also:
-
localGameProfile
private final com.mojang.authlib.GameProfile localGameProfile -
level
Reference to the current ClientWorld instance, which many handler methods operate on -
levelData
-
playerInfoMap
A mapping from player names to their respective GuiPlayerInfo (specifies the clients response time to the server) -
listedPlayers
-
advancements
-
suggestionsProvider
-
debugQueryHandler
-
serverChunkRadius
private int serverChunkRadius -
serverSimulationDistance
private int serverSimulationDistance -
random
Just an ordinary random number generator, used to randomize audio pitch of item/orb pickup and randomize both particlespawn offset and velocity -
commands
-
recipeManager
-
id
-
levels
-
registryAccess
-
enabledFeatures
-
potionBrewing
-
chatSession
-
signedMessageEncoder
-
lastSeenMessages
-
messageSignatureCache
-
chunkBatchSizeCalculator
-
pingDebugMonitor
-
debugSampleSubscriber
-
connectionType
-
levelLoadStatusManager
-
serverEnforcesSecureChat
private boolean serverEnforcesSecureChat -
seenInsecureChatWarning
private boolean seenInsecureChatWarning -
closed
private volatile boolean closed -
scoreboard
-
searchTrees
-
-
Constructor Details
-
ClientPacketListener
public ClientPacketListener(Minecraft pMinecraft, Connection pConnection, CommonListenerCookie pCommonListenerCookie)
-
-
Method Details
-
getSuggestionsProvider
-
close
public void close() -
clearLevel
public void clearLevel() -
getRecipeManager
-
handleLogin
Registers some server properties (gametype, hardcore-mode, terraintype, difficulty, player limit), creates a new WorldClient and sets the player initial dimension.- Specified by:
handleLogin
in interfaceClientGamePacketListener
-
handleAddEntity
Spawns an instance of the objecttype indicated by the packet and sets its position and momentum- Specified by:
handleAddEntity
in interfaceClientGamePacketListener
-
createEntityFromPacket
-
postAddEntitySoundInstance
-
handleAddExperienceOrb
Spawns an experience orb and sets its value (amount of XP)- Specified by:
handleAddExperienceOrb
in interfaceClientGamePacketListener
-
handleSetEntityMotion
Sets the velocity of the specified entity to the specified value- Specified by:
handleSetEntityMotion
in interfaceClientGamePacketListener
-
handleSetEntityData
Invoked when the server registers new proximate objects in your watchlist or when objects in your watchlist have changed -> Registers any changes locally- Specified by:
handleSetEntityData
in interfaceClientGamePacketListener
-
handleTeleportEntity
Updates an entity's position and rotation as specified by the packet- Specified by:
handleTeleportEntity
in interfaceClientGamePacketListener
-
handleTickingState
- Specified by:
handleTickingState
in interfaceClientGamePacketListener
-
handleTickingStep
- Specified by:
handleTickingStep
in interfaceClientGamePacketListener
-
handleSetCarriedItem
Updates which hotbar slot of the player is currently selected- Specified by:
handleSetCarriedItem
in interfaceClientGamePacketListener
-
handleMoveEntity
Updates the specified entity's position by the specified relative momentum and absolute rotation. Note that subclassing of the packet allows for the specification of a subset of this data (e.g. only rel. position, abs. rotation or both).- Specified by:
handleMoveEntity
in interfaceClientGamePacketListener
-
handleRotateMob
Updates the direction in which the specified entity is looking, normally this head rotation is independent of the rotation of the entity itself- Specified by:
handleRotateMob
in interfaceClientGamePacketListener
-
handleRemoveEntities
- Specified by:
handleRemoveEntities
in interfaceClientGamePacketListener
-
handleMovePlayer
- Specified by:
handleMovePlayer
in interfaceClientGamePacketListener
-
handleChunkBlocksUpdate
Received from the servers PlayerManager if between 1 and 64 blocks in a chunk are changed. If only one block requires an update, the server sends S23PacketBlockChange and if 64 or more blocks are changed, the server sends S21PacketChunkData- Specified by:
handleChunkBlocksUpdate
in interfaceClientGamePacketListener
-
handleLevelChunkWithLight
- Specified by:
handleLevelChunkWithLight
in interfaceClientGamePacketListener
-
handleChunksBiomes
- Specified by:
handleChunksBiomes
in interfaceClientGamePacketListener
-
updateLevelChunk
-
enableChunkLight
-
handleForgetLevelChunk
- Specified by:
handleForgetLevelChunk
in interfaceClientGamePacketListener
-
queueLightRemoval
-
handleBlockUpdate
Updates the block and metadata and generates a blockupdate (and notify the clients)- Specified by:
handleBlockUpdate
in interfaceClientGamePacketListener
-
handleConfigurationStart
- Specified by:
handleConfigurationStart
in interfaceClientGamePacketListener
-
handleTakeItemEntity
- Specified by:
handleTakeItemEntity
in interfaceClientGamePacketListener
-
handleSystemChat
- Specified by:
handleSystemChat
in interfaceClientGamePacketListener
-
handlePlayerChat
- Specified by:
handlePlayerChat
in interfaceClientGamePacketListener
-
handleDisguisedChat
- Specified by:
handleDisguisedChat
in interfaceClientGamePacketListener
-
handleDeleteChat
- Specified by:
handleDeleteChat
in interfaceClientGamePacketListener
-
handleAnimate
Renders a specified animation: Waking up a player, a living entity swinging its currently held item, being hurt or receiving a critical hit by normal or magical means- Specified by:
handleAnimate
in interfaceClientGamePacketListener
-
handleHurtAnimation
- Specified by:
handleHurtAnimation
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
Invokes the entities' handleUpdateHealth method which is implemented in LivingBase (hurt/death), MinecartMobSpawner (spawn delay), FireworkRocket invalid input: '&' MinecartTNT (explosion), IronGolem (throwing, ...), Witch (spawn particles), Zombie (villager transformation), Animal (breeding mode particles), Horse (breeding/smoke particles), Sheep (...), Tameable (...), Villager (particles for breeding mode, angry and happy), Wolf (...)- Specified by:
handleEntityEvent
in interfaceClientGamePacketListener
-
handleDamageEvent
- Specified by:
handleDamageEvent
in interfaceClientGamePacketListener
-
handleSetHealth
- Specified by:
handleSetHealth
in interfaceClientGamePacketListener
-
handleSetExperience
- Specified by:
handleSetExperience
in interfaceClientGamePacketListener
-
handleRespawn
- Specified by:
handleRespawn
in interfaceClientGamePacketListener
-
determineLevelLoadingReason
private ReceivingLevelScreen.Reason determineLevelLoadingReason(boolean pDying, ResourceKey<Level> pSpawnDimension, ResourceKey<Level> pCurrentDimension) -
handleExplosion
Initiates a new explosion (sound, particles, drop spawn) for the affected blocks indicated by the packet.- Specified by:
handleExplosion
in interfaceClientGamePacketListener
-
handleHorseScreenOpen
- Specified by:
handleHorseScreenOpen
in interfaceClientGamePacketListener
-
handleOpenScreen
- Specified by:
handleOpenScreen
in interfaceClientGamePacketListener
-
handleContainerSetSlot
Handles picking up an ItemStack or dropping one in your inventory or an open (non-creative) container- Specified by:
handleContainerSetSlot
in interfaceClientGamePacketListener
-
handleContainerContent
Handles the placement of a specified ItemStack in a specified container/inventory slot- Specified by:
handleContainerContent
in interfaceClientGamePacketListener
-
handleOpenSignEditor
Creates a sign in the specified location if it didn't exist and opens the GUI to edit its text- Specified by:
handleOpenSignEditor
in interfaceClientGamePacketListener
-
handleBlockEntityData
Updates the NBTTagCompound metadata of instances of the following entitytypes: Mob spawners, command blocks, beacons, skulls, flowerpot- Specified by:
handleBlockEntityData
in interfaceClientGamePacketListener
-
handleContainerSetData
Sets the progressbar of the opened window to the specified value- Specified by:
handleContainerSetData
in interfaceClientGamePacketListener
-
handleSetEquipment
- Specified by:
handleSetEquipment
in interfaceClientGamePacketListener
-
handleContainerClose
Resets the ItemStack held in hand and closes the window that is opened- Specified by:
handleContainerClose
in interfaceClientGamePacketListener
-
handleBlockEvent
Triggers Block.onBlockEventReceived, which is implemented in BlockPistonBase for extension/retraction, BlockNote for setting the instrument (including audiovisual feedback) and in BlockContainer to set the number of players accessing a (Ender)Chest- Specified by:
handleBlockEvent
in interfaceClientGamePacketListener
-
handleBlockDestruction
Updates all registered IWorldAccess instances with destroyBlockInWorldPartially- Specified by:
handleBlockDestruction
in interfaceClientGamePacketListener
-
handleGameEvent
- Specified by:
handleGameEvent
in interfaceClientGamePacketListener
-
startWaitingForNewLevel
@Deprecated private void startWaitingForNewLevel(LocalPlayer pPlayer, ClientLevel pLevel, ReceivingLevelScreen.Reason pReason) Deprecated. -
startWaitingForNewLevel
private void startWaitingForNewLevel(LocalPlayer pPlayer, ClientLevel pLevel, ReceivingLevelScreen.Reason pReason, @Nullable ResourceKey<Level> toDimension, @Nullable ResourceKey<Level> fromDimension) -
handleMapItemData
Updates the worlds MapStorage with the specified MapData for the specified map-identifier and invokes a MapItemRenderer for it- 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
This method is only called for manual tab-completion (theminecraft:ask_server
suggestion provider).- Specified by:
handleCommandSuggestions
in interfaceClientGamePacketListener
-
handleUpdateRecipes
- Specified by:
handleUpdateRecipes
in interfaceClientGamePacketListener
-
handleLookAt
- Specified by:
handleLookAt
in interfaceClientGamePacketListener
-
handleTagQueryPacket
- Specified by:
handleTagQueryPacket
in interfaceClientGamePacketListener
-
handleAwardStats
Updates the players statistics or achievements- Specified by:
handleAwardStats
in interfaceClientGamePacketListener
-
handleAddOrRemoveRecipes
- Specified by:
handleAddOrRemoveRecipes
in interfaceClientGamePacketListener
-
handleUpdateMobEffect
- Specified by:
handleUpdateMobEffect
in interfaceClientGamePacketListener
-
handleUpdateTags
- Specified by:
handleUpdateTags
in interfaceClientCommonPacketListener
-
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
-
handleServerData
- Specified by:
handleServerData
in interfaceClientGamePacketListener
-
handleCustomChatCompletions
- Specified by:
handleCustomChatCompletions
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
-
handlePlayerInfoRemove
- Specified by:
handlePlayerInfoRemove
in interfaceClientGamePacketListener
-
handlePlayerInfoUpdate
- Specified by:
handlePlayerInfoUpdate
in interfaceClientGamePacketListener
-
applyPlayerInfoUpdate
private void applyPlayerInfoUpdate(ClientboundPlayerInfoUpdatePacket.Action pAction, ClientboundPlayerInfoUpdatePacket.Entry pEntry, PlayerInfo pPlayerInfo) -
initializeChatSession
private void initializeChatSession(ClientboundPlayerInfoUpdatePacket.Entry pEntry, PlayerInfo pPlayerInfo) -
enforcesSecureChat
private boolean enforcesSecureChat() -
handlePlayerAbilities
- Specified by:
handlePlayerAbilities
in interfaceClientGamePacketListener
-
handleSoundEvent
- Specified by:
handleSoundEvent
in interfaceClientGamePacketListener
-
handleSoundEntityEvent
- Specified by:
handleSoundEntityEvent
in interfaceClientGamePacketListener
-
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 classClientCommonPacketListenerImpl
-
handleUnknownCustomPayload
-
handleAddObjective
May create a scoreboard objective, remove an objective from the scoreboard or update an objectives' displayname- Specified by:
handleAddObjective
in interfaceClientGamePacketListener
-
handleSetScore
Either updates the score with a specified value or removes the score for an objective- Specified by:
handleSetScore
in interfaceClientGamePacketListener
-
handleResetScore
- Specified by:
handleResetScore
in interfaceClientGamePacketListener
-
handleSetDisplayObjective
Removes or sets the ScoreObjective to be displayed at a particular scoreboard position (list, sidebar, below name)- Specified by:
handleSetDisplayObjective
in interfaceClientGamePacketListener
-
handleSetPlayerTeamPacket
Updates a team managed by the scoreboard: Create/Remove the team registration, Register/Remove the player-team-memberships, Set team displayname/prefix/suffix and/or whether friendly fire is enabled- Specified by:
handleSetPlayerTeamPacket
in interfaceClientGamePacketListener
-
handleParticleEvent
Spawns a specified number of particles at the specified location with a randomized displacement according to specified bounds- Specified by:
handleParticleEvent
in interfaceClientGamePacketListener
-
handleUpdateAttributes
Updates en entity's attributes and their respective modifiers, which are used for speed bonuses (player sprinting, animals fleeing, baby speed), weapon/tool attackDamage, hostiles followRange randomization, zombie maxHealth and knockback resistance as well as reinforcement spawning chance.- Specified by:
handleUpdateAttributes
in interfaceClientGamePacketListener
-
handlePlaceRecipe
- Specified by:
handlePlaceRecipe
in interfaceClientGamePacketListener
-
handleLightUpdatePacket
- Specified by:
handleLightUpdatePacket
in interfaceClientGamePacketListener
-
applyLightData
-
handleMerchantOffers
- Specified by:
handleMerchantOffers
in interfaceClientGamePacketListener
-
handleSetChunkCacheRadius
- Specified by:
handleSetChunkCacheRadius
in interfaceClientGamePacketListener
-
handleSetSimulationDistance
- Specified by:
handleSetSimulationDistance
in interfaceClientGamePacketListener
-
handleSetChunkCacheCenter
- Specified by:
handleSetChunkCacheCenter
in interfaceClientGamePacketListener
-
handleBlockChangedAck
- Specified by:
handleBlockChangedAck
in interfaceClientGamePacketListener
-
handleBundlePacket
- Specified by:
handleBundlePacket
in interfaceClientGamePacketListener
-
handleProjectilePowerPacket
- Specified by:
handleProjectilePowerPacket
in interfaceClientGamePacketListener
-
handleChunkBatchStart
- Specified by:
handleChunkBatchStart
in interfaceClientGamePacketListener
-
handleChunkBatchFinished
- Specified by:
handleChunkBatchFinished
in interfaceClientGamePacketListener
-
handleDebugSample
- Specified by:
handleDebugSample
in interfaceClientGamePacketListener
-
handlePongResponse
- Specified by:
handlePongResponse
in interfaceClientPongPacketListener
-
readSectionList
private void readSectionList(int pX, int pZ, LevelLightEngine pLightEngine, LightLayer pLightLayer, BitSet pSkyYMask, BitSet pEmptySkyYMask, Iterator<byte[]> pSkyUpdates) -
getConnection
Description copied from interface:ICommonPacketListener
Returns the connection this listener is attached to.- Specified by:
getConnection
in interfaceICommonPacketListener
- Overrides:
getConnection
in classClientCommonPacketListenerImpl
- Returns:
- the connection this listener is attached to
-
isAcceptingMessages
public boolean isAcceptingMessages()- Specified by:
isAcceptingMessages
in interfacePacketListener
-
getListedOnlinePlayers
-
getOnlinePlayers
-
getOnlinePlayerIds
-
getPlayerInfo
-
getPlayerInfo
Gets the client's description information about another player on the server. -
getLocalGameProfile
public com.mojang.authlib.GameProfile getLocalGameProfile() -
getAdvancements
-
getCommands
-
getLevel
-
getDebugQueryHandler
-
getId
-
levels
-
registryAccess
-
markMessageAsProcessed
-
sendChatAcknowledgement
private void sendChatAcknowledgement() -
sendChat
-
sendCommand
-
sendUnsignedCommand
-
parseCommand
-
tick
public void tick()- Specified by:
tick
in interfaceTickablePacketListener
-
setKeyPair
-
getServerData
-
enabledFeatures
-
isFeatureEnabled
-
scoreboard
-
getConnectionType
Description copied from interface:ICommonPacketListener
Returns the connection type of this packet listener.- Specified by:
getConnectionType
in interfaceICommonPacketListener
- Returns:
- the connection type of this packet listener
-
potionBrewing
-
updateSearchTrees
public void updateSearchTrees() -
searchTrees
-
serverLinks
-
startWaitingForNewLevel(LocalPlayer, ClientLevel, ReceivingLevelScreen.Reason, ResourceKey, ResourceKey)
instead.