Class ItemChestBoatBase

java.lang.Object
cn.nukkit.item.Item
cn.nukkit.item.ItemChestBoatBase
All Implemented Interfaces:
BlockID, ItemID, Cloneable
Direct Known Subclasses:
ItemChestBoatAcacia, ItemChestBoatBirch, ItemChestBoatDarkOak, ItemChestBoatJungle, ItemChestBoatMangrove, ItemChestBoatOak, ItemChestBoatSpruce

public abstract class ItemChestBoatBase extends Item
  • Constructor Details

    • ItemChestBoatBase

      public ItemChestBoatBase(int id, Integer meta, int count, String name)
  • Method Details

    • canBeActivated

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

      public abstract int getBoatId()
    • onActivate

      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:
    • getMaxStackSize

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

      Define the maximum number of items to be stacked

      Overrides:
      getMaxStackSize in class Item
      Returns: