Class ItemHoneyBottle

All Implemented Interfaces:
BlockID, ItemID, Cloneable

public class ItemHoneyBottle extends ItemEdible
Author:
joserobjr
  • Constructor Details

    • ItemHoneyBottle

      public ItemHoneyBottle()
    • ItemHoneyBottle

      public ItemHoneyBottle(Integer meta)
    • ItemHoneyBottle

      public ItemHoneyBottle(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
      Returns:
    • onClickAir

      @PowerNukkitDifference(since="1.4.0.0-PN", info="Will always return true so it\'s always drinkable") 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 - direction
      Returns:
      item changed
    • onUse

      @PowerNukkitDifference(since="1.4.0.0-PN", info="Cancellable by PlayerItemConsumeEvent and uses the FoodHoney class to handle the food behaviour") public boolean onUse(Player player, int ticksUsed)
      Overrides:
      onUse in class ItemEdible