Class ItemCustomEdible

All Implemented Interfaces:
BlockID, ItemID, Cloneable

@PowerNukkitXOnly @Since("1.6.0.0-PNX") public abstract class ItemCustomEdible extends ItemCustom
Author:
lt_name
  • Constructor Details

    • ItemCustomEdible

      public ItemCustomEdible(@Nonnull String id, @Nullable String name)
    • ItemCustomEdible

      public ItemCustomEdible(@Nonnull String id, @Nullable String name, @Nonnull String textureName)
  • Method Details

    • 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 - direction
      Returns:
      item changed
    • onUse

      public boolean onUse(Player player, int ticksUsed)
      Overrides:
      onUse in class Item
    • getEatTick

      public int getEatTick()
    • isDrink

      public boolean isDrink()
    • canAlwaysEat

      public boolean canAlwaysEat()