Class ItemFlintSteel

All Implemented Interfaces:
BlockID, ItemDurable, ItemID, Cloneable

public class ItemFlintSteel extends ItemTool
Author:
MagicDroidX (Nukkit Project)
  • Constructor Details

    • ItemFlintSteel

      public ItemFlintSteel()
    • ItemFlintSteel

      public ItemFlintSteel(Integer meta)
    • ItemFlintSteel

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

    • canBeActivated

      public boolean canBeActivated()
      Overrides:
      canBeActivated in class Item
    • onActivate

      @PowerNukkitDifference(info="Using new method to play sounds", since="1.4.0.0-PN") public boolean onActivate(Level level, Player player, Block block, Block target, BlockFace face, double fx, double fy, double fz)
      Description copied from class: Item
      玩家使用一个物品交互时会调用这个方法

      This method is called when the player interacts with an item

      Overrides:
      onActivate in class Item
      Parameters:
      level - 玩家所在地图
      Player location level
      player - 玩家实例对象
      Player instance object
      target - 交互的目标方块
      Interacting target block
      face - 交互的方向
      Direction of Interaction
      Returns:
    • getMaxDurability

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

      Define the maximum durability value of the item

      Overrides:
      getMaxDurability in class Item
      Returns:
    • useOn

      public boolean useOn(Block block)
      Overrides:
      useOn in class ItemTool