Class ItemGoatHorn

All Implemented Interfaces:
BlockID, ItemID, StringItem, Cloneable

@PowerNukkitXOnly @Since("1.19.80-r3") public class ItemGoatHorn extends StringItemBase
  • Field Details

    • coolDownTick

      protected int coolDownTick
  • Constructor Details

    • ItemGoatHorn

      public ItemGoatHorn()
    • ItemGoatHorn

      public ItemGoatHorn(int count)
    • ItemGoatHorn

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

    • getMaxStackSize

      public int getMaxStackSize()
      Description copied from class: Item
      定义物品堆叠的最大数量

      Define the maximum number of items to be stacked

      Overrides:
      getMaxStackSize in class Item
    • 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
    • setCoolDown

      public void setCoolDown(int coolDownTick)
      Sets cool down tick
      Parameters:
      coolDownTick - the cool down tick
    • playSound

      public void playSound(Player player)