net.minecraft.network.packet

## Class NetHandler

- java.lang.Object
- - net.minecraft.network.packet.NetHandler

- Direct Known Subclasses:
    NetClientHandler, NetLoginHandler, NetServerHandler

      public abstract class NetHandler
      extends Object

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `NetHandler()`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `boolean` | `canProcessPacketsAsync()` If this returns false, all packets will be queued for the main thread to handle, even if they would otherwise be processed asynchronously.
    `abstract EntityPlayer` | `getPlayer()`
    `void` | `handleAnimation(Packet18Animation par1Packet18Animation)`
    `void` | `handleAttachEntity(Packet39AttachEntity par1Packet39AttachEntity)` Packet handler
    `void` | `handleAutoComplete(Packet203AutoComplete par1Packet203AutoComplete)`
    `void` | `handleBlockChange(Packet53BlockChange par1Packet53BlockChange)`
    `void` | `handleBlockDestroy(Packet55BlockDestroy par1Packet55BlockDestroy)`
    `void` | `handleBlockDig(Packet14BlockDig par1Packet14BlockDig)`
    `void` | `handleBlockEvent(Packet54PlayNoteBlock par1Packet54PlayNoteBlock)`
    `void` | `handleBlockItemSwitch(Packet16BlockItemSwitch par1Packet16BlockItemSwitch)`
    `void` | `handleChat(Packet3Chat par1Packet3Chat)`
    `void` | `handleClientCommand(Packet205ClientCommand par1Packet205ClientCommand)`
    `void` | `handleClientInfo(Packet204ClientInfo par1Packet204ClientInfo)`
    `void` | `handleClientProtocol(Packet2ClientProtocol par1Packet2ClientProtocol)`
    `void` | `handleCloseWindow(Packet101CloseWindow par1Packet101CloseWindow)`
    `void` | `handleCollect(Packet22Collect par1Packet22Collect)`
    `void` | `handleCreativeSetSlot(Packet107CreativeSetSlot par1Packet107CreativeSetSlot)` Handle a creative slot packet.
    `void` | `handleCustomPayload(Packet250CustomPayload par1Packet250CustomPayload)`
    `void` | `handleDestroyEntity(Packet29DestroyEntity par1Packet29DestroyEntity)`
    `void` | `handleDoorChange(Packet61DoorChange par1Packet61DoorChange)`
    `void` | `handleEnchantItem(Packet108EnchantItem par1Packet108EnchantItem)`
    `void` | `handleEntity(Packet30Entity par1Packet30Entity)`
    `void` | `handleEntityAction(Packet19EntityAction par1Packet19EntityAction)` runs registerPacket on the given Packet19EntityAction
    `void` | `handleEntityEffect(Packet41EntityEffect par1Packet41EntityEffect)` Handle an entity effect packet.
    `void` | `handleEntityExpOrb(Packet26EntityExpOrb par1Packet26EntityExpOrb)` Handle a entity experience orb packet.
    `void` | `handleEntityHeadRotation(Packet35EntityHeadRotation par1Packet35EntityHeadRotation)`
    `void` | `handleEntityMetadata(Packet40EntityMetadata par1Packet40EntityMetadata)` Packet handler
    `void` | `handleEntityPainting(Packet25EntityPainting par1Packet25EntityPainting)` Packet handler
    `void` | `handleEntityStatus(Packet38EntityStatus par1Packet38EntityStatus)` Packet handler
    `void` | `handleEntityTeleport(Packet34EntityTeleport par1Packet34EntityTeleport)`
    `void` | `handleEntityVelocity(Packet28EntityVelocity par1Packet28EntityVelocity)` Packet handler
    `void` | `handleErrorMessage(String par1Str, Object[] par2ArrayOfObj)`
    `void` | `handleExperience(Packet43Experience par1Packet43Experience)` Handle an experience packet.
    `void` | `handleExplosion(Packet60Explosion par1Packet60Explosion)`
    `void` | `handleFlying(Packet10Flying par1Packet10Flying)`
    `void` | `handleGameEvent(Packet70GameEvent par1Packet70GameEvent)`
    `void` | `handleKeepAlive(Packet0KeepAlive par1Packet0KeepAlive)` Handle a keep alive packet.
    `void` | `handleKickDisconnect(Packet255KickDisconnect par1Packet255KickDisconnect)`
    `void` | `handleLevelSound(Packet62LevelSound par1Packet62LevelSound)`
    `void` | `handleLogin(Packet1Login par1Packet1Login)`
    `void` | `handleMapChunk(Packet51MapChunk par1Packet51MapChunk)` Handle Packet51MapChunk (full chunk update of blocks, metadata, light levels, and optionally biome data)
    `void` | `handleMapChunks(Packet56MapChunks par1Packet56MapChunks)`
    `void` | `handleMapData(Packet131MapData par1Packet131MapData)` Contains logic for handling packets containing arbitrary unique item data.
    `void` | `handleMobSpawn(Packet24MobSpawn par1Packet24MobSpawn)`
    `void` | `handleMultiBlockChange(Packet52MultiBlockChange par1Packet52MultiBlockChange)`
    `void` | `handleNamedEntitySpawn(Packet20NamedEntitySpawn par1Packet20NamedEntitySpawn)`
    `void` | `handleOpenWindow(Packet100OpenWindow par1Packet100OpenWindow)`
    `void` | `handlePlace(Packet15Place par1Packet15Place)`
    `void` | `handlePlayerAbilities(Packet202PlayerAbilities par1Packet202PlayerAbilities)` Handle a player abilities packet.
    `void` | `handlePlayerInfo(Packet201PlayerInfo par1Packet201PlayerInfo)` Handle a player information packet.
    `void` | `handlePlayerInventory(Packet5PlayerInventory par1Packet5PlayerInventory)`
    `void` | `handleRemoveEntityEffect(Packet42RemoveEntityEffect par1Packet42RemoveEntityEffect)` Handle a remove entity effect packet.
    `void` | `handleRespawn(Packet9Respawn par1Packet9Respawn)` respawns the player
    `void` | `handleServerAuthData(Packet253ServerAuthData par1Packet253ServerAuthData)`
    `void` | `handleServerPing(Packet254ServerPing par1Packet254ServerPing)` Handle a server ping packet.
    `void` | `handleSetSlot(Packet103SetSlot par1Packet103SetSlot)`
    `void` | `handleSharedKey(Packet252SharedKey par1Packet252SharedKey)`
    `void` | `handleSleep(Packet17Sleep par1Packet17Sleep)`
    `void` | `handleSpawnPosition(Packet6SpawnPosition par1Packet6SpawnPosition)`
    `void` | `handleStatistic(Packet200Statistic par1Packet200Statistic)` Increment player statistics
    `void` | `handleTileEntityData(Packet132TileEntityData par1Packet132TileEntityData)`
    `void` | `handleTransaction(Packet106Transaction par1Packet106Transaction)`
    `void` | `handleUpdateHealth(Packet8UpdateHealth par1Packet8UpdateHealth)` Recieves player health from the server and then proceeds to set it locally on the client.
    `void` | `handleUpdateProgressbar(Packet105UpdateProgressbar par1Packet105UpdateProgressbar)`
    `void` | `handleUpdateSign(Packet130UpdateSign par1Packet130UpdateSign)` Updates Client side signs
    `void` | `handleUpdateTime(Packet4UpdateTime par1Packet4UpdateTime)`
    `void` | `handleUseEntity(Packet7UseEntity par1Packet7UseEntity)`
    `abstract void` | `handleVanilla250Packet(Packet250CustomPayload payload)`
    `void` | `handleVehicleSpawn(Packet23VehicleSpawn par1Packet23VehicleSpawn)`
    `void` | `handleWeather(Packet71Weather par1Packet71Weather)` Handles weather packet
    `void` | `handleWindowClick(Packet102WindowClick par1Packet102WindowClick)`
    `void` | `handleWindowItems(Packet104WindowItems par1Packet104WindowItems)`
    `abstract boolean` | `isServerHandler()` determine if it is a server handler
    `void` | `unexpectedPacket(Packet par1Packet)` Default handler called for packets that don't have their own handlers in NetClientHandler; currentlly does nothing.

    - ### Methods inherited from class java.lang.Object

      `equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### NetHandler

          public NetHandler()

  - ### Method Detail

    - #### isServerHandler

          public abstract boolean isServerHandler()

      determine if it is a server handler

    - #### handleMapChunk

          public void handleMapChunk(Packet51MapChunk par1Packet51MapChunk)

      Handle Packet51MapChunk (full chunk update of blocks, metadata, light levels, and optionally biome data)

    - #### unexpectedPacket

          public void unexpectedPacket(Packet par1Packet)

      Default handler called for packets that don't have their own handlers in NetClientHandler; currentlly does nothing.

    - #### handleErrorMessage

          public void handleErrorMessage(String par1Str,
                                Object[] par2ArrayOfObj)

    - #### handleKickDisconnect

          public void handleKickDisconnect(Packet255KickDisconnect par1Packet255KickDisconnect)

    - #### handleLogin

          public void handleLogin(Packet1Login par1Packet1Login)

    - #### handleFlying

          public void handleFlying(Packet10Flying par1Packet10Flying)

    - #### handleMultiBlockChange

          public void handleMultiBlockChange(Packet52MultiBlockChange par1Packet52MultiBlockChange)

    - #### handleBlockDig

          public void handleBlockDig(Packet14BlockDig par1Packet14BlockDig)

    - #### handleBlockChange

          public void handleBlockChange(Packet53BlockChange par1Packet53BlockChange)

    - #### handleNamedEntitySpawn

          public void handleNamedEntitySpawn(Packet20NamedEntitySpawn par1Packet20NamedEntitySpawn)

    - #### handleEntity

          public void handleEntity(Packet30Entity par1Packet30Entity)

    - #### handleEntityTeleport

          public void handleEntityTeleport(Packet34EntityTeleport par1Packet34EntityTeleport)

    - #### handlePlace

          public void handlePlace(Packet15Place par1Packet15Place)

    - #### handleBlockItemSwitch

          public void handleBlockItemSwitch(Packet16BlockItemSwitch par1Packet16BlockItemSwitch)

    - #### handleDestroyEntity

          public void handleDestroyEntity(Packet29DestroyEntity par1Packet29DestroyEntity)

    - #### handleCollect

          public void handleCollect(Packet22Collect par1Packet22Collect)

    - #### handleChat

          public void handleChat(Packet3Chat par1Packet3Chat)

    - #### handleVehicleSpawn

          public void handleVehicleSpawn(Packet23VehicleSpawn par1Packet23VehicleSpawn)

    - #### handleAnimation

          public void handleAnimation(Packet18Animation par1Packet18Animation)

    - #### handleEntityAction

          public void handleEntityAction(Packet19EntityAction par1Packet19EntityAction)

      runs registerPacket on the given Packet19EntityAction

    - #### handleClientProtocol

          public void handleClientProtocol(Packet2ClientProtocol par1Packet2ClientProtocol)

    - #### handleServerAuthData

          public void handleServerAuthData(Packet253ServerAuthData par1Packet253ServerAuthData)

    - #### handleSharedKey

          public void handleSharedKey(Packet252SharedKey par1Packet252SharedKey)

    - #### handleMobSpawn

          public void handleMobSpawn(Packet24MobSpawn par1Packet24MobSpawn)

    - #### handleUpdateTime

          public void handleUpdateTime(Packet4UpdateTime par1Packet4UpdateTime)

    - #### handleSpawnPosition

          public void handleSpawnPosition(Packet6SpawnPosition par1Packet6SpawnPosition)

    - #### handleEntityVelocity

          public void handleEntityVelocity(Packet28EntityVelocity par1Packet28EntityVelocity)

      Packet handler

    - #### handleEntityMetadata

          public void handleEntityMetadata(Packet40EntityMetadata par1Packet40EntityMetadata)

      Packet handler

    - #### handleAttachEntity

          public void handleAttachEntity(Packet39AttachEntity par1Packet39AttachEntity)

      Packet handler

    - #### handleUseEntity

          public void handleUseEntity(Packet7UseEntity par1Packet7UseEntity)

    - #### handleEntityStatus

          public void handleEntityStatus(Packet38EntityStatus par1Packet38EntityStatus)

      Packet handler

    - #### handleUpdateHealth

          public void handleUpdateHealth(Packet8UpdateHealth par1Packet8UpdateHealth)

      Recieves player health from the server and then proceeds to set it locally on the client.

    - #### handleRespawn

          public void handleRespawn(Packet9Respawn par1Packet9Respawn)

      respawns the player

    - #### handleExplosion

          public void handleExplosion(Packet60Explosion par1Packet60Explosion)

    - #### handleOpenWindow

          public void handleOpenWindow(Packet100OpenWindow par1Packet100OpenWindow)

    - #### handleCloseWindow

          public void handleCloseWindow(Packet101CloseWindow par1Packet101CloseWindow)

    - #### handleWindowClick

          public void handleWindowClick(Packet102WindowClick par1Packet102WindowClick)

    - #### handleSetSlot

          public void handleSetSlot(Packet103SetSlot par1Packet103SetSlot)

    - #### handleWindowItems

          public void handleWindowItems(Packet104WindowItems par1Packet104WindowItems)

    - #### handleUpdateSign

          public void handleUpdateSign(Packet130UpdateSign par1Packet130UpdateSign)

      Updates Client side signs

    - #### handleUpdateProgressbar

          public void handleUpdateProgressbar(Packet105UpdateProgressbar par1Packet105UpdateProgressbar)

    - #### handlePlayerInventory

          public void handlePlayerInventory(Packet5PlayerInventory par1Packet5PlayerInventory)

    - #### handleTransaction

          public void handleTransaction(Packet106Transaction par1Packet106Transaction)

    - #### handleEntityPainting

          public void handleEntityPainting(Packet25EntityPainting par1Packet25EntityPainting)

      Packet handler

    - #### handleBlockEvent

          public void handleBlockEvent(Packet54PlayNoteBlock par1Packet54PlayNoteBlock)

    - #### handleStatistic

          public void handleStatistic(Packet200Statistic par1Packet200Statistic)

      Increment player statistics

    - #### handleSleep

          public void handleSleep(Packet17Sleep par1Packet17Sleep)

    - #### handleGameEvent

          public void handleGameEvent(Packet70GameEvent par1Packet70GameEvent)

    - #### handleWeather

          public void handleWeather(Packet71Weather par1Packet71Weather)

      Handles weather packet

    - #### handleMapData

          public void handleMapData(Packet131MapData par1Packet131MapData)

      Contains logic for handling packets containing arbitrary unique item data. Currently this is only for maps.

    - #### handleDoorChange

          public void handleDoorChange(Packet61DoorChange par1Packet61DoorChange)

    - #### handleServerPing

          public void handleServerPing(Packet254ServerPing par1Packet254ServerPing)

      Handle a server ping packet.

    - #### handleEntityEffect

          public void handleEntityEffect(Packet41EntityEffect par1Packet41EntityEffect)

      Handle an entity effect packet.

    - #### handleRemoveEntityEffect

          public void handleRemoveEntityEffect(Packet42RemoveEntityEffect par1Packet42RemoveEntityEffect)

      Handle a remove entity effect packet.

    - #### handlePlayerInfo

          public void handlePlayerInfo(Packet201PlayerInfo par1Packet201PlayerInfo)

      Handle a player information packet.

    - #### handleKeepAlive

          public void handleKeepAlive(Packet0KeepAlive par1Packet0KeepAlive)

      Handle a keep alive packet.

    - #### handleExperience

          public void handleExperience(Packet43Experience par1Packet43Experience)

      Handle an experience packet.

    - #### handleCreativeSetSlot

          public void handleCreativeSetSlot(Packet107CreativeSetSlot par1Packet107CreativeSetSlot)

      Handle a creative slot packet.

    - #### handleEntityExpOrb

          public void handleEntityExpOrb(Packet26EntityExpOrb par1Packet26EntityExpOrb)

      Handle a entity experience orb packet.

    - #### handleEnchantItem

          public void handleEnchantItem(Packet108EnchantItem par1Packet108EnchantItem)

    - #### handleCustomPayload

          public void handleCustomPayload(Packet250CustomPayload par1Packet250CustomPayload)

    - #### handleEntityHeadRotation

          public void handleEntityHeadRotation(Packet35EntityHeadRotation par1Packet35EntityHeadRotation)

    - #### handleTileEntityData

          public void handleTileEntityData(Packet132TileEntityData par1Packet132TileEntityData)

    - #### handlePlayerAbilities

          public void handlePlayerAbilities(Packet202PlayerAbilities par1Packet202PlayerAbilities)

      Handle a player abilities packet.

    - #### handleAutoComplete

          public void handleAutoComplete(Packet203AutoComplete par1Packet203AutoComplete)

    - #### handleClientInfo

          public void handleClientInfo(Packet204ClientInfo par1Packet204ClientInfo)

    - #### handleLevelSound

          public void handleLevelSound(Packet62LevelSound par1Packet62LevelSound)

    - #### handleBlockDestroy

          public void handleBlockDestroy(Packet55BlockDestroy par1Packet55BlockDestroy)

    - #### handleClientCommand

          public void handleClientCommand(Packet205ClientCommand par1Packet205ClientCommand)

    - #### handleMapChunks

          public void handleMapChunks(Packet56MapChunks par1Packet56MapChunks)

    - #### canProcessPacketsAsync

          public boolean canProcessPacketsAsync()

      If this returns false, all packets will be queued for the main thread to handle, even if they would otherwise be processed asynchronously. Used to avoid processing packets on the client before the world has been downloaded (which happens on the main thread)

    - #### handleVanilla250Packet

          public abstract void handleVanilla250Packet(Packet250CustomPayload payload)

    - #### getPlayer

          public abstract EntityPlayer getPlayer()