Class ItemBow

java.lang.Object
net.minecraft.src.Item
net.minecraft.src.ItemBow
Direct Known Subclasses:
CompositeBowItem

public class ItemBow extends Item
  • Field Details

    • bowPullIconNameArray

      public static final String[] bowPullIconNameArray
  • Constructor Details

    • ItemBow

      public ItemBow(int par1)
  • Method Details

    • onEaten

      public ItemStack onEaten(ItemStack par1ItemStack, World par2World, EntityPlayer par3EntityPlayer)
      Overrides:
      onEaten in class Item
    • getMaxItemUseDuration

      public int getMaxItemUseDuration(ItemStack par1ItemStack)
      How long it takes to use or consume an item
      Overrides:
      getMaxItemUseDuration in class Item
    • getItemUseAction

      public EnumAction getItemUseAction(ItemStack par1ItemStack)
      returns the action that specifies what animation to play when the items is being used
      Overrides:
      getItemUseAction in class Item
    • onPlayerStoppedUsing

      public void onPlayerStoppedUsing(ItemStack itemStack, World world, EntityPlayer player, int iTicksInUseRemaining)
      Description copied from class: Item
      called when the player releases the use item button. Args: itemstack, world, entityplayer, itemInUseCount
      Overrides:
      onPlayerStoppedUsing in class Item
    • onItemRightClick

      public ItemStack onItemRightClick(ItemStack stack, World world, EntityPlayer player)
      Description copied from class: Item
      // +++START EDIT+++ // ---END EDIT--- Called whenever this item is equipped and the right mouse button is pressed. Args: itemStack, world, entityPlayer
      Overrides:
      onItemRightClick in class Item
    • getItemEnchantability

      public int getItemEnchantability()
      Description copied from class: Item
      Return the enchantability factor of the item, most of the time is based on material.
      Overrides:
      getItemEnchantability in class Item
    • isEnchantmentApplicable

      public boolean isEnchantmentApplicable(Enchantment enchantment)
      Overrides:
      isEnchantmentApplicable in class Item
    • onUsedInCrafting

      public void onUsedInCrafting(EntityPlayer player, ItemStack outputStack)
      Overrides:
      onUsedInCrafting in class Item
    • getCurrentPullStrength

      protected float getCurrentPullStrength(EntityPlayer player, ItemStack itemStack, int iTicksInUseRemaining)
    • getFirstArrowStackInHotbar

      public ItemStack getFirstArrowStackInHotbar(EntityPlayer player)
    • canItemBeFiredAsArrow

      public boolean canItemBeFiredAsArrow(int iItemID)
    • getPullStrengthToArrowVelocityMultiplier

      public float getPullStrengthToArrowVelocityMultiplier()
    • createArrowEntityForItem

      protected EntityArrow createArrowEntityForItem(World world, EntityPlayer player, int iItemID, float fPullStrength)
    • applyBowEnchantmentsToArrow

      protected void applyBowEnchantmentsToArrow(ItemStack bowStack, EntityArrow entityArrow)
    • playerBowSound

      protected void playerBowSound(World world, EntityPlayer player, float fPullStrength)
    • getDrawIcon

      public Icon getDrawIcon(int itemInUseDuration)
    • getAnimationIcon

      public Icon getAnimationIcon(EntityPlayer player)
      Description copied from class: Item
      Used to change the item icon the player is holding. Used in bow pulling and casting fishing rod
      Overrides:
      getAnimationIcon in class Item
    • registerIcons

      public void registerIcons(IconRegister par1IconRegister)
      Overrides:
      registerIcons in class Item
    • getItemIconForUseDuration

      public Icon getItemIconForUseDuration(int par1)
      used to cycle through icons based on their used duration, i.e. for the bow