Class ClientPlayNetHandler
- java.lang.Object
-
- net.minecraft.client.network.play.ClientPlayNetHandler
-
- All Implemented Interfaces:
IClientPlayNetHandler
,INetHandler
public class ClientPlayNetHandler extends java.lang.Object implements IClientPlayNetHandler
-
-
Field Summary
Fields Modifier and Type Field Description private ClientAdvancementManager
advancements
private Screen
callbackScreen
private com.mojang.brigadier.CommandDispatcher<ISuggestionProvider>
commands
private NetworkManager
connection
private NBTQueryManager
debugQueryHandler
private static ITextComponent
GENERIC_DISCONNECT_MESSAGE
private java.util.UUID
id
private ClientWorld
level
private ClientWorld.ClientWorldInfo
levelData
private java.util.Set<RegistryKey<World>>
levels
private com.mojang.authlib.GameProfile
localGameProfile
private static org.apache.logging.log4j.Logger
LOGGER
private Minecraft
minecraft
private java.util.Map<java.util.UUID,NetworkPlayerInfo>
playerInfoMap
private java.util.Random
random
private RecipeManager
recipeManager
private DynamicRegistries
registryAccess
private int
serverChunkRadius
private boolean
started
private ClientSuggestionProvider
suggestionsProvider
private ITagCollectionSupplier
tags
-
Constructor Summary
Constructors Constructor Description ClientPlayNetHandler(Minecraft p_i46300_1_, Screen p_i46300_2_, NetworkManager p_i46300_3_, com.mojang.authlib.GameProfile p_i46300_4_)
-
Method Summary
-
-
-
Field Detail
-
LOGGER
private static final org.apache.logging.log4j.Logger LOGGER
-
GENERIC_DISCONNECT_MESSAGE
private static final ITextComponent GENERIC_DISCONNECT_MESSAGE
-
connection
private final NetworkManager connection
-
localGameProfile
private final com.mojang.authlib.GameProfile localGameProfile
-
callbackScreen
private final Screen callbackScreen
-
minecraft
private Minecraft minecraft
-
level
private ClientWorld level
-
levelData
private ClientWorld.ClientWorldInfo levelData
-
started
private boolean started
-
playerInfoMap
private final java.util.Map<java.util.UUID,NetworkPlayerInfo> playerInfoMap
-
advancements
private final ClientAdvancementManager advancements
-
suggestionsProvider
private final ClientSuggestionProvider suggestionsProvider
-
tags
private ITagCollectionSupplier tags
-
debugQueryHandler
private final NBTQueryManager debugQueryHandler
-
serverChunkRadius
private int serverChunkRadius
-
random
private final java.util.Random random
-
commands
private com.mojang.brigadier.CommandDispatcher<ISuggestionProvider> commands
-
recipeManager
private final RecipeManager recipeManager
-
id
private final java.util.UUID id
-
levels
private java.util.Set<RegistryKey<World>> levels
-
registryAccess
private DynamicRegistries registryAccess
-
-
Constructor Detail
-
ClientPlayNetHandler
public ClientPlayNetHandler(Minecraft p_i46300_1_, Screen p_i46300_2_, NetworkManager p_i46300_3_, com.mojang.authlib.GameProfile p_i46300_4_)
-
-
Method Detail
-
getSuggestionsProvider
public ClientSuggestionProvider getSuggestionsProvider()
-
cleanup
public void cleanup()
-
getRecipeManager
public RecipeManager getRecipeManager()
-
handleLogin
public void handleLogin(SJoinGamePacket p_147282_1_)
- Specified by:
handleLogin
in interfaceIClientPlayNetHandler
-
handleAddEntity
public void handleAddEntity(SSpawnObjectPacket p_147235_1_)
- Specified by:
handleAddEntity
in interfaceIClientPlayNetHandler
-
handleAddExperienceOrb
public void handleAddExperienceOrb(SSpawnExperienceOrbPacket p_147286_1_)
- Specified by:
handleAddExperienceOrb
in interfaceIClientPlayNetHandler
-
handleAddPainting
public void handleAddPainting(SSpawnPaintingPacket p_147288_1_)
- Specified by:
handleAddPainting
in interfaceIClientPlayNetHandler
-
handleSetEntityMotion
public void handleSetEntityMotion(SEntityVelocityPacket p_147244_1_)
- Specified by:
handleSetEntityMotion
in interfaceIClientPlayNetHandler
-
handleSetEntityData
public void handleSetEntityData(SEntityMetadataPacket p_147284_1_)
- Specified by:
handleSetEntityData
in interfaceIClientPlayNetHandler
-
handleAddPlayer
public void handleAddPlayer(SSpawnPlayerPacket p_147237_1_)
- Specified by:
handleAddPlayer
in interfaceIClientPlayNetHandler
-
handleTeleportEntity
public void handleTeleportEntity(SEntityTeleportPacket p_147275_1_)
- Specified by:
handleTeleportEntity
in interfaceIClientPlayNetHandler
-
handleSetCarriedItem
public void handleSetCarriedItem(SHeldItemChangePacket p_147257_1_)
- Specified by:
handleSetCarriedItem
in interfaceIClientPlayNetHandler
-
handleMoveEntity
public void handleMoveEntity(SEntityPacket p_147259_1_)
- Specified by:
handleMoveEntity
in interfaceIClientPlayNetHandler
-
handleRotateMob
public void handleRotateMob(SEntityHeadLookPacket p_147267_1_)
- Specified by:
handleRotateMob
in interfaceIClientPlayNetHandler
-
handleRemoveEntity
public void handleRemoveEntity(SDestroyEntitiesPacket p_147238_1_)
- Specified by:
handleRemoveEntity
in interfaceIClientPlayNetHandler
-
handleMovePlayer
public void handleMovePlayer(SPlayerPositionLookPacket p_184330_1_)
- Specified by:
handleMovePlayer
in interfaceIClientPlayNetHandler
-
handleChunkBlocksUpdate
public void handleChunkBlocksUpdate(SMultiBlockChangePacket p_147287_1_)
- Specified by:
handleChunkBlocksUpdate
in interfaceIClientPlayNetHandler
-
handleLevelChunk
public void handleLevelChunk(SChunkDataPacket p_147263_1_)
- Specified by:
handleLevelChunk
in interfaceIClientPlayNetHandler
-
handleForgetLevelChunk
public void handleForgetLevelChunk(SUnloadChunkPacket p_184326_1_)
- Specified by:
handleForgetLevelChunk
in interfaceIClientPlayNetHandler
-
handleBlockUpdate
public void handleBlockUpdate(SChangeBlockPacket p_147234_1_)
- Specified by:
handleBlockUpdate
in interfaceIClientPlayNetHandler
-
handleDisconnect
public void handleDisconnect(SDisconnectPacket p_147253_1_)
- Specified by:
handleDisconnect
in interfaceIClientPlayNetHandler
-
onDisconnect
public void onDisconnect(ITextComponent p_147231_1_)
- Specified by:
onDisconnect
in interfaceINetHandler
-
send
public void send(IPacket<?> p_147297_1_)
-
handleTakeItemEntity
public void handleTakeItemEntity(SCollectItemPacket p_147246_1_)
- Specified by:
handleTakeItemEntity
in interfaceIClientPlayNetHandler
-
handleChat
public void handleChat(SChatPacket p_147251_1_)
- Specified by:
handleChat
in interfaceIClientPlayNetHandler
-
handleAnimate
public void handleAnimate(SAnimateHandPacket p_147279_1_)
- Specified by:
handleAnimate
in interfaceIClientPlayNetHandler
-
handleAddMob
public void handleAddMob(SSpawnMobPacket p_147281_1_)
- Specified by:
handleAddMob
in interfaceIClientPlayNetHandler
-
handleSetTime
public void handleSetTime(SUpdateTimePacket p_147285_1_)
- Specified by:
handleSetTime
in interfaceIClientPlayNetHandler
-
handleSetSpawn
public void handleSetSpawn(SWorldSpawnChangedPacket p_230488_1_)
- Specified by:
handleSetSpawn
in interfaceIClientPlayNetHandler
-
handleSetEntityPassengersPacket
public void handleSetEntityPassengersPacket(SSetPassengersPacket p_184328_1_)
- Specified by:
handleSetEntityPassengersPacket
in interfaceIClientPlayNetHandler
-
handleEntityLinkPacket
public void handleEntityLinkPacket(SMountEntityPacket p_147243_1_)
- Specified by:
handleEntityLinkPacket
in interfaceIClientPlayNetHandler
-
findTotem
private static ItemStack findTotem(PlayerEntity p_217282_0_)
-
handleEntityEvent
public void handleEntityEvent(SEntityStatusPacket p_147236_1_)
- Specified by:
handleEntityEvent
in interfaceIClientPlayNetHandler
-
handleSetHealth
public void handleSetHealth(SUpdateHealthPacket p_147249_1_)
- Specified by:
handleSetHealth
in interfaceIClientPlayNetHandler
-
handleSetExperience
public void handleSetExperience(SSetExperiencePacket p_147295_1_)
- Specified by:
handleSetExperience
in interfaceIClientPlayNetHandler
-
handleRespawn
public void handleRespawn(SRespawnPacket p_147280_1_)
- Specified by:
handleRespawn
in interfaceIClientPlayNetHandler
-
handleExplosion
public void handleExplosion(SExplosionPacket p_147283_1_)
- Specified by:
handleExplosion
in interfaceIClientPlayNetHandler
-
handleHorseScreenOpen
public void handleHorseScreenOpen(SOpenHorseWindowPacket p_217271_1_)
- Specified by:
handleHorseScreenOpen
in interfaceIClientPlayNetHandler
-
handleOpenScreen
public void handleOpenScreen(SOpenWindowPacket p_217272_1_)
- Specified by:
handleOpenScreen
in interfaceIClientPlayNetHandler
-
handleContainerSetSlot
public void handleContainerSetSlot(SSetSlotPacket p_147266_1_)
- Specified by:
handleContainerSetSlot
in interfaceIClientPlayNetHandler
-
handleContainerAck
public void handleContainerAck(SConfirmTransactionPacket p_147239_1_)
- Specified by:
handleContainerAck
in interfaceIClientPlayNetHandler
-
handleContainerContent
public void handleContainerContent(SWindowItemsPacket p_147241_1_)
- Specified by:
handleContainerContent
in interfaceIClientPlayNetHandler
-
handleOpenSignEditor
public void handleOpenSignEditor(SOpenSignMenuPacket p_147268_1_)
- Specified by:
handleOpenSignEditor
in interfaceIClientPlayNetHandler
-
handleBlockEntityData
public void handleBlockEntityData(SUpdateTileEntityPacket p_147273_1_)
- Specified by:
handleBlockEntityData
in interfaceIClientPlayNetHandler
-
handleContainerSetData
public void handleContainerSetData(SWindowPropertyPacket p_147245_1_)
- Specified by:
handleContainerSetData
in interfaceIClientPlayNetHandler
-
handleSetEquipment
public void handleSetEquipment(SEntityEquipmentPacket p_147242_1_)
- Specified by:
handleSetEquipment
in interfaceIClientPlayNetHandler
-
handleContainerClose
public void handleContainerClose(SCloseWindowPacket p_147276_1_)
- Specified by:
handleContainerClose
in interfaceIClientPlayNetHandler
-
handleBlockEvent
public void handleBlockEvent(SBlockActionPacket p_147261_1_)
- Specified by:
handleBlockEvent
in interfaceIClientPlayNetHandler
-
handleBlockDestruction
public void handleBlockDestruction(SAnimateBlockBreakPacket p_147294_1_)
- Specified by:
handleBlockDestruction
in interfaceIClientPlayNetHandler
-
handleGameEvent
public void handleGameEvent(SChangeGameStatePacket p_147252_1_)
- Specified by:
handleGameEvent
in interfaceIClientPlayNetHandler
-
handleMapItemData
public void handleMapItemData(SMapDataPacket p_147264_1_)
- Specified by:
handleMapItemData
in interfaceIClientPlayNetHandler
-
handleLevelEvent
public void handleLevelEvent(SPlaySoundEventPacket p_147277_1_)
- Specified by:
handleLevelEvent
in interfaceIClientPlayNetHandler
-
handleUpdateAdvancementsPacket
public void handleUpdateAdvancementsPacket(SAdvancementInfoPacket p_191981_1_)
- Specified by:
handleUpdateAdvancementsPacket
in interfaceIClientPlayNetHandler
-
handleSelectAdvancementsTab
public void handleSelectAdvancementsTab(SSelectAdvancementsTabPacket p_194022_1_)
- Specified by:
handleSelectAdvancementsTab
in interfaceIClientPlayNetHandler
-
handleCommands
public void handleCommands(SCommandListPacket p_195511_1_)
- Specified by:
handleCommands
in interfaceIClientPlayNetHandler
-
handleStopSoundEvent
public void handleStopSoundEvent(SStopSoundPacket p_195512_1_)
- Specified by:
handleStopSoundEvent
in interfaceIClientPlayNetHandler
-
handleCommandSuggestions
public void handleCommandSuggestions(STabCompletePacket p_195510_1_)
- Specified by:
handleCommandSuggestions
in interfaceIClientPlayNetHandler
-
handleUpdateRecipes
public void handleUpdateRecipes(SUpdateRecipesPacket p_199525_1_)
- Specified by:
handleUpdateRecipes
in interfaceIClientPlayNetHandler
-
handleLookAt
public void handleLookAt(SPlayerLookPacket p_200232_1_)
- Specified by:
handleLookAt
in interfaceIClientPlayNetHandler
-
handleTagQueryPacket
public void handleTagQueryPacket(SQueryNBTResponsePacket p_211522_1_)
- Specified by:
handleTagQueryPacket
in interfaceIClientPlayNetHandler
-
handleAwardStats
public void handleAwardStats(SStatisticsPacket p_147293_1_)
- Specified by:
handleAwardStats
in interfaceIClientPlayNetHandler
-
handleAddOrRemoveRecipes
public void handleAddOrRemoveRecipes(SRecipeBookPacket p_191980_1_)
- Specified by:
handleAddOrRemoveRecipes
in interfaceIClientPlayNetHandler
-
handleUpdateMobEffect
public void handleUpdateMobEffect(SPlayEntityEffectPacket p_147260_1_)
- Specified by:
handleUpdateMobEffect
in interfaceIClientPlayNetHandler
-
handleUpdateTags
public void handleUpdateTags(STagsListPacket p_199723_1_)
- Specified by:
handleUpdateTags
in interfaceIClientPlayNetHandler
-
handlePlayerCombat
public void handlePlayerCombat(SCombatPacket p_175098_1_)
- Specified by:
handlePlayerCombat
in interfaceIClientPlayNetHandler
-
handleChangeDifficulty
public void handleChangeDifficulty(SServerDifficultyPacket p_175101_1_)
- Specified by:
handleChangeDifficulty
in interfaceIClientPlayNetHandler
-
handleSetCamera
public void handleSetCamera(SCameraPacket p_175094_1_)
- Specified by:
handleSetCamera
in interfaceIClientPlayNetHandler
-
handleSetBorder
public void handleSetBorder(SWorldBorderPacket p_175093_1_)
- Specified by:
handleSetBorder
in interfaceIClientPlayNetHandler
-
handleSetTitles
public void handleSetTitles(STitlePacket p_175099_1_)
- Specified by:
handleSetTitles
in interfaceIClientPlayNetHandler
-
handleTabListCustomisation
public void handleTabListCustomisation(SPlayerListHeaderFooterPacket p_175096_1_)
- Specified by:
handleTabListCustomisation
in interfaceIClientPlayNetHandler
-
handleRemoveMobEffect
public void handleRemoveMobEffect(SRemoveEntityEffectPacket p_147262_1_)
- Specified by:
handleRemoveMobEffect
in interfaceIClientPlayNetHandler
-
handlePlayerInfo
public void handlePlayerInfo(SPlayerListItemPacket p_147256_1_)
- Specified by:
handlePlayerInfo
in interfaceIClientPlayNetHandler
-
handleKeepAlive
public void handleKeepAlive(SKeepAlivePacket p_147272_1_)
- Specified by:
handleKeepAlive
in interfaceIClientPlayNetHandler
-
handlePlayerAbilities
public void handlePlayerAbilities(SPlayerAbilitiesPacket p_147270_1_)
- Specified by:
handlePlayerAbilities
in interfaceIClientPlayNetHandler
-
handleSoundEvent
public void handleSoundEvent(SPlaySoundEffectPacket p_184327_1_)
- Specified by:
handleSoundEvent
in interfaceIClientPlayNetHandler
-
handleSoundEntityEvent
public void handleSoundEntityEvent(SSpawnMovingSoundEffectPacket p_217266_1_)
- Specified by:
handleSoundEntityEvent
in interfaceIClientPlayNetHandler
-
handleCustomSoundEvent
public void handleCustomSoundEvent(SPlaySoundPacket p_184329_1_)
- Specified by:
handleCustomSoundEvent
in interfaceIClientPlayNetHandler
-
handleResourcePack
public void handleResourcePack(SSendResourcePackPacket p_175095_1_)
- Specified by:
handleResourcePack
in interfaceIClientPlayNetHandler
-
validateResourcePackUrl
private boolean validateResourcePackUrl(java.lang.String p_189688_1_)
-
downloadCallback
private void downloadCallback(java.util.concurrent.CompletableFuture<?> p_217279_1_)
-
send
private void send(CResourcePackStatusPacket.Action p_217283_1_)
-
handleBossUpdate
public void handleBossUpdate(SUpdateBossInfoPacket p_184325_1_)
- Specified by:
handleBossUpdate
in interfaceIClientPlayNetHandler
-
handleItemCooldown
public void handleItemCooldown(SCooldownPacket p_184324_1_)
- Specified by:
handleItemCooldown
in interfaceIClientPlayNetHandler
-
handleMoveVehicle
public void handleMoveVehicle(SMoveVehiclePacket p_184323_1_)
- Specified by:
handleMoveVehicle
in interfaceIClientPlayNetHandler
-
handleOpenBook
public void handleOpenBook(SOpenBookWindowPacket p_217268_1_)
- Specified by:
handleOpenBook
in interfaceIClientPlayNetHandler
-
handleCustomPayload
public void handleCustomPayload(SCustomPayloadPlayPacket p_147240_1_)
- Specified by:
handleCustomPayload
in interfaceIClientPlayNetHandler
-
handleAddObjective
public void handleAddObjective(SScoreboardObjectivePacket p_147291_1_)
- Specified by:
handleAddObjective
in interfaceIClientPlayNetHandler
-
handleSetScore
public void handleSetScore(SUpdateScorePacket p_147250_1_)
- Specified by:
handleSetScore
in interfaceIClientPlayNetHandler
-
handleSetDisplayObjective
public void handleSetDisplayObjective(SDisplayObjectivePacket p_147254_1_)
- Specified by:
handleSetDisplayObjective
in interfaceIClientPlayNetHandler
-
handleSetPlayerTeamPacket
public void handleSetPlayerTeamPacket(STeamsPacket p_147247_1_)
- Specified by:
handleSetPlayerTeamPacket
in interfaceIClientPlayNetHandler
-
handleParticleEvent
public void handleParticleEvent(SSpawnParticlePacket p_147289_1_)
- Specified by:
handleParticleEvent
in interfaceIClientPlayNetHandler
-
handleUpdateAttributes
public void handleUpdateAttributes(SEntityPropertiesPacket p_147290_1_)
- Specified by:
handleUpdateAttributes
in interfaceIClientPlayNetHandler
-
handlePlaceRecipe
public void handlePlaceRecipe(SPlaceGhostRecipePacket p_194307_1_)
- Specified by:
handlePlaceRecipe
in interfaceIClientPlayNetHandler
-
handleLightUpdatePacked
public void handleLightUpdatePacked(SUpdateLightPacket p_217269_1_)
- Specified by:
handleLightUpdatePacked
in interfaceIClientPlayNetHandler
-
handleMerchantOffers
public void handleMerchantOffers(SMerchantOffersPacket p_217273_1_)
- Specified by:
handleMerchantOffers
in interfaceIClientPlayNetHandler
-
handleSetChunkCacheRadius
public void handleSetChunkCacheRadius(SUpdateViewDistancePacket p_217270_1_)
- Specified by:
handleSetChunkCacheRadius
in interfaceIClientPlayNetHandler
-
handleSetChunkCacheCenter
public void handleSetChunkCacheCenter(SUpdateChunkPositionPacket p_217267_1_)
- Specified by:
handleSetChunkCacheCenter
in interfaceIClientPlayNetHandler
-
handleBlockBreakAck
public void handleBlockBreakAck(SPlayerDiggingPacket p_225312_1_)
- Specified by:
handleBlockBreakAck
in interfaceIClientPlayNetHandler
-
readSectionList
private void readSectionList(int p_217284_1_, int p_217284_2_, WorldLightManager p_217284_3_, LightType p_217284_4_, int p_217284_5_, int p_217284_6_, java.util.Iterator<byte[]> p_217284_7_, boolean p_217284_8_)
-
getConnection
public NetworkManager getConnection()
- Specified by:
getConnection
in interfaceINetHandler
-
getOnlinePlayers
public java.util.Collection<NetworkPlayerInfo> getOnlinePlayers()
-
getOnlinePlayerIds
public java.util.Collection<java.util.UUID> getOnlinePlayerIds()
-
getPlayerInfo
@Nullable public NetworkPlayerInfo getPlayerInfo(java.util.UUID p_175102_1_)
-
getPlayerInfo
@Nullable public NetworkPlayerInfo getPlayerInfo(java.lang.String p_175104_1_)
-
getLocalGameProfile
public com.mojang.authlib.GameProfile getLocalGameProfile()
-
getAdvancements
public ClientAdvancementManager getAdvancements()
-
getCommands
public com.mojang.brigadier.CommandDispatcher<ISuggestionProvider> getCommands()
-
getLevel
public ClientWorld getLevel()
-
getTags
public ITagCollectionSupplier getTags()
-
getDebugQueryHandler
public NBTQueryManager getDebugQueryHandler()
-
getId
public java.util.UUID getId()
-
levels
public java.util.Set<RegistryKey<World>> levels()
-
registryAccess
public DynamicRegistries registryAccess()
-
-