Class ItemTridentBehavior

All Implemented Interfaces:
org.cloudburstmc.api.item.behavior.ItemBehavior

public class ItemTridentBehavior extends ItemToolBehavior
Created by PetteriM1
  • Constructor Details

    • ItemTridentBehavior

      public ItemTridentBehavior()
  • Method Details

    • getMaxDurability

      public int getMaxDurability()
      Specified by:
      getMaxDurability in interface org.cloudburstmc.api.item.behavior.ItemBehavior
      Overrides:
      getMaxDurability in class CloudItemBehavior
    • isSword

      public boolean isSword()
      Specified by:
      isSword in interface org.cloudburstmc.api.item.behavior.ItemBehavior
      Overrides:
      isSword in class ItemToolBehavior
    • getAttackDamage

      public int getAttackDamage(org.cloudburstmc.api.item.ItemStack item)
      Specified by:
      getAttackDamage in interface org.cloudburstmc.api.item.behavior.ItemBehavior
      Overrides:
      getAttackDamage in class CloudItemBehavior
    • onClickAir

      public boolean onClickAir(org.cloudburstmc.api.item.ItemStack item, com.nukkitx.math.vector.Vector3f directionVector, org.cloudburstmc.api.player.Player player)
      Description copied from class: CloudItemBehavior
      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.
      Specified by:
      onClickAir in interface org.cloudburstmc.api.item.behavior.ItemBehavior
      Overrides:
      onClickAir in class CloudItemBehavior
      directionVector - direction
      player - player
      Returns:
      item changed
    • onRelease

      public org.cloudburstmc.api.item.ItemStack onRelease(org.cloudburstmc.api.item.ItemStack item, int ticksUsed, org.cloudburstmc.api.player.Player player)
      Specified by:
      onRelease in interface org.cloudburstmc.api.item.behavior.ItemBehavior
      Overrides:
      onRelease in class CloudItemBehavior