Class ItemFirework

java.lang.Object
cn.nukkit.item.Item
cn.nukkit.item.ItemFirework
All Implemented Interfaces:
BlockID, ItemID, Cloneable

public class ItemFirework extends Item
Author:
CreeperFace
  • Constructor Details

    • ItemFirework

      public ItemFirework()
    • ItemFirework

      public ItemFirework(Integer meta)
    • ItemFirework

      @PowerNukkitDifference(info="Will not add compound tag automatically") public ItemFirework(Integer meta, int count)
  • Method Details

    • canBeActivated

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

      public boolean onActivate(Level level, Player player, Block block, Block target, BlockFace face, double fx, double fy, double fz)
      Overrides:
      onActivate 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 - direction
      Returns:
      item changed
    • addExplosion

      public void addExplosion(ItemFirework.FireworkExplosion explosion)
    • clearExplosions

      public void clearExplosions()