Class ItemFishingRod

All Implemented Interfaces:
BlockID, ItemDurable, ItemID, Cloneable

public class ItemFishingRod extends ItemTool
Since:
2016/1/14
Author:
Snake1999
  • Constructor Details

    • ItemFishingRod

      public ItemFishingRod()
    • ItemFishingRod

      public ItemFishingRod(Integer meta)
    • ItemFishingRod

      public ItemFishingRod(Integer meta, int count)
  • Method Details

    • getEnchantAbility

      public int getEnchantAbility()
      Description copied from class: Item
      定义物品的附魔

      Define the enchantment of an item

      Overrides:
      getEnchantAbility in class ItemTool
    • onClickAir

      public boolean onClickAir(Player player, Vector3 directionVector)
      Description copied from class: Item
      当玩家对着空中使用物品时调用,例如投掷物品。返回物品是否已更改,例如数量减少或耐久度更改。

      Called when a player uses the item on air, for example throwing a projectile. Returns whether the item was changed, for example count decrease or durability change.

      Overrides:
      onClickAir in class Item
      Parameters:
      player - player
      directionVector - 点击的方向向量
      The direction vector of the click
      Returns:
      item changed
    • getMaxDurability

      public int getMaxDurability()
      Description copied from class: Item
      定义物品最大耐久值

      Define the maximum durability value of the item

      Overrides:
      getMaxDurability in class Item
    • noDamageOnAttack

      public boolean noDamageOnAttack()
      Description copied from class: ItemTool
      No damage to item when it's used to attack entities
      Overrides:
      noDamageOnAttack in class ItemTool
      Returns:
      whether the item should take damage when used to attack entities
    • noDamageOnBreak

      public boolean noDamageOnBreak()
      Description copied from class: ItemTool
      No damage to item when it's used to break blocks
      Overrides:
      noDamageOnBreak in class ItemTool
      Returns:
      whether the item should take damage when used to break blocks