Class PlayerControllerMP

java.lang.Object
net.minecraft.src.PlayerControllerMP

public class PlayerControllerMP extends Object
  • Constructor Details

  • Method Details

    • 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
    • enableEverythingIsScrewedUpMode

      public boolean enableEverythingIsScrewedUpMode()
      If modified to return true, the player spins around slowly around (0, 68.5, 0). The GUI is disabled, the view is set to first person, and both chat and menu are disabled. Unless the server is modified to ignore illegal stances, attempting to enter a world at all will result in an immediate kick due to an illegal stance. Appears to be left-over debug, or demo code.
    • 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.
    • func_110738_j

      public boolean func_110738_j()
    • getNetClientHandler

      public NetClientHandler getNetClientHandler()
    • isHittingBlock

      public boolean isHittingBlock()
    • getItemCooldowns

      public Hashtable<Integer,Long> getItemCooldowns()