Class ItemChorusFruit

All Implemented Interfaces:
BlockID, ItemID, Cloneable

public class ItemChorusFruit extends ItemEdible
Since:
20.08.18
Author:
Leonidius20
  • Constructor Details

    • ItemChorusFruit

      public ItemChorusFruit()
    • ItemChorusFruit

      public ItemChorusFruit(Integer meta)
    • ItemChorusFruit

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

    • 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 ItemEdible
      Parameters:
      player - player
      directionVector - 点击的方向向量
      The direction vector of the click
      Returns:
      item changed
    • onUse

      public boolean onUse(Player player, int ticksUsed)
      Description copied from class: Item
      Overrides:
      onUse in class ItemEdible
      Parameters:
      player - the player
      ticksUsed - 物品被使用了多久(右键持续时间)
      How long the item has been used (right-click duration)
      Returns:
      the boolean