Package net.minecraft.client.network
Class ClientPlayNetworkHandler
java.lang.Object
net.minecraft.client.network.ClientPlayNetworkHandler
- All Implemented Interfaces:
ClientPlayPacketListener
,PacketListener
@Environment(CLIENT) public class ClientPlayNetworkHandler extends Object implements ClientPlayPacketListener
-
Field Summary
Fields Modifier and Type Field Description private ClientAdvancementManager
advancementHandler
private int
chunkLoadDistance
private MinecraftClient
client
private com.mojang.brigadier.CommandDispatcher<CommandSource>
commandDispatcher
private ClientCommandSource
commandSource
private ClientConnection
connection
private DataQueryHandler
dataQueryHandler
private static Text
DISCONNECT_LOST_TEXT
private static Logger
LOGGER
private Screen
loginScreen
private Map<UUID,PlayerListEntry>
playerListEntries
private boolean
positionLookSetup
private com.mojang.authlib.GameProfile
profile
private Random
random
private RecipeManager
recipeManager
private DynamicRegistryManager
registryManager
private UUID
sessionId
private TagManager
tagManager
private ClientWorld
world
private Set<RegistryKey<World>>
worldKeys
private ClientWorld.Properties
worldProperties
-
Constructor Summary
Constructors Constructor Description ClientPlayNetworkHandler(MinecraftClient client, Screen screen, ClientConnection connection, com.mojang.authlib.GameProfile profile)
-
Method Summary
-
Field Details
-
LOGGER
-
DISCONNECT_LOST_TEXT
-
connection
-
profile
private final com.mojang.authlib.GameProfile profile -
loginScreen
-
client
-
world
-
worldProperties
-
positionLookSetup
private boolean positionLookSetup -
playerListEntries
-
advancementHandler
-
commandSource
-
tagManager
-
dataQueryHandler
-
chunkLoadDistance
private int chunkLoadDistance -
random
-
commandDispatcher
-
recipeManager
-
sessionId
-
worldKeys
-
registryManager
-
-
Constructor Details
-
ClientPlayNetworkHandler
public ClientPlayNetworkHandler(MinecraftClient client, Screen screen, ClientConnection connection, com.mojang.authlib.GameProfile profile)
-
-
Method Details
-
getCommandSource
-
clearWorld
public void clearWorld() -
getRecipeManager
-
onGameJoin
- Specified by:
onGameJoin
in interfaceClientPlayPacketListener
-
onEntitySpawn
Handles the spawning of non-living entities.- Specified by:
onEntitySpawn
in interfaceClientPlayPacketListener
-
onExperienceOrbSpawn
- Specified by:
onExperienceOrbSpawn
in interfaceClientPlayPacketListener
-
onVibration
- Specified by:
onVibration
in interfaceClientPlayPacketListener
-
onPaintingSpawn
- Specified by:
onPaintingSpawn
in interfaceClientPlayPacketListener
-
onVelocityUpdate
- Specified by:
onVelocityUpdate
in interfaceClientPlayPacketListener
-
onEntityTrackerUpdate
- Specified by:
onEntityTrackerUpdate
in interfaceClientPlayPacketListener
-
onPlayerSpawn
- Specified by:
onPlayerSpawn
in interfaceClientPlayPacketListener
-
onEntityPosition
- Specified by:
onEntityPosition
in interfaceClientPlayPacketListener
-
onHeldItemChange
- Specified by:
onHeldItemChange
in interfaceClientPlayPacketListener
-
onEntityUpdate
- Specified by:
onEntityUpdate
in interfaceClientPlayPacketListener
-
onEntitySetHeadYaw
- Specified by:
onEntitySetHeadYaw
in interfaceClientPlayPacketListener
-
onEntitiesDestroy
- Specified by:
onEntitiesDestroy
in interfaceClientPlayPacketListener
-
onPlayerPositionLook
- Specified by:
onPlayerPositionLook
in interfaceClientPlayPacketListener
-
onChunkDeltaUpdate
- Specified by:
onChunkDeltaUpdate
in interfaceClientPlayPacketListener
-
onChunkData
- Specified by:
onChunkData
in interfaceClientPlayPacketListener
-
onUnloadChunk
- Specified by:
onUnloadChunk
in interfaceClientPlayPacketListener
-
onBlockUpdate
- Specified by:
onBlockUpdate
in interfaceClientPlayPacketListener
-
onDisconnect
- Specified by:
onDisconnect
in interfaceClientPlayPacketListener
-
onDisconnected
- Specified by:
onDisconnected
in interfacePacketListener
-
sendPacket
Sends a packet to the server.- Parameters:
packet
- the packet to send
-
onItemPickupAnimation
- Specified by:
onItemPickupAnimation
in interfaceClientPlayPacketListener
-
onGameMessage
- Specified by:
onGameMessage
in interfaceClientPlayPacketListener
-
onEntityAnimation
- Specified by:
onEntityAnimation
in interfaceClientPlayPacketListener
-
onMobSpawn
- Specified by:
onMobSpawn
in interfaceClientPlayPacketListener
-
onWorldTimeUpdate
- Specified by:
onWorldTimeUpdate
in interfaceClientPlayPacketListener
-
onPlayerSpawnPosition
- Specified by:
onPlayerSpawnPosition
in interfaceClientPlayPacketListener
-
onEntityPassengersSet
- Specified by:
onEntityPassengersSet
in interfaceClientPlayPacketListener
-
onEntityAttach
- Specified by:
onEntityAttach
in interfaceClientPlayPacketListener
-
getActiveTotemOfUndying
-
onEntityStatus
- Specified by:
onEntityStatus
in interfaceClientPlayPacketListener
-
onHealthUpdate
- Specified by:
onHealthUpdate
in interfaceClientPlayPacketListener
-
onExperienceBarUpdate
- Specified by:
onExperienceBarUpdate
in interfaceClientPlayPacketListener
-
onPlayerRespawn
- Specified by:
onPlayerRespawn
in interfaceClientPlayPacketListener
-
onExplosion
- Specified by:
onExplosion
in interfaceClientPlayPacketListener
-
onOpenHorseScreen
- Specified by:
onOpenHorseScreen
in interfaceClientPlayPacketListener
-
onOpenScreen
- Specified by:
onOpenScreen
in interfaceClientPlayPacketListener
-
onScreenHandlerSlotUpdate
- Specified by:
onScreenHandlerSlotUpdate
in interfaceClientPlayPacketListener
-
onConfirmScreenAction
- Specified by:
onConfirmScreenAction
in interfaceClientPlayPacketListener
-
onInventory
- Specified by:
onInventory
in interfaceClientPlayPacketListener
-
onSignEditorOpen
- Specified by:
onSignEditorOpen
in interfaceClientPlayPacketListener
-
onBlockEntityUpdate
- Specified by:
onBlockEntityUpdate
in interfaceClientPlayPacketListener
-
onScreenHandlerPropertyUpdate
- Specified by:
onScreenHandlerPropertyUpdate
in interfaceClientPlayPacketListener
-
onEquipmentUpdate
- Specified by:
onEquipmentUpdate
in interfaceClientPlayPacketListener
-
onCloseScreen
- Specified by:
onCloseScreen
in interfaceClientPlayPacketListener
-
onBlockEvent
- Specified by:
onBlockEvent
in interfaceClientPlayPacketListener
-
onBlockDestroyProgress
- Specified by:
onBlockDestroyProgress
in interfaceClientPlayPacketListener
-
onGameStateChange
- Specified by:
onGameStateChange
in interfaceClientPlayPacketListener
-
onMapUpdate
- Specified by:
onMapUpdate
in interfaceClientPlayPacketListener
-
onWorldEvent
- Specified by:
onWorldEvent
in interfaceClientPlayPacketListener
-
onAdvancements
- Specified by:
onAdvancements
in interfaceClientPlayPacketListener
-
onSelectAdvancementTab
- Specified by:
onSelectAdvancementTab
in interfaceClientPlayPacketListener
-
onCommandTree
- Specified by:
onCommandTree
in interfaceClientPlayPacketListener
-
onStopSound
- Specified by:
onStopSound
in interfaceClientPlayPacketListener
-
onCommandSuggestions
- Specified by:
onCommandSuggestions
in interfaceClientPlayPacketListener
-
onSynchronizeRecipes
- Specified by:
onSynchronizeRecipes
in interfaceClientPlayPacketListener
-
onLookAt
- Specified by:
onLookAt
in interfaceClientPlayPacketListener
-
onTagQuery
- Specified by:
onTagQuery
in interfaceClientPlayPacketListener
-
onStatistics
- Specified by:
onStatistics
in interfaceClientPlayPacketListener
-
onUnlockRecipes
- Specified by:
onUnlockRecipes
in interfaceClientPlayPacketListener
-
onEntityPotionEffect
- Specified by:
onEntityPotionEffect
in interfaceClientPlayPacketListener
-
onSynchronizeTags
- Specified by:
onSynchronizeTags
in interfaceClientPlayPacketListener
-
onCombatEvent
- Specified by:
onCombatEvent
in interfaceClientPlayPacketListener
-
onDifficulty
- Specified by:
onDifficulty
in interfaceClientPlayPacketListener
-
onSetCameraEntity
- Specified by:
onSetCameraEntity
in interfaceClientPlayPacketListener
-
onWorldBorder
- Specified by:
onWorldBorder
in interfaceClientPlayPacketListener
-
onTitle
- Specified by:
onTitle
in interfaceClientPlayPacketListener
-
onPlayerListHeader
- Specified by:
onPlayerListHeader
in interfaceClientPlayPacketListener
-
onRemoveEntityEffect
- Specified by:
onRemoveEntityEffect
in interfaceClientPlayPacketListener
-
onPlayerList
- Specified by:
onPlayerList
in interfaceClientPlayPacketListener
-
onKeepAlive
- Specified by:
onKeepAlive
in interfaceClientPlayPacketListener
-
onPlayerAbilities
- Specified by:
onPlayerAbilities
in interfaceClientPlayPacketListener
-
onPlaySound
- Specified by:
onPlaySound
in interfaceClientPlayPacketListener
-
onPlaySoundFromEntity
- Specified by:
onPlaySoundFromEntity
in interfaceClientPlayPacketListener
-
onPlaySoundId
- Specified by:
onPlaySoundId
in interfaceClientPlayPacketListener
-
onResourcePackSend
- Specified by:
onResourcePackSend
in interfaceClientPlayPacketListener
-
validateResourcePackUrl
-
feedbackAfterDownload
-
sendResourcePackStatus
-
onBossBar
- Specified by:
onBossBar
in interfaceClientPlayPacketListener
-
onCooldownUpdate
- Specified by:
onCooldownUpdate
in interfaceClientPlayPacketListener
-
onVehicleMove
- Specified by:
onVehicleMove
in interfaceClientPlayPacketListener
-
onOpenWrittenBook
- Specified by:
onOpenWrittenBook
in interfaceClientPlayPacketListener
-
onCustomPayload
- Specified by:
onCustomPayload
in interfaceClientPlayPacketListener
-
onScoreboardObjectiveUpdate
- Specified by:
onScoreboardObjectiveUpdate
in interfaceClientPlayPacketListener
-
onScoreboardPlayerUpdate
- Specified by:
onScoreboardPlayerUpdate
in interfaceClientPlayPacketListener
-
onScoreboardDisplay
- Specified by:
onScoreboardDisplay
in interfaceClientPlayPacketListener
-
onTeam
- Specified by:
onTeam
in interfaceClientPlayPacketListener
-
onParticle
- Specified by:
onParticle
in interfaceClientPlayPacketListener
-
onEntityAttributes
- Specified by:
onEntityAttributes
in interfaceClientPlayPacketListener
-
onCraftFailedResponse
- Specified by:
onCraftFailedResponse
in interfaceClientPlayPacketListener
-
onLightUpdate
- Specified by:
onLightUpdate
in interfaceClientPlayPacketListener
-
onSetTradeOffers
- Specified by:
onSetTradeOffers
in interfaceClientPlayPacketListener
-
onChunkLoadDistance
- Specified by:
onChunkLoadDistance
in interfaceClientPlayPacketListener
-
onChunkRenderDistanceCenter
- Specified by:
onChunkRenderDistanceCenter
in interfaceClientPlayPacketListener
-
onPlayerActionResponse
- Specified by:
onPlayerActionResponse
in interfaceClientPlayPacketListener
-
updateLighting
private void updateLighting(int chunkX, int chunkZ, LightingProvider provider, LightType type, BitSet bitSet, BitSet bitSet2, Iterator<byte[]> iterator, boolean bool) -
getConnection
- Specified by:
getConnection
in interfacePacketListener
-
getPlayerList
-
getPlayerUuids
-
getPlayerListEntry
-
getPlayerListEntry
-
getProfile
public com.mojang.authlib.GameProfile getProfile() -
getAdvancementHandler
-
getCommandDispatcher
-
getWorld
-
getTagManager
-
getDataQueryHandler
-
getSessionId
-
getWorldKeys
-
getRegistryManager
-