net.minecraft.client.multiplayer

## Class PlayerControllerMP

- java.lang.Object
- - net.minecraft.client.multiplayer.PlayerControllerMP

-     public class PlayerControllerMP
      extends Object

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `PlayerControllerMP(Minecraft par1Minecraft, NetClientHandler par2NetClientHandler)`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `attackEntity(EntityPlayer par1EntityPlayer, Entity par2Entity)` Attacks an entity
    `void` | `clickBlock(int par1, int par2, int par3, int par4)` Called by Minecraft class when the player is hitting a block with an item.
    `static void` | `clickBlockCreative(Minecraft par0Minecraft, PlayerControllerMP par1PlayerControllerMP, int par2, int par3, int par4, int par5)` Block dig operation in creative mode (instantly digs the block).
    `boolean` | `extendedReach()` true for hitting entities far away.
    `void` | `flipPlayer(EntityPlayer par1EntityPlayer)` Flips the player around.
    `boolean` | `func_78747_a()`
    `void` | `func_78752_a(ItemStack par1ItemStack)`
    `EntityClientPlayerMP` | `func_78754_a(World par1World)`
    `boolean` | `func_78763_f()`
    `boolean` | `func_78768_b(EntityPlayer par1EntityPlayer, Entity par2Entity)`
    `float` | `getBlockReachDistance()` player reach distance = 4F
    `boolean` | `isInCreativeMode()` returns true if player is in creative mode
    `boolean` | `isNotCreative()` Checks if the player is not creative, used for checking if it should break a block instantly
    `void` | `onPlayerDamageBlock(int par1, int par2, int par3, int par4)` Called when a player damages a block and updates damage counters
    `boolean` | `onPlayerDestroyBlock(int par1, int par2, int par3, int par4)` Called when a player completes the destruction of a block
    `boolean` | `onPlayerRightClick(EntityPlayer par1EntityPlayer, World par2World, ItemStack par3ItemStack, int par4, int par5, int par6, int par7, Vec3 par8Vec3)` Handles a players right click.
    `void` | `onStoppedUsingItem(EntityPlayer par1EntityPlayer)`
    `void` | `resetBlockRemoving()` Resets current block damage and isHittingBlock
    `void` | `sendEnchantPacket(int par1, int par2)` GuiEnchantment uses this during multiplayer to tell PlayerControllerMP to send a packet indicating the enchantment action the player has taken.
    `void` | `sendSlotPacket(ItemStack par1ItemStack, int par2)` Used in PlayerControllerMP to update the server with an ItemStack in a slot.
    `boolean` | `sendUseItem(EntityPlayer par1EntityPlayer, World par2World, ItemStack par3ItemStack)` Notifies the server of things like consuming food, etc...
    `void` | `setGameType(EnumGameType par1EnumGameType)` Sets the game type for the player.
    `void` | `setPlayerCapabilities(EntityPlayer par1EntityPlayer)` Sets player capabilities depending on current gametype.
    `boolean` | `shouldDrawHUD()`
    `void` | `updateController()`
    `ItemStack` | `windowClick(int par1, int par2, int par3, int par4, EntityPlayer par5EntityPlayer)`

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

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

- - ### Constructor Detail

    - #### PlayerControllerMP

          public PlayerControllerMP(Minecraft par1Minecraft,
                            NetClientHandler par2NetClientHandler)

  - ### Method Detail

    - #### clickBlockCreative

          public static void clickBlockCreative(Minecraft par0Minecraft,
                                PlayerControllerMP par1PlayerControllerMP,
                                int par2,
                                int par3,
                                int par4,
                                int par5)

      Block dig operation in creative mode (instantly digs the block).

    - #### setPlayerCapabilities

          public void setPlayerCapabilities(EntityPlayer par1EntityPlayer)

      Sets player capabilities depending on current gametype. params: player

    - #### func_78747_a

          public boolean func_78747_a()

    - #### setGameType

          public void setGameType(EnumGameType par1EnumGameType)

      Sets the game type for the player.

    - #### flipPlayer

          public void flipPlayer(EntityPlayer par1EntityPlayer)

      Flips the player around. Args: player

    - #### shouldDrawHUD

          public boolean shouldDrawHUD()

    - #### onPlayerDestroyBlock

          public boolean onPlayerDestroyBlock(int par1,
                                     int par2,
                                     int par3,
                                     int par4)

      Called when a player completes the destruction of a block

    - #### clickBlock

          public void clickBlock(int par1,
                        int par2,
                        int par3,
                        int par4)

      Called by Minecraft class when the player is hitting a block with an item. Args: x, y, z, side

    - #### resetBlockRemoving

          public void resetBlockRemoving()

      Resets current block damage and isHittingBlock

    - #### onPlayerDamageBlock

          public void onPlayerDamageBlock(int par1,
                                 int par2,
                                 int par3,
                                 int par4)

      Called when a player damages a block and updates damage counters

    - #### getBlockReachDistance

          public float getBlockReachDistance()

      player reach distance = 4F

    - #### updateController

          public void updateController()

    - #### onPlayerRightClick

          public boolean onPlayerRightClick(EntityPlayer par1EntityPlayer,
                                   World par2World,
                                   ItemStack par3ItemStack,
                                   int par4,
                                   int par5,
                                   int par6,
                                   int par7,
                                   Vec3 par8Vec3)

      Handles a players right click. Args: player, world, x, y, z, side, hitVec

    - #### sendUseItem

          public boolean sendUseItem(EntityPlayer par1EntityPlayer,
                            World par2World,
                            ItemStack par3ItemStack)

      Notifies the server of things like consuming food, etc...

    - #### func_78754_a

          public EntityClientPlayerMP func_78754_a(World par1World)

    - #### attackEntity

          public void attackEntity(EntityPlayer par1EntityPlayer,
                          Entity par2Entity)

      Attacks an entity

    - #### func_78768_b

          public boolean func_78768_b(EntityPlayer par1EntityPlayer,
                             Entity par2Entity)

    - #### windowClick

          public ItemStack windowClick(int par1,
                              int par2,
                              int par3,
                              int par4,
                              EntityPlayer par5EntityPlayer)

    - #### sendEnchantPacket

          public void sendEnchantPacket(int par1,
                               int par2)

      GuiEnchantment uses this during multiplayer to tell PlayerControllerMP to send a packet indicating the enchantment action the player has taken.

    - #### sendSlotPacket

          public void sendSlotPacket(ItemStack par1ItemStack,
                            int par2)

      Used in PlayerControllerMP to update the server with an ItemStack in a slot.

    - #### func_78752_a

          public void func_78752_a(ItemStack par1ItemStack)

    - #### onStoppedUsingItem

          public void onStoppedUsingItem(EntityPlayer par1EntityPlayer)

    - #### func_78763_f

          public boolean func_78763_f()

    - #### isNotCreative

          public boolean isNotCreative()

      Checks if the player is not creative, used for checking if it should break a block instantly

    - #### isInCreativeMode

          public boolean isInCreativeMode()

      returns true if player is in creative mode

    - #### extendedReach

          public boolean extendedReach()

      true for hitting entities far away.