Class ItemTrident

All Implemented Interfaces:
BlockID, ItemDurable, ItemID, Cloneable

public class ItemTrident extends ItemTool
Author:
PetteriM1
  • Constructor Details

    • ItemTrident

      public ItemTrident()
    • ItemTrident

      public ItemTrident(Integer meta)
    • ItemTrident

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

    • getMaxDurability

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

      Define the maximum durability value of the item

      Overrides:
      getMaxDurability in class Item
    • getAttackDamage

      public int getAttackDamage()
      Description copied from class: Item
      定义物品的攻击伤害

      Define the attackdamage of an item

      Overrides:
      getAttackDamage 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
    • onRelease

      @PowerNukkitDifference(info="Using new method to play sounds", since="1.4.0.0-PN") public boolean onRelease(Player player, int ticksUsed)
      Description copied from class: Item
      当玩家在长时间右键物品后释放物品时,该函数被调用。

      Allows the item to execute code when the player releases the item after long clicking it.

      Overrides:
      onRelease in class Item
      Parameters:
      player - The player who released the click button
      松开按钮的玩家
      ticksUsed - How many ticks the item was held.
      这个物品被使用多少ticks时间
      Returns:
      If an inventory contents update should be sent to the player
      是否要向玩家发送库存内容的更新信息